From 8f0a065bcceddd150a2c9bce78dac3bc399a0165 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 7 Jun 2022 00:53:56 +0000 Subject: [PATCH] build(deps): bump github.com/go-openapi/validate from 0.20.2 to 0.22.0 Bumps [github.com/go-openapi/validate](https://github.com/go-openapi/validate) from 0.20.2 to 0.22.0. - [Release notes](https://github.com/go-openapi/validate/releases) - [Commits](https://github.com/go-openapi/validate/compare/v0.20.2...v0.22.0) --- updated-dependencies: - dependency-name: github.com/go-openapi/validate dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- go.mod | 11 +- go.sum | 53 +- .../go/compute/metadata/BUILD.bazel | 9 - .../github.com/Azure/go-autorest/BUILD.bazel | 9 - .../Azure/go-autorest/autorest/BUILD.bazel | 31 - .../go-autorest/autorest/adal/BUILD.bazel | 25 - .../go-autorest/autorest/azure/BUILD.bazel | 19 - .../go-autorest/autorest/date/BUILD.bazel | 15 - .../Azure/go-autorest/logger/BUILD.bazel | 9 - .../Azure/go-autorest/tracing/BUILD.bazel | 9 - .../github.com/Masterminds/semver/BUILD.bazel | 14 - .../github.com/PuerkitoBio/purell/BUILD.bazel | 15 - .../github.com/PuerkitoBio/urlesc/BUILD.bazel | 9 - .../asaskevich/govalidator/BUILD.bazel | 19 - .../beorn7/perks/quantile/BUILD.bazel | 9 - vendor/github.com/blang/semver/BUILD.bazel | 15 - .../c9s/goprocinfo/linux/BUILD.bazel | 36 - .../github.com/cespare/xxhash/v2/BUILD.bazel | 15 - vendor/github.com/cilium/ebpf/BUILD.bazel | 27 - vendor/github.com/cilium/ebpf/asm/BUILD.bazel | 24 - .../cilium/ebpf/internal/BUILD.bazel | 26 - .../cilium/ebpf/internal/btf/BUILD.bazel | 23 - .../cilium/ebpf/internal/unix/BUILD.bazel | 21 - .../github.com/cilium/ebpf/link/BUILD.bazel | 29 - .../plugins/pkg/ns/BUILD.bazel | 18 - .../coreos/go-iptables/iptables/BUILD.bazel | 12 - .../coreos/go-semver/semver/BUILD.bazel | 12 - .../coreos/go-systemd/v22/dbus/BUILD.bazel | 17 - .../pkg/apis/monitoring/BUILD.bazel | 9 - .../pkg/apis/monitoring/v1/BUILD.bazel | 23 - .../cyphar/filepath-securejoin/BUILD.bazel | 13 - .../davecgh/go-spew/spew/BUILD.bazel | 18 - .../emicklei/go-restful-openapi/BUILD.bazel | 21 - .../emicklei/go-restful/BUILD.bazel | 40 - .../emicklei/go-restful/log/BUILD.bazel | 9 - .../github.com/evanphx/json-patch/BUILD.bazel | 14 - .../form3tech-oss/jwt-go/BUILD.bazel | 24 - .../github.com/fsnotify/fsnotify/BUILD.bazel | 45 - vendor/github.com/ghodss/yaml/BUILD.bazel | 13 - vendor/github.com/go-kit/kit/log/BUILD.bazel | 19 - .../github.com/go-logfmt/logfmt/BUILD.bazel | 14 - vendor/github.com/go-logr/logr/BUILD.bazel | 12 - .../go-openapi/analysis/.gitattributes | 2 + .../go-openapi/analysis/.golangci.yml | 12 +- .../go-openapi/analysis/.travis.yml | 17 - .../go-openapi/analysis/BUILD.bazel | 24 - .../github.com/go-openapi/analysis/README.md | 1 - .../go-openapi/analysis/analyzer.go | 226 +- .../go-openapi/analysis/appveyor.yml | 2 +- .../github.com/go-openapi/analysis/debug.go | 28 +- .../github.com/go-openapi/analysis/fixer.go | 53 +- .../github.com/go-openapi/analysis/flatten.go | 1769 +- .../go-openapi/analysis/flatten_name.go | 293 + .../go-openapi/analysis/flatten_options.go | 78 + .../go-openapi/analysis/internal/BUILD.bazel | 12 - .../internal/{pre_go18.go => debug/debug.go} | 36 +- .../internal/flatten/normalize/normalize.go | 87 + .../internal/flatten/operations/operations.go | 90 + .../internal/flatten/replace/replace.go | 434 + .../flatten/schutils/flatten_schema.go | 29 + .../analysis/internal/flatten/sortref/keys.go | 201 + .../internal/flatten/sortref/sort_ref.go | 141 + .../go-openapi/analysis/internal/post_go18.go | 29 - .../github.com/go-openapi/analysis/mixin.go | 186 +- .../github.com/go-openapi/analysis/schema.go | 60 +- .../github.com/go-openapi/errors/BUILD.bazel | 17 - .../go-openapi/jsonpointer/BUILD.bazel | 10 - .../go-openapi/jsonreference/BUILD.bazel | 13 - .../github.com/go-openapi/loads/.travis.yml | 5 +- .../github.com/go-openapi/loads/BUILD.bazel | 19 - vendor/github.com/go-openapi/loads/README.md | 2 +- .../github.com/go-openapi/runtime/BUILD.bazel | 32 - .../go-openapi/runtime/client/BUILD.bazel | 22 - .../go-openapi/runtime/logger/BUILD.bazel | 12 - .../go-openapi/runtime/middleware/BUILD.bazel | 41 - .../runtime/middleware/denco/BUILD.bazel | 13 - .../runtime/middleware/header/BUILD.bazel | 9 - .../runtime/middleware/untyped/BUILD.bazel | 17 - .../go-openapi/runtime/security/BUILD.bazel | 16 - .../go-openapi/runtime/yamlpc/BUILD.bazel | 13 - vendor/github.com/go-openapi/spec/.travis.yml | 2 +- vendor/github.com/go-openapi/spec/BUILD.bazel | 46 - .../go-openapi/spec/schema_loader.go | 9 +- .../go-openapi/strfmt/.gitattributes | 2 + .../github.com/go-openapi/strfmt/.travis.yml | 31 - .../github.com/go-openapi/strfmt/BUILD.bazel | 25 - vendor/github.com/go-openapi/strfmt/README.md | 2 + vendor/github.com/go-openapi/strfmt/bson.go | 6 +- vendor/github.com/go-openapi/strfmt/format.go | 63 +- vendor/github.com/go-openapi/strfmt/time.go | 9 +- vendor/github.com/go-openapi/strfmt/ulid.go | 225 + vendor/github.com/go-openapi/swag/BUILD.bazel | 31 - .../go-openapi/validate/.gitattributes | 2 + .../go-openapi/validate/.golangci.yml | 12 +- .../go-openapi/validate/.travis.yml | 52 - .../go-openapi/validate/BUILD.bazel | 41 - .../github.com/go-openapi/validate/context.go | 2 +- .../go-openapi/validate/default_validator.go | 2 +- .../go-openapi/validate/example_validator.go | 2 +- .../github.com/go-openapi/validate/helpers.go | 4 +- .../go-openapi/validate/schema_props.go | 2 +- vendor/github.com/go-openapi/validate/spec.go | 11 +- vendor/github.com/go-openapi/validate/type.go | 3 +- .../github.com/go-openapi/validate/values.go | 2 +- vendor/github.com/go-stack/stack/BUILD.bazel | 9 - .../github.com/go-task/slim-sprig/BUILD.bazel | 23 - vendor/github.com/godbus/dbus/v5/BUILD.bazel | 48 - .../gogo/protobuf/gogoproto/BUILD.bazel | 17 - .../gogo/protobuf/proto/BUILD.bazel | 44 - .../protoc-gen-gogo/descriptor/BUILD.bazel | 15 - .../gogo/protobuf/sortkeys/BUILD.bazel | 9 - vendor/github.com/golang/glog | 1 - .../golang/glog}/BUILD.bazel | 6 +- vendor/github.com/golang/glog/glog.go | 427 + .../golang/groupcache/lru/BUILD.bazel | 9 - .../github.com/golang/mock/gomock/BUILD.bazel | 14 - .../golang/protobuf/proto/BUILD.bazel | 32 - .../golang/protobuf/ptypes/BUILD.bazel | 22 - .../golang/protobuf/ptypes/any/BUILD.bazel | 14 - .../protobuf/ptypes/duration/BUILD.bazel | 14 - .../protobuf/ptypes/timestamp/BUILD.bazel | 14 - .../github.com/google/go-cmp/cmp/BUILD.bazel | 27 - .../go-cmp/cmp/internal/diff/BUILD.bazel | 13 - .../go-cmp/cmp/internal/flags/BUILD.bazel | 13 - .../go-cmp/cmp/internal/function/BUILD.bazel | 9 - .../go-cmp/cmp/internal/value/BUILD.bazel | 14 - .../google/go-github/v32/github/BUILD.bazel | 113 - .../google/go-querystring/query/BUILD.bazel | 9 - vendor/github.com/google/goexpect/BUILD.bazel | 14 - vendor/github.com/google/gofuzz/BUILD.bazel | 12 - .../github.com/google/goterm/term/BUILD.bazel | 13 - .../google/pprof/profile/BUILD.bazel | 19 - vendor/github.com/google/renameio/BUILD.bazel | 13 - vendor/github.com/google/uuid/BUILD.bazel | 24 - .../googleapis/gnostic/compiler/BUILD.bazel | 23 - .../googleapis/gnostic/extensions/BUILD.bazel | 19 - .../googleapis/gnostic/jsonschema/BUILD.bazel | 17 - .../googleapis/gnostic/openapiv2/BUILD.bazel | 20 - .../ineffassign/pkg/ineffassign/BUILD.bazel | 11 - .../github.com/gorilla/websocket/BUILD.bazel | 24 - vendor/github.com/imdario/mergo/BUILD.bazel | 14 - .../inconshreveable/mousetrap/BUILD.bazel | 13 - .../insomniacslk/dhcp/dhcpv4/BUILD.bazel | 37 - .../insomniacslk/dhcp/dhcpv6/BUILD.bazel | 54 - .../dhcp/dhcpv6/server6/BUILD.bazel | 19 - .../insomniacslk/dhcp/iana/BUILD.bazel | 15 - .../insomniacslk/dhcp/interfaces/BUILD.bazel | 22 - .../dhcp/rfc1035label/BUILD.bazel | 9 - .../github.com/josharian/intern/BUILD.bazel | 9 - .../github.com/json-iterator/go/BUILD.bazel | 56 - .../pkg/apis/k8s.cni.cncf.io/BUILD.bazel | 9 - vendor/github.com/krolaw/dhcp4/BUILD.bazel | 21 - .../github.com/krolaw/dhcp4/conn/BUILD.bazel | 13 - .../v4/apis/volumesnapshot/v1/BUILD.bazel | 21 - .../mailru/easyjson/buffer/BUILD.bazel | 9 - .../mailru/easyjson/jlexer/BUILD.bazel | 14 - .../mailru/easyjson/jwriter/BUILD.bazel | 10 - .../github.com/mattn/go-runewidth/BUILD.bazel | 15 - .../pbutil/BUILD.bazel | 14 - vendor/github.com/mitchellh/go-ps/BUILD.bazel | 17 - .../github.com/mitchellh/go-vnc/BUILD.bazel | 17 - .../mitchellh/mapstructure/BUILD.bazel | 13 - vendor/github.com/moby/spdystream/BUILD.bazel | 16 - .../moby/spdystream/spdy/BUILD.bazel | 14 - .../github.com/moby/sys/mountinfo/BUILD.bazel | 35 - .../modern-go/concurrent/BUILD.bazel | 15 - .../github.com/modern-go/reflect2/BUILD.bazel | 40 - vendor/github.com/oklog/ulid/.gitignore | 29 + vendor/github.com/oklog/ulid/.travis.yml | 16 + vendor/github.com/oklog/ulid/AUTHORS.md | 2 + vendor/github.com/oklog/ulid/CHANGELOG.md | 33 + vendor/github.com/oklog/ulid/CONTRIBUTING.md | 17 + vendor/github.com/oklog/ulid/Gopkg.lock | 15 + vendor/github.com/oklog/ulid/Gopkg.toml | 26 + vendor/github.com/oklog/ulid/LICENSE | 201 + vendor/github.com/oklog/ulid/README.md | 150 + vendor/github.com/oklog/ulid/ulid.go | 614 + vendor/github.com/onsi/ginkgo/v2/BUILD.bazel | 26 - .../onsi/ginkgo/v2/config/BUILD.bazel | 9 - .../onsi/ginkgo/v2/formatter/BUILD.bazel | 13 - .../onsi/ginkgo/v2/ginkgo/BUILD.bazel | 26 - .../onsi/ginkgo/v2/ginkgo/build/BUILD.bazel | 14 - .../onsi/ginkgo/v2/ginkgo/command/BUILD.bazel | 17 - .../ginkgo/v2/ginkgo/generators/BUILD.bazel | 21 - .../ginkgo/v2/ginkgo/internal/BUILD.bazel | 23 - .../onsi/ginkgo/v2/ginkgo/labels/BUILD.bazel | 15 - .../onsi/ginkgo/v2/ginkgo/outline/BUILD.bazel | 19 - .../onsi/ginkgo/v2/ginkgo/run/BUILD.bazel | 16 - .../onsi/ginkgo/v2/ginkgo/unfocus/BUILD.bazel | 10 - .../onsi/ginkgo/v2/ginkgo/watch/BUILD.bazel | 24 - .../onsi/ginkgo/v2/internal/BUILD.bazel | 60 - .../ginkgo/v2/internal/global/BUILD.bazel | 10 - .../v2/internal/interrupt_handler/BUILD.bazel | 17 - .../v2/internal/parallel_support/BUILD.bazel | 20 - .../v2/internal/testingtproxy/BUILD.bazel | 13 - .../onsi/ginkgo/v2/reporters/BUILD.bazel | 21 - .../onsi/ginkgo/v2/types/BUILD.bazel | 23 - vendor/github.com/onsi/gomega/BUILD.bazel | 17 - .../github.com/onsi/gomega/format/BUILD.bazel | 9 - .../github.com/onsi/gomega/ghttp/BUILD.bazel | 17 - .../onsi/gomega/gmeasure/BUILD.bazel | 18 - .../onsi/gomega/gmeasure/table/BUILD.bazel | 9 - .../onsi/gomega/gstruct/BUILD.bazel | 21 - .../onsi/gomega/gstruct/errors/BUILD.bazel | 10 - .../onsi/gomega/internal/BUILD.bazel | 15 - .../onsi/gomega/matchers/BUILD.bazel | 65 - .../support/goraph/bipartitegraph/BUILD.bazel | 17 - .../matchers/support/goraph/edge/BUILD.bazel | 10 - .../matchers/support/goraph/node/BUILD.bazel | 9 - .../matchers/support/goraph/util/BUILD.bazel | 9 - .../github.com/onsi/gomega/types/BUILD.bazel | 9 - .../runc/libcontainer/cgroups/BUILD.bazel | 33 - .../libcontainer/cgroups/devices/BUILD.bazel | 20 - .../libcontainer/cgroups/ebpf/BUILD.bazel | 28 - .../cgroups/ebpf/devicefilter/BUILD.bazel | 16 - .../runc/libcontainer/cgroups/fs/BUILD.bazel | 52 - .../runc/libcontainer/cgroups/fs2/BUILD.bazel | 47 - .../libcontainer/cgroups/fscommon/BUILD.bazel | 18 - .../runc/libcontainer/configs/BUILD.bazel | 41 - .../runc/libcontainer/devices/BUILD.bazel | 54 - .../runc/libcontainer/user/BUILD.bazel | 42 - .../runc/libcontainer/userns/BUILD.bazel | 58 - .../runc/libcontainer/utils/BUILD.bazel | 17 - .../runtime-spec/specs-go/BUILD.bazel | 13 - .../selinux/go-selinux/BUILD.bazel | 30 - .../selinux/pkg/pwalk/BUILD.bazel | 10 - .../openshift/api/config/v1/BUILD.bazel | 40 - .../openshift/api/operator/v1/BUILD.bazel | 37 - .../openshift/api/security/v1/BUILD.bazel | 25 - .../versioned/typed/security/v1/BUILD.bazel | 26 - .../typed/security/v1/fake/BUILD.bazel | 28 - .../conditions/v1/BUILD.bazel | 18 - .../resource/resourcemerge/BUILD.bazel | 31 - .../go-appr/appregistry/BUILD.bazel | 19 - .../go-appr/appregistry/appr/BUILD.bazel | 23 - .../go-appr/appregistry/blobs/BUILD.bazel | 23 - .../go-appr/appregistry/channel/BUILD.bazel | 31 - .../go-appr/appregistry/info/BUILD.bazel | 21 - .../appregistry/package_appr/BUILD.bazel | 32 - .../go-appr/models/BUILD.bazel | 26 - .../pkg/api/apis/operators/BUILD.bazel | 12 - .../api/apis/operators/v1alpha1/BUILD.bazel | 28 - .../pkg/apis/operators/shared/BUILD.bazel | 16 - .../pkg/apis/operators/v1/BUILD.bazel | 21 - .../pkg/appregistry/BUILD.bazel | 27 - .../pkg/datastore/BUILD.bazel | 18 - vendor/github.com/pborman/uuid/BUILD.bazel | 22 - vendor/github.com/pkg/diff/BUILD.bazel | 17 - vendor/github.com/pkg/errors/BUILD.bazel | 13 - vendor/github.com/povsister/scp/BUILD.bazel | 16 - .../prometheus/client_golang/api/BUILD.bazel | 9 - .../api/prometheus/v1/BUILD.bazel | 14 - .../client_golang/prometheus/BUILD.bazel | 86 - .../prometheus/internal/BUILD.bazel | 10 - .../prometheus/promhttp/BUILD.bazel | 20 - .../prometheus/testutil/BUILD.bazel | 19 - .../prometheus/testutil/promlint/BUILD.bazel | 13 - .../prometheus/client_model/go/BUILD.bazel | 13 - .../prometheus/common/expfmt/BUILD.bazel | 24 - .../bitbucket.org/ww/goautoneg/BUILD.bazel | 9 - .../prometheus/common/model/BUILD.bazel | 21 - .../github.com/prometheus/procfs/BUILD.bazel | 94 - .../prometheus/procfs/internal/fs/BUILD.bazel | 9 - .../procfs/internal/util/BUILD.bazel | 15 - vendor/github.com/sirupsen/logrus/BUILD.bazel | 65 - vendor/github.com/spf13/cobra/BUILD.bazel | 30 - vendor/github.com/spf13/pflag/BUILD.bazel | 46 - .../u-root/u-root/pkg/cmdline/BUILD.bazel | 13 - .../u-root/u-root/pkg/rand/BUILD.bazel | 51 - .../u-root/u-root/pkg/shlex/BUILD.bazel | 9 - .../u-root/u-root/pkg/ubinary/BUILD.bazel | 13 - .../u-root/u-root/pkg/uio/BUILD.bazel | 22 - .../vishvananda/netlink/BUILD.bazel | 111 - .../vishvananda/netlink/nl/BUILD.bazel | 42 - .../github.com/vishvananda/netns/BUILD.bazel | 14 - .../github.com/wadey/gocovmerge/BUILD.bazel | 16 - vendor/github.com/willf/bitset/BUILD.bazel | 18 - .../mongo-driver/bson/BUILD.bazel | 29 - .../mongo-driver/bson/bsoncodec/BUILD.bazel | 37 - .../mongo-driver/bson/bsonoptions/BUILD.bazel | 18 - .../mongo-driver/bson/bsonrw/BUILD.bazel | 28 - .../mongo-driver/bson/bsontype/BUILD.bazel | 9 - .../mongo-driver/bson/primitive/BUILD.bazel | 13 - .../mongo-driver/x/bsonx/bsoncore/BUILD.bazel | 24 - .../golang.org/x/crypto/blowfish/BUILD.bazel | 13 - vendor/golang.org/x/crypto/cast5/BUILD.bazel | 9 - .../golang.org/x/crypto/chacha20/BUILD.bazel | 27 - .../x/crypto/curve25519/BUILD.bazel | 10 - .../curve25519/internal/field/BUILD.bazel | 18 - .../golang.org/x/crypto/ed25519/BUILD.bazel | 9 - .../x/crypto/internal/poly1305/BUILD.bazel | 27 - .../x/crypto/internal/subtle/BUILD.bazel | 9 - .../golang.org/x/crypto/openpgp/BUILD.bazel | 20 - .../x/crypto/openpgp/armor/BUILD.bazel | 13 - .../x/crypto/openpgp/elgamal/BUILD.bazel | 9 - .../x/crypto/openpgp/errors/BUILD.bazel | 9 - .../x/crypto/openpgp/packet/BUILD.bazel | 34 - .../x/crypto/openpgp/s2k/BUILD.bazel | 10 - vendor/golang.org/x/crypto/pkcs12/BUILD.bazel | 18 - .../x/crypto/pkcs12/internal/rc2/BUILD.bazel | 9 - vendor/golang.org/x/crypto/ssh/BUILD.bazel | 38 - .../golang.org/x/crypto/ssh/agent/BUILD.bazel | 18 - .../ssh/internal/bcrypt_pbkdf/BUILD.bazel | 10 - .../x/crypto/ssh/knownhosts/BUILD.bazel | 10 - .../x/crypto/ssh/terminal/BUILD.bazel | 10 - vendor/golang.org/x/net/bpf/BUILD.bazel | 17 - vendor/golang.org/x/net/context/BUILD.bazel | 15 - .../x/net/context/ctxhttp/BUILD.bazel | 9 - vendor/golang.org/x/net/html/BUILD.bazel | 21 - vendor/golang.org/x/net/html/atom/BUILD.bazel | 12 - .../golang.org/x/net/html/charset/BUILD.bazel | 16 - .../x/net/http/httpguts/BUILD.bazel | 13 - vendor/golang.org/x/net/http2/BUILD.bazel | 38 - .../golang.org/x/net/http2/hpack/BUILD.bazel | 14 - vendor/golang.org/x/net/idna/BUILD.bazel | 27 - .../x/net/internal/iana/BUILD.bazel | 9 - .../x/net/internal/socket/BUILD.bazel | 140 - .../x/net/internal/timeseries/BUILD.bazel | 9 - vendor/golang.org/x/net/ipv4/BUILD.bazel | 88 - vendor/golang.org/x/net/ipv6/BUILD.bazel | 87 - vendor/golang.org/x/net/trace/BUILD.bazel | 14 - vendor/golang.org/x/oauth2/BUILD.bazel | 14 - .../x/oauth2/authhandler/BUILD.bazel | 10 - vendor/golang.org/x/oauth2/google/BUILD.bazel | 26 - .../internal/externalaccount/BUILD.bazel | 19 - .../golang.org/x/oauth2/internal/BUILD.bazel | 15 - vendor/golang.org/x/oauth2/jws/BUILD.bazel | 9 - vendor/golang.org/x/oauth2/jwt/BUILD.bazel | 14 - vendor/golang.org/x/sys/cpu/BUILD.bazel | 43 - .../x/sys/internal/unsafeheader/BUILD.bazel | 9 - vendor/golang.org/x/sys/plan9/BUILD.bazel | 35 - vendor/golang.org/x/sys/unix/BUILD.bazel | 288 - vendor/golang.org/x/sys/windows/BUILD.bazel | 38 - vendor/golang.org/x/term/BUILD.bazel | 57 - vendor/golang.org/x/text/encoding/BUILD.bazel | 13 - .../x/text/encoding/charmap/BUILD.bazel | 18 - .../x/text/encoding/htmlindex/BUILD.bazel | 24 - .../x/text/encoding/internal/BUILD.bazel | 14 - .../encoding/internal/identifier/BUILD.bazel | 12 - .../x/text/encoding/japanese/BUILD.bazel | 21 - .../x/text/encoding/korean/BUILD.bazel | 18 - .../encoding/simplifiedchinese/BUILD.bazel | 20 - .../encoding/traditionalchinese/BUILD.bazel | 18 - .../x/text/encoding/unicode/BUILD.bazel | 20 - .../x/text/internal/language/BUILD.bazel | 21 - .../internal/language/compact/BUILD.bazel | 16 - .../x/text/internal/tag/BUILD.bazel | 9 - .../x/text/internal/utf8internal/BUILD.bazel | 9 - vendor/golang.org/x/text/language/BUILD.bazel | 23 - vendor/golang.org/x/text/runes/BUILD.bazel | 13 - .../x/text/secure/bidirule/BUILD.bazel | 17 - .../golang.org/x/text/transform/BUILD.bazel | 9 - .../x/text/unicode/bidi/BUILD.bazel | 20 - .../x/text/unicode/norm/BUILD.bazel | 24 - vendor/golang.org/x/text/width/BUILD.bazel | 20 - vendor/golang.org/x/tools/cover/BUILD.bazel | 9 - .../x/tools/go/analysis/BUILD.bazel | 15 - .../x/tools/go/ast/astutil/BUILD.bazel | 15 - .../x/tools/go/ast/inspector/BUILD.bazel | 13 - .../internal/analysisinternal/BUILD.bazel | 13 - .../x/tools/internal/lsp/fuzzy/BUILD.bazel | 13 - .../x/tools/internal/typeparams/BUILD.bazel | 18 - .../google.golang.org/appengine/BUILD.bazel | 23 - .../appengine/internal/BUILD.bazel | 29 - .../internal/app_identity/BUILD.bazel | 10 - .../appengine/internal/base/BUILD.bazel | 10 - .../appengine/internal/datastore/BUILD.bazel | 10 - .../appengine/internal/log/BUILD.bazel | 10 - .../appengine/internal/modules/BUILD.bazel | 10 - .../appengine/internal/remote_api/BUILD.bazel | 10 - .../appengine/internal/urlfetch/BUILD.bazel | 10 - .../appengine/urlfetch/BUILD.bazel | 15 - .../googleapis/rpc/status/BUILD.bazel | 14 - .../protobuf/encoding/prototext/BUILD.bazel | 28 - .../protobuf/encoding/protowire/BUILD.bazel | 10 - .../protobuf/internal/descfmt/BUILD.bazel | 14 - .../protobuf/internal/descopts/BUILD.bazel | 10 - .../protobuf/internal/detrand/BUILD.bazel | 9 - .../internal/encoding/defval/BUILD.bazel | 14 - .../internal/encoding/messageset/BUILD.bazel | 14 - .../internal/encoding/tag/BUILD.bazel | 15 - .../internal/encoding/text/BUILD.bazel | 22 - .../protobuf/internal/errors/BUILD.bazel | 14 - .../protobuf/internal/filedesc/BUILD.bazel | 31 - .../protobuf/internal/filetype/BUILD.bazel | 16 - .../protobuf/internal/flags/BUILD.bazel | 12 - .../protobuf/internal/genid/BUILD.bazel | 26 - .../protobuf/internal/impl/BUILD.bazel | 62 - .../protobuf/internal/order/BUILD.bazel | 13 - .../protobuf/internal/pragma/BUILD.bazel | 9 - .../protobuf/internal/set/BUILD.bazel | 9 - .../protobuf/internal/strs/BUILD.bazel | 16 - .../protobuf/internal/version/BUILD.bazel | 9 - .../protobuf/proto/BUILD.bazel | 39 - .../protobuf/reflect/protodesc/BUILD.bazel | 29 - .../protobuf/reflect/protoreflect/BUILD.bazel | 22 - .../reflect/protoregistry/BUILD.bazel | 15 - .../protobuf/runtime/protoiface/BUILD.bazel | 16 - .../protobuf/runtime/protoimpl/BUILD.bazel | 18 - .../protobuf/types/descriptorpb/BUILD.bazel | 13 - .../protobuf/types/known/anypb/BUILD.bazel | 15 - .../types/known/durationpb/BUILD.bazel | 13 - .../types/known/timestamppb/BUILD.bazel | 13 - vendor/gopkg.in/cheggaaa/pb.v1/BUILD.bazel | 54 - vendor/gopkg.in/yaml.v2/BUILD.bazel | 23 - vendor/gopkg.in/yaml.v3/BUILD.bazel | 23 - vendor/k8s.io/api/admission/v1/BUILD.bazel | 25 - .../api/admissionregistration/v1/BUILD.bazel | 22 - .../admissionregistration/v1beta1/BUILD.bazel | 23 - .../apiserverinternal/v1alpha1/BUILD.bazel | 22 - vendor/k8s.io/api/apps/v1/BUILD.bazel | 24 - vendor/k8s.io/api/apps/v1beta1/BUILD.bazel | 26 - vendor/k8s.io/api/apps/v1beta2/BUILD.bazel | 26 - .../k8s.io/api/authentication/v1/BUILD.bazel | 24 - .../api/authentication/v1beta1/BUILD.bazel | 24 - .../k8s.io/api/authorization/v1/BUILD.bazel | 23 - .../api/authorization/v1beta1/BUILD.bazel | 24 - vendor/k8s.io/api/autoscaling/v1/BUILD.bazel | 24 - .../api/autoscaling/v2beta1/BUILD.bazel | 25 - .../api/autoscaling/v2beta2/BUILD.bazel | 25 - vendor/k8s.io/api/batch/v1beta1/BUILD.bazel | 25 - vendor/k8s.io/api/certificates/v1/BUILD.bazel | 24 - .../api/certificates/v1beta1/BUILD.bazel | 25 - .../api/coordination/v1beta1/BUILD.bazel | 23 - vendor/k8s.io/api/core/v1/BUILD.bazel | 34 - vendor/k8s.io/api/discovery/v1/BUILD.bazel | 25 - .../k8s.io/api/discovery/v1beta1/BUILD.bazel | 26 - vendor/k8s.io/api/events/v1beta1/BUILD.bazel | 24 - .../k8s.io/api/extensions/v1beta1/BUILD.bazel | 27 - .../api/flowcontrol/v1alpha1/BUILD.bazel | 23 - .../api/flowcontrol/v1beta1/BUILD.bazel | 23 - .../api/flowcontrol/v1beta2/BUILD.bazel | 23 - vendor/k8s.io/api/networking/v1/BUILD.bazel | 25 - .../k8s.io/api/networking/v1beta1/BUILD.bazel | 26 - vendor/k8s.io/api/node/v1/BUILD.bazel | 25 - vendor/k8s.io/api/node/v1alpha1/BUILD.bazel | 25 - vendor/k8s.io/api/node/v1beta1/BUILD.bazel | 26 - vendor/k8s.io/api/policy/v1/BUILD.bazel | 24 - vendor/k8s.io/api/policy/v1beta1/BUILD.bazel | 26 - vendor/k8s.io/api/rbac/v1/BUILD.bazel | 22 - vendor/k8s.io/api/rbac/v1alpha1/BUILD.bazel | 22 - vendor/k8s.io/api/rbac/v1beta1/BUILD.bazel | 23 - vendor/k8s.io/api/scheduling/v1/BUILD.bazel | 23 - .../api/scheduling/v1alpha1/BUILD.bazel | 23 - .../k8s.io/api/scheduling/v1beta1/BUILD.bazel | 24 - vendor/k8s.io/api/storage/v1/BUILD.bazel | 24 - .../k8s.io/api/storage/v1alpha1/BUILD.bazel | 26 - vendor/k8s.io/api/storage/v1beta1/BUILD.bazel | 26 - .../pkg/apis/apiextensions/BUILD.bazel | 22 - .../pkg/apis/apiextensions/v1/BUILD.bazel | 35 - .../apis/apiextensions/v1beta1/BUILD.bazel | 35 - .../client/clientset/clientset/BUILD.bazel | 19 - .../clientset/clientset/fake/BUILD.bazel | 31 - .../typed/apiextensions/v1/BUILD.bazel | 22 - .../typed/apiextensions/v1/fake/BUILD.bazel | 24 - .../typed/apiextensions/v1beta1/BUILD.bazel | 22 - .../apimachinery/pkg/api/equality/BUILD.bazel | 16 - .../apimachinery/pkg/api/errors/BUILD.bazel | 18 - .../apimachinery/pkg/api/meta/BUILD.bazel | 31 - .../apimachinery/pkg/api/resource/BUILD.bazel | 22 - .../pkg/apis/meta/internalversion/BUILD.bazel | 24 - .../apimachinery/pkg/apis/meta/v1/BUILD.bazel | 49 - .../pkg/apis/meta/v1/unstructured/BUILD.bazel | 23 - .../pkg/apis/meta/v1beta1/BUILD.bazel | 26 - .../apimachinery/pkg/conversion/BUILD.bazel | 15 - .../pkg/conversion/queryparams/BUILD.bazel | 12 - .../apimachinery/pkg/fields/BUILD.bazel | 15 - .../apimachinery/pkg/labels/BUILD.bazel | 22 - .../apimachinery/pkg/runtime/BUILD.bazel | 43 - .../pkg/runtime/schema/BUILD.bazel | 14 - .../pkg/runtime/serializer/BUILD.bazel | 20 - .../pkg/runtime/serializer/json/BUILD.bazel | 22 - .../runtime/serializer/protobuf/BUILD.bazel | 20 - .../runtime/serializer/recognizer/BUILD.bazel | 13 - .../runtime/serializer/streaming/BUILD.bazel | 13 - .../runtime/serializer/versioning/BUILD.bazel | 15 - .../apimachinery/pkg/selection/BUILD.bazel | 9 - .../k8s.io/apimachinery/pkg/types/BUILD.bazel | 15 - .../apimachinery/pkg/util/cache/BUILD.bazel | 13 - .../apimachinery/pkg/util/clock/BUILD.bazel | 9 - .../apimachinery/pkg/util/diff/BUILD.bazel | 13 - .../apimachinery/pkg/util/errors/BUILD.bazel | 13 - .../apimachinery/pkg/util/framer/BUILD.bazel | 9 - .../pkg/util/httpstream/BUILD.bazel | 12 - .../pkg/util/httpstream/spdy/BUILD.bazel | 25 - .../apimachinery/pkg/util/intstr/BUILD.bazel | 18 - .../apimachinery/pkg/util/json/BUILD.bazel | 10 - .../pkg/util/managedfields/BUILD.bazel | 23 - .../pkg/util/mergepatch/BUILD.bazel | 16 - .../apimachinery/pkg/util/naming/BUILD.bazel | 9 - .../apimachinery/pkg/util/net/BUILD.bazel | 21 - .../apimachinery/pkg/util/rand/BUILD.bazel | 9 - .../pkg/util/remotecommand/BUILD.bazel | 10 - .../apimachinery/pkg/util/runtime/BUILD.bazel | 10 - .../apimachinery/pkg/util/sets/BUILD.bazel | 17 - .../pkg/util/strategicpatch/BUILD.bazel | 21 - .../apimachinery/pkg/util/uuid/BUILD.bazel | 13 - .../pkg/util/validation/BUILD.bazel | 13 - .../pkg/util/validation/field/BUILD.bazel | 16 - .../apimachinery/pkg/util/wait/BUILD.bazel | 16 - .../apimachinery/pkg/util/yaml/BUILD.bazel | 13 - .../apimachinery/pkg/version/BUILD.bazel | 13 - .../k8s.io/apimachinery/pkg/watch/BUILD.bazel | 23 - .../forked/golang/json/BUILD.bazel | 9 - .../forked/golang/netutil/BUILD.bazel | 9 - .../forked/golang/reflect/BUILD.bazel | 9 - .../admissionregistration/v1/BUILD.bazel | 26 - .../admissionregistration/v1beta1/BUILD.bazel | 26 - .../apiserverinternal/v1alpha1/BUILD.bazel | 22 - .../applyconfigurations/apps/v1/BUILD.bazel | 46 - .../apps/v1beta1/BUILD.bazel | 37 - .../apps/v1beta2/BUILD.bazel | 47 - .../autoscaling/v1/BUILD.bazel | 25 - .../autoscaling/v2/BUILD.bazel | 44 - .../autoscaling/v2beta1/BUILD.bazel | 37 - .../autoscaling/v2beta2/BUILD.bazel | 43 - .../applyconfigurations/batch/v1/BUILD.bazel | 29 - .../batch/v1beta1/BUILD.bazel | 24 - .../certificates/v1/BUILD.bazel | 23 - .../certificates/v1beta1/BUILD.bazel | 23 - .../coordination/v1/BUILD.bazel | 20 - .../coordination/v1beta1/BUILD.bazel | 20 - .../applyconfigurations/core/v1/BUILD.bazel | 197 - .../discovery/v1/BUILD.bazel | 26 - .../discovery/v1beta1/BUILD.bazel | 26 - .../applyconfigurations/events/v1/BUILD.bazel | 21 - .../events/v1beta1/BUILD.bazel | 21 - .../extensions/v1beta1/BUILD.bazel | 68 - .../flowcontrol/v1alpha1/BUILD.bazel | 38 - .../flowcontrol/v1beta1/BUILD.bazel | 38 - .../flowcontrol/v1beta2/BUILD.bazel | 38 - .../applyconfigurations/internal/BUILD.bazel | 10 - .../applyconfigurations/meta/v1/BUILD.bazel | 30 - .../networking/v1/BUILD.bazel | 42 - .../networking/v1beta1/BUILD.bazel | 32 - .../applyconfigurations/node/v1/BUILD.bazel | 23 - .../node/v1alpha1/BUILD.bazel | 24 - .../node/v1beta1/BUILD.bazel | 23 - .../applyconfigurations/policy/v1/BUILD.bazel | 23 - .../policy/v1beta1/BUILD.bazel | 38 - .../applyconfigurations/rbac/v1/BUILD.bazel | 26 - .../rbac/v1alpha1/BUILD.bazel | 26 - .../rbac/v1beta1/BUILD.bazel | 26 - .../scheduling/v1/BUILD.bazel | 18 - .../scheduling/v1alpha1/BUILD.bazel | 18 - .../scheduling/v1beta1/BUILD.bazel | 18 - .../storage/v1/BUILD.bazel | 33 - .../storage/v1alpha1/BUILD.bazel | 26 - .../storage/v1beta1/BUILD.bazel | 35 - vendor/k8s.io/client-go/discovery/BUILD.bazel | 27 - .../client-go/discovery/fake/BUILD.bazel | 19 - vendor/k8s.io/client-go/dynamic/BUILD.bazel | 25 - .../k8s.io/client-go/dynamic/fake/BUILD.bazel | 22 - vendor/k8s.io/client-go/informers/BUILD.bazel | 79 - .../admissionregistration/BUILD.bazel | 14 - .../admissionregistration/v1/BUILD.bazel | 23 - .../admissionregistration/v1beta1/BUILD.bazel | 23 - .../informers/apiserverinternal/BUILD.bazel | 13 - .../apiserverinternal/v1alpha1/BUILD.bazel | 22 - .../client-go/informers/apps/BUILD.bazel | 15 - .../client-go/informers/apps/v1/BUILD.bazel | 26 - .../informers/apps/v1beta1/BUILD.bazel | 24 - .../informers/apps/v1beta2/BUILD.bazel | 26 - .../informers/autoscaling/BUILD.bazel | 16 - .../informers/autoscaling/v1/BUILD.bazel | 22 - .../informers/autoscaling/v2/BUILD.bazel | 22 - .../informers/autoscaling/v2beta1/BUILD.bazel | 22 - .../informers/autoscaling/v2beta2/BUILD.bazel | 22 - .../client-go/informers/batch/BUILD.bazel | 14 - .../client-go/informers/batch/v1/BUILD.bazel | 23 - .../informers/batch/v1beta1/BUILD.bazel | 22 - .../informers/certificates/BUILD.bazel | 14 - .../informers/certificates/v1/BUILD.bazel | 22 - .../certificates/v1beta1/BUILD.bazel | 22 - .../informers/coordination/BUILD.bazel | 14 - .../informers/coordination/v1/BUILD.bazel | 22 - .../coordination/v1beta1/BUILD.bazel | 22 - .../client-go/informers/core/BUILD.bazel | 13 - .../client-go/informers/core/v1/BUILD.bazel | 37 - .../client-go/informers/discovery/BUILD.bazel | 14 - .../informers/discovery/v1/BUILD.bazel | 22 - .../informers/discovery/v1beta1/BUILD.bazel | 22 - .../client-go/informers/events/BUILD.bazel | 14 - .../client-go/informers/events/v1/BUILD.bazel | 22 - .../informers/events/v1beta1/BUILD.bazel | 22 - .../informers/extensions/BUILD.bazel | 13 - .../informers/extensions/v1beta1/BUILD.bazel | 27 - .../informers/flowcontrol/BUILD.bazel | 15 - .../flowcontrol/v1alpha1/BUILD.bazel | 23 - .../informers/flowcontrol/v1beta1/BUILD.bazel | 23 - .../informers/flowcontrol/v1beta2/BUILD.bazel | 23 - .../informers/internalinterfaces/BUILD.bazel | 15 - .../informers/networking/BUILD.bazel | 14 - .../informers/networking/v1/BUILD.bazel | 24 - .../informers/networking/v1beta1/BUILD.bazel | 23 - .../client-go/informers/node/BUILD.bazel | 15 - .../client-go/informers/node/v1/BUILD.bazel | 22 - .../informers/node/v1alpha1/BUILD.bazel | 22 - .../informers/node/v1beta1/BUILD.bazel | 22 - .../client-go/informers/policy/BUILD.bazel | 14 - .../client-go/informers/policy/v1/BUILD.bazel | 22 - .../informers/policy/v1beta1/BUILD.bazel | 23 - .../client-go/informers/rbac/BUILD.bazel | 15 - .../client-go/informers/rbac/v1/BUILD.bazel | 25 - .../informers/rbac/v1alpha1/BUILD.bazel | 25 - .../informers/rbac/v1beta1/BUILD.bazel | 25 - .../informers/scheduling/BUILD.bazel | 15 - .../informers/scheduling/v1/BUILD.bazel | 22 - .../informers/scheduling/v1alpha1/BUILD.bazel | 22 - .../informers/scheduling/v1beta1/BUILD.bazel | 22 - .../client-go/informers/storage/BUILD.bazel | 15 - .../informers/storage/v1/BUILD.bazel | 25 - .../informers/storage/v1alpha1/BUILD.bazel | 23 - .../informers/storage/v1beta1/BUILD.bazel | 26 - .../k8s.io/client-go/kubernetes/BUILD.bazel | 63 - .../client-go/kubernetes/fake/BUILD.bazel | 160 - .../client-go/kubernetes/scheme/BUILD.bazel | 64 - .../admissionregistration/v1/BUILD.bazel | 24 - .../admissionregistration/v1/fake/BUILD.bazel | 26 - .../admissionregistration/v1beta1/BUILD.bazel | 24 - .../v1beta1/fake/BUILD.bazel | 26 - .../apiserverinternal/v1alpha1/BUILD.bazel | 23 - .../kubernetes/typed/apps/v1/BUILD.bazel | 29 - .../kubernetes/typed/apps/v1/fake/BUILD.bazel | 31 - .../kubernetes/typed/apps/v1beta1/BUILD.bazel | 25 - .../typed/apps/v1beta1/fake/BUILD.bazel | 27 - .../kubernetes/typed/apps/v1beta2/BUILD.bazel | 27 - .../typed/apps/v1beta2/fake/BUILD.bazel | 29 - .../typed/authentication/v1/BUILD.bazel | 20 - .../typed/authentication/v1/fake/BUILD.bazel | 21 - .../typed/authentication/v1beta1/BUILD.bazel | 20 - .../authentication/v1beta1/fake/BUILD.bazel | 21 - .../typed/authorization/v1/BUILD.bazel | 23 - .../typed/authorization/v1/fake/BUILD.bazel | 24 - .../typed/authorization/v1beta1/BUILD.bazel | 23 - .../authorization/v1beta1/fake/BUILD.bazel | 24 - .../typed/autoscaling/v1/BUILD.bazel | 23 - .../typed/autoscaling/v1/fake/BUILD.bazel | 25 - .../typed/autoscaling/v2/BUILD.bazel | 23 - .../typed/autoscaling/v2/fake/BUILD.bazel | 25 - .../autoscaling/v2beta1/fake/BUILD.bazel | 25 - .../typed/autoscaling/v2beta2/BUILD.bazel | 23 - .../autoscaling/v2beta2/fake/BUILD.bazel | 25 - .../typed/batch/v1beta1/fake/BUILD.bazel | 25 - .../typed/certificates/v1beta1/BUILD.bazel | 24 - .../certificates/v1beta1/fake/BUILD.bazel | 26 - .../typed/coordination/v1/BUILD.bazel | 23 - .../typed/coordination/v1/fake/BUILD.bazel | 25 - .../typed/coordination/v1beta1/BUILD.bazel | 23 - .../coordination/v1beta1/fake/BUILD.bazel | 25 - .../kubernetes/typed/core/v1/BUILD.bazel | 51 - .../kubernetes/typed/core/v1/fake/BUILD.bazel | 53 - .../kubernetes/typed/discovery/v1/BUILD.bazel | 23 - .../typed/discovery/v1beta1/BUILD.bazel | 23 - .../typed/discovery/v1beta1/fake/BUILD.bazel | 25 - .../typed/events/v1beta1/BUILD.bazel | 24 - .../typed/events/v1beta1/fake/BUILD.bazel | 26 - .../typed/extensions/v1beta1/BUILD.bazel | 29 - .../typed/extensions/v1beta1/fake/BUILD.bazel | 31 - .../typed/flowcontrol/v1alpha1/BUILD.bazel | 24 - .../flowcontrol/v1alpha1/fake/BUILD.bazel | 26 - .../typed/flowcontrol/v1beta1/BUILD.bazel | 24 - .../flowcontrol/v1beta1/fake/BUILD.bazel | 26 - .../typed/flowcontrol/v1beta2/BUILD.bazel | 24 - .../flowcontrol/v1beta2/fake/BUILD.bazel | 26 - .../typed/networking/v1/BUILD.bazel | 25 - .../typed/networking/v1/fake/BUILD.bazel | 27 - .../typed/networking/v1beta1/BUILD.bazel | 24 - .../typed/networking/v1beta1/fake/BUILD.bazel | 26 - .../typed/node/v1alpha1/BUILD.bazel | 23 - .../typed/node/v1alpha1/fake/BUILD.bazel | 25 - .../kubernetes/typed/node/v1beta1/BUILD.bazel | 23 - .../kubernetes/typed/policy/v1/BUILD.bazel | 25 - .../typed/policy/v1/fake/BUILD.bazel | 27 - .../typed/policy/v1beta1/BUILD.bazel | 26 - .../typed/policy/v1beta1/fake/BUILD.bazel | 28 - .../kubernetes/typed/rbac/v1/BUILD.bazel | 26 - .../kubernetes/typed/rbac/v1/fake/BUILD.bazel | 28 - .../typed/rbac/v1alpha1/BUILD.bazel | 26 - .../typed/rbac/v1alpha1/fake/BUILD.bazel | 28 - .../kubernetes/typed/rbac/v1beta1/BUILD.bazel | 26 - .../typed/rbac/v1beta1/fake/BUILD.bazel | 28 - .../typed/scheduling/v1/BUILD.bazel | 23 - .../typed/scheduling/v1/fake/BUILD.bazel | 25 - .../typed/scheduling/v1alpha1/BUILD.bazel | 23 - .../scheduling/v1alpha1/fake/BUILD.bazel | 25 - .../typed/scheduling/v1beta1/BUILD.bazel | 23 - .../kubernetes/typed/storage/v1/BUILD.bazel | 26 - .../typed/storage/v1/fake/BUILD.bazel | 28 - .../typed/storage/v1alpha1/BUILD.bazel | 24 - .../typed/storage/v1alpha1/fake/BUILD.bazel | 26 - .../typed/storage/v1beta1/BUILD.bazel | 27 - .../typed/storage/v1beta1/fake/BUILD.bazel | 29 - .../admissionregistration/v1/BUILD.bazel | 19 - .../admissionregistration/v1beta1/BUILD.bazel | 19 - .../apiserverinternal/v1alpha1/BUILD.bazel | 18 - .../client-go/listers/apps/v1/BUILD.bazel | 27 - .../listers/apps/v1beta1/BUILD.bazel | 23 - .../listers/apps/v1beta2/BUILD.bazel | 27 - .../listers/autoscaling/v1/BUILD.bazel | 18 - .../listers/autoscaling/v2/BUILD.bazel | 18 - .../listers/autoscaling/v2beta1/BUILD.bazel | 18 - .../listers/autoscaling/v2beta2/BUILD.bazel | 18 - .../client-go/listers/batch/v1/BUILD.bazel | 22 - .../listers/batch/v1beta1/BUILD.bazel | 18 - .../listers/certificates/v1/BUILD.bazel | 18 - .../listers/certificates/v1beta1/BUILD.bazel | 18 - .../listers/coordination/v1/BUILD.bazel | 18 - .../listers/coordination/v1beta1/BUILD.bazel | 18 - .../client-go/listers/core/v1/BUILD.bazel | 34 - .../listers/discovery/v1/BUILD.bazel | 18 - .../listers/discovery/v1beta1/BUILD.bazel | 18 - .../client-go/listers/events/v1/BUILD.bazel | 18 - .../listers/events/v1beta1/BUILD.bazel | 18 - .../listers/extensions/v1beta1/BUILD.bazel | 28 - .../listers/flowcontrol/v1alpha1/BUILD.bazel | 19 - .../listers/flowcontrol/v1beta1/BUILD.bazel | 19 - .../listers/flowcontrol/v1beta2/BUILD.bazel | 19 - .../listers/networking/v1/BUILD.bazel | 20 - .../listers/networking/v1beta1/BUILD.bazel | 19 - .../client-go/listers/node/v1/BUILD.bazel | 18 - .../listers/node/v1alpha1/BUILD.bazel | 18 - .../listers/node/v1beta1/BUILD.bazel | 18 - .../client-go/listers/policy/v1/BUILD.bazel | 23 - .../listers/policy/v1beta1/BUILD.bazel | 24 - .../client-go/listers/rbac/v1/BUILD.bazel | 21 - .../listers/rbac/v1alpha1/BUILD.bazel | 21 - .../listers/rbac/v1beta1/BUILD.bazel | 21 - .../listers/scheduling/v1/BUILD.bazel | 18 - .../listers/scheduling/v1alpha1/BUILD.bazel | 18 - .../listers/scheduling/v1beta1/BUILD.bazel | 18 - .../client-go/listers/storage/v1/BUILD.bazel | 21 - .../listers/storage/v1alpha1/BUILD.bazel | 19 - .../listers/storage/v1beta1/BUILD.bazel | 22 - .../clientauthentication/install/BUILD.bazel | 17 - .../apis/clientauthentication/v1/BUILD.bazel | 24 - .../clientauthentication/v1alpha1/BUILD.bazel | 24 - .../clientauthentication/v1beta1/BUILD.bazel | 24 - .../k8s.io/client-go/pkg/version/BUILD.bazel | 14 - .../plugin/pkg/client/auth/BUILD.bazel | 18 - .../plugin/pkg/client/auth/azure/BUILD.bazel | 17 - .../plugin/pkg/client/auth/exec/BUILD.bazel | 31 - .../plugin/pkg/client/auth/gcp/BUILD.bazel | 18 - .../plugin/pkg/client/auth/oidc/BUILD.bazel | 15 - .../pkg/client/auth/openstack/BUILD.bazel | 13 - vendor/k8s.io/client-go/rest/BUILD.bazel | 44 - vendor/k8s.io/client-go/rest/fake/BUILD.bazel | 16 - .../k8s.io/client-go/rest/watch/BUILD.bazel | 18 - vendor/k8s.io/client-go/testing/BUILD.bazel | 29 - .../forked/golang/template/BUILD.bazel | 12 - .../k8s.io/client-go/tools/auth/BUILD.bazel | 10 - .../k8s.io/client-go/tools/cache/BUILD.bazel | 53 - .../client-go/tools/cache/testing/BUILD.bazel | 18 - .../client-go/tools/clientcmd/BUILD.bazel | 35 - .../client-go/tools/clientcmd/api/BUILD.bazel | 19 - .../tools/clientcmd/api/latest/BUILD.bazel | 18 - .../tools/clientcmd/api/v1/BUILD.bazel | 24 - .../tools/leaderelection/BUILD.bazel | 22 - .../leaderelection/resourcelock/BUILD.bazel | 26 - .../client-go/tools/metrics/BUILD.bazel | 9 - .../k8s.io/client-go/tools/pager/BUILD.bazel | 17 - .../client-go/tools/portforward/BUILD.bazel | 18 - .../k8s.io/client-go/tools/record/BUILD.bazel | 31 - .../client-go/tools/record/util/BUILD.bazel | 13 - .../client-go/tools/reference/BUILD.bazel | 15 - .../client-go/tools/remotecommand/BUILD.bazel | 30 - .../k8s.io/client-go/tools/watch/BUILD.bazel | 24 - vendor/k8s.io/client-go/transport/BUILD.bazel | 25 - .../client-go/transport/spdy/BUILD.bazel | 14 - vendor/k8s.io/client-go/util/cert/BUILD.bazel | 19 - .../client-go/util/certificate/BUILD.bazel | 24 - .../util/certificate/csr/BUILD.bazel | 26 - .../client-go/util/connrotation/BUILD.bazel | 9 - vendor/k8s.io/client-go/util/exec/BUILD.bazel | 9 - .../client-go/util/flowcontrol/BUILD.bazel | 18 - .../k8s.io/client-go/util/homedir/BUILD.bazel | 9 - .../client-go/util/jsonpath/BUILD.bazel | 15 - .../k8s.io/client-go/util/keyutil/BUILD.bazel | 9 - .../k8s.io/client-go/util/retry/BUILD.bazel | 13 - .../client-go/util/workqueue/BUILD.bazel | 22 - vendor/k8s.io/klog/v2/BUILD.bazel | 15 - .../pkg/apis/apiregistration/BUILD.bazel | 21 - .../pkg/apis/apiregistration/v1/BUILD.bazel | 27 - .../apis/apiregistration/v1beta1/BUILD.bazel | 28 - .../clientset_generated/clientset/BUILD.bazel | 19 - .../typed/apiregistration/v1/BUILD.bazel | 22 - .../typed/apiregistration/v1beta1/BUILD.bazel | 22 - .../kube-openapi/pkg/builder/BUILD.bazel | 19 - .../kube-openapi/pkg/common/BUILD.bazel | 16 - .../kube-openapi/pkg/schemaconv/BUILD.bazel | 13 - .../k8s.io/kube-openapi/pkg/util/BUILD.bazel | 12 - .../kube-openapi/pkg/util/proto/BUILD.bazel | 17 - .../kubectl/pkg/cmd/util/podcmd/BUILD.bazel | 13 - vendor/k8s.io/utils/buffer/BUILD.bazel | 9 - vendor/k8s.io/utils/clock/testing/BUILD.bazel | 13 - .../third_party/forked/golang/net/BUILD.bazel | 12 - vendor/k8s.io/utils/net/BUILD.bazel | 15 - vendor/k8s.io/utils/trace/BUILD.bazel | 10 - vendor/kubevirt.io/api | 1 - .../api/core}/BUILD.bazel | 5 +- vendor/kubevirt.io/api/core/register.go | 4 + vendor/kubevirt.io/api/core/v1/BUILD.bazel | 33 + .../api/core/v1/componentconfig.go | 48 + .../api/core/v1/deepcopy_generated.go | 4981 +++ vendor/kubevirt.io/api/core/v1/defaults.go | 241 + vendor/kubevirt.io/api/core/v1/doc.go | 8 + vendor/kubevirt.io/api/core/v1/register.go | 121 + vendor/kubevirt.io/api/core/v1/sanitizers.go | 45 + vendor/kubevirt.io/api/core/v1/schema.go | 1398 + .../api/core/v1/schema_swagger_generated.go | 800 + vendor/kubevirt.io/api/core/v1/types.go | 2233 ++ .../api/core/v1/types_swagger_generated.go | 743 + .../api/core/v1/zz_generated.defaults.go | 566 + .../api/flavor}/BUILD.bazel | 5 +- vendor/kubevirt.io/api/flavor/register.go | 31 + .../api/flavor/v1alpha1}/BUILD.bazel | 8 +- .../api/flavor/v1alpha1/deepcopy_generated.go | 169 + vendor/kubevirt.io/api/flavor/v1alpha1/doc.go | 24 + .../api/flavor/v1alpha1/register.go | 60 + .../kubevirt.io/api/flavor/v1alpha1/types.go | 83 + .../v1alpha1/types_swagger_generated.go | 36 + .../api/migrations}/BUILD.bazel | 5 +- vendor/kubevirt.io/api/migrations/register.go | 28 + .../api/migrations/v1alpha1}/BUILD.bazel | 12 +- .../migrations/v1alpha1/deepcopy_generated.go | 171 + .../api/migrations/v1alpha1/doc.go | 24 + .../api/migrations/v1alpha1/register.go | 67 + .../api/migrations/v1alpha1/types.go | 218 + .../v1alpha1/types_swagger_generated.go | 43 + .../v1alpha1/zz_generated.defaults.go | 33 + vendor/kubevirt.io/api/pool/BUILD.bazel | 8 + vendor/kubevirt.io/api/pool/register.go | 25 + .../api/pool/v1alpha1}/BUILD.bazel | 11 +- .../api/pool/v1alpha1/deepcopy_generated.go | 178 + vendor/kubevirt.io/api/pool/v1alpha1/doc.go | 24 + .../kubevirt.io/api/pool/v1alpha1/register.go | 58 + vendor/kubevirt.io/api/pool/v1alpha1/types.go | 124 + .../pool/v1alpha1/types_swagger_generated.go | 49 + vendor/kubevirt.io/api/snapshot/BUILD.bazel | 8 + vendor/kubevirt.io/api/snapshot/register.go | 25 + .../api/snapshot/v1alpha1}/BUILD.bazel | 11 +- .../snapshot/v1alpha1/deepcopy_generated.go | 608 + .../kubevirt.io/api/snapshot/v1alpha1/doc.go | 24 + .../api/snapshot/v1alpha1/register.go | 62 + .../api/snapshot/v1alpha1/types.go | 348 + .../v1alpha1/types_swagger_generated.go | 161 + vendor/kubevirt.io/client-go | 1 - vendor/kubevirt.io/client-go/api/BUILD.bazel | 43 + .../client-go/api/openapi_generated.go | 25953 ++++++++++++++++ vendor/kubevirt.io/client-go/api/utils.go | 47 + .../clientset/versioned/BUILD.bazel | 18 + .../clientset/versioned/clientset.go | 112 + .../clientset/versioned/doc.go | 20 + .../clientset/versioned/fake/BUILD.bazel | 30 + .../versioned/fake/clientset_generated.go | 90 + .../clientset/versioned/fake/doc.go | 20 + .../clientset/versioned/fake/register.go | 59 + .../clientset/versioned}/scheme/BUILD.bazel | 7 +- .../clientset/versioned/scheme/doc.go | 20 + .../clientset/versioned/scheme/register.go | 59 + .../versioned/typed/core/v1beta1/BUILD.bazel | 27 + .../versioned/typed/core/v1beta1/cdi.go | 185 + .../versioned/typed/core/v1beta1/cdiconfig.go | 185 + .../typed/core/v1beta1/core_client.go | 120 + .../typed/core/v1beta1/dataimportcron.go | 196 + .../typed/core/v1beta1/datasource.go | 196 + .../typed/core/v1beta1/datavolume.go | 196 + .../versioned/typed/core/v1beta1/doc.go | 20 + .../typed/core}/v1beta1/fake/BUILD.bazel | 18 +- .../versioned/typed/core/v1beta1/fake/doc.go | 20 + .../typed/core/v1beta1/fake/fake_cdi.go | 134 + .../typed/core/v1beta1/fake/fake_cdiconfig.go | 134 + .../core/v1beta1/fake/fake_core_client.go | 65 + .../core/v1beta1/fake/fake_dataimportcron.go | 143 + .../core/v1beta1/fake/fake_datasource.go | 143 + .../core/v1beta1/fake/fake_datavolume.go | 143 + .../core/v1beta1/fake/fake_objecttransfer.go | 134 + .../core/v1beta1/fake/fake_storageprofile.go | 134 + .../typed/core/v1beta1/generated_expansion.go | 33 + .../typed/core/v1beta1/objecttransfer.go | 185 + .../typed/core/v1beta1/storageprofile.go | 185 + .../typed/upload/v1beta1}/BUILD.bazel | 12 +- .../versioned/typed/upload/v1beta1/doc.go | 20 + .../typed/upload/v1beta1}/fake/BUILD.bazel | 12 +- .../typed/upload/v1beta1/fake/doc.go | 20 + .../upload/v1beta1/fake/fake_upload_client.go | 41 + .../v1beta1/fake/fake_uploadtokenrequest.go | 143 + .../upload/v1beta1/generated_expansion.go | 21 + .../typed/upload/v1beta1/upload_client.go | 90 + .../upload/v1beta1/uploadtokenrequest.go | 196 + .../clientset/versioned/BUILD.bazel | 17 + .../clientset/versioned/clientset.go | 98 + .../clientset/versioned/doc.go | 20 + .../clientset/versioned/fake/BUILD.bazel | 27 + .../versioned/fake/clientset_generated.go | 83 + .../clientset/versioned/fake/doc.go | 20 + .../clientset/versioned/fake/register.go | 56 + .../clientset/versioned/scheme/BUILD.bazel | 5 +- .../clientset/versioned/scheme/doc.go | 20 + .../clientset/versioned/scheme/register.go | 56 + .../typed/volumesnapshot/v1}/BUILD.bazel | 14 +- .../versioned/typed/volumesnapshot/v1/doc.go | 20 + .../typed/volumesnapshot/v1}/fake/BUILD.bazel | 14 +- .../typed/volumesnapshot/v1/fake/doc.go | 20 + .../v1/fake/fake_volumesnapshot.go | 142 + .../v1/fake/fake_volumesnapshot_client.go | 49 + .../v1/fake/fake_volumesnapshotclass.go | 122 + .../v1/fake/fake_volumesnapshotcontent.go | 133 + .../volumesnapshot/v1/generated_expansion.go | 25 + .../typed/volumesnapshot/v1/volumesnapshot.go | 196 + .../v1/volumesnapshot_client.go | 100 + .../volumesnapshot/v1/volumesnapshotclass.go | 169 + .../v1/volumesnapshotcontent.go | 185 + .../kubevirt/clientset/versioned/BUILD.bazel | 20 + .../kubevirt/clientset/versioned/clientset.go | 140 + .../kubevirt/clientset/versioned/doc.go | 20 + .../clientset/versioned/fake/BUILD.bazel | 36 + .../versioned/fake/clientset_generated.go | 104 + .../kubevirt/clientset/versioned/fake/doc.go | 20 + .../clientset/versioned/fake/register.go | 63 + .../clientset/versioned}/scheme/BUILD.bazel | 9 +- .../clientset/versioned/scheme/doc.go | 20 + .../clientset/versioned/scheme/register.go | 63 + .../typed/flavor/v1alpha1}/BUILD.bazel | 14 +- .../versioned/typed/flavor/v1alpha1/doc.go | 20 + .../typed/flavor/v1alpha1}/fake/BUILD.bazel | 13 +- .../typed/flavor/v1alpha1/fake/doc.go | 20 + .../v1alpha1/fake/fake_flavor_client.go | 45 + .../fake/fake_virtualmachineclusterflavor.go | 123 + .../fake/fake_virtualmachineflavor.go | 131 + .../typed/flavor/v1alpha1/flavor_client.go | 95 + .../flavor/v1alpha1/generated_expansion.go | 23 + .../v1alpha1/virtualmachineclusterflavor.go | 169 + .../flavor/v1alpha1/virtualmachineflavor.go | 179 + .../typed/migrations/v1alpha1}/BUILD.bazel | 12 +- .../typed/migrations/v1alpha1/doc.go | 20 + .../migrations/v1alpha1}/fake/BUILD.bazel | 13 +- .../typed/migrations/v1alpha1/fake/doc.go | 20 + .../v1alpha1/fake/fake_migrationpolicy.go | 134 + .../v1alpha1/fake/fake_migrations_client.go | 41 + .../v1alpha1/generated_expansion.go | 21 + .../migrations/v1alpha1/migrationpolicy.go | 185 + .../migrations/v1alpha1/migrations_client.go | 90 + .../typed/pool/v1alpha1}/BUILD.bazel | 12 +- .../versioned/typed/pool/v1alpha1/doc.go | 20 + .../typed/pool/v1alpha1}/fake/BUILD.bazel | 12 +- .../versioned/typed/pool/v1alpha1/fake/doc.go | 20 + .../pool/v1alpha1/fake/fake_pool_client.go | 41 + .../v1alpha1/fake/fake_virtualmachinepool.go | 143 + .../pool/v1alpha1/generated_expansion.go | 21 + .../typed/pool/v1alpha1/pool_client.go | 90 + .../typed/pool/v1alpha1/virtualmachinepool.go | 196 + .../typed/snapshot/v1alpha1/BUILD.bazel | 23 + .../versioned/typed/snapshot/v1alpha1/doc.go | 20 + .../typed/snapshot/v1alpha1}/fake/BUILD.bazel | 14 +- .../typed/snapshot/v1alpha1/fake/doc.go | 20 + .../v1alpha1/fake/fake_snapshot_client.go | 49 + .../fake/fake_virtualmachinerestore.go | 143 + .../fake/fake_virtualmachinesnapshot.go | 143 + .../fake_virtualmachinesnapshotcontent.go | 143 + .../snapshot/v1alpha1/generated_expansion.go | 25 + .../snapshot/v1alpha1/snapshot_client.go | 100 + .../v1alpha1/virtualmachinerestore.go | 196 + .../v1alpha1/virtualmachinesnapshot.go | 196 + .../v1alpha1/virtualmachinesnapshotcontent.go | 196 + .../clientset/versioned/BUILD.bazel | 17 + .../clientset/versioned/clientset.go | 98 + .../clientset/versioned/doc.go | 20 + .../clientset/versioned/fake/BUILD.bazel | 27 + .../versioned/fake/clientset_generated.go | 83 + .../clientset/versioned/fake/doc.go | 20 + .../clientset/versioned/fake/register.go | 56 + .../clientset/versioned/scheme}/BUILD.bazel | 9 +- .../clientset/versioned/scheme/doc.go | 20 + .../clientset/versioned/scheme/register.go | 56 + .../typed/k8s.cni.cncf.io}/v1/BUILD.bazel | 12 +- .../versioned/typed/k8s.cni.cncf.io/v1/doc.go | 20 + .../k8s.cni.cncf.io}/v1/fake/BUILD.bazel | 12 +- .../typed/k8s.cni.cncf.io/v1/fake/doc.go | 20 + .../v1/fake/fake_k8s.cni.cncf.io_client.go | 41 + .../fake/fake_networkattachmentdefinition.go | 130 + .../k8s.cni.cncf.io/v1/generated_expansion.go | 21 + .../v1/k8s.cni.cncf.io_client.go | 90 + .../v1/networkattachmentdefinition.go | 179 + .../clientset/versioned/BUILD.bazel | 17 + .../clientset/versioned/clientset.go | 98 + .../clientset/versioned/doc.go | 20 + .../clientset/versioned/fake/BUILD.bazel | 27 + .../versioned/fake/clientset_generated.go | 83 + .../clientset/versioned/fake/doc.go | 20 + .../clientset/versioned/fake/register.go | 56 + .../clientset/versioned/scheme}/BUILD.bazel | 11 +- .../clientset/versioned/scheme/doc.go | 20 + .../clientset/versioned/scheme/register.go | 56 + .../versioned/typed/monitoring/v1/BUILD.bazel | 26 + .../typed/monitoring/v1/alertmanager.go | 196 + .../versioned/typed/monitoring/v1/doc.go | 20 + .../typed/monitoring/v1}/fake/BUILD.bazel | 16 +- .../versioned/typed/monitoring/v1/fake/doc.go | 20 + .../monitoring/v1/fake/fake_alertmanager.go | 142 + .../v1/fake/fake_monitoring_client.go | 61 + .../monitoring/v1/fake/fake_podmonitor.go | 130 + .../monitoring/v1/fake/fake_prometheus.go | 142 + .../monitoring/v1/fake/fake_prometheusrule.go | 130 + .../monitoring/v1/fake/fake_servicemonitor.go | 130 + .../monitoring/v1/fake/fake_thanosruler.go | 142 + .../monitoring/v1/generated_expansion.go | 31 + .../typed/monitoring/v1/monitoring_client.go | 115 + .../typed/monitoring/v1/podmonitor.go | 179 + .../typed/monitoring/v1/prometheus.go | 196 + .../typed/monitoring/v1/prometheusrule.go | 179 + .../typed/monitoring/v1/servicemonitor.go | 179 + .../typed/monitoring/v1/thanosruler.go | 196 + .../kubevirt.io/client-go/kubecli/BUILD.bazel | 147 + vendor/kubevirt.io/client-go/kubecli/async.go | 84 + .../kubecli/generated_mock_kubevirt.go | 1816 ++ .../kubevirt.io/client-go/kubecli/guestfs.go | 86 + .../kubevirt.io/client-go/kubecli/handler.go | 281 + .../kubevirt.io/client-go/kubecli/kubecli.go | 408 + .../kubevirt.io/client-go/kubecli/kubevirt.go | 288 + .../client-go/kubecli/kubevirt_test_utils.go | 87 + vendor/kubevirt.io/client-go/kubecli/kv.go | 164 + .../client-go/kubecli/migration.go | 163 + .../kubevirt.io/client-go/kubecli/profiler.go | 131 + .../client-go/kubecli/replicaset.go | 170 + .../kubevirt.io/client-go/kubecli/streamer.go | 55 + .../kubevirt.io/client-go/kubecli/version.go | 88 + vendor/kubevirt.io/client-go/kubecli/vm.go | 257 + vendor/kubevirt.io/client-go/kubecli/vmi.go | 477 + .../client-go/kubecli/vmipreset.go | 117 + .../client-go/kubecli/websocket.go | 133 + vendor/kubevirt.io/client-go/log/BUILD.bazel | 35 + vendor/kubevirt.io/client-go/log/log.go | 447 + .../kubevirt.io/client-go/precond/BUILD.bazel | 8 + .../kubevirt.io/client-go/precond/precond.go | 89 + .../client-go/reporter/BUILD.bazel | 12 + .../client-go/reporter/reporter.go | 192 + .../client-go/subresources/BUILD.bazel | 8 + .../client-go/subresources/constants.go | 25 + .../client-go/testutils/BUILD.bazel | 15 + .../kubevirt.io/client-go/testutils/setup.go | 80 + vendor/kubevirt.io/client-go/util/BUILD.bazel | 8 + vendor/kubevirt.io/client-go/util/util.go | 22 + .../client-go/version}/BUILD.bazel | 8 +- vendor/kubevirt.io/client-go/version/base.go | 28 + vendor/kubevirt.io/client-go/version/def.bzl | 36 + vendor/kubevirt.io/client-go/version/types.go | 34 + .../kubevirt.io/client-go/version/version.go | 53 + .../pkg/apis/core/BUILD.bazel | 9 - .../pkg/apis/core/v1beta1/BUILD.bazel | 25 - .../pkg/apis/upload/BUILD.bazel | 9 - .../pkg/apis/upload/v1beta1/BUILD.bazel | 21 - .../pkg/clone/BUILD.bazel | 3 +- .../pkg/sdk/api/BUILD.bazel | 13 - .../qe-tools/pkg/ginkgo-reporters/BUILD.bazel | 18 - .../qe-tools/pkg/polarion-xml/BUILD.bazel | 9 - vendor/libvirt.org/go/libvirt/BUILD.bazel | 102 - vendor/modules.txt | 20 +- vendor/mvdan.cc/editorconfig/BUILD.bazel | 12 - vendor/mvdan.cc/sh/v3/cmd/shfmt/BUILD.bazel | 26 - vendor/mvdan.cc/sh/v3/fileutil/BUILD.bazel | 9 - vendor/mvdan.cc/sh/v3/syntax/BUILD.bazel | 21 - .../pkg/runtime/scheme/BUILD.bazel | 10 - .../controller-runtime/pkg/scheme/BUILD.bazel | 14 - vendor/sigs.k8s.io/json/BUILD.bazel | 13 - .../internal/golang/encoding/json/BUILD.bazel | 19 - .../v4/fieldpath/BUILD.bazel | 24 - .../v4/schema/BUILD.bazel | 14 - .../v4/typed/BUILD.bazel | 26 - .../v4/value/BUILD.bazel | 30 - vendor/sigs.k8s.io/yaml/BUILD.bazel | 14 - 1071 files changed, 62369 insertions(+), 19366 deletions(-) delete mode 100644 vendor/cloud.google.com/go/compute/metadata/BUILD.bazel delete mode 100644 vendor/github.com/Azure/go-autorest/BUILD.bazel delete mode 100644 vendor/github.com/Azure/go-autorest/autorest/BUILD.bazel delete mode 100644 vendor/github.com/Azure/go-autorest/autorest/adal/BUILD.bazel delete mode 100644 vendor/github.com/Azure/go-autorest/autorest/azure/BUILD.bazel delete mode 100644 vendor/github.com/Azure/go-autorest/autorest/date/BUILD.bazel delete mode 100644 vendor/github.com/Azure/go-autorest/logger/BUILD.bazel delete mode 100644 vendor/github.com/Azure/go-autorest/tracing/BUILD.bazel delete mode 100644 vendor/github.com/Masterminds/semver/BUILD.bazel delete mode 100644 vendor/github.com/PuerkitoBio/purell/BUILD.bazel delete mode 100644 vendor/github.com/PuerkitoBio/urlesc/BUILD.bazel delete mode 100644 vendor/github.com/asaskevich/govalidator/BUILD.bazel delete mode 100644 vendor/github.com/beorn7/perks/quantile/BUILD.bazel delete mode 100644 vendor/github.com/blang/semver/BUILD.bazel delete mode 100644 vendor/github.com/c9s/goprocinfo/linux/BUILD.bazel delete mode 100644 vendor/github.com/cespare/xxhash/v2/BUILD.bazel delete mode 100644 vendor/github.com/cilium/ebpf/BUILD.bazel delete mode 100644 vendor/github.com/cilium/ebpf/asm/BUILD.bazel delete mode 100644 vendor/github.com/cilium/ebpf/internal/BUILD.bazel delete mode 100644 vendor/github.com/cilium/ebpf/internal/btf/BUILD.bazel delete mode 100644 vendor/github.com/cilium/ebpf/internal/unix/BUILD.bazel delete mode 100644 vendor/github.com/cilium/ebpf/link/BUILD.bazel delete mode 100644 vendor/github.com/containernetworking/plugins/pkg/ns/BUILD.bazel delete mode 100644 vendor/github.com/coreos/go-iptables/iptables/BUILD.bazel delete mode 100644 vendor/github.com/coreos/go-semver/semver/BUILD.bazel delete mode 100644 vendor/github.com/coreos/go-systemd/v22/dbus/BUILD.bazel delete mode 100644 vendor/github.com/coreos/prometheus-operator/pkg/apis/monitoring/BUILD.bazel delete mode 100644 vendor/github.com/coreos/prometheus-operator/pkg/apis/monitoring/v1/BUILD.bazel delete mode 100644 vendor/github.com/cyphar/filepath-securejoin/BUILD.bazel delete mode 100644 vendor/github.com/davecgh/go-spew/spew/BUILD.bazel delete mode 100644 vendor/github.com/emicklei/go-restful-openapi/BUILD.bazel delete mode 100644 vendor/github.com/emicklei/go-restful/BUILD.bazel delete mode 100644 vendor/github.com/emicklei/go-restful/log/BUILD.bazel delete mode 100644 vendor/github.com/evanphx/json-patch/BUILD.bazel delete mode 100644 vendor/github.com/form3tech-oss/jwt-go/BUILD.bazel delete mode 100644 vendor/github.com/fsnotify/fsnotify/BUILD.bazel delete mode 100644 vendor/github.com/ghodss/yaml/BUILD.bazel delete mode 100644 vendor/github.com/go-kit/kit/log/BUILD.bazel delete mode 100644 vendor/github.com/go-logfmt/logfmt/BUILD.bazel delete mode 100644 vendor/github.com/go-logr/logr/BUILD.bazel create mode 100644 vendor/github.com/go-openapi/analysis/.gitattributes delete mode 100644 vendor/github.com/go-openapi/analysis/.travis.yml delete mode 100644 vendor/github.com/go-openapi/analysis/BUILD.bazel create mode 100644 vendor/github.com/go-openapi/analysis/flatten_name.go create mode 100644 vendor/github.com/go-openapi/analysis/flatten_options.go delete mode 100644 vendor/github.com/go-openapi/analysis/internal/BUILD.bazel rename vendor/github.com/go-openapi/analysis/internal/{pre_go18.go => debug/debug.go} (53%) create mode 100644 vendor/github.com/go-openapi/analysis/internal/flatten/normalize/normalize.go create mode 100644 vendor/github.com/go-openapi/analysis/internal/flatten/operations/operations.go create mode 100644 vendor/github.com/go-openapi/analysis/internal/flatten/replace/replace.go create mode 100644 vendor/github.com/go-openapi/analysis/internal/flatten/schutils/flatten_schema.go create mode 100644 vendor/github.com/go-openapi/analysis/internal/flatten/sortref/keys.go create mode 100644 vendor/github.com/go-openapi/analysis/internal/flatten/sortref/sort_ref.go delete mode 100644 vendor/github.com/go-openapi/analysis/internal/post_go18.go delete mode 100644 vendor/github.com/go-openapi/errors/BUILD.bazel delete mode 100644 vendor/github.com/go-openapi/jsonpointer/BUILD.bazel delete mode 100644 vendor/github.com/go-openapi/jsonreference/BUILD.bazel delete mode 100644 vendor/github.com/go-openapi/loads/BUILD.bazel delete mode 100644 vendor/github.com/go-openapi/runtime/BUILD.bazel delete mode 100644 vendor/github.com/go-openapi/runtime/client/BUILD.bazel delete mode 100644 vendor/github.com/go-openapi/runtime/logger/BUILD.bazel delete mode 100644 vendor/github.com/go-openapi/runtime/middleware/BUILD.bazel delete mode 100644 vendor/github.com/go-openapi/runtime/middleware/denco/BUILD.bazel delete mode 100644 vendor/github.com/go-openapi/runtime/middleware/header/BUILD.bazel delete mode 100644 vendor/github.com/go-openapi/runtime/middleware/untyped/BUILD.bazel delete mode 100644 vendor/github.com/go-openapi/runtime/security/BUILD.bazel delete mode 100644 vendor/github.com/go-openapi/runtime/yamlpc/BUILD.bazel delete mode 100644 vendor/github.com/go-openapi/spec/BUILD.bazel create mode 100644 vendor/github.com/go-openapi/strfmt/.gitattributes delete mode 100644 vendor/github.com/go-openapi/strfmt/.travis.yml delete mode 100644 vendor/github.com/go-openapi/strfmt/BUILD.bazel create mode 100644 vendor/github.com/go-openapi/strfmt/ulid.go delete mode 100644 vendor/github.com/go-openapi/swag/BUILD.bazel create mode 100644 vendor/github.com/go-openapi/validate/.gitattributes delete mode 100644 vendor/github.com/go-openapi/validate/.travis.yml delete mode 100644 vendor/github.com/go-openapi/validate/BUILD.bazel delete mode 100644 vendor/github.com/go-stack/stack/BUILD.bazel delete mode 100644 vendor/github.com/go-task/slim-sprig/BUILD.bazel delete mode 100644 vendor/github.com/godbus/dbus/v5/BUILD.bazel delete mode 100644 vendor/github.com/gogo/protobuf/gogoproto/BUILD.bazel delete mode 100644 vendor/github.com/gogo/protobuf/proto/BUILD.bazel delete mode 100644 vendor/github.com/gogo/protobuf/protoc-gen-gogo/descriptor/BUILD.bazel delete mode 100644 vendor/github.com/gogo/protobuf/sortkeys/BUILD.bazel delete mode 120000 vendor/github.com/golang/glog rename vendor/{golang.org/x/time/rate => github.com/golang/glog}/BUILD.bazel (51%) create mode 100644 vendor/github.com/golang/glog/glog.go delete mode 100644 vendor/github.com/golang/groupcache/lru/BUILD.bazel delete mode 100644 vendor/github.com/golang/mock/gomock/BUILD.bazel delete mode 100644 vendor/github.com/golang/protobuf/proto/BUILD.bazel delete mode 100644 vendor/github.com/golang/protobuf/ptypes/BUILD.bazel delete mode 100644 vendor/github.com/golang/protobuf/ptypes/any/BUILD.bazel delete mode 100644 vendor/github.com/golang/protobuf/ptypes/duration/BUILD.bazel delete mode 100644 vendor/github.com/golang/protobuf/ptypes/timestamp/BUILD.bazel delete mode 100644 vendor/github.com/google/go-cmp/cmp/BUILD.bazel delete mode 100644 vendor/github.com/google/go-cmp/cmp/internal/diff/BUILD.bazel delete mode 100644 vendor/github.com/google/go-cmp/cmp/internal/flags/BUILD.bazel delete mode 100644 vendor/github.com/google/go-cmp/cmp/internal/function/BUILD.bazel delete mode 100644 vendor/github.com/google/go-cmp/cmp/internal/value/BUILD.bazel delete mode 100644 vendor/github.com/google/go-github/v32/github/BUILD.bazel delete mode 100644 vendor/github.com/google/go-querystring/query/BUILD.bazel delete mode 100644 vendor/github.com/google/goexpect/BUILD.bazel delete mode 100644 vendor/github.com/google/gofuzz/BUILD.bazel delete mode 100644 vendor/github.com/google/goterm/term/BUILD.bazel delete mode 100644 vendor/github.com/google/pprof/profile/BUILD.bazel delete mode 100644 vendor/github.com/google/renameio/BUILD.bazel delete mode 100644 vendor/github.com/google/uuid/BUILD.bazel delete mode 100644 vendor/github.com/googleapis/gnostic/compiler/BUILD.bazel delete mode 100644 vendor/github.com/googleapis/gnostic/extensions/BUILD.bazel delete mode 100644 vendor/github.com/googleapis/gnostic/jsonschema/BUILD.bazel delete mode 100644 vendor/github.com/googleapis/gnostic/openapiv2/BUILD.bazel delete mode 100644 vendor/github.com/gordonklaus/ineffassign/pkg/ineffassign/BUILD.bazel delete mode 100644 vendor/github.com/gorilla/websocket/BUILD.bazel delete mode 100644 vendor/github.com/imdario/mergo/BUILD.bazel delete mode 100644 vendor/github.com/inconshreveable/mousetrap/BUILD.bazel delete mode 100644 vendor/github.com/insomniacslk/dhcp/dhcpv4/BUILD.bazel delete mode 100644 vendor/github.com/insomniacslk/dhcp/dhcpv6/BUILD.bazel delete mode 100644 vendor/github.com/insomniacslk/dhcp/dhcpv6/server6/BUILD.bazel delete mode 100644 vendor/github.com/insomniacslk/dhcp/iana/BUILD.bazel delete mode 100644 vendor/github.com/insomniacslk/dhcp/interfaces/BUILD.bazel delete mode 100644 vendor/github.com/insomniacslk/dhcp/rfc1035label/BUILD.bazel delete mode 100644 vendor/github.com/josharian/intern/BUILD.bazel delete mode 100644 vendor/github.com/json-iterator/go/BUILD.bazel delete mode 100644 vendor/github.com/k8snetworkplumbingwg/network-attachment-definition-client/pkg/apis/k8s.cni.cncf.io/BUILD.bazel delete mode 100644 vendor/github.com/krolaw/dhcp4/BUILD.bazel delete mode 100644 vendor/github.com/krolaw/dhcp4/conn/BUILD.bazel delete mode 100644 vendor/github.com/kubernetes-csi/external-snapshotter/client/v4/apis/volumesnapshot/v1/BUILD.bazel delete mode 100644 vendor/github.com/mailru/easyjson/buffer/BUILD.bazel delete mode 100644 vendor/github.com/mailru/easyjson/jlexer/BUILD.bazel delete mode 100644 vendor/github.com/mailru/easyjson/jwriter/BUILD.bazel delete mode 100644 vendor/github.com/mattn/go-runewidth/BUILD.bazel delete mode 100644 vendor/github.com/matttproud/golang_protobuf_extensions/pbutil/BUILD.bazel delete mode 100644 vendor/github.com/mitchellh/go-ps/BUILD.bazel delete mode 100644 vendor/github.com/mitchellh/go-vnc/BUILD.bazel delete mode 100644 vendor/github.com/mitchellh/mapstructure/BUILD.bazel delete mode 100644 vendor/github.com/moby/spdystream/BUILD.bazel delete mode 100644 vendor/github.com/moby/spdystream/spdy/BUILD.bazel delete mode 100644 vendor/github.com/moby/sys/mountinfo/BUILD.bazel delete mode 100644 vendor/github.com/modern-go/concurrent/BUILD.bazel delete mode 100644 vendor/github.com/modern-go/reflect2/BUILD.bazel create mode 100644 vendor/github.com/oklog/ulid/.gitignore create mode 100644 vendor/github.com/oklog/ulid/.travis.yml create mode 100644 vendor/github.com/oklog/ulid/AUTHORS.md create mode 100644 vendor/github.com/oklog/ulid/CHANGELOG.md create mode 100644 vendor/github.com/oklog/ulid/CONTRIBUTING.md create mode 100644 vendor/github.com/oklog/ulid/Gopkg.lock create mode 100644 vendor/github.com/oklog/ulid/Gopkg.toml create mode 100644 vendor/github.com/oklog/ulid/LICENSE create mode 100644 vendor/github.com/oklog/ulid/README.md create mode 100644 vendor/github.com/oklog/ulid/ulid.go delete mode 100644 vendor/github.com/onsi/ginkgo/v2/BUILD.bazel delete mode 100644 vendor/github.com/onsi/ginkgo/v2/config/BUILD.bazel delete mode 100644 vendor/github.com/onsi/ginkgo/v2/formatter/BUILD.bazel delete mode 100644 vendor/github.com/onsi/ginkgo/v2/ginkgo/BUILD.bazel delete mode 100644 vendor/github.com/onsi/ginkgo/v2/ginkgo/build/BUILD.bazel delete mode 100644 vendor/github.com/onsi/ginkgo/v2/ginkgo/command/BUILD.bazel delete mode 100644 vendor/github.com/onsi/ginkgo/v2/ginkgo/generators/BUILD.bazel delete mode 100644 vendor/github.com/onsi/ginkgo/v2/ginkgo/internal/BUILD.bazel delete mode 100644 vendor/github.com/onsi/ginkgo/v2/ginkgo/labels/BUILD.bazel delete mode 100644 vendor/github.com/onsi/ginkgo/v2/ginkgo/outline/BUILD.bazel delete mode 100644 vendor/github.com/onsi/ginkgo/v2/ginkgo/run/BUILD.bazel delete mode 100644 vendor/github.com/onsi/ginkgo/v2/ginkgo/unfocus/BUILD.bazel delete mode 100644 vendor/github.com/onsi/ginkgo/v2/ginkgo/watch/BUILD.bazel delete mode 100644 vendor/github.com/onsi/ginkgo/v2/internal/BUILD.bazel delete mode 100644 vendor/github.com/onsi/ginkgo/v2/internal/global/BUILD.bazel delete mode 100644 vendor/github.com/onsi/ginkgo/v2/internal/interrupt_handler/BUILD.bazel delete mode 100644 vendor/github.com/onsi/ginkgo/v2/internal/parallel_support/BUILD.bazel delete mode 100644 vendor/github.com/onsi/ginkgo/v2/internal/testingtproxy/BUILD.bazel delete mode 100644 vendor/github.com/onsi/ginkgo/v2/reporters/BUILD.bazel delete mode 100644 vendor/github.com/onsi/ginkgo/v2/types/BUILD.bazel delete mode 100644 vendor/github.com/onsi/gomega/BUILD.bazel delete mode 100644 vendor/github.com/onsi/gomega/format/BUILD.bazel delete mode 100644 vendor/github.com/onsi/gomega/ghttp/BUILD.bazel delete mode 100644 vendor/github.com/onsi/gomega/gmeasure/BUILD.bazel delete mode 100644 vendor/github.com/onsi/gomega/gmeasure/table/BUILD.bazel delete mode 100644 vendor/github.com/onsi/gomega/gstruct/BUILD.bazel delete mode 100644 vendor/github.com/onsi/gomega/gstruct/errors/BUILD.bazel delete mode 100644 vendor/github.com/onsi/gomega/internal/BUILD.bazel delete mode 100644 vendor/github.com/onsi/gomega/matchers/BUILD.bazel delete mode 100644 vendor/github.com/onsi/gomega/matchers/support/goraph/bipartitegraph/BUILD.bazel delete mode 100644 vendor/github.com/onsi/gomega/matchers/support/goraph/edge/BUILD.bazel delete mode 100644 vendor/github.com/onsi/gomega/matchers/support/goraph/node/BUILD.bazel delete mode 100644 vendor/github.com/onsi/gomega/matchers/support/goraph/util/BUILD.bazel delete mode 100644 vendor/github.com/onsi/gomega/types/BUILD.bazel delete mode 100644 vendor/github.com/opencontainers/runc/libcontainer/cgroups/BUILD.bazel delete mode 100644 vendor/github.com/opencontainers/runc/libcontainer/cgroups/devices/BUILD.bazel delete mode 100644 vendor/github.com/opencontainers/runc/libcontainer/cgroups/ebpf/BUILD.bazel delete mode 100644 vendor/github.com/opencontainers/runc/libcontainer/cgroups/ebpf/devicefilter/BUILD.bazel delete mode 100644 vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/BUILD.bazel delete mode 100644 vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2/BUILD.bazel delete mode 100644 vendor/github.com/opencontainers/runc/libcontainer/cgroups/fscommon/BUILD.bazel delete mode 100644 vendor/github.com/opencontainers/runc/libcontainer/configs/BUILD.bazel delete mode 100644 vendor/github.com/opencontainers/runc/libcontainer/devices/BUILD.bazel delete mode 100644 vendor/github.com/opencontainers/runc/libcontainer/user/BUILD.bazel delete mode 100644 vendor/github.com/opencontainers/runc/libcontainer/userns/BUILD.bazel delete mode 100644 vendor/github.com/opencontainers/runc/libcontainer/utils/BUILD.bazel delete mode 100644 vendor/github.com/opencontainers/runtime-spec/specs-go/BUILD.bazel delete mode 100644 vendor/github.com/opencontainers/selinux/go-selinux/BUILD.bazel delete mode 100644 vendor/github.com/opencontainers/selinux/pkg/pwalk/BUILD.bazel delete mode 100644 vendor/github.com/openshift/api/config/v1/BUILD.bazel delete mode 100644 vendor/github.com/openshift/api/operator/v1/BUILD.bazel delete mode 100644 vendor/github.com/openshift/api/security/v1/BUILD.bazel delete mode 100644 vendor/github.com/openshift/client-go/security/clientset/versioned/typed/security/v1/BUILD.bazel delete mode 100644 vendor/github.com/openshift/client-go/security/clientset/versioned/typed/security/v1/fake/BUILD.bazel delete mode 100644 vendor/github.com/openshift/custom-resource-status/conditions/v1/BUILD.bazel delete mode 100644 vendor/github.com/openshift/library-go/pkg/operator/resource/resourcemerge/BUILD.bazel delete mode 100644 vendor/github.com/operator-framework/go-appr/appregistry/BUILD.bazel delete mode 100644 vendor/github.com/operator-framework/go-appr/appregistry/appr/BUILD.bazel delete mode 100644 vendor/github.com/operator-framework/go-appr/appregistry/blobs/BUILD.bazel delete mode 100644 vendor/github.com/operator-framework/go-appr/appregistry/channel/BUILD.bazel delete mode 100644 vendor/github.com/operator-framework/go-appr/appregistry/info/BUILD.bazel delete mode 100644 vendor/github.com/operator-framework/go-appr/appregistry/package_appr/BUILD.bazel delete mode 100644 vendor/github.com/operator-framework/go-appr/models/BUILD.bazel delete mode 100644 vendor/github.com/operator-framework/operator-lifecycle-manager/pkg/api/apis/operators/BUILD.bazel delete mode 100644 vendor/github.com/operator-framework/operator-lifecycle-manager/pkg/api/apis/operators/v1alpha1/BUILD.bazel delete mode 100644 vendor/github.com/operator-framework/operator-marketplace/pkg/apis/operators/shared/BUILD.bazel delete mode 100644 vendor/github.com/operator-framework/operator-marketplace/pkg/apis/operators/v1/BUILD.bazel delete mode 100644 vendor/github.com/operator-framework/operator-marketplace/pkg/appregistry/BUILD.bazel delete mode 100644 vendor/github.com/operator-framework/operator-marketplace/pkg/datastore/BUILD.bazel delete mode 100644 vendor/github.com/pborman/uuid/BUILD.bazel delete mode 100644 vendor/github.com/pkg/diff/BUILD.bazel delete mode 100644 vendor/github.com/pkg/errors/BUILD.bazel delete mode 100644 vendor/github.com/povsister/scp/BUILD.bazel delete mode 100644 vendor/github.com/prometheus/client_golang/api/BUILD.bazel delete mode 100644 vendor/github.com/prometheus/client_golang/api/prometheus/v1/BUILD.bazel delete mode 100644 vendor/github.com/prometheus/client_golang/prometheus/BUILD.bazel delete mode 100644 vendor/github.com/prometheus/client_golang/prometheus/internal/BUILD.bazel delete mode 100644 vendor/github.com/prometheus/client_golang/prometheus/promhttp/BUILD.bazel delete mode 100644 vendor/github.com/prometheus/client_golang/prometheus/testutil/BUILD.bazel delete mode 100644 vendor/github.com/prometheus/client_golang/prometheus/testutil/promlint/BUILD.bazel delete mode 100644 vendor/github.com/prometheus/client_model/go/BUILD.bazel delete mode 100644 vendor/github.com/prometheus/common/expfmt/BUILD.bazel delete mode 100644 vendor/github.com/prometheus/common/internal/bitbucket.org/ww/goautoneg/BUILD.bazel delete mode 100644 vendor/github.com/prometheus/common/model/BUILD.bazel delete mode 100644 vendor/github.com/prometheus/procfs/BUILD.bazel delete mode 100644 vendor/github.com/prometheus/procfs/internal/fs/BUILD.bazel delete mode 100644 vendor/github.com/prometheus/procfs/internal/util/BUILD.bazel delete mode 100644 vendor/github.com/sirupsen/logrus/BUILD.bazel delete mode 100644 vendor/github.com/spf13/cobra/BUILD.bazel delete mode 100644 vendor/github.com/spf13/pflag/BUILD.bazel delete mode 100644 vendor/github.com/u-root/u-root/pkg/cmdline/BUILD.bazel delete mode 100644 vendor/github.com/u-root/u-root/pkg/rand/BUILD.bazel delete mode 100644 vendor/github.com/u-root/u-root/pkg/shlex/BUILD.bazel delete mode 100644 vendor/github.com/u-root/u-root/pkg/ubinary/BUILD.bazel delete mode 100644 vendor/github.com/u-root/u-root/pkg/uio/BUILD.bazel delete mode 100644 vendor/github.com/vishvananda/netlink/BUILD.bazel delete mode 100644 vendor/github.com/vishvananda/netlink/nl/BUILD.bazel delete mode 100644 vendor/github.com/vishvananda/netns/BUILD.bazel delete mode 100644 vendor/github.com/wadey/gocovmerge/BUILD.bazel delete mode 100644 vendor/github.com/willf/bitset/BUILD.bazel delete mode 100644 vendor/go.mongodb.org/mongo-driver/bson/BUILD.bazel delete mode 100644 vendor/go.mongodb.org/mongo-driver/bson/bsoncodec/BUILD.bazel delete mode 100644 vendor/go.mongodb.org/mongo-driver/bson/bsonoptions/BUILD.bazel delete mode 100644 vendor/go.mongodb.org/mongo-driver/bson/bsonrw/BUILD.bazel delete mode 100644 vendor/go.mongodb.org/mongo-driver/bson/bsontype/BUILD.bazel delete mode 100644 vendor/go.mongodb.org/mongo-driver/bson/primitive/BUILD.bazel delete mode 100644 vendor/go.mongodb.org/mongo-driver/x/bsonx/bsoncore/BUILD.bazel delete mode 100644 vendor/golang.org/x/crypto/blowfish/BUILD.bazel delete mode 100644 vendor/golang.org/x/crypto/cast5/BUILD.bazel delete mode 100644 vendor/golang.org/x/crypto/chacha20/BUILD.bazel delete mode 100644 vendor/golang.org/x/crypto/curve25519/BUILD.bazel delete mode 100644 vendor/golang.org/x/crypto/curve25519/internal/field/BUILD.bazel delete mode 100644 vendor/golang.org/x/crypto/ed25519/BUILD.bazel delete mode 100644 vendor/golang.org/x/crypto/internal/poly1305/BUILD.bazel delete mode 100644 vendor/golang.org/x/crypto/internal/subtle/BUILD.bazel delete mode 100644 vendor/golang.org/x/crypto/openpgp/BUILD.bazel delete mode 100644 vendor/golang.org/x/crypto/openpgp/armor/BUILD.bazel delete mode 100644 vendor/golang.org/x/crypto/openpgp/elgamal/BUILD.bazel delete mode 100644 vendor/golang.org/x/crypto/openpgp/errors/BUILD.bazel delete mode 100644 vendor/golang.org/x/crypto/openpgp/packet/BUILD.bazel delete mode 100644 vendor/golang.org/x/crypto/openpgp/s2k/BUILD.bazel delete mode 100644 vendor/golang.org/x/crypto/pkcs12/BUILD.bazel delete mode 100644 vendor/golang.org/x/crypto/pkcs12/internal/rc2/BUILD.bazel delete mode 100644 vendor/golang.org/x/crypto/ssh/BUILD.bazel delete mode 100644 vendor/golang.org/x/crypto/ssh/agent/BUILD.bazel delete mode 100644 vendor/golang.org/x/crypto/ssh/internal/bcrypt_pbkdf/BUILD.bazel delete mode 100644 vendor/golang.org/x/crypto/ssh/knownhosts/BUILD.bazel delete mode 100644 vendor/golang.org/x/crypto/ssh/terminal/BUILD.bazel delete mode 100644 vendor/golang.org/x/net/bpf/BUILD.bazel delete mode 100644 vendor/golang.org/x/net/context/BUILD.bazel delete mode 100644 vendor/golang.org/x/net/context/ctxhttp/BUILD.bazel delete mode 100644 vendor/golang.org/x/net/html/BUILD.bazel delete mode 100644 vendor/golang.org/x/net/html/atom/BUILD.bazel delete mode 100644 vendor/golang.org/x/net/html/charset/BUILD.bazel delete mode 100644 vendor/golang.org/x/net/http/httpguts/BUILD.bazel delete mode 100644 vendor/golang.org/x/net/http2/BUILD.bazel delete mode 100644 vendor/golang.org/x/net/http2/hpack/BUILD.bazel delete mode 100644 vendor/golang.org/x/net/idna/BUILD.bazel delete mode 100644 vendor/golang.org/x/net/internal/iana/BUILD.bazel delete mode 100644 vendor/golang.org/x/net/internal/socket/BUILD.bazel delete mode 100644 vendor/golang.org/x/net/internal/timeseries/BUILD.bazel delete mode 100644 vendor/golang.org/x/net/ipv4/BUILD.bazel delete mode 100644 vendor/golang.org/x/net/ipv6/BUILD.bazel delete mode 100644 vendor/golang.org/x/net/trace/BUILD.bazel delete mode 100644 vendor/golang.org/x/oauth2/BUILD.bazel delete mode 100644 vendor/golang.org/x/oauth2/authhandler/BUILD.bazel delete mode 100644 vendor/golang.org/x/oauth2/google/BUILD.bazel delete mode 100644 vendor/golang.org/x/oauth2/google/internal/externalaccount/BUILD.bazel delete mode 100644 vendor/golang.org/x/oauth2/internal/BUILD.bazel delete mode 100644 vendor/golang.org/x/oauth2/jws/BUILD.bazel delete mode 100644 vendor/golang.org/x/oauth2/jwt/BUILD.bazel delete mode 100644 vendor/golang.org/x/sys/cpu/BUILD.bazel delete mode 100644 vendor/golang.org/x/sys/internal/unsafeheader/BUILD.bazel delete mode 100644 vendor/golang.org/x/sys/plan9/BUILD.bazel delete mode 100644 vendor/golang.org/x/sys/unix/BUILD.bazel delete mode 100644 vendor/golang.org/x/sys/windows/BUILD.bazel delete mode 100644 vendor/golang.org/x/term/BUILD.bazel delete mode 100644 vendor/golang.org/x/text/encoding/BUILD.bazel delete mode 100644 vendor/golang.org/x/text/encoding/charmap/BUILD.bazel delete mode 100644 vendor/golang.org/x/text/encoding/htmlindex/BUILD.bazel delete mode 100644 vendor/golang.org/x/text/encoding/internal/BUILD.bazel delete mode 100644 vendor/golang.org/x/text/encoding/internal/identifier/BUILD.bazel delete mode 100644 vendor/golang.org/x/text/encoding/japanese/BUILD.bazel delete mode 100644 vendor/golang.org/x/text/encoding/korean/BUILD.bazel delete mode 100644 vendor/golang.org/x/text/encoding/simplifiedchinese/BUILD.bazel delete mode 100644 vendor/golang.org/x/text/encoding/traditionalchinese/BUILD.bazel delete mode 100644 vendor/golang.org/x/text/encoding/unicode/BUILD.bazel delete mode 100644 vendor/golang.org/x/text/internal/language/BUILD.bazel delete mode 100644 vendor/golang.org/x/text/internal/language/compact/BUILD.bazel delete mode 100644 vendor/golang.org/x/text/internal/tag/BUILD.bazel delete mode 100644 vendor/golang.org/x/text/internal/utf8internal/BUILD.bazel delete mode 100644 vendor/golang.org/x/text/language/BUILD.bazel delete mode 100644 vendor/golang.org/x/text/runes/BUILD.bazel delete mode 100644 vendor/golang.org/x/text/secure/bidirule/BUILD.bazel delete mode 100644 vendor/golang.org/x/text/transform/BUILD.bazel delete mode 100644 vendor/golang.org/x/text/unicode/bidi/BUILD.bazel delete mode 100644 vendor/golang.org/x/text/unicode/norm/BUILD.bazel delete mode 100644 vendor/golang.org/x/text/width/BUILD.bazel delete mode 100644 vendor/golang.org/x/tools/cover/BUILD.bazel delete mode 100644 vendor/golang.org/x/tools/go/analysis/BUILD.bazel delete mode 100644 vendor/golang.org/x/tools/go/ast/astutil/BUILD.bazel delete mode 100644 vendor/golang.org/x/tools/go/ast/inspector/BUILD.bazel delete mode 100644 vendor/golang.org/x/tools/internal/analysisinternal/BUILD.bazel delete mode 100644 vendor/golang.org/x/tools/internal/lsp/fuzzy/BUILD.bazel delete mode 100644 vendor/golang.org/x/tools/internal/typeparams/BUILD.bazel delete mode 100644 vendor/google.golang.org/appengine/BUILD.bazel delete mode 100644 vendor/google.golang.org/appengine/internal/BUILD.bazel delete mode 100644 vendor/google.golang.org/appengine/internal/app_identity/BUILD.bazel delete mode 100644 vendor/google.golang.org/appengine/internal/base/BUILD.bazel delete mode 100644 vendor/google.golang.org/appengine/internal/datastore/BUILD.bazel delete mode 100644 vendor/google.golang.org/appengine/internal/log/BUILD.bazel delete mode 100644 vendor/google.golang.org/appengine/internal/modules/BUILD.bazel delete mode 100644 vendor/google.golang.org/appengine/internal/remote_api/BUILD.bazel delete mode 100644 vendor/google.golang.org/appengine/internal/urlfetch/BUILD.bazel delete mode 100644 vendor/google.golang.org/appengine/urlfetch/BUILD.bazel delete mode 100644 vendor/google.golang.org/genproto/googleapis/rpc/status/BUILD.bazel delete mode 100644 vendor/google.golang.org/protobuf/encoding/prototext/BUILD.bazel delete mode 100644 vendor/google.golang.org/protobuf/encoding/protowire/BUILD.bazel delete mode 100644 vendor/google.golang.org/protobuf/internal/descfmt/BUILD.bazel delete mode 100644 vendor/google.golang.org/protobuf/internal/descopts/BUILD.bazel delete mode 100644 vendor/google.golang.org/protobuf/internal/detrand/BUILD.bazel delete mode 100644 vendor/google.golang.org/protobuf/internal/encoding/defval/BUILD.bazel delete mode 100644 vendor/google.golang.org/protobuf/internal/encoding/messageset/BUILD.bazel delete mode 100644 vendor/google.golang.org/protobuf/internal/encoding/tag/BUILD.bazel delete mode 100644 vendor/google.golang.org/protobuf/internal/encoding/text/BUILD.bazel delete mode 100644 vendor/google.golang.org/protobuf/internal/errors/BUILD.bazel delete mode 100644 vendor/google.golang.org/protobuf/internal/filedesc/BUILD.bazel delete mode 100644 vendor/google.golang.org/protobuf/internal/filetype/BUILD.bazel delete mode 100644 vendor/google.golang.org/protobuf/internal/flags/BUILD.bazel delete mode 100644 vendor/google.golang.org/protobuf/internal/genid/BUILD.bazel delete mode 100644 vendor/google.golang.org/protobuf/internal/impl/BUILD.bazel delete mode 100644 vendor/google.golang.org/protobuf/internal/order/BUILD.bazel delete mode 100644 vendor/google.golang.org/protobuf/internal/pragma/BUILD.bazel delete mode 100644 vendor/google.golang.org/protobuf/internal/set/BUILD.bazel delete mode 100644 vendor/google.golang.org/protobuf/internal/strs/BUILD.bazel delete mode 100644 vendor/google.golang.org/protobuf/internal/version/BUILD.bazel delete mode 100644 vendor/google.golang.org/protobuf/proto/BUILD.bazel delete mode 100644 vendor/google.golang.org/protobuf/reflect/protodesc/BUILD.bazel delete mode 100644 vendor/google.golang.org/protobuf/reflect/protoreflect/BUILD.bazel delete mode 100644 vendor/google.golang.org/protobuf/reflect/protoregistry/BUILD.bazel delete mode 100644 vendor/google.golang.org/protobuf/runtime/protoiface/BUILD.bazel delete mode 100644 vendor/google.golang.org/protobuf/runtime/protoimpl/BUILD.bazel delete mode 100644 vendor/google.golang.org/protobuf/types/descriptorpb/BUILD.bazel delete mode 100644 vendor/google.golang.org/protobuf/types/known/anypb/BUILD.bazel delete mode 100644 vendor/google.golang.org/protobuf/types/known/durationpb/BUILD.bazel delete mode 100644 vendor/google.golang.org/protobuf/types/known/timestamppb/BUILD.bazel delete mode 100644 vendor/gopkg.in/cheggaaa/pb.v1/BUILD.bazel delete mode 100644 vendor/gopkg.in/yaml.v2/BUILD.bazel delete mode 100644 vendor/gopkg.in/yaml.v3/BUILD.bazel delete mode 100644 vendor/k8s.io/api/admission/v1/BUILD.bazel delete mode 100644 vendor/k8s.io/api/admissionregistration/v1/BUILD.bazel delete mode 100644 vendor/k8s.io/api/admissionregistration/v1beta1/BUILD.bazel delete mode 100644 vendor/k8s.io/api/apiserverinternal/v1alpha1/BUILD.bazel delete mode 100644 vendor/k8s.io/api/apps/v1/BUILD.bazel delete mode 100644 vendor/k8s.io/api/apps/v1beta1/BUILD.bazel delete mode 100644 vendor/k8s.io/api/apps/v1beta2/BUILD.bazel delete mode 100644 vendor/k8s.io/api/authentication/v1/BUILD.bazel delete mode 100644 vendor/k8s.io/api/authentication/v1beta1/BUILD.bazel delete mode 100644 vendor/k8s.io/api/authorization/v1/BUILD.bazel delete mode 100644 vendor/k8s.io/api/authorization/v1beta1/BUILD.bazel delete mode 100644 vendor/k8s.io/api/autoscaling/v1/BUILD.bazel delete mode 100644 vendor/k8s.io/api/autoscaling/v2beta1/BUILD.bazel delete mode 100644 vendor/k8s.io/api/autoscaling/v2beta2/BUILD.bazel delete mode 100644 vendor/k8s.io/api/batch/v1beta1/BUILD.bazel delete mode 100644 vendor/k8s.io/api/certificates/v1/BUILD.bazel delete mode 100644 vendor/k8s.io/api/certificates/v1beta1/BUILD.bazel delete mode 100644 vendor/k8s.io/api/coordination/v1beta1/BUILD.bazel delete mode 100644 vendor/k8s.io/api/core/v1/BUILD.bazel delete mode 100644 vendor/k8s.io/api/discovery/v1/BUILD.bazel delete mode 100644 vendor/k8s.io/api/discovery/v1beta1/BUILD.bazel delete mode 100644 vendor/k8s.io/api/events/v1beta1/BUILD.bazel delete mode 100644 vendor/k8s.io/api/extensions/v1beta1/BUILD.bazel delete mode 100644 vendor/k8s.io/api/flowcontrol/v1alpha1/BUILD.bazel delete mode 100644 vendor/k8s.io/api/flowcontrol/v1beta1/BUILD.bazel delete mode 100644 vendor/k8s.io/api/flowcontrol/v1beta2/BUILD.bazel delete mode 100644 vendor/k8s.io/api/networking/v1/BUILD.bazel delete mode 100644 vendor/k8s.io/api/networking/v1beta1/BUILD.bazel delete mode 100644 vendor/k8s.io/api/node/v1/BUILD.bazel delete mode 100644 vendor/k8s.io/api/node/v1alpha1/BUILD.bazel delete mode 100644 vendor/k8s.io/api/node/v1beta1/BUILD.bazel delete mode 100644 vendor/k8s.io/api/policy/v1/BUILD.bazel delete mode 100644 vendor/k8s.io/api/policy/v1beta1/BUILD.bazel delete mode 100644 vendor/k8s.io/api/rbac/v1/BUILD.bazel delete mode 100644 vendor/k8s.io/api/rbac/v1alpha1/BUILD.bazel delete mode 100644 vendor/k8s.io/api/rbac/v1beta1/BUILD.bazel delete mode 100644 vendor/k8s.io/api/scheduling/v1/BUILD.bazel delete mode 100644 vendor/k8s.io/api/scheduling/v1alpha1/BUILD.bazel delete mode 100644 vendor/k8s.io/api/scheduling/v1beta1/BUILD.bazel delete mode 100644 vendor/k8s.io/api/storage/v1/BUILD.bazel delete mode 100644 vendor/k8s.io/api/storage/v1alpha1/BUILD.bazel delete mode 100644 vendor/k8s.io/api/storage/v1beta1/BUILD.bazel delete mode 100644 vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/BUILD.bazel delete mode 100644 vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/BUILD.bazel delete mode 100644 vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/BUILD.bazel delete mode 100644 vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/BUILD.bazel delete mode 100644 vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/fake/BUILD.bazel delete mode 100644 vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1/BUILD.bazel delete mode 100644 vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1/fake/BUILD.bazel delete mode 100644 vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1/BUILD.bazel delete mode 100644 vendor/k8s.io/apimachinery/pkg/api/equality/BUILD.bazel delete mode 100644 vendor/k8s.io/apimachinery/pkg/api/errors/BUILD.bazel delete mode 100644 vendor/k8s.io/apimachinery/pkg/api/meta/BUILD.bazel delete mode 100644 vendor/k8s.io/apimachinery/pkg/api/resource/BUILD.bazel delete mode 100644 vendor/k8s.io/apimachinery/pkg/apis/meta/internalversion/BUILD.bazel delete mode 100644 vendor/k8s.io/apimachinery/pkg/apis/meta/v1/BUILD.bazel delete mode 100644 vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/BUILD.bazel delete mode 100644 vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1/BUILD.bazel delete mode 100644 vendor/k8s.io/apimachinery/pkg/conversion/BUILD.bazel delete mode 100644 vendor/k8s.io/apimachinery/pkg/conversion/queryparams/BUILD.bazel delete mode 100644 vendor/k8s.io/apimachinery/pkg/fields/BUILD.bazel delete mode 100644 vendor/k8s.io/apimachinery/pkg/labels/BUILD.bazel delete mode 100644 vendor/k8s.io/apimachinery/pkg/runtime/BUILD.bazel delete mode 100644 vendor/k8s.io/apimachinery/pkg/runtime/schema/BUILD.bazel delete mode 100644 vendor/k8s.io/apimachinery/pkg/runtime/serializer/BUILD.bazel delete mode 100644 vendor/k8s.io/apimachinery/pkg/runtime/serializer/json/BUILD.bazel delete mode 100644 vendor/k8s.io/apimachinery/pkg/runtime/serializer/protobuf/BUILD.bazel delete mode 100644 vendor/k8s.io/apimachinery/pkg/runtime/serializer/recognizer/BUILD.bazel delete mode 100644 vendor/k8s.io/apimachinery/pkg/runtime/serializer/streaming/BUILD.bazel delete mode 100644 vendor/k8s.io/apimachinery/pkg/runtime/serializer/versioning/BUILD.bazel delete mode 100644 vendor/k8s.io/apimachinery/pkg/selection/BUILD.bazel delete mode 100644 vendor/k8s.io/apimachinery/pkg/types/BUILD.bazel delete mode 100644 vendor/k8s.io/apimachinery/pkg/util/cache/BUILD.bazel delete mode 100644 vendor/k8s.io/apimachinery/pkg/util/clock/BUILD.bazel delete mode 100644 vendor/k8s.io/apimachinery/pkg/util/diff/BUILD.bazel delete mode 100644 vendor/k8s.io/apimachinery/pkg/util/errors/BUILD.bazel delete mode 100644 vendor/k8s.io/apimachinery/pkg/util/framer/BUILD.bazel delete mode 100644 vendor/k8s.io/apimachinery/pkg/util/httpstream/BUILD.bazel delete mode 100644 vendor/k8s.io/apimachinery/pkg/util/httpstream/spdy/BUILD.bazel delete mode 100644 vendor/k8s.io/apimachinery/pkg/util/intstr/BUILD.bazel delete mode 100644 vendor/k8s.io/apimachinery/pkg/util/json/BUILD.bazel delete mode 100644 vendor/k8s.io/apimachinery/pkg/util/managedfields/BUILD.bazel delete mode 100644 vendor/k8s.io/apimachinery/pkg/util/mergepatch/BUILD.bazel delete mode 100644 vendor/k8s.io/apimachinery/pkg/util/naming/BUILD.bazel delete mode 100644 vendor/k8s.io/apimachinery/pkg/util/net/BUILD.bazel delete mode 100644 vendor/k8s.io/apimachinery/pkg/util/rand/BUILD.bazel delete mode 100644 vendor/k8s.io/apimachinery/pkg/util/remotecommand/BUILD.bazel delete mode 100644 vendor/k8s.io/apimachinery/pkg/util/runtime/BUILD.bazel delete mode 100644 vendor/k8s.io/apimachinery/pkg/util/sets/BUILD.bazel delete mode 100644 vendor/k8s.io/apimachinery/pkg/util/strategicpatch/BUILD.bazel delete mode 100644 vendor/k8s.io/apimachinery/pkg/util/uuid/BUILD.bazel delete mode 100644 vendor/k8s.io/apimachinery/pkg/util/validation/BUILD.bazel delete mode 100644 vendor/k8s.io/apimachinery/pkg/util/validation/field/BUILD.bazel delete mode 100644 vendor/k8s.io/apimachinery/pkg/util/wait/BUILD.bazel delete mode 100644 vendor/k8s.io/apimachinery/pkg/util/yaml/BUILD.bazel delete mode 100644 vendor/k8s.io/apimachinery/pkg/version/BUILD.bazel delete mode 100644 vendor/k8s.io/apimachinery/pkg/watch/BUILD.bazel delete mode 100644 vendor/k8s.io/apimachinery/third_party/forked/golang/json/BUILD.bazel delete mode 100644 vendor/k8s.io/apimachinery/third_party/forked/golang/netutil/BUILD.bazel delete mode 100644 vendor/k8s.io/apimachinery/third_party/forked/golang/reflect/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/applyconfigurations/apiserverinternal/v1alpha1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/applyconfigurations/apps/v1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/applyconfigurations/apps/v1beta1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/applyconfigurations/apps/v1beta2/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/applyconfigurations/autoscaling/v1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/applyconfigurations/autoscaling/v2/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/applyconfigurations/autoscaling/v2beta1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/applyconfigurations/batch/v1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/applyconfigurations/batch/v1beta1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/applyconfigurations/certificates/v1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/applyconfigurations/certificates/v1beta1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/applyconfigurations/coordination/v1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/applyconfigurations/coordination/v1beta1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/applyconfigurations/core/v1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/applyconfigurations/discovery/v1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/applyconfigurations/discovery/v1beta1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/applyconfigurations/events/v1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/applyconfigurations/events/v1beta1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/applyconfigurations/extensions/v1beta1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/applyconfigurations/flowcontrol/v1alpha1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta2/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/applyconfigurations/internal/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/applyconfigurations/meta/v1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/applyconfigurations/networking/v1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/applyconfigurations/networking/v1beta1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/applyconfigurations/node/v1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/applyconfigurations/node/v1alpha1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/applyconfigurations/node/v1beta1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/applyconfigurations/policy/v1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/applyconfigurations/policy/v1beta1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/applyconfigurations/rbac/v1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/applyconfigurations/rbac/v1alpha1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/applyconfigurations/rbac/v1beta1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/applyconfigurations/scheduling/v1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/applyconfigurations/scheduling/v1alpha1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/applyconfigurations/scheduling/v1beta1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/applyconfigurations/storage/v1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/applyconfigurations/storage/v1alpha1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/applyconfigurations/storage/v1beta1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/discovery/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/discovery/fake/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/dynamic/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/dynamic/fake/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/informers/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/informers/admissionregistration/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/informers/admissionregistration/v1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/informers/admissionregistration/v1beta1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/informers/apiserverinternal/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/informers/apiserverinternal/v1alpha1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/informers/apps/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/informers/apps/v1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/informers/apps/v1beta1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/informers/apps/v1beta2/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/informers/autoscaling/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/informers/autoscaling/v1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/informers/autoscaling/v2/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/informers/autoscaling/v2beta1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/informers/autoscaling/v2beta2/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/informers/batch/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/informers/batch/v1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/informers/batch/v1beta1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/informers/certificates/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/informers/certificates/v1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/informers/certificates/v1beta1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/informers/coordination/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/informers/coordination/v1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/informers/coordination/v1beta1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/informers/core/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/informers/core/v1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/informers/discovery/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/informers/discovery/v1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/informers/discovery/v1beta1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/informers/events/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/informers/events/v1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/informers/events/v1beta1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/informers/extensions/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/informers/extensions/v1beta1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/informers/flowcontrol/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/informers/flowcontrol/v1alpha1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/informers/flowcontrol/v1beta1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/informers/flowcontrol/v1beta2/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/informers/internalinterfaces/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/informers/networking/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/informers/networking/v1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/informers/networking/v1beta1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/informers/node/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/informers/node/v1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/informers/node/v1alpha1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/informers/node/v1beta1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/informers/policy/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/informers/policy/v1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/informers/policy/v1beta1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/informers/rbac/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/informers/rbac/v1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/informers/rbac/v1alpha1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/informers/rbac/v1beta1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/informers/scheduling/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/informers/scheduling/v1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/informers/scheduling/v1alpha1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/informers/scheduling/v1beta1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/informers/storage/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/informers/storage/v1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/informers/storage/v1alpha1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/informers/storage/v1beta1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/kubernetes/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/kubernetes/fake/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/kubernetes/scheme/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/fake/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/fake/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/kubernetes/typed/apiserverinternal/v1alpha1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/kubernetes/typed/apps/v1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/kubernetes/typed/apps/v1/fake/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/fake/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/kubernetes/typed/authentication/v1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/kubernetes/typed/authentication/v1/fake/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/fake/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/fake/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v1/fake/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2/fake/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/fake/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta2/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta2/fake/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/kubernetes/typed/batch/v1beta1/fake/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/fake/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/kubernetes/typed/coordination/v1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/kubernetes/typed/coordination/v1/fake/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/kubernetes/typed/coordination/v1beta1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/kubernetes/typed/coordination/v1beta1/fake/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/kubernetes/typed/core/v1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/kubernetes/typed/discovery/v1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/kubernetes/typed/discovery/v1beta1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/kubernetes/typed/discovery/v1beta1/fake/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/kubernetes/typed/events/v1beta1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/kubernetes/typed/events/v1beta1/fake/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1/fake/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta1/fake/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta2/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta2/fake/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/kubernetes/typed/networking/v1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/kubernetes/typed/networking/v1/fake/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/kubernetes/typed/networking/v1beta1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/kubernetes/typed/networking/v1beta1/fake/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/kubernetes/typed/node/v1alpha1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/kubernetes/typed/node/v1alpha1/fake/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/kubernetes/typed/node/v1beta1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/kubernetes/typed/policy/v1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/kubernetes/typed/policy/v1/fake/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/fake/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/kubernetes/typed/rbac/v1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/kubernetes/typed/rbac/v1/fake/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/kubernetes/typed/scheduling/v1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/kubernetes/typed/scheduling/v1/fake/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/fake/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/kubernetes/typed/scheduling/v1beta1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/kubernetes/typed/storage/v1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/kubernetes/typed/storage/v1/fake/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/fake/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1/fake/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/listers/admissionregistration/v1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/listers/admissionregistration/v1beta1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/listers/apiserverinternal/v1alpha1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/listers/apps/v1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/listers/apps/v1beta1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/listers/apps/v1beta2/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/listers/autoscaling/v1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/listers/autoscaling/v2/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/listers/autoscaling/v2beta1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/listers/autoscaling/v2beta2/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/listers/batch/v1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/listers/batch/v1beta1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/listers/certificates/v1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/listers/certificates/v1beta1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/listers/coordination/v1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/listers/coordination/v1beta1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/listers/core/v1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/listers/discovery/v1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/listers/discovery/v1beta1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/listers/events/v1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/listers/events/v1beta1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/listers/extensions/v1beta1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/listers/flowcontrol/v1alpha1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/listers/flowcontrol/v1beta1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/listers/flowcontrol/v1beta2/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/listers/networking/v1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/listers/networking/v1beta1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/listers/node/v1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/listers/node/v1alpha1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/listers/node/v1beta1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/listers/policy/v1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/listers/policy/v1beta1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/listers/rbac/v1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/listers/rbac/v1alpha1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/listers/rbac/v1beta1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/listers/scheduling/v1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/listers/scheduling/v1alpha1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/listers/scheduling/v1beta1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/listers/storage/v1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/listers/storage/v1alpha1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/listers/storage/v1beta1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/pkg/apis/clientauthentication/install/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/pkg/apis/clientauthentication/v1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/pkg/apis/clientauthentication/v1beta1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/pkg/version/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/plugin/pkg/client/auth/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/plugin/pkg/client/auth/azure/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/plugin/pkg/client/auth/exec/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/plugin/pkg/client/auth/gcp/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/plugin/pkg/client/auth/oidc/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/plugin/pkg/client/auth/openstack/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/rest/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/rest/fake/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/rest/watch/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/testing/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/third_party/forked/golang/template/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/tools/auth/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/tools/cache/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/tools/cache/testing/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/tools/clientcmd/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/tools/clientcmd/api/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/tools/clientcmd/api/latest/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/tools/clientcmd/api/v1/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/tools/leaderelection/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/tools/leaderelection/resourcelock/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/tools/metrics/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/tools/pager/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/tools/portforward/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/tools/record/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/tools/record/util/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/tools/reference/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/tools/remotecommand/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/tools/watch/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/transport/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/transport/spdy/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/util/cert/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/util/certificate/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/util/certificate/csr/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/util/connrotation/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/util/exec/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/util/flowcontrol/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/util/homedir/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/util/jsonpath/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/util/keyutil/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/util/retry/BUILD.bazel delete mode 100644 vendor/k8s.io/client-go/util/workqueue/BUILD.bazel delete mode 100644 vendor/k8s.io/klog/v2/BUILD.bazel delete mode 100644 vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/BUILD.bazel delete mode 100644 vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/v1/BUILD.bazel delete mode 100644 vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1/BUILD.bazel delete mode 100644 vendor/k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/BUILD.bazel delete mode 100644 vendor/k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1/BUILD.bazel delete mode 100644 vendor/k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1beta1/BUILD.bazel delete mode 100644 vendor/k8s.io/kube-openapi/pkg/builder/BUILD.bazel delete mode 100644 vendor/k8s.io/kube-openapi/pkg/common/BUILD.bazel delete mode 100644 vendor/k8s.io/kube-openapi/pkg/schemaconv/BUILD.bazel delete mode 100644 vendor/k8s.io/kube-openapi/pkg/util/BUILD.bazel delete mode 100644 vendor/k8s.io/kube-openapi/pkg/util/proto/BUILD.bazel delete mode 100644 vendor/k8s.io/kubectl/pkg/cmd/util/podcmd/BUILD.bazel delete mode 100644 vendor/k8s.io/utils/buffer/BUILD.bazel delete mode 100644 vendor/k8s.io/utils/clock/testing/BUILD.bazel delete mode 100644 vendor/k8s.io/utils/internal/third_party/forked/golang/net/BUILD.bazel delete mode 100644 vendor/k8s.io/utils/net/BUILD.bazel delete mode 100644 vendor/k8s.io/utils/trace/BUILD.bazel delete mode 120000 vendor/kubevirt.io/api rename vendor/{k8s.io/utils/clock => kubevirt.io/api/core}/BUILD.bazel (52%) create mode 100644 vendor/kubevirt.io/api/core/register.go create mode 100644 vendor/kubevirt.io/api/core/v1/BUILD.bazel create mode 100644 vendor/kubevirt.io/api/core/v1/componentconfig.go create mode 100644 vendor/kubevirt.io/api/core/v1/deepcopy_generated.go create mode 100644 vendor/kubevirt.io/api/core/v1/defaults.go create mode 100644 vendor/kubevirt.io/api/core/v1/doc.go create mode 100644 vendor/kubevirt.io/api/core/v1/register.go create mode 100644 vendor/kubevirt.io/api/core/v1/sanitizers.go create mode 100644 vendor/kubevirt.io/api/core/v1/schema.go create mode 100644 vendor/kubevirt.io/api/core/v1/schema_swagger_generated.go create mode 100644 vendor/kubevirt.io/api/core/v1/types.go create mode 100644 vendor/kubevirt.io/api/core/v1/types_swagger_generated.go create mode 100644 vendor/kubevirt.io/api/core/v1/zz_generated.defaults.go rename vendor/{k8s.io/utils/integer => kubevirt.io/api/flavor}/BUILD.bazel (51%) create mode 100644 vendor/kubevirt.io/api/flavor/register.go rename vendor/{k8s.io/client-go/pkg/apis/clientauthentication => kubevirt.io/api/flavor/v1alpha1}/BUILD.bazel (64%) create mode 100644 vendor/kubevirt.io/api/flavor/v1alpha1/deepcopy_generated.go create mode 100644 vendor/kubevirt.io/api/flavor/v1alpha1/doc.go create mode 100644 vendor/kubevirt.io/api/flavor/v1alpha1/register.go create mode 100644 vendor/kubevirt.io/api/flavor/v1alpha1/types.go create mode 100644 vendor/kubevirt.io/api/flavor/v1alpha1/types_swagger_generated.go rename vendor/{k8s.io/utils/pointer => kubevirt.io/api/migrations}/BUILD.bazel (51%) create mode 100644 vendor/kubevirt.io/api/migrations/register.go rename vendor/{k8s.io/api/autoscaling/v2 => kubevirt.io/api/migrations/v1alpha1}/BUILD.bazel (66%) create mode 100644 vendor/kubevirt.io/api/migrations/v1alpha1/deepcopy_generated.go create mode 100644 vendor/kubevirt.io/api/migrations/v1alpha1/doc.go create mode 100644 vendor/kubevirt.io/api/migrations/v1alpha1/register.go create mode 100644 vendor/kubevirt.io/api/migrations/v1alpha1/types.go create mode 100644 vendor/kubevirt.io/api/migrations/v1alpha1/types_swagger_generated.go create mode 100644 vendor/kubevirt.io/api/migrations/v1alpha1/zz_generated.defaults.go create mode 100644 vendor/kubevirt.io/api/pool/BUILD.bazel create mode 100644 vendor/kubevirt.io/api/pool/register.go rename vendor/{k8s.io/api/events/v1 => kubevirt.io/api/pool/v1alpha1}/BUILD.bazel (64%) create mode 100644 vendor/kubevirt.io/api/pool/v1alpha1/deepcopy_generated.go create mode 100644 vendor/kubevirt.io/api/pool/v1alpha1/doc.go create mode 100644 vendor/kubevirt.io/api/pool/v1alpha1/register.go create mode 100644 vendor/kubevirt.io/api/pool/v1alpha1/types.go create mode 100644 vendor/kubevirt.io/api/pool/v1alpha1/types_swagger_generated.go create mode 100644 vendor/kubevirt.io/api/snapshot/BUILD.bazel create mode 100644 vendor/kubevirt.io/api/snapshot/register.go rename vendor/{k8s.io/api/batch/v1 => kubevirt.io/api/snapshot/v1alpha1}/BUILD.bazel (67%) create mode 100644 vendor/kubevirt.io/api/snapshot/v1alpha1/deepcopy_generated.go create mode 100644 vendor/kubevirt.io/api/snapshot/v1alpha1/doc.go create mode 100644 vendor/kubevirt.io/api/snapshot/v1alpha1/register.go create mode 100644 vendor/kubevirt.io/api/snapshot/v1alpha1/types.go create mode 100644 vendor/kubevirt.io/api/snapshot/v1alpha1/types_swagger_generated.go delete mode 120000 vendor/kubevirt.io/client-go create mode 100644 vendor/kubevirt.io/client-go/api/BUILD.bazel create mode 100644 vendor/kubevirt.io/client-go/api/openapi_generated.go create mode 100644 vendor/kubevirt.io/client-go/api/utils.go create mode 100644 vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/BUILD.bazel create mode 100644 vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/clientset.go create mode 100644 vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/doc.go create mode 100644 vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/fake/BUILD.bazel create mode 100644 vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/fake/clientset_generated.go create mode 100644 vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/fake/doc.go create mode 100644 vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/fake/register.go rename vendor/{k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset => kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned}/scheme/BUILD.bazel (60%) create mode 100644 vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/scheme/doc.go create mode 100644 vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/scheme/register.go create mode 100644 vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/core/v1beta1/BUILD.bazel create mode 100644 vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/core/v1beta1/cdi.go create mode 100644 vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/core/v1beta1/cdiconfig.go create mode 100644 vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/core/v1beta1/core_client.go create mode 100644 vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/core/v1beta1/dataimportcron.go create mode 100644 vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/core/v1beta1/datasource.go create mode 100644 vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/core/v1beta1/datavolume.go create mode 100644 vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/core/v1beta1/doc.go rename vendor/{k8s.io/client-go/kubernetes/typed/scheduling => kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/core}/v1beta1/fake/BUILD.bazel (55%) create mode 100644 vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/core/v1beta1/fake/doc.go create mode 100644 vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/core/v1beta1/fake/fake_cdi.go create mode 100644 vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/core/v1beta1/fake/fake_cdiconfig.go create mode 100644 vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/core/v1beta1/fake/fake_core_client.go create mode 100644 vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/core/v1beta1/fake/fake_dataimportcron.go create mode 100644 vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/core/v1beta1/fake/fake_datasource.go create mode 100644 vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/core/v1beta1/fake/fake_datavolume.go create mode 100644 vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/core/v1beta1/fake/fake_objecttransfer.go create mode 100644 vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/core/v1beta1/fake/fake_storageprofile.go create mode 100644 vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/core/v1beta1/generated_expansion.go create mode 100644 vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/core/v1beta1/objecttransfer.go create mode 100644 vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/core/v1beta1/storageprofile.go rename vendor/{k8s.io/client-go/kubernetes/typed/events/v1 => kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/upload/v1beta1}/BUILD.bazel (54%) create mode 100644 vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/upload/v1beta1/doc.go rename vendor/{k8s.io/client-go/kubernetes/typed/node/v1 => kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/upload/v1beta1}/fake/BUILD.bazel (62%) create mode 100644 vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/upload/v1beta1/fake/doc.go create mode 100644 vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/upload/v1beta1/fake/fake_upload_client.go create mode 100644 vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/upload/v1beta1/fake/fake_uploadtokenrequest.go create mode 100644 vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/upload/v1beta1/generated_expansion.go create mode 100644 vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/upload/v1beta1/upload_client.go create mode 100644 vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/upload/v1beta1/uploadtokenrequest.go create mode 100644 vendor/kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned/BUILD.bazel create mode 100644 vendor/kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned/clientset.go create mode 100644 vendor/kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned/doc.go create mode 100644 vendor/kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned/fake/BUILD.bazel create mode 100644 vendor/kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned/fake/clientset_generated.go create mode 100644 vendor/kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned/fake/doc.go create mode 100644 vendor/kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned/fake/register.go rename vendor/{github.com/openshift/client-go/security => kubevirt.io/client-go/generated/external-snapshotter}/clientset/versioned/scheme/BUILD.bazel (68%) create mode 100644 vendor/kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned/scheme/doc.go create mode 100644 vendor/kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned/scheme/register.go rename vendor/{k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1 => kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned/typed/volumesnapshot/v1}/BUILD.bazel (50%) create mode 100644 vendor/kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned/typed/volumesnapshot/v1/doc.go rename vendor/{k8s.io/client-go/kubernetes/typed/apiserverinternal/v1alpha1 => kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned/typed/volumesnapshot/v1}/fake/BUILD.bazel (56%) create mode 100644 vendor/kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned/typed/volumesnapshot/v1/fake/doc.go create mode 100644 vendor/kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned/typed/volumesnapshot/v1/fake/fake_volumesnapshot.go create mode 100644 vendor/kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned/typed/volumesnapshot/v1/fake/fake_volumesnapshot_client.go create mode 100644 vendor/kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned/typed/volumesnapshot/v1/fake/fake_volumesnapshotclass.go create mode 100644 vendor/kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned/typed/volumesnapshot/v1/fake/fake_volumesnapshotcontent.go create mode 100644 vendor/kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned/typed/volumesnapshot/v1/generated_expansion.go create mode 100644 vendor/kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned/typed/volumesnapshot/v1/volumesnapshot.go create mode 100644 vendor/kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned/typed/volumesnapshot/v1/volumesnapshot_client.go create mode 100644 vendor/kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned/typed/volumesnapshot/v1/volumesnapshotclass.go create mode 100644 vendor/kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned/typed/volumesnapshot/v1/volumesnapshotcontent.go create mode 100644 vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/BUILD.bazel create mode 100644 vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/clientset.go create mode 100644 vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/doc.go create mode 100644 vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/fake/BUILD.bazel create mode 100644 vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/fake/clientset_generated.go create mode 100644 vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/fake/doc.go create mode 100644 vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/fake/register.go rename vendor/{k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset => kubevirt.io/client-go/generated/kubevirt/clientset/versioned}/scheme/BUILD.bazel (60%) create mode 100644 vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/scheme/doc.go create mode 100644 vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/scheme/register.go rename vendor/{k8s.io/client-go/kubernetes/typed/batch/v1 => kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/flavor/v1alpha1}/BUILD.bazel (53%) create mode 100644 vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/flavor/v1alpha1/doc.go rename vendor/{k8s.io/client-go/kubernetes/typed/events/v1 => kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/flavor/v1alpha1}/fake/BUILD.bazel (60%) create mode 100644 vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/flavor/v1alpha1/fake/doc.go create mode 100644 vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/flavor/v1alpha1/fake/fake_flavor_client.go create mode 100644 vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/flavor/v1alpha1/fake/fake_virtualmachineclusterflavor.go create mode 100644 vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/flavor/v1alpha1/fake/fake_virtualmachineflavor.go create mode 100644 vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/flavor/v1alpha1/flavor_client.go create mode 100644 vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/flavor/v1alpha1/generated_expansion.go create mode 100644 vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/flavor/v1alpha1/virtualmachineclusterflavor.go create mode 100644 vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/flavor/v1alpha1/virtualmachineflavor.go rename vendor/{k8s.io/client-go/kubernetes/typed/batch/v1beta1 => kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/migrations/v1alpha1}/BUILD.bazel (53%) create mode 100644 vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/migrations/v1alpha1/doc.go rename vendor/{k8s.io/client-go/kubernetes/typed/batch/v1 => kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/migrations/v1alpha1}/fake/BUILD.bazel (59%) create mode 100644 vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/migrations/v1alpha1/fake/doc.go create mode 100644 vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/migrations/v1alpha1/fake/fake_migrationpolicy.go create mode 100644 vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/migrations/v1alpha1/fake/fake_migrations_client.go create mode 100644 vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/migrations/v1alpha1/generated_expansion.go create mode 100644 vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/migrations/v1alpha1/migrationpolicy.go create mode 100644 vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/migrations/v1alpha1/migrations_client.go rename vendor/{k8s.io/client-go/kubernetes/typed/node/v1 => kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/pool/v1alpha1}/BUILD.bazel (55%) create mode 100644 vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/pool/v1alpha1/doc.go rename vendor/{k8s.io/client-go/kubernetes/typed/node/v1beta1 => kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/pool/v1alpha1}/fake/BUILD.bazel (59%) create mode 100644 vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/pool/v1alpha1/fake/doc.go create mode 100644 vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/pool/v1alpha1/fake/fake_pool_client.go create mode 100644 vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/pool/v1alpha1/fake/fake_virtualmachinepool.go create mode 100644 vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/pool/v1alpha1/generated_expansion.go create mode 100644 vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/pool/v1alpha1/pool_client.go create mode 100644 vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/pool/v1alpha1/virtualmachinepool.go create mode 100644 vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/snapshot/v1alpha1/BUILD.bazel create mode 100644 vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/snapshot/v1alpha1/doc.go rename vendor/{k8s.io/client-go/kubernetes/typed/discovery/v1 => kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/snapshot/v1alpha1}/fake/BUILD.bazel (58%) create mode 100644 vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/snapshot/v1alpha1/fake/doc.go create mode 100644 vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/snapshot/v1alpha1/fake/fake_snapshot_client.go create mode 100644 vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/snapshot/v1alpha1/fake/fake_virtualmachinerestore.go create mode 100644 vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/snapshot/v1alpha1/fake/fake_virtualmachinesnapshot.go create mode 100644 vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/snapshot/v1alpha1/fake/fake_virtualmachinesnapshotcontent.go create mode 100644 vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/snapshot/v1alpha1/generated_expansion.go create mode 100644 vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/snapshot/v1alpha1/snapshot_client.go create mode 100644 vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/snapshot/v1alpha1/virtualmachinerestore.go create mode 100644 vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/snapshot/v1alpha1/virtualmachinesnapshot.go create mode 100644 vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/snapshot/v1alpha1/virtualmachinesnapshotcontent.go create mode 100644 vendor/kubevirt.io/client-go/generated/network-attachment-definition-client/clientset/versioned/BUILD.bazel create mode 100644 vendor/kubevirt.io/client-go/generated/network-attachment-definition-client/clientset/versioned/clientset.go create mode 100644 vendor/kubevirt.io/client-go/generated/network-attachment-definition-client/clientset/versioned/doc.go create mode 100644 vendor/kubevirt.io/client-go/generated/network-attachment-definition-client/clientset/versioned/fake/BUILD.bazel create mode 100644 vendor/kubevirt.io/client-go/generated/network-attachment-definition-client/clientset/versioned/fake/clientset_generated.go create mode 100644 vendor/kubevirt.io/client-go/generated/network-attachment-definition-client/clientset/versioned/fake/doc.go create mode 100644 vendor/kubevirt.io/client-go/generated/network-attachment-definition-client/clientset/versioned/fake/register.go rename vendor/{github.com/k8snetworkplumbingwg/network-attachment-definition-client/pkg/apis/k8s.cni.cncf.io/v1 => kubevirt.io/client-go/generated/network-attachment-definition-client/clientset/versioned/scheme}/BUILD.bazel (57%) create mode 100644 vendor/kubevirt.io/client-go/generated/network-attachment-definition-client/clientset/versioned/scheme/doc.go create mode 100644 vendor/kubevirt.io/client-go/generated/network-attachment-definition-client/clientset/versioned/scheme/register.go rename vendor/{k8s.io/client-go/kubernetes/typed/certificates => kubevirt.io/client-go/generated/network-attachment-definition-client/clientset/versioned/typed/k8s.cni.cncf.io}/v1/BUILD.bazel (51%) create mode 100644 vendor/kubevirt.io/client-go/generated/network-attachment-definition-client/clientset/versioned/typed/k8s.cni.cncf.io/v1/doc.go rename vendor/{k8s.io/client-go/kubernetes/typed/certificates => kubevirt.io/client-go/generated/network-attachment-definition-client/clientset/versioned/typed/k8s.cni.cncf.io}/v1/fake/BUILD.bazel (57%) create mode 100644 vendor/kubevirt.io/client-go/generated/network-attachment-definition-client/clientset/versioned/typed/k8s.cni.cncf.io/v1/fake/doc.go create mode 100644 vendor/kubevirt.io/client-go/generated/network-attachment-definition-client/clientset/versioned/typed/k8s.cni.cncf.io/v1/fake/fake_k8s.cni.cncf.io_client.go create mode 100644 vendor/kubevirt.io/client-go/generated/network-attachment-definition-client/clientset/versioned/typed/k8s.cni.cncf.io/v1/fake/fake_networkattachmentdefinition.go create mode 100644 vendor/kubevirt.io/client-go/generated/network-attachment-definition-client/clientset/versioned/typed/k8s.cni.cncf.io/v1/generated_expansion.go create mode 100644 vendor/kubevirt.io/client-go/generated/network-attachment-definition-client/clientset/versioned/typed/k8s.cni.cncf.io/v1/k8s.cni.cncf.io_client.go create mode 100644 vendor/kubevirt.io/client-go/generated/network-attachment-definition-client/clientset/versioned/typed/k8s.cni.cncf.io/v1/networkattachmentdefinition.go create mode 100644 vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/BUILD.bazel create mode 100644 vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/clientset.go create mode 100644 vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/doc.go create mode 100644 vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/fake/BUILD.bazel create mode 100644 vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/fake/clientset_generated.go create mode 100644 vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/fake/doc.go create mode 100644 vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/fake/register.go rename vendor/{k8s.io/api/coordination/v1 => kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/scheme}/BUILD.bazel (55%) create mode 100644 vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/scheme/doc.go create mode 100644 vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/scheme/register.go create mode 100644 vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/typed/monitoring/v1/BUILD.bazel create mode 100644 vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/typed/monitoring/v1/alertmanager.go create mode 100644 vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/typed/monitoring/v1/doc.go rename vendor/{k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1 => kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/typed/monitoring/v1}/fake/BUILD.bazel (54%) create mode 100644 vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/typed/monitoring/v1/fake/doc.go create mode 100644 vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/typed/monitoring/v1/fake/fake_alertmanager.go create mode 100644 vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/typed/monitoring/v1/fake/fake_monitoring_client.go create mode 100644 vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/typed/monitoring/v1/fake/fake_podmonitor.go create mode 100644 vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/typed/monitoring/v1/fake/fake_prometheus.go create mode 100644 vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/typed/monitoring/v1/fake/fake_prometheusrule.go create mode 100644 vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/typed/monitoring/v1/fake/fake_servicemonitor.go create mode 100644 vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/typed/monitoring/v1/fake/fake_thanosruler.go create mode 100644 vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/typed/monitoring/v1/generated_expansion.go create mode 100644 vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/typed/monitoring/v1/monitoring_client.go create mode 100644 vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/typed/monitoring/v1/podmonitor.go create mode 100644 vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/typed/monitoring/v1/prometheus.go create mode 100644 vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/typed/monitoring/v1/prometheusrule.go create mode 100644 vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/typed/monitoring/v1/servicemonitor.go create mode 100644 vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/typed/monitoring/v1/thanosruler.go create mode 100644 vendor/kubevirt.io/client-go/kubecli/BUILD.bazel create mode 100644 vendor/kubevirt.io/client-go/kubecli/async.go create mode 100644 vendor/kubevirt.io/client-go/kubecli/generated_mock_kubevirt.go create mode 100644 vendor/kubevirt.io/client-go/kubecli/guestfs.go create mode 100644 vendor/kubevirt.io/client-go/kubecli/handler.go create mode 100644 vendor/kubevirt.io/client-go/kubecli/kubecli.go create mode 100644 vendor/kubevirt.io/client-go/kubecli/kubevirt.go create mode 100644 vendor/kubevirt.io/client-go/kubecli/kubevirt_test_utils.go create mode 100644 vendor/kubevirt.io/client-go/kubecli/kv.go create mode 100644 vendor/kubevirt.io/client-go/kubecli/migration.go create mode 100644 vendor/kubevirt.io/client-go/kubecli/profiler.go create mode 100644 vendor/kubevirt.io/client-go/kubecli/replicaset.go create mode 100644 vendor/kubevirt.io/client-go/kubecli/streamer.go create mode 100644 vendor/kubevirt.io/client-go/kubecli/version.go create mode 100644 vendor/kubevirt.io/client-go/kubecli/vm.go create mode 100644 vendor/kubevirt.io/client-go/kubecli/vmi.go create mode 100644 vendor/kubevirt.io/client-go/kubecli/vmipreset.go create mode 100644 vendor/kubevirt.io/client-go/kubecli/websocket.go create mode 100644 vendor/kubevirt.io/client-go/log/BUILD.bazel create mode 100644 vendor/kubevirt.io/client-go/log/log.go create mode 100644 vendor/kubevirt.io/client-go/precond/BUILD.bazel create mode 100644 vendor/kubevirt.io/client-go/precond/precond.go create mode 100644 vendor/kubevirt.io/client-go/reporter/BUILD.bazel create mode 100644 vendor/kubevirt.io/client-go/reporter/reporter.go create mode 100644 vendor/kubevirt.io/client-go/subresources/BUILD.bazel create mode 100644 vendor/kubevirt.io/client-go/subresources/constants.go create mode 100644 vendor/kubevirt.io/client-go/testutils/BUILD.bazel create mode 100644 vendor/kubevirt.io/client-go/testutils/setup.go create mode 100644 vendor/kubevirt.io/client-go/util/BUILD.bazel create mode 100644 vendor/kubevirt.io/client-go/util/util.go rename vendor/{gopkg.in/inf.v0 => kubevirt.io/client-go/version}/BUILD.bazel (53%) create mode 100644 vendor/kubevirt.io/client-go/version/base.go create mode 100644 vendor/kubevirt.io/client-go/version/def.bzl create mode 100644 vendor/kubevirt.io/client-go/version/types.go create mode 100644 vendor/kubevirt.io/client-go/version/version.go delete mode 100644 vendor/kubevirt.io/containerized-data-importer-api/pkg/apis/core/BUILD.bazel delete mode 100644 vendor/kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1/BUILD.bazel delete mode 100644 vendor/kubevirt.io/containerized-data-importer-api/pkg/apis/upload/BUILD.bazel delete mode 100644 vendor/kubevirt.io/containerized-data-importer-api/pkg/apis/upload/v1beta1/BUILD.bazel delete mode 100644 vendor/kubevirt.io/controller-lifecycle-operator-sdk/pkg/sdk/api/BUILD.bazel delete mode 100644 vendor/kubevirt.io/qe-tools/pkg/ginkgo-reporters/BUILD.bazel delete mode 100644 vendor/kubevirt.io/qe-tools/pkg/polarion-xml/BUILD.bazel delete mode 100644 vendor/libvirt.org/go/libvirt/BUILD.bazel delete mode 100644 vendor/mvdan.cc/editorconfig/BUILD.bazel delete mode 100644 vendor/mvdan.cc/sh/v3/cmd/shfmt/BUILD.bazel delete mode 100644 vendor/mvdan.cc/sh/v3/fileutil/BUILD.bazel delete mode 100644 vendor/mvdan.cc/sh/v3/syntax/BUILD.bazel delete mode 100644 vendor/sigs.k8s.io/controller-runtime/pkg/runtime/scheme/BUILD.bazel delete mode 100644 vendor/sigs.k8s.io/controller-runtime/pkg/scheme/BUILD.bazel delete mode 100644 vendor/sigs.k8s.io/json/BUILD.bazel delete mode 100644 vendor/sigs.k8s.io/json/internal/golang/encoding/json/BUILD.bazel delete mode 100644 vendor/sigs.k8s.io/structured-merge-diff/v4/fieldpath/BUILD.bazel delete mode 100644 vendor/sigs.k8s.io/structured-merge-diff/v4/schema/BUILD.bazel delete mode 100644 vendor/sigs.k8s.io/structured-merge-diff/v4/typed/BUILD.bazel delete mode 100644 vendor/sigs.k8s.io/structured-merge-diff/v4/value/BUILD.bazel delete mode 100644 vendor/sigs.k8s.io/yaml/BUILD.bazel diff --git a/go.mod b/go.mod index 7120ab1b64d1..fcaff7750777 100644 --- a/go.mod +++ b/go.mod @@ -15,9 +15,9 @@ require ( github.com/ghodss/yaml v1.0.0 github.com/go-kit/kit v0.9.0 github.com/go-openapi/errors v0.19.9 - github.com/go-openapi/spec v0.20.3 - github.com/go-openapi/strfmt v0.20.0 - github.com/go-openapi/validate v0.20.2 + github.com/go-openapi/spec v0.20.4 + github.com/go-openapi/strfmt v0.21.1 + github.com/go-openapi/validate v0.22.0 github.com/gogo/protobuf v1.3.2 github.com/golang/glog v1.0.0 github.com/golang/mock v1.5.0 @@ -102,10 +102,10 @@ require ( github.com/form3tech-oss/jwt-go v3.2.3+incompatible // indirect github.com/go-logfmt/logfmt v0.5.0 // indirect github.com/go-logr/logr v1.2.3 // indirect - github.com/go-openapi/analysis v0.20.0 // indirect + github.com/go-openapi/analysis v0.21.2 // indirect github.com/go-openapi/jsonpointer v0.19.5 // indirect github.com/go-openapi/jsonreference v0.19.6 // indirect - github.com/go-openapi/loads v0.20.2 // indirect + github.com/go-openapi/loads v0.21.1 // indirect github.com/go-openapi/runtime v0.19.24 // indirect github.com/go-openapi/swag v0.21.1 // indirect github.com/go-stack/stack v1.8.0 // indirect @@ -127,6 +127,7 @@ require ( github.com/moby/spdystream v0.2.0 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect + github.com/oklog/ulid v1.3.1 // indirect github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417 // indirect github.com/openshift/custom-resource-status v1.1.2 // indirect github.com/pkg/diff v0.0.0-20190930165518-531926345625 // indirect diff --git a/go.sum b/go.sum index 301eb616d57d..66542e34dd9c 100644 --- a/go.sum +++ b/go.sum @@ -120,7 +120,6 @@ github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWX github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= github.com/VividCortex/ewma v1.1.1/go.mod h1:2Tkkvm3sRDVXaiyucHiACn4cqf7DpdyLvmxzcbUokwA= github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d/go.mod h1:asat636LX7Bqt5lYEZ27JNDcqxfjdBQuJ/MM4CN/Lzo= -github.com/agnivade/levenshtein v1.0.1/go.mod h1:CURSv5d9Uaml+FovSIICkLbAUZ9S4RqaHDIsdSBg7lM= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= @@ -128,7 +127,6 @@ github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRF github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/alexflint/go-filemutex v0.0.0-20171022225611-72bdc8eae2ae/go.mod h1:CgnQgUtFrFz9mxFNtED3jI5tLDjKlOM+oUF/sTk6ps0= github.com/aliyun/aliyun-oss-go-sdk v2.0.4+incompatible/go.mod h1:T/Aws4fEfogEE9v+HPhhw+CntffsBHJ8nXQCwKr0/g8= -github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6/go.mod h1:V8iCPQYkqmusNa815XgQio277wI47sdRh1dUOLdyC6Q= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/antlr/antlr4/runtime/Go/antlr v0.0.0-20210826220005-b48c857c3a0e/go.mod h1:F7bn7fEU90QkQ3tnmaTx3LTKLEDqnwWODIYppRQ5hnY= @@ -148,7 +146,6 @@ github.com/asaskevich/govalidator v0.0.0-20200907205600-7a23bdc65eef h1:46PFijGL github.com/asaskevich/govalidator v0.0.0-20200907205600-7a23bdc65eef/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= github.com/aws/aws-sdk-go v1.15.11/go.mod h1:mFuSZ37Z9YOHbQEwBWztmVzqXrEkub65tZoCYDt7FT0= github.com/aws/aws-sdk-go v1.25.48/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= -github.com/aws/aws-sdk-go v1.34.28/go.mod h1:H7NKnBqNVzoTJpGfLrQkkD+ytBA93eiDYi/+8rV9s48= github.com/baiyubin/aliyun-sts-go-sdk v0.0.0-20180326062324-cfa1a18b161f/go.mod h1:AuiFmCCPBSrqvVMvuqFuk0qogytodnVFVSN5CeJB8Gc= github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= @@ -472,16 +469,14 @@ github.com/go-openapi/analysis v0.19.2/go.mod h1:3P1osvZa9jKjb8ed2TPng3f0i/UY9sn github.com/go-openapi/analysis v0.19.4/go.mod h1:3P1osvZa9jKjb8ed2TPng3f0i/UY9snX6gxi44djMjk= github.com/go-openapi/analysis v0.19.5/go.mod h1:hkEAkxagaIvIP7VTn8ygJNkd4kAYON2rCu0v0ObL0AU= github.com/go-openapi/analysis v0.19.10/go.mod h1:qmhS3VNFxBlquFJ0RGoDtylO9y4pgTAUNE9AEEMdlJQ= -github.com/go-openapi/analysis v0.19.16/go.mod h1:GLInF007N83Ad3m8a/CbQ5TPzdnGT7workfHwuVjNVk= -github.com/go-openapi/analysis v0.20.0 h1:UN09o0kNhleunxW7LR+KnltD0YrJ8FF03pSqvAN3Vro= -github.com/go-openapi/analysis v0.20.0/go.mod h1:BMchjvaHDykmRMsK40iPtvyOfFdMMxlOmQr9FBZk+Og= +github.com/go-openapi/analysis v0.21.2 h1:hXFrOYFHUAMQdu6zwAiKKJHJQ8kqZs1ux/ru1P1wLJU= +github.com/go-openapi/analysis v0.21.2/go.mod h1:HZwRk4RRisyG8vx2Oe6aqeSQcoxRp47Xkp3+K6q+LdY= github.com/go-openapi/errors v0.17.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= github.com/go-openapi/errors v0.17.2/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= github.com/go-openapi/errors v0.18.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= github.com/go-openapi/errors v0.19.2/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= github.com/go-openapi/errors v0.19.3/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= github.com/go-openapi/errors v0.19.6/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= -github.com/go-openapi/errors v0.19.7/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= github.com/go-openapi/errors v0.19.8/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= github.com/go-openapi/errors v0.19.9 h1:9SnKdGhiPZHF3ttwFMiCBEb8jQ4IDdrK+5+a0oTygA4= github.com/go-openapi/errors v0.19.9/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= @@ -509,17 +504,13 @@ github.com/go-openapi/loads v0.19.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf github.com/go-openapi/loads v0.19.2/go.mod h1:QAskZPMX5V0C2gvfkGZzJlINuP7Hx/4+ix5jWFxsNPs= github.com/go-openapi/loads v0.19.3/go.mod h1:YVfqhUCdahYwR3f3iiwQLhicVRvLlU/WO5WPaZvcvSI= github.com/go-openapi/loads v0.19.5/go.mod h1:dswLCAdonkRufe/gSUC3gN8nTSaB9uaS2es0x5/IbjY= -github.com/go-openapi/loads v0.19.6/go.mod h1:brCsvE6j8mnbmGBh103PT/QLHfbyDxA4hsKvYBNEGVc= -github.com/go-openapi/loads v0.19.7/go.mod h1:brCsvE6j8mnbmGBh103PT/QLHfbyDxA4hsKvYBNEGVc= -github.com/go-openapi/loads v0.20.0/go.mod h1:2LhKquiE513rN5xC6Aan6lYOSddlL8Mp20AW9kpviM4= -github.com/go-openapi/loads v0.20.2 h1:z5p5Xf5wujMxS1y8aP+vxwW5qYT2zdJBbXKmQUG3lcc= -github.com/go-openapi/loads v0.20.2/go.mod h1:hTVUotJ+UonAMMZsvakEgmWKgtulweO9vYP2bQYKA/o= +github.com/go-openapi/loads v0.21.1 h1:Wb3nVZpdEzDTcly8S4HMkey6fjARRzb7iEaySimlDW0= +github.com/go-openapi/loads v0.21.1/go.mod h1:/DtAMXXneXFjbQMGEtbamCZb+4x7eGwkvZCvBmwUG+g= github.com/go-openapi/runtime v0.0.0-20180920151709-4f900dc2ade9/go.mod h1:6v9a6LTXWQCdL8k1AO3cvqx5OtZY/Y9wKTgaoP6YRfA= github.com/go-openapi/runtime v0.18.0/go.mod h1:uI6pHuxWYTy94zZxgcwJkUWa9wbIlhteGfloI10GD4U= github.com/go-openapi/runtime v0.19.0/go.mod h1:OwNfisksmmaZse4+gpV3Ne9AyMOlP1lt4sK4FXt0O64= github.com/go-openapi/runtime v0.19.4/go.mod h1:X277bwSUBxVlCYR3r7xgZZGKVvBd/29gLDlFGtJ8NL4= github.com/go-openapi/runtime v0.19.15/go.mod h1:dhGWCTKRXlAfGnQG0ONViOZpjfg0m2gUt9nTQPQZuoo= -github.com/go-openapi/runtime v0.19.16/go.mod h1:5P9104EJgYcizotuXhEuUrzVc+j1RiSjahULvYmlv98= github.com/go-openapi/runtime v0.19.24 h1:TqagMVlRAOTwllE/7hNKx6rQ10O6T8ZzeJdMjSTKaD4= github.com/go-openapi/runtime v0.19.24/go.mod h1:Lm9YGCeecBnUUkFTxPC4s1+lwrkJ0pthx8YvyjCfkgk= github.com/go-openapi/spec v0.0.0-20180415031709-bcff419492ee/go.mod h1:J8+jY1nAiCcj+friV/PDoE1/3eeccG9LYBs0tYvLOWc= @@ -530,11 +521,8 @@ github.com/go-openapi/spec v0.19.2/go.mod h1:sCxk3jxKgioEJikev4fgkNmwS+3kuYdJtcs github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= github.com/go-openapi/spec v0.19.6/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk= github.com/go-openapi/spec v0.19.8/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk= -github.com/go-openapi/spec v0.19.15/go.mod h1:+81FIL1JwC5P3/Iuuozq3pPE9dXdIEGxFutcFKaVbmU= -github.com/go-openapi/spec v0.20.0/go.mod h1:+81FIL1JwC5P3/Iuuozq3pPE9dXdIEGxFutcFKaVbmU= -github.com/go-openapi/spec v0.20.1/go.mod h1:93x7oh+d+FQsmsieroS4cmR3u0p/ywH649a3qwC9OsQ= -github.com/go-openapi/spec v0.20.3 h1:uH9RQ6vdyPSs2pSy9fL8QPspDF2AMIMPtmK5coSSjtQ= -github.com/go-openapi/spec v0.20.3/go.mod h1:gG4F8wdEDN+YPBMVnzE85Rbhf+Th2DTvA9nFPQ5AYEg= +github.com/go-openapi/spec v0.20.4 h1:O8hJrt0UMnhHcluhIdUgCLRWyM2x7QkBXRvOs7m+O1M= +github.com/go-openapi/spec v0.20.4/go.mod h1:faYFR1CvsJZ0mNsmsphTMSoRrNV3TEDoAM7FOEWeq8I= github.com/go-openapi/strfmt v0.17.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= github.com/go-openapi/strfmt v0.17.2/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= github.com/go-openapi/strfmt v0.18.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= @@ -543,9 +531,9 @@ github.com/go-openapi/strfmt v0.19.2/go.mod h1:0yX7dbo8mKIvc3XSKp7MNfxw4JytCfCD6 github.com/go-openapi/strfmt v0.19.3/go.mod h1:0yX7dbo8mKIvc3XSKp7MNfxw4JytCfCD6+bY1AVL9LU= github.com/go-openapi/strfmt v0.19.4/go.mod h1:eftuHTlB/dI8Uq8JJOyRlieZf+WkkxUuk0dgdHXr2Qk= github.com/go-openapi/strfmt v0.19.5/go.mod h1:eftuHTlB/dI8Uq8JJOyRlieZf+WkkxUuk0dgdHXr2Qk= -github.com/go-openapi/strfmt v0.19.11/go.mod h1:UukAYgTaQfqJuAFlNxxMWNvMYiwiXtLsF2VwmoFtbtc= -github.com/go-openapi/strfmt v0.20.0 h1:l2omNtmNbMc39IGptl9BuXBEKcZfS8zjrTsPKTiJiDM= -github.com/go-openapi/strfmt v0.20.0/go.mod h1:UukAYgTaQfqJuAFlNxxMWNvMYiwiXtLsF2VwmoFtbtc= +github.com/go-openapi/strfmt v0.21.0/go.mod h1:ZRQ409bWMj+SOgXofQAGTIo2Ebu72Gs+WaRADcS5iNg= +github.com/go-openapi/strfmt v0.21.1 h1:G6s2t5V5kGCHLVbSdZ/6lI8Wm4OzoPFkc3/cjAsKQrM= +github.com/go-openapi/strfmt v0.21.1/go.mod h1:I/XVKeLc5+MM5oPNN7P6urMOpuLXEcNrCX/rPGuWb0k= github.com/go-openapi/swag v0.0.0-20180405201759-811b1089cde9/go.mod h1:DXUve3Dpr1UfpPtxFw+EFuQ41HhCWZfha5jSVRG7C7I= github.com/go-openapi/swag v0.17.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= github.com/go-openapi/swag v0.17.2/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= @@ -554,9 +542,8 @@ github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.7/go.mod h1:ao+8BpOPyKdpQz3AOJfbeEVpLmWAvlT1IfTe5McPyhY= github.com/go-openapi/swag v0.19.9/go.mod h1:ao+8BpOPyKdpQz3AOJfbeEVpLmWAvlT1IfTe5McPyhY= -github.com/go-openapi/swag v0.19.12/go.mod h1:eFdyEBkTdoAf/9RXBvj4cr1nH7GD8Kzo5HTt47gr72M= -github.com/go-openapi/swag v0.19.13/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= github.com/go-openapi/swag v0.19.14/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= +github.com/go-openapi/swag v0.19.15/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= github.com/go-openapi/swag v0.21.1 h1:wm0rhTb5z7qpJRHBdPOMuY4QjVUMbF6/kwoYeRAOrKU= github.com/go-openapi/swag v0.21.1/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= github.com/go-openapi/validate v0.17.2/go.mod h1:Uh4HdOzKt19xGIGm1qHf/ofbX1YQ4Y+MYsct2VUrAJ4= @@ -564,12 +551,8 @@ github.com/go-openapi/validate v0.18.0/go.mod h1:Uh4HdOzKt19xGIGm1qHf/ofbX1YQ4Y+ github.com/go-openapi/validate v0.19.2/go.mod h1:1tRCw7m3jtI8eNWEEliiAqUIcBztB2KDnRCRMUi7GTA= github.com/go-openapi/validate v0.19.3/go.mod h1:90Vh6jjkTn+OT1Eefm0ZixWNFjhtOH7vS9k0lo6zwJo= github.com/go-openapi/validate v0.19.10/go.mod h1:RKEZTUWDkxKQxN2jDT7ZnZi2bhZlbNMAuKvKB+IaGx8= -github.com/go-openapi/validate v0.19.12/go.mod h1:Rzou8hA/CBw8donlS6WNEUQupNvUZ0waH08tGe6kAQ4= -github.com/go-openapi/validate v0.19.15/go.mod h1:tbn/fdOwYHgrhPBzidZfJC2MIVvs9GA7monOmWBbeCI= -github.com/go-openapi/validate v0.20.1/go.mod h1:b60iJT+xNNLfaQJUqLI7946tYiFEOuE9E4k54HpKcJ0= -github.com/go-openapi/validate v0.20.2 h1:AhqDegYV3J3iQkMPJSXkvzymHKMTw0BST3RK3hTT4ts= -github.com/go-openapi/validate v0.20.2/go.mod h1:e7OJoKNgd0twXZwIn0A43tHbvIcr/rZIVCbJBpTUoY0= -github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= +github.com/go-openapi/validate v0.22.0 h1:b0QecH6VslW/TxtpKgzpO1SNG7GU2FsaqKdP1E2T50Y= +github.com/go-openapi/validate v0.22.0/go.mod h1:rjnrwK57VJ7A8xqfpAOEKRH8yQSGUriMu5/zuPSQ1hg= github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0 h1:p104kn46Q8WdvHunIJ9dAyjPVtrBPhSr3KT2yUst43I= @@ -824,8 +807,6 @@ github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJS github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.0.0-20160803190731-bd40a432e4c7/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= -github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= -github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= github.com/joeshaw/multierror v0.0.0-20140124173710-69b34d4ec901/go.mod h1:Z86h9688Y0wesXCyonoVr47MasHilkuLMqGhRZ4Hpak= github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= @@ -978,7 +959,6 @@ github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:F github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.3.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.3.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mitchellh/mapstructure v1.4.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.4.1 h1:CpVNEelQCZBooIPDn+AR3NpivK/TIKU8bDxdASFVQag= github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/osext v0.0.0-20151018003038-5e2d6d41470f/go.mod h1:OkQIRizQZAeMln+1tSwduZz7+Af5oFlKirV/MSYes2A= @@ -1019,6 +999,7 @@ github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/oklog/ulid v0.0.0-20170117200651-66bb6560562f/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= +github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= github.com/olekukonko/tablewriter v0.0.1/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= @@ -1304,7 +1285,6 @@ github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtX github.com/urfave/cli v1.22.2/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/vbatts/tar-split v0.11.1/go.mod h1:LEuURwDEiWjRjwu46yU3KVGuUdVv/dcnpcEPSzR8z6g= github.com/vbauerster/mpb/v5 v5.2.2/go.mod h1:W5Fvgw4dm3/0NhqzV8j6EacfuTe5SvnzBRwiXxDR9ww= -github.com/vektah/gqlparser v1.1.2/go.mod h1:1ycwN7Ij5njmMkPPAOaRFY4rET2Enx7IkVv3vaXspKw= github.com/vishvananda/netlink v0.0.0-20181108222139-023a6dafdcdf/go.mod h1:+SR5DhBJrl6ZM7CoCKvpw5BKroDKQ+PJqOg65H/2ktk= github.com/vishvananda/netlink v1.0.0/go.mod h1:+SR5DhBJrl6ZM7CoCKvpw5BKroDKQ+PJqOg65H/2ktk= github.com/vishvananda/netlink v1.1.0/go.mod h1:cTgwzPIzzgDAYoQrMm0EdrjRUBkTqKYppBueQtXaqoE= @@ -1368,9 +1348,8 @@ go.mongodb.org/mongo-driver v1.0.3/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qL go.mongodb.org/mongo-driver v1.1.1/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= go.mongodb.org/mongo-driver v1.3.0/go.mod h1:MSWZXKOynuguX+JSvwP8i+58jYCXxbia8HS3gZBapIE= go.mongodb.org/mongo-driver v1.3.4/go.mod h1:MSWZXKOynuguX+JSvwP8i+58jYCXxbia8HS3gZBapIE= -go.mongodb.org/mongo-driver v1.4.3/go.mod h1:WcMNYLx/IlOxLe6JRJiv2uXuCz6zBLndR4SoGjYphSc= -go.mongodb.org/mongo-driver v1.4.4/go.mod h1:WcMNYLx/IlOxLe6JRJiv2uXuCz6zBLndR4SoGjYphSc= -go.mongodb.org/mongo-driver v1.4.6/go.mod h1:WcMNYLx/IlOxLe6JRJiv2uXuCz6zBLndR4SoGjYphSc= +go.mongodb.org/mongo-driver v1.7.3/go.mod h1:NqaYOwnXWr5Pm7AOpO5QFxKJ503nbMse/R79oO62zWg= +go.mongodb.org/mongo-driver v1.7.5/go.mod h1:VXEWRZ6URJIkUq2SCAyapmhH0ZLRBP+FT4xhp5Zvxng= go.mongodb.org/mongo-driver v1.8.4 h1:NruvZPPL0PBcRJKmbswoWSrmHeUvzdxA3GCPfD/NEOA= go.mongodb.org/mongo-driver v1.8.4/go.mod h1:0sQWfOeY63QTntERDJJ/0SuKK0T1uVSgKCuAROlKEPY= go.mozilla.org/pkcs7 v0.0.0-20200128120323-432b2356ecb1/go.mod h1:SNgMg+EgDFwmvSmLRTNKC5fegJjB7v23qTQ0XLGUNHk= @@ -1430,6 +1409,7 @@ golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3 golang.org/x/crypto v0.0.0-20190927123631-a832865fa7ad/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191112222119-e1110fd1c708/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200423211502-4bdfaf469ed5/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= @@ -1732,7 +1712,6 @@ golang.org/x/tools v0.0.0-20181011152555-a398e557df60/go.mod h1:n7NCudcB/nEzxVGm golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190118193359-16909d206f00/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190125232054-d66bd3c5d5a6/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= diff --git a/vendor/cloud.google.com/go/compute/metadata/BUILD.bazel b/vendor/cloud.google.com/go/compute/metadata/BUILD.bazel deleted file mode 100644 index b7fde35c950d..000000000000 --- a/vendor/cloud.google.com/go/compute/metadata/BUILD.bazel +++ /dev/null @@ -1,9 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = ["metadata.go"], - importmap = "kubevirt.io/kubevirt/vendor/cloud.google.com/go/compute/metadata", - importpath = "cloud.google.com/go/compute/metadata", - visibility = ["//visibility:public"], -) diff --git a/vendor/github.com/Azure/go-autorest/BUILD.bazel b/vendor/github.com/Azure/go-autorest/BUILD.bazel deleted file mode 100644 index 727c52cb6dbb..000000000000 --- a/vendor/github.com/Azure/go-autorest/BUILD.bazel +++ /dev/null @@ -1,9 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = ["doc.go"], - importmap = "kubevirt.io/kubevirt/vendor/github.com/Azure/go-autorest", - importpath = "github.com/Azure/go-autorest", - visibility = ["//visibility:public"], -) diff --git a/vendor/github.com/Azure/go-autorest/autorest/BUILD.bazel b/vendor/github.com/Azure/go-autorest/autorest/BUILD.bazel deleted file mode 100644 index 64ed5653e132..000000000000 --- a/vendor/github.com/Azure/go-autorest/autorest/BUILD.bazel +++ /dev/null @@ -1,31 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "authorization.go", - "authorization_sas.go", - "authorization_storage.go", - "autorest.go", - "client.go", - "error.go", - "preparer.go", - "responder.go", - "retriablerequest.go", - "retriablerequest_1.7.go", - "retriablerequest_1.8.go", - "sender.go", - "utility.go", - "utility_1.13.go", - "utility_legacy.go", - "version.go", - ], - importmap = "kubevirt.io/kubevirt/vendor/github.com/Azure/go-autorest/autorest", - importpath = "github.com/Azure/go-autorest/autorest", - visibility = ["//visibility:public"], - deps = [ - "//vendor/github.com/Azure/go-autorest/autorest/adal:go_default_library", - "//vendor/github.com/Azure/go-autorest/logger:go_default_library", - "//vendor/github.com/Azure/go-autorest/tracing:go_default_library", - ], -) diff --git a/vendor/github.com/Azure/go-autorest/autorest/adal/BUILD.bazel b/vendor/github.com/Azure/go-autorest/autorest/adal/BUILD.bazel deleted file mode 100644 index 446d94a1403a..000000000000 --- a/vendor/github.com/Azure/go-autorest/autorest/adal/BUILD.bazel +++ /dev/null @@ -1,25 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "config.go", - "devicetoken.go", - "persist.go", - "sender.go", - "token.go", - "token_1.13.go", - "token_legacy.go", - "version.go", - ], - importmap = "kubevirt.io/kubevirt/vendor/github.com/Azure/go-autorest/autorest/adal", - importpath = "github.com/Azure/go-autorest/autorest/adal", - visibility = ["//visibility:public"], - deps = [ - "//vendor/github.com/Azure/go-autorest/autorest/date:go_default_library", - "//vendor/github.com/Azure/go-autorest/logger:go_default_library", - "//vendor/github.com/Azure/go-autorest/tracing:go_default_library", - "//vendor/github.com/form3tech-oss/jwt-go:go_default_library", - "//vendor/golang.org/x/crypto/pkcs12:go_default_library", - ], -) diff --git a/vendor/github.com/Azure/go-autorest/autorest/azure/BUILD.bazel b/vendor/github.com/Azure/go-autorest/autorest/azure/BUILD.bazel deleted file mode 100644 index 05f24e732dbd..000000000000 --- a/vendor/github.com/Azure/go-autorest/autorest/azure/BUILD.bazel +++ /dev/null @@ -1,19 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "async.go", - "azure.go", - "environments.go", - "metadata_environment.go", - "rp.go", - ], - importmap = "kubevirt.io/kubevirt/vendor/github.com/Azure/go-autorest/autorest/azure", - importpath = "github.com/Azure/go-autorest/autorest/azure", - visibility = ["//visibility:public"], - deps = [ - "//vendor/github.com/Azure/go-autorest/autorest:go_default_library", - "//vendor/github.com/Azure/go-autorest/tracing:go_default_library", - ], -) diff --git a/vendor/github.com/Azure/go-autorest/autorest/date/BUILD.bazel b/vendor/github.com/Azure/go-autorest/autorest/date/BUILD.bazel deleted file mode 100644 index 696c036d981c..000000000000 --- a/vendor/github.com/Azure/go-autorest/autorest/date/BUILD.bazel +++ /dev/null @@ -1,15 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "date.go", - "time.go", - "timerfc1123.go", - "unixtime.go", - "utility.go", - ], - importmap = "kubevirt.io/kubevirt/vendor/github.com/Azure/go-autorest/autorest/date", - importpath = "github.com/Azure/go-autorest/autorest/date", - visibility = ["//visibility:public"], -) diff --git a/vendor/github.com/Azure/go-autorest/logger/BUILD.bazel b/vendor/github.com/Azure/go-autorest/logger/BUILD.bazel deleted file mode 100644 index 7cfb930136ee..000000000000 --- a/vendor/github.com/Azure/go-autorest/logger/BUILD.bazel +++ /dev/null @@ -1,9 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = ["logger.go"], - importmap = "kubevirt.io/kubevirt/vendor/github.com/Azure/go-autorest/logger", - importpath = "github.com/Azure/go-autorest/logger", - visibility = ["//visibility:public"], -) diff --git a/vendor/github.com/Azure/go-autorest/tracing/BUILD.bazel b/vendor/github.com/Azure/go-autorest/tracing/BUILD.bazel deleted file mode 100644 index e7dba8926d55..000000000000 --- a/vendor/github.com/Azure/go-autorest/tracing/BUILD.bazel +++ /dev/null @@ -1,9 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = ["tracing.go"], - importmap = "kubevirt.io/kubevirt/vendor/github.com/Azure/go-autorest/tracing", - importpath = "github.com/Azure/go-autorest/tracing", - visibility = ["//visibility:public"], -) diff --git a/vendor/github.com/Masterminds/semver/BUILD.bazel b/vendor/github.com/Masterminds/semver/BUILD.bazel deleted file mode 100644 index 7bbf3252f626..000000000000 --- a/vendor/github.com/Masterminds/semver/BUILD.bazel +++ /dev/null @@ -1,14 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "collection.go", - "constraints.go", - "doc.go", - "version.go", - ], - importmap = "kubevirt.io/kubevirt/vendor/github.com/Masterminds/semver", - importpath = "github.com/Masterminds/semver", - visibility = ["//visibility:public"], -) diff --git a/vendor/github.com/PuerkitoBio/purell/BUILD.bazel b/vendor/github.com/PuerkitoBio/purell/BUILD.bazel deleted file mode 100644 index 28da59693849..000000000000 --- a/vendor/github.com/PuerkitoBio/purell/BUILD.bazel +++ /dev/null @@ -1,15 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = ["purell.go"], - importmap = "kubevirt.io/kubevirt/vendor/github.com/PuerkitoBio/purell", - importpath = "github.com/PuerkitoBio/purell", - visibility = ["//visibility:public"], - deps = [ - "//vendor/github.com/PuerkitoBio/urlesc:go_default_library", - "//vendor/golang.org/x/net/idna:go_default_library", - "//vendor/golang.org/x/text/unicode/norm:go_default_library", - "//vendor/golang.org/x/text/width:go_default_library", - ], -) diff --git a/vendor/github.com/PuerkitoBio/urlesc/BUILD.bazel b/vendor/github.com/PuerkitoBio/urlesc/BUILD.bazel deleted file mode 100644 index 79c88576c6a3..000000000000 --- a/vendor/github.com/PuerkitoBio/urlesc/BUILD.bazel +++ /dev/null @@ -1,9 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = ["urlesc.go"], - importmap = "kubevirt.io/kubevirt/vendor/github.com/PuerkitoBio/urlesc", - importpath = "github.com/PuerkitoBio/urlesc", - visibility = ["//visibility:public"], -) diff --git a/vendor/github.com/asaskevich/govalidator/BUILD.bazel b/vendor/github.com/asaskevich/govalidator/BUILD.bazel deleted file mode 100644 index 0b9a715bc48f..000000000000 --- a/vendor/github.com/asaskevich/govalidator/BUILD.bazel +++ /dev/null @@ -1,19 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "arrays.go", - "converter.go", - "doc.go", - "error.go", - "numerics.go", - "patterns.go", - "types.go", - "utils.go", - "validator.go", - ], - importmap = "kubevirt.io/kubevirt/vendor/github.com/asaskevich/govalidator", - importpath = "github.com/asaskevich/govalidator", - visibility = ["//visibility:public"], -) diff --git a/vendor/github.com/beorn7/perks/quantile/BUILD.bazel b/vendor/github.com/beorn7/perks/quantile/BUILD.bazel deleted file mode 100644 index 9cce51d228b1..000000000000 --- a/vendor/github.com/beorn7/perks/quantile/BUILD.bazel +++ /dev/null @@ -1,9 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = ["stream.go"], - importmap = "kubevirt.io/kubevirt/vendor/github.com/beorn7/perks/quantile", - importpath = "github.com/beorn7/perks/quantile", - visibility = ["//visibility:public"], -) diff --git a/vendor/github.com/blang/semver/BUILD.bazel b/vendor/github.com/blang/semver/BUILD.bazel deleted file mode 100644 index 26af5ed85515..000000000000 --- a/vendor/github.com/blang/semver/BUILD.bazel +++ /dev/null @@ -1,15 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "json.go", - "range.go", - "semver.go", - "sort.go", - "sql.go", - ], - importmap = "kubevirt.io/kubevirt/vendor/github.com/blang/semver", - importpath = "github.com/blang/semver", - visibility = ["//visibility:public"], -) diff --git a/vendor/github.com/c9s/goprocinfo/linux/BUILD.bazel b/vendor/github.com/c9s/goprocinfo/linux/BUILD.bazel deleted file mode 100644 index e8733eabe37e..000000000000 --- a/vendor/github.com/c9s/goprocinfo/linux/BUILD.bazel +++ /dev/null @@ -1,36 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "cpuinfo.go", - "disk.go", - "diskstat.go", - "interrupts.go", - "loadavg.go", - "meminfo.go", - "mounts.go", - "net_ip.go", - "net_tcp.go", - "net_udp.go", - "net_unix.go", - "netstat.go", - "network_stat.go", - "process.go", - "process_cmdline.go", - "process_io.go", - "process_pid.go", - "process_sched_stat.go", - "process_stat.go", - "process_statm.go", - "process_status.go", - "snmp.go", - "sockstat.go", - "stat.go", - "uptime.go", - "vmstat.go", - ], - importmap = "kubevirt.io/kubevirt/vendor/github.com/c9s/goprocinfo/linux", - importpath = "github.com/c9s/goprocinfo/linux", - visibility = ["//visibility:public"], -) diff --git a/vendor/github.com/cespare/xxhash/v2/BUILD.bazel b/vendor/github.com/cespare/xxhash/v2/BUILD.bazel deleted file mode 100644 index 9021f3c5daa9..000000000000 --- a/vendor/github.com/cespare/xxhash/v2/BUILD.bazel +++ /dev/null @@ -1,15 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "xxhash.go", - "xxhash_amd64.go", - "xxhash_amd64.s", - "xxhash_other.go", - "xxhash_unsafe.go", - ], - importmap = "kubevirt.io/kubevirt/vendor/github.com/cespare/xxhash/v2", - importpath = "github.com/cespare/xxhash/v2", - visibility = ["//visibility:public"], -) diff --git a/vendor/github.com/cilium/ebpf/BUILD.bazel b/vendor/github.com/cilium/ebpf/BUILD.bazel deleted file mode 100644 index 7ff348721dd7..000000000000 --- a/vendor/github.com/cilium/ebpf/BUILD.bazel +++ /dev/null @@ -1,27 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "collection.go", - "doc.go", - "elf_reader.go", - "info.go", - "linker.go", - "map.go", - "marshalers.go", - "prog.go", - "syscalls.go", - "types.go", - "types_string.go", - ], - importmap = "kubevirt.io/kubevirt/vendor/github.com/cilium/ebpf", - importpath = "github.com/cilium/ebpf", - visibility = ["//visibility:public"], - deps = [ - "//vendor/github.com/cilium/ebpf/asm:go_default_library", - "//vendor/github.com/cilium/ebpf/internal:go_default_library", - "//vendor/github.com/cilium/ebpf/internal/btf:go_default_library", - "//vendor/github.com/cilium/ebpf/internal/unix:go_default_library", - ], -) diff --git a/vendor/github.com/cilium/ebpf/asm/BUILD.bazel b/vendor/github.com/cilium/ebpf/asm/BUILD.bazel deleted file mode 100644 index a5611eed05e9..000000000000 --- a/vendor/github.com/cilium/ebpf/asm/BUILD.bazel +++ /dev/null @@ -1,24 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "alu.go", - "alu_string.go", - "doc.go", - "func.go", - "func_string.go", - "instruction.go", - "jump.go", - "jump_string.go", - "load_store.go", - "load_store_string.go", - "opcode.go", - "opcode_string.go", - "register.go", - ], - importmap = "kubevirt.io/kubevirt/vendor/github.com/cilium/ebpf/asm", - importpath = "github.com/cilium/ebpf/asm", - visibility = ["//visibility:public"], - deps = ["//vendor/github.com/cilium/ebpf/internal/unix:go_default_library"], -) diff --git a/vendor/github.com/cilium/ebpf/internal/BUILD.bazel b/vendor/github.com/cilium/ebpf/internal/BUILD.bazel deleted file mode 100644 index 4568f4c9355a..000000000000 --- a/vendor/github.com/cilium/ebpf/internal/BUILD.bazel +++ /dev/null @@ -1,26 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "cpu.go", - "elf.go", - "endian.go", - "errors.go", - "fd.go", - "feature.go", - "io.go", - "pinning.go", - "ptr.go", - "ptr_32_be.go", - "ptr_32_le.go", - "ptr_64.go", - "syscall.go", - "syscall_string.go", - "version.go", - ], - importmap = "kubevirt.io/kubevirt/vendor/github.com/cilium/ebpf/internal", - importpath = "github.com/cilium/ebpf/internal", - visibility = ["//vendor/github.com/cilium/ebpf:__subpackages__"], - deps = ["//vendor/github.com/cilium/ebpf/internal/unix:go_default_library"], -) diff --git a/vendor/github.com/cilium/ebpf/internal/btf/BUILD.bazel b/vendor/github.com/cilium/ebpf/internal/btf/BUILD.bazel deleted file mode 100644 index f2e218e6a338..000000000000 --- a/vendor/github.com/cilium/ebpf/internal/btf/BUILD.bazel +++ /dev/null @@ -1,23 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "btf.go", - "btf_types.go", - "btf_types_string.go", - "core.go", - "doc.go", - "ext_info.go", - "strings.go", - "types.go", - ], - importmap = "kubevirt.io/kubevirt/vendor/github.com/cilium/ebpf/internal/btf", - importpath = "github.com/cilium/ebpf/internal/btf", - visibility = ["//vendor/github.com/cilium/ebpf:__subpackages__"], - deps = [ - "//vendor/github.com/cilium/ebpf/asm:go_default_library", - "//vendor/github.com/cilium/ebpf/internal:go_default_library", - "//vendor/github.com/cilium/ebpf/internal/unix:go_default_library", - ], -) diff --git a/vendor/github.com/cilium/ebpf/internal/unix/BUILD.bazel b/vendor/github.com/cilium/ebpf/internal/unix/BUILD.bazel deleted file mode 100644 index 91a42e32c203..000000000000 --- a/vendor/github.com/cilium/ebpf/internal/unix/BUILD.bazel +++ /dev/null @@ -1,21 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "types_linux.go", - "types_other.go", - ], - importmap = "kubevirt.io/kubevirt/vendor/github.com/cilium/ebpf/internal/unix", - importpath = "github.com/cilium/ebpf/internal/unix", - visibility = ["//vendor/github.com/cilium/ebpf:__subpackages__"], - deps = select({ - "@io_bazel_rules_go//go/platform:android": [ - "//vendor/golang.org/x/sys/unix:go_default_library", - ], - "@io_bazel_rules_go//go/platform:linux": [ - "//vendor/golang.org/x/sys/unix:go_default_library", - ], - "//conditions:default": [], - }), -) diff --git a/vendor/github.com/cilium/ebpf/link/BUILD.bazel b/vendor/github.com/cilium/ebpf/link/BUILD.bazel deleted file mode 100644 index b50621bbc190..000000000000 --- a/vendor/github.com/cilium/ebpf/link/BUILD.bazel +++ /dev/null @@ -1,29 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "cgroup.go", - "doc.go", - "iter.go", - "kprobe.go", - "link.go", - "netns.go", - "perf_event.go", - "platform.go", - "program.go", - "raw_tracepoint.go", - "syscalls.go", - "tracepoint.go", - "uprobe.go", - ], - importmap = "kubevirt.io/kubevirt/vendor/github.com/cilium/ebpf/link", - importpath = "github.com/cilium/ebpf/link", - visibility = ["//visibility:public"], - deps = [ - "//vendor/github.com/cilium/ebpf:go_default_library", - "//vendor/github.com/cilium/ebpf/asm:go_default_library", - "//vendor/github.com/cilium/ebpf/internal:go_default_library", - "//vendor/github.com/cilium/ebpf/internal/unix:go_default_library", - ], -) diff --git a/vendor/github.com/containernetworking/plugins/pkg/ns/BUILD.bazel b/vendor/github.com/containernetworking/plugins/pkg/ns/BUILD.bazel deleted file mode 100644 index 55343d89c626..000000000000 --- a/vendor/github.com/containernetworking/plugins/pkg/ns/BUILD.bazel +++ /dev/null @@ -1,18 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = ["ns_linux.go"], - importmap = "kubevirt.io/kubevirt/vendor/github.com/containernetworking/plugins/pkg/ns", - importpath = "github.com/containernetworking/plugins/pkg/ns", - visibility = ["//visibility:public"], - deps = select({ - "@io_bazel_rules_go//go/platform:android": [ - "//vendor/golang.org/x/sys/unix:go_default_library", - ], - "@io_bazel_rules_go//go/platform:linux": [ - "//vendor/golang.org/x/sys/unix:go_default_library", - ], - "//conditions:default": [], - }), -) diff --git a/vendor/github.com/coreos/go-iptables/iptables/BUILD.bazel b/vendor/github.com/coreos/go-iptables/iptables/BUILD.bazel deleted file mode 100644 index 7fc2b462f9b8..000000000000 --- a/vendor/github.com/coreos/go-iptables/iptables/BUILD.bazel +++ /dev/null @@ -1,12 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "iptables.go", - "lock.go", - ], - importmap = "kubevirt.io/kubevirt/vendor/github.com/coreos/go-iptables/iptables", - importpath = "github.com/coreos/go-iptables/iptables", - visibility = ["//visibility:public"], -) diff --git a/vendor/github.com/coreos/go-semver/semver/BUILD.bazel b/vendor/github.com/coreos/go-semver/semver/BUILD.bazel deleted file mode 100644 index 84758a1c0371..000000000000 --- a/vendor/github.com/coreos/go-semver/semver/BUILD.bazel +++ /dev/null @@ -1,12 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "semver.go", - "sort.go", - ], - importmap = "kubevirt.io/kubevirt/vendor/github.com/coreos/go-semver/semver", - importpath = "github.com/coreos/go-semver/semver", - visibility = ["//visibility:public"], -) diff --git a/vendor/github.com/coreos/go-systemd/v22/dbus/BUILD.bazel b/vendor/github.com/coreos/go-systemd/v22/dbus/BUILD.bazel deleted file mode 100644 index 3cb208585b5e..000000000000 --- a/vendor/github.com/coreos/go-systemd/v22/dbus/BUILD.bazel +++ /dev/null @@ -1,17 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "dbus.go", - "methods.go", - "properties.go", - "set.go", - "subscription.go", - "subscription_set.go", - ], - importmap = "kubevirt.io/kubevirt/vendor/github.com/coreos/go-systemd/v22/dbus", - importpath = "github.com/coreos/go-systemd/v22/dbus", - visibility = ["//visibility:public"], - deps = ["//vendor/github.com/godbus/dbus/v5:go_default_library"], -) diff --git a/vendor/github.com/coreos/prometheus-operator/pkg/apis/monitoring/BUILD.bazel b/vendor/github.com/coreos/prometheus-operator/pkg/apis/monitoring/BUILD.bazel deleted file mode 100644 index 9f4e2ed8cc67..000000000000 --- a/vendor/github.com/coreos/prometheus-operator/pkg/apis/monitoring/BUILD.bazel +++ /dev/null @@ -1,9 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = ["register.go"], - importmap = "kubevirt.io/kubevirt/vendor/github.com/coreos/prometheus-operator/pkg/apis/monitoring", - importpath = "github.com/coreos/prometheus-operator/pkg/apis/monitoring", - visibility = ["//visibility:public"], -) diff --git a/vendor/github.com/coreos/prometheus-operator/pkg/apis/monitoring/v1/BUILD.bazel b/vendor/github.com/coreos/prometheus-operator/pkg/apis/monitoring/v1/BUILD.bazel deleted file mode 100644 index 33abbbdb07b5..000000000000 --- a/vendor/github.com/coreos/prometheus-operator/pkg/apis/monitoring/v1/BUILD.bazel +++ /dev/null @@ -1,23 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "register.go", - "thanos_types.go", - "types.go", - "zz_generated.deepcopy.go", - ], - importmap = "kubevirt.io/kubevirt/vendor/github.com/coreos/prometheus-operator/pkg/apis/monitoring/v1", - importpath = "github.com/coreos/prometheus-operator/pkg/apis/monitoring/v1", - visibility = ["//visibility:public"], - deps = [ - "//vendor/github.com/coreos/prometheus-operator/pkg/apis/monitoring:go_default_library", - "//vendor/k8s.io/api/core/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/intstr:go_default_library", - ], -) diff --git a/vendor/github.com/cyphar/filepath-securejoin/BUILD.bazel b/vendor/github.com/cyphar/filepath-securejoin/BUILD.bazel deleted file mode 100644 index 4dcb35975afc..000000000000 --- a/vendor/github.com/cyphar/filepath-securejoin/BUILD.bazel +++ /dev/null @@ -1,13 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "join.go", - "vfs.go", - ], - importmap = "kubevirt.io/kubevirt/vendor/github.com/cyphar/filepath-securejoin", - importpath = "github.com/cyphar/filepath-securejoin", - visibility = ["//visibility:public"], - deps = ["//vendor/github.com/pkg/errors:go_default_library"], -) diff --git a/vendor/github.com/davecgh/go-spew/spew/BUILD.bazel b/vendor/github.com/davecgh/go-spew/spew/BUILD.bazel deleted file mode 100644 index 422da0e89364..000000000000 --- a/vendor/github.com/davecgh/go-spew/spew/BUILD.bazel +++ /dev/null @@ -1,18 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "bypass.go", - "bypasssafe.go", - "common.go", - "config.go", - "doc.go", - "dump.go", - "format.go", - "spew.go", - ], - importmap = "kubevirt.io/kubevirt/vendor/github.com/davecgh/go-spew/spew", - importpath = "github.com/davecgh/go-spew/spew", - visibility = ["//visibility:public"], -) diff --git a/vendor/github.com/emicklei/go-restful-openapi/BUILD.bazel b/vendor/github.com/emicklei/go-restful-openapi/BUILD.bazel deleted file mode 100644 index 70171f9df759..000000000000 --- a/vendor/github.com/emicklei/go-restful-openapi/BUILD.bazel +++ /dev/null @@ -1,21 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "build_definitions.go", - "build_path.go", - "config.go", - "definition_builder.go", - "lookup.go", - "property_ext.go", - "spec_resource.go", - ], - importmap = "kubevirt.io/kubevirt/vendor/github.com/emicklei/go-restful-openapi", - importpath = "github.com/emicklei/go-restful-openapi", - visibility = ["//visibility:public"], - deps = [ - "//vendor/github.com/emicklei/go-restful:go_default_library", - "//vendor/github.com/go-openapi/spec:go_default_library", - ], -) diff --git a/vendor/github.com/emicklei/go-restful/BUILD.bazel b/vendor/github.com/emicklei/go-restful/BUILD.bazel deleted file mode 100644 index 054d30e21e59..000000000000 --- a/vendor/github.com/emicklei/go-restful/BUILD.bazel +++ /dev/null @@ -1,40 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "compress.go", - "compressor_cache.go", - "compressor_pools.go", - "compressors.go", - "constants.go", - "container.go", - "cors_filter.go", - "curly.go", - "curly_route.go", - "custom_verb.go", - "doc.go", - "entity_accessors.go", - "filter.go", - "json.go", - "jsr311.go", - "logger.go", - "mime.go", - "options_filter.go", - "parameter.go", - "path_expression.go", - "path_processor.go", - "request.go", - "response.go", - "route.go", - "route_builder.go", - "router.go", - "service_error.go", - "web_service.go", - "web_service_container.go", - ], - importmap = "kubevirt.io/kubevirt/vendor/github.com/emicklei/go-restful", - importpath = "github.com/emicklei/go-restful", - visibility = ["//visibility:public"], - deps = ["//vendor/github.com/emicklei/go-restful/log:go_default_library"], -) diff --git a/vendor/github.com/emicklei/go-restful/log/BUILD.bazel b/vendor/github.com/emicklei/go-restful/log/BUILD.bazel deleted file mode 100644 index e61895b8ffcd..000000000000 --- a/vendor/github.com/emicklei/go-restful/log/BUILD.bazel +++ /dev/null @@ -1,9 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = ["log.go"], - importmap = "kubevirt.io/kubevirt/vendor/github.com/emicklei/go-restful/log", - importpath = "github.com/emicklei/go-restful/log", - visibility = ["//visibility:public"], -) diff --git a/vendor/github.com/evanphx/json-patch/BUILD.bazel b/vendor/github.com/evanphx/json-patch/BUILD.bazel deleted file mode 100644 index 988ea361b0cd..000000000000 --- a/vendor/github.com/evanphx/json-patch/BUILD.bazel +++ /dev/null @@ -1,14 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "errors.go", - "merge.go", - "patch.go", - ], - importmap = "kubevirt.io/kubevirt/vendor/github.com/evanphx/json-patch", - importpath = "github.com/evanphx/json-patch", - visibility = ["//visibility:public"], - deps = ["//vendor/github.com/pkg/errors:go_default_library"], -) diff --git a/vendor/github.com/form3tech-oss/jwt-go/BUILD.bazel b/vendor/github.com/form3tech-oss/jwt-go/BUILD.bazel deleted file mode 100644 index 58529469906d..000000000000 --- a/vendor/github.com/form3tech-oss/jwt-go/BUILD.bazel +++ /dev/null @@ -1,24 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "claims.go", - "doc.go", - "ecdsa.go", - "ecdsa_utils.go", - "errors.go", - "hmac.go", - "map_claims.go", - "none.go", - "parser.go", - "rsa.go", - "rsa_pss.go", - "rsa_utils.go", - "signing_method.go", - "token.go", - ], - importmap = "kubevirt.io/kubevirt/vendor/github.com/form3tech-oss/jwt-go", - importpath = "github.com/form3tech-oss/jwt-go", - visibility = ["//visibility:public"], -) diff --git a/vendor/github.com/fsnotify/fsnotify/BUILD.bazel b/vendor/github.com/fsnotify/fsnotify/BUILD.bazel deleted file mode 100644 index 822c7bb32f1d..000000000000 --- a/vendor/github.com/fsnotify/fsnotify/BUILD.bazel +++ /dev/null @@ -1,45 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "fen.go", - "fsnotify.go", - "inotify.go", - "inotify_poller.go", - "kqueue.go", - "open_mode_bsd.go", - "open_mode_darwin.go", - "windows.go", - ], - importmap = "kubevirt.io/kubevirt/vendor/github.com/fsnotify/fsnotify", - importpath = "github.com/fsnotify/fsnotify", - visibility = ["//visibility:public"], - deps = select({ - "@io_bazel_rules_go//go/platform:android": [ - "//vendor/golang.org/x/sys/unix:go_default_library", - ], - "@io_bazel_rules_go//go/platform:darwin": [ - "//vendor/golang.org/x/sys/unix:go_default_library", - ], - "@io_bazel_rules_go//go/platform:dragonfly": [ - "//vendor/golang.org/x/sys/unix:go_default_library", - ], - "@io_bazel_rules_go//go/platform:freebsd": [ - "//vendor/golang.org/x/sys/unix:go_default_library", - ], - "@io_bazel_rules_go//go/platform:ios": [ - "//vendor/golang.org/x/sys/unix:go_default_library", - ], - "@io_bazel_rules_go//go/platform:linux": [ - "//vendor/golang.org/x/sys/unix:go_default_library", - ], - "@io_bazel_rules_go//go/platform:netbsd": [ - "//vendor/golang.org/x/sys/unix:go_default_library", - ], - "@io_bazel_rules_go//go/platform:openbsd": [ - "//vendor/golang.org/x/sys/unix:go_default_library", - ], - "//conditions:default": [], - }), -) diff --git a/vendor/github.com/ghodss/yaml/BUILD.bazel b/vendor/github.com/ghodss/yaml/BUILD.bazel deleted file mode 100644 index e304b763303a..000000000000 --- a/vendor/github.com/ghodss/yaml/BUILD.bazel +++ /dev/null @@ -1,13 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "fields.go", - "yaml.go", - ], - importmap = "kubevirt.io/kubevirt/vendor/github.com/ghodss/yaml", - importpath = "github.com/ghodss/yaml", - visibility = ["//visibility:public"], - deps = ["//vendor/gopkg.in/yaml.v2:go_default_library"], -) diff --git a/vendor/github.com/go-kit/kit/log/BUILD.bazel b/vendor/github.com/go-kit/kit/log/BUILD.bazel deleted file mode 100644 index 51651f65e289..000000000000 --- a/vendor/github.com/go-kit/kit/log/BUILD.bazel +++ /dev/null @@ -1,19 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "json_logger.go", - "log.go", - "logfmt_logger.go", - "nop_logger.go", - "stdlib.go", - "sync.go", - "value.go", - ], - importmap = "kubevirt.io/kubevirt/vendor/github.com/go-kit/kit/log", - importpath = "github.com/go-kit/kit/log", - visibility = ["//visibility:public"], - deps = ["//vendor/github.com/go-logfmt/logfmt:go_default_library"], -) diff --git a/vendor/github.com/go-logfmt/logfmt/BUILD.bazel b/vendor/github.com/go-logfmt/logfmt/BUILD.bazel deleted file mode 100644 index 349fd2bad504..000000000000 --- a/vendor/github.com/go-logfmt/logfmt/BUILD.bazel +++ /dev/null @@ -1,14 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "decode.go", - "doc.go", - "encode.go", - "jsonstring.go", - ], - importmap = "kubevirt.io/kubevirt/vendor/github.com/go-logfmt/logfmt", - importpath = "github.com/go-logfmt/logfmt", - visibility = ["//visibility:public"], -) diff --git a/vendor/github.com/go-logr/logr/BUILD.bazel b/vendor/github.com/go-logr/logr/BUILD.bazel deleted file mode 100644 index 9d3351cff397..000000000000 --- a/vendor/github.com/go-logr/logr/BUILD.bazel +++ /dev/null @@ -1,12 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "discard.go", - "logr.go", - ], - importmap = "kubevirt.io/kubevirt/vendor/github.com/go-logr/logr", - importpath = "github.com/go-logr/logr", - visibility = ["//visibility:public"], -) diff --git a/vendor/github.com/go-openapi/analysis/.gitattributes b/vendor/github.com/go-openapi/analysis/.gitattributes new file mode 100644 index 000000000000..d020be8ea4e7 --- /dev/null +++ b/vendor/github.com/go-openapi/analysis/.gitattributes @@ -0,0 +1,2 @@ +*.go text eol=lf + diff --git a/vendor/github.com/go-openapi/analysis/.golangci.yml b/vendor/github.com/go-openapi/analysis/.golangci.yml index e6aafe704730..8cad29879194 100644 --- a/vendor/github.com/go-openapi/analysis/.golangci.yml +++ b/vendor/github.com/go-openapi/analysis/.golangci.yml @@ -5,6 +5,8 @@ linters-settings: min-confidence: 0 gocyclo: min-complexity: 40 + gocognit: + min-complexity: 40 maligned: suggest-new: true dupl: @@ -27,17 +29,17 @@ linters: - scopelint - godox - gocognit - - whitespace + #- whitespace - wsl - funlen - testpackage - wrapcheck - - nlreturn + #- nlreturn - gomnd - goerr113 - exhaustivestruct - - errorlint - - nestif + #- errorlint + #- nestif - gofumpt - godot - gci @@ -47,3 +49,5 @@ linters: - thelper - ifshort - forbidigo + - cyclop + - varnamelen diff --git a/vendor/github.com/go-openapi/analysis/.travis.yml b/vendor/github.com/go-openapi/analysis/.travis.yml deleted file mode 100644 index 55bdbec7400b..000000000000 --- a/vendor/github.com/go-openapi/analysis/.travis.yml +++ /dev/null @@ -1,17 +0,0 @@ -after_success: -- bash <(curl -s https://codecov.io/bash) -go: -- 1.14.x -- 1.x -arch: - - amd64 - - ppc64le -install: -- go get -u gotest.tools/gotestsum -language: go -notifications: - slack: - secure: Sf7kZf7ZGbnwWUMpffHwMu5A0cHkLK2MYY32LNTPj4+/3qC3Ghl7+9v4TSLOqOlCwdRNjOGblAq7s+GDJed6/xgRQl1JtCi1klzZNrYX4q01pgTPvvGcwbBkIYgeMaPeIRcK9OZnud7sRXdttozgTOpytps2U6Js32ip7uj5mHSg2ub0FwoSJwlS6dbezZ8+eDhoha0F/guY99BEwx8Bd+zROrT2TFGsSGOFGN6wFc7moCqTHO/YkWib13a2QNXqOxCCVBy/lt76Wp+JkeFppjHlzs/2lP3EAk13RIUAaesdEUHvIHrzCyNJEd3/+KO2DzsWOYfpktd+KBCvgaYOsoo7ubdT3IROeAegZdCgo/6xgCEsmFc9ZcqCfN5yNx2A+BZ2Vwmpws+bQ1E1+B5HDzzaiLcYfG4X2O210QVGVDLWsv1jqD+uPYeHY2WRfh5ZsIUFvaqgUEnwHwrK44/8REAhQavt1QAj5uJpsRd7CkRVPWRNK+yIky+wgbVUFEchRNmS55E7QWf+W4+4QZkQi7vUTMc9nbTUu2Es9NfvfudOpM2wZbn98fjpb/qq/nRv6Bk+ca+7XD5/IgNLMbWp2ouDdzbiHLCOfDUiHiDJhLfFZx9Bwo7ZwfzeOlbrQX66bx7xRKYmOe4DLrXhNcpbsMa8qbfxlZRCmYbubB/Y8h4= -script: -- gotestsum -f short-verbose -- -timeout=20m -coverprofile=coverage.txt -covermode=atomic -args -enable-long ./... -- gotestsum -f short-verbose -- -race -timeout=20m ./... diff --git a/vendor/github.com/go-openapi/analysis/BUILD.bazel b/vendor/github.com/go-openapi/analysis/BUILD.bazel deleted file mode 100644 index 055151ca6f56..000000000000 --- a/vendor/github.com/go-openapi/analysis/BUILD.bazel +++ /dev/null @@ -1,24 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "analyzer.go", - "debug.go", - "doc.go", - "fixer.go", - "flatten.go", - "mixin.go", - "schema.go", - ], - importmap = "kubevirt.io/kubevirt/vendor/github.com/go-openapi/analysis", - importpath = "github.com/go-openapi/analysis", - visibility = ["//visibility:public"], - deps = [ - "//vendor/github.com/go-openapi/analysis/internal:go_default_library", - "//vendor/github.com/go-openapi/jsonpointer:go_default_library", - "//vendor/github.com/go-openapi/spec:go_default_library", - "//vendor/github.com/go-openapi/strfmt:go_default_library", - "//vendor/github.com/go-openapi/swag:go_default_library", - ], -) diff --git a/vendor/github.com/go-openapi/analysis/README.md b/vendor/github.com/go-openapi/analysis/README.md index 4b97f030f111..aad6da10fe79 100644 --- a/vendor/github.com/go-openapi/analysis/README.md +++ b/vendor/github.com/go-openapi/analysis/README.md @@ -6,7 +6,6 @@ [![Slack Status](https://slackin.goswagger.io/badge.svg)](https://slackin.goswagger.io) [![license](http://img.shields.io/badge/license-Apache%20v2-orange.svg)](https://raw.githubusercontent.com/go-openapi/analysis/master/LICENSE) [![Go Reference](https://pkg.go.dev/badge/github.com/go-openapi/analysis.svg)](https://pkg.go.dev/github.com/go-openapi/analysis) -[![GolangCI](https://golangci.com/badges/github.com/go-openapi/analysis.svg)](https://golangci.com) [![Go Report Card](https://goreportcard.com/badge/github.com/go-openapi/analysis)](https://goreportcard.com/report/github.com/go-openapi/analysis) diff --git a/vendor/github.com/go-openapi/analysis/analyzer.go b/vendor/github.com/go-openapi/analysis/analyzer.go index b34f15a2c58e..c17aee1b6173 100644 --- a/vendor/github.com/go-openapi/analysis/analyzer.go +++ b/vendor/github.com/go-openapi/analysis/analyzer.go @@ -149,6 +149,7 @@ func New(doc *spec.Swagger) *Spec { } a.reset() a.initialize() + return a } @@ -311,6 +312,26 @@ func (s *Spec) analyzeItems(name string, items *spec.Items, prefix, location str } } +func (s *Spec) analyzeParameter(prefix string, i int, param spec.Parameter) { + refPref := slashpath.Join(prefix, "parameters", strconv.Itoa(i)) + if param.Ref.String() != "" { + s.references.addParamRef(refPref, ¶m) //#nosec + } + + if param.Pattern != "" { + s.patterns.addParameterPattern(refPref, param.Pattern) + } + + if len(param.Enum) > 0 { + s.enums.addParameterEnum(refPref, param.Enum) + } + + s.analyzeItems("items", param.Items, refPref, "parameter") + if param.In == "body" && param.Schema != nil { + s.analyzeSchema("schema", param.Schema, refPref) + } +} + func (s *Spec) analyzeOperation(method, path string, op *spec.Operation) { if op == nil { return @@ -319,72 +340,80 @@ func (s *Spec) analyzeOperation(method, path string, op *spec.Operation) { for _, c := range op.Consumes { s.consumes[c] = struct{}{} } + for _, c := range op.Produces { s.produces[c] = struct{}{} } + for _, ss := range op.Security { for k := range ss { s.authSchemes[k] = struct{}{} } } + if _, ok := s.operations[method]; !ok { s.operations[method] = make(map[string]*spec.Operation) } + s.operations[method][path] = op prefix := slashpath.Join("/paths", jsonpointer.Escape(path), strings.ToLower(method)) for i, param := range op.Parameters { - refPref := slashpath.Join(prefix, "parameters", strconv.Itoa(i)) - if param.Ref.String() != "" { - s.references.addParamRef(refPref, ¶m) //#nosec - } - if param.Pattern != "" { - s.patterns.addParameterPattern(refPref, param.Pattern) - } - if len(param.Enum) > 0 { - s.enums.addParameterEnum(refPref, param.Enum) - } - s.analyzeItems("items", param.Items, refPref, "parameter") - if param.In == "body" && param.Schema != nil { - s.analyzeSchema("schema", param.Schema, refPref) + s.analyzeParameter(prefix, i, param) + } + + if op.Responses == nil { + return + } + + if op.Responses.Default != nil { + s.analyzeDefaultResponse(prefix, op.Responses.Default) + } + + for k, res := range op.Responses.StatusCodeResponses { + s.analyzeResponse(prefix, k, res) + } +} + +func (s *Spec) analyzeDefaultResponse(prefix string, res *spec.Response) { + refPref := slashpath.Join(prefix, "responses", "default") + if res.Ref.String() != "" { + s.references.addResponseRef(refPref, res) + } + + for k, v := range res.Headers { + hRefPref := slashpath.Join(refPref, "headers", k) + s.analyzeItems("items", v.Items, hRefPref, "header") + if v.Pattern != "" { + s.patterns.addHeaderPattern(hRefPref, v.Pattern) } } - if op.Responses != nil { - if op.Responses.Default != nil { - refPref := slashpath.Join(prefix, "responses", "default") - if op.Responses.Default.Ref.String() != "" { - s.references.addResponseRef(refPref, op.Responses.Default) - } - for k, v := range op.Responses.Default.Headers { - hRefPref := slashpath.Join(refPref, "headers", k) - s.analyzeItems("items", v.Items, hRefPref, "header") - if v.Pattern != "" { - s.patterns.addHeaderPattern(hRefPref, v.Pattern) - } - } - if op.Responses.Default.Schema != nil { - s.analyzeSchema("schema", op.Responses.Default.Schema, refPref) - } + + if res.Schema != nil { + s.analyzeSchema("schema", res.Schema, refPref) + } +} + +func (s *Spec) analyzeResponse(prefix string, k int, res spec.Response) { + refPref := slashpath.Join(prefix, "responses", strconv.Itoa(k)) + if res.Ref.String() != "" { + s.references.addResponseRef(refPref, &res) //#nosec + } + + for k, v := range res.Headers { + hRefPref := slashpath.Join(refPref, "headers", k) + s.analyzeItems("items", v.Items, hRefPref, "header") + if v.Pattern != "" { + s.patterns.addHeaderPattern(hRefPref, v.Pattern) } - for k, res := range op.Responses.StatusCodeResponses { - refPref := slashpath.Join(prefix, "responses", strconv.Itoa(k)) - if res.Ref.String() != "" { - s.references.addResponseRef(refPref, &res) //#nosec - } - for k, v := range res.Headers { - hRefPref := slashpath.Join(refPref, "headers", k) - s.analyzeItems("items", v.Items, hRefPref, "header") - if v.Pattern != "" { - s.patterns.addHeaderPattern(hRefPref, v.Pattern) - } - if len(v.Enum) > 0 { - s.enums.addHeaderEnum(hRefPref, v.Enum) - } - } - if res.Schema != nil { - s.analyzeSchema("schema", res.Schema, refPref) - } + + if len(v.Enum) > 0 { + s.enums.addHeaderEnum(hRefPref, v.Enum) } } + + if res.Schema != nil { + s.analyzeSchema("schema", res.Schema, refPref) + } } func (s *Spec) analyzeSchema(name string, schema *spec.Schema, prefix string) { @@ -401,9 +430,11 @@ func (s *Spec) analyzeSchema(name string, schema *spec.Schema, prefix string) { if schema.Ref.String() != "" { s.references.addSchemaRef(refURI, schRef) } + if schema.Pattern != "" { s.patterns.addSchemaPattern(refURI, schema.Pattern) } + if len(schema.Enum) > 0 { s.enums.addSchemaEnum(refURI, schema.Enum) } @@ -412,52 +443,63 @@ func (s *Spec) analyzeSchema(name string, schema *spec.Schema, prefix string) { v := v s.analyzeSchema(k, &v, slashpath.Join(refURI, "definitions")) } + for k, v := range schema.Properties { v := v s.analyzeSchema(k, &v, slashpath.Join(refURI, "properties")) } + for k, v := range schema.PatternProperties { v := v // NOTE: swagger 2.0 does not support PatternProperties. // However it is possible to analyze this in a schema s.analyzeSchema(k, &v, slashpath.Join(refURI, "patternProperties")) } + for i := range schema.AllOf { v := &schema.AllOf[i] s.analyzeSchema(strconv.Itoa(i), v, slashpath.Join(refURI, "allOf")) } + if len(schema.AllOf) > 0 { s.allOfs["#"+refURI] = schRef } + for i := range schema.AnyOf { v := &schema.AnyOf[i] // NOTE: swagger 2.0 does not support anyOf constructs. // However it is possible to analyze this in a schema s.analyzeSchema(strconv.Itoa(i), v, slashpath.Join(refURI, "anyOf")) } + for i := range schema.OneOf { v := &schema.OneOf[i] // NOTE: swagger 2.0 does not support oneOf constructs. // However it is possible to analyze this in a schema s.analyzeSchema(strconv.Itoa(i), v, slashpath.Join(refURI, "oneOf")) } + if schema.Not != nil { // NOTE: swagger 2.0 does not support "not" constructs. // However it is possible to analyze this in a schema s.analyzeSchema("not", schema.Not, refURI) } + if schema.AdditionalProperties != nil && schema.AdditionalProperties.Schema != nil { s.analyzeSchema("additionalProperties", schema.AdditionalProperties.Schema, refURI) } + if schema.AdditionalItems != nil && schema.AdditionalItems.Schema != nil { // NOTE: swagger 2.0 does not support AdditionalItems. // However it is possible to analyze this in a schema s.analyzeSchema("additionalItems", schema.AdditionalItems.Schema, refURI) } + if schema.Items != nil { if schema.Items.Schema != nil { s.analyzeSchema("items", schema.Items.Schema, refURI) } + for i := range schema.Items.Schemas { sch := &schema.Items.Schemas[i] s.analyzeSchema(strconv.Itoa(i), sch, slashpath.Join(refURI, "items")) @@ -487,8 +529,10 @@ func (s *Spec) SecurityRequirementsFor(operation *spec.Operation) [][]SecurityRe if len(scheme) == 0 { // append a zero object for anonymous result = append(result, []SecurityRequirement{{}}) + continue } + var reqs []SecurityRequirement for k, v := range scheme { if v == nil { @@ -496,8 +540,10 @@ func (s *Spec) SecurityRequirementsFor(operation *spec.Operation) [][]SecurityRe } reqs = append(reqs, SecurityRequirement{Name: k, Scopes: v}) } + result = append(result, reqs) } + return result } @@ -512,6 +558,7 @@ func (s *Spec) SecurityDefinitionsForRequirements(requirements []SecurityRequire } } } + return result } @@ -529,10 +576,12 @@ func (s *Spec) SecurityDefinitionsFor(operation *spec.Operation) map[string]spec // optional requirement continue } + if _, ok := result[v.Name]; ok { // duplicate requirement continue } + if definition, ok := s.spec.SecurityDefinitions[v.Name]; ok { if definition != nil { result[v.Name] = *definition @@ -540,17 +589,18 @@ func (s *Spec) SecurityDefinitionsFor(operation *spec.Operation) map[string]spec } } } + return result } // ConsumesFor gets the mediatypes for the operation func (s *Spec) ConsumesFor(operation *spec.Operation) []string { - if len(operation.Consumes) == 0 { cons := make(map[string]struct{}, len(s.spec.Consumes)) for _, k := range s.spec.Consumes { cons[k] = struct{}{} } + return s.structMapKeys(cons) } @@ -558,6 +608,7 @@ func (s *Spec) ConsumesFor(operation *spec.Operation) []string { for _, c := range operation.Consumes { cons[c] = struct{}{} } + return s.structMapKeys(cons) } @@ -568,6 +619,7 @@ func (s *Spec) ProducesFor(operation *spec.Operation) []string { for _, k := range s.spec.Produces { prod[k] = struct{}{} } + return s.structMapKeys(prod) } @@ -575,6 +627,7 @@ func (s *Spec) ProducesFor(operation *spec.Operation) []string { for _, c := range operation.Produces { prod[c] = struct{}{} } + return s.structMapKeys(prod) } @@ -587,6 +640,7 @@ func fieldNameFromParam(param *spec.Parameter) string { if nm, ok := param.Extensions.GetString("go-name"); ok { return nm } + return swag.ToGoName(param.Name) } @@ -606,31 +660,38 @@ type ErrorOnParamFunc func(spec.Parameter, error) bool func (s *Spec) paramsAsMap(parameters []spec.Parameter, res map[string]spec.Parameter, callmeOnError ErrorOnParamFunc) { for _, param := range parameters { pr := param - if pr.Ref.String() != "" { - obj, _, err := pr.Ref.GetPointer().Get(s.spec) - if err != nil { - if callmeOnError != nil { - if callmeOnError(param, fmt.Errorf("invalid reference: %q", pr.Ref.String())) { - continue - } - break - } else { - panic(fmt.Sprintf("invalid reference: %q", pr.Ref.String())) - } + if pr.Ref.String() == "" { + res[mapKeyFromParam(&pr)] = pr + + continue + } + + // resolve $ref + if callmeOnError == nil { + callmeOnError = func(_ spec.Parameter, err error) bool { + panic(err) } - if objAsParam, ok := obj.(spec.Parameter); ok { - pr = objAsParam - } else { - if callmeOnError != nil { - if callmeOnError(param, fmt.Errorf("resolved reference is not a parameter: %q", pr.Ref.String())) { - continue - } - break - } else { - panic(fmt.Sprintf("resolved reference is not a parameter: %q", pr.Ref.String())) - } + } + + obj, _, err := pr.Ref.GetPointer().Get(s.spec) + if err != nil { + if callmeOnError(param, fmt.Errorf("invalid reference: %q", pr.Ref.String())) { + continue + } + + break + } + + objAsParam, ok := obj.(spec.Parameter) + if !ok { + if callmeOnError(param, fmt.Errorf("resolved reference is not a parameter: %q", pr.Ref.String())) { + continue } + + break } + + pr = objAsParam res[mapKeyFromParam(&pr)] = pr } } @@ -661,8 +722,10 @@ func (s *Spec) SafeParametersFor(operationID string, callmeOnError ErrorOnParamF for _, v := range bag { res = append(res, v) } + return res } + for _, pi := range s.spec.Paths.Paths { if pi.Get != nil && pi.Get.ID == operationID { return gatherParams(&pi, pi.Get) //#nosec @@ -686,6 +749,7 @@ func (s *Spec) SafeParametersFor(operationID string, callmeOnError ErrorOnParamF return gatherParams(&pi, pi.Delete) //#nosec } } + return nil } @@ -713,6 +777,7 @@ func (s *Spec) SafeParamsFor(method, path string, callmeOnError ErrorOnParamFunc s.paramsAsMap(pi.Parameters, res, callmeOnError) s.paramsAsMap(s.operations[strings.ToUpper(method)][path].Parameters, res, callmeOnError) } + return res } @@ -725,6 +790,7 @@ func (s *Spec) OperationForName(operationID string) (string, string, *spec.Opera } } } + return "", "", nil, false } @@ -732,8 +798,10 @@ func (s *Spec) OperationForName(operationID string) (string, string, *spec.Opera func (s *Spec) OperationFor(method, path string) (*spec.Operation, bool) { if mp, ok := s.operations[strings.ToUpper(method)]; ok { op, fn := mp[path] + return op, fn } + return nil, false } @@ -751,6 +819,7 @@ func (s *Spec) structMapKeys(mp map[string]struct{}) []string { for k := range mp { result = append(result, k) } + return result } @@ -759,6 +828,7 @@ func (s *Spec) AllPaths() map[string]spec.PathItem { if s.spec == nil || s.spec.Paths == nil { return nil } + return s.spec.Paths.Paths } @@ -767,6 +837,7 @@ func (s *Spec) OperationIDs() []string { if len(s.operations) == 0 { return nil } + result := make([]string, 0, len(s.operations)) for method, v := range s.operations { for p, o := range v { @@ -777,6 +848,7 @@ func (s *Spec) OperationIDs() []string { } } } + return result } @@ -785,12 +857,14 @@ func (s *Spec) OperationMethodPaths() []string { if len(s.operations) == 0 { return nil } + result := make([]string, 0, len(s.operations)) for method, v := range s.operations { for p := range v { result = append(result, fmt.Sprintf("%s %s", strings.ToUpper(method), p)) } } + return result } @@ -823,6 +897,7 @@ func (s *Spec) SchemasWithAllOf() (result []SchemaRef) { for _, v := range s.allOfs { result = append(result, v) } + return } @@ -831,6 +906,7 @@ func (s *Spec) AllDefinitions() (result []SchemaRef) { for _, v := range s.allSchemas { result = append(result, v) } + return } @@ -839,6 +915,7 @@ func (s *Spec) AllDefinitionReferences() (result []string) { for _, v := range s.references.schemas { result = append(result, v.String()) } + return } @@ -847,6 +924,7 @@ func (s *Spec) AllParameterReferences() (result []string) { for _, v := range s.references.parameters { result = append(result, v.String()) } + return } @@ -855,6 +933,7 @@ func (s *Spec) AllResponseReferences() (result []string) { for _, v := range s.references.responses { result = append(result, v.String()) } + return } @@ -863,6 +942,7 @@ func (s *Spec) AllPathItemReferences() (result []string) { for _, v := range s.references.pathItems { result = append(result, v.String()) } + return } @@ -874,6 +954,7 @@ func (s *Spec) AllItemsReferences() (result []string) { for _, v := range s.references.items { result = append(result, v.String()) } + return } @@ -882,6 +963,7 @@ func (s *Spec) AllReferences() (result []string) { for _, v := range s.references.allRefs { result = append(result, v.String()) } + return } @@ -893,11 +975,13 @@ func (s *Spec) AllRefs() (result []spec.Ref) { if a == "" { continue } + if _, ok := set[a]; !ok { set[a] = struct{}{} result = append(result, v) } } + return } @@ -906,6 +990,7 @@ func cloneStringMap(source map[string]string) map[string]string { for k, v := range source { res[k] = v } + return res } @@ -914,6 +999,7 @@ func cloneEnumMap(source map[string][]interface{}) map[string][]interface{} { for k, v := range source { res[k] = v } + return res } diff --git a/vendor/github.com/go-openapi/analysis/appveyor.yml b/vendor/github.com/go-openapi/analysis/appveyor.yml index a3574f870833..c2f6fd733a93 100644 --- a/vendor/github.com/go-openapi/analysis/appveyor.yml +++ b/vendor/github.com/go-openapi/analysis/appveyor.yml @@ -14,7 +14,7 @@ build: off environment: GOPATH: c:\gopath -stack: go 1.15 +stack: go 1.16 test_script: - go test -v -timeout 20m ./... diff --git a/vendor/github.com/go-openapi/analysis/debug.go b/vendor/github.com/go-openapi/analysis/debug.go index 84cc4e54cb79..33c15704ecb5 100644 --- a/vendor/github.com/go-openapi/analysis/debug.go +++ b/vendor/github.com/go-openapi/analysis/debug.go @@ -15,33 +15,9 @@ package analysis import ( - "fmt" - "log" "os" - "path/filepath" - "runtime" -) -var ( - // Debug is true when the SWAGGER_DEBUG env var is not empty. - // It enables a more verbose logging of the spec analyzer. - Debug = os.Getenv("SWAGGER_DEBUG") != "" - // analysisLogger is a debug logger for this package - analysisLogger *log.Logger + "github.com/go-openapi/analysis/internal/debug" ) -func init() { - debugOptions() -} - -func debugOptions() { - analysisLogger = log.New(os.Stdout, "analysis:", log.LstdFlags) -} - -func debugLog(msg string, args ...interface{}) { - // A private, trivial trace logger, based on go-openapi/spec/expander.go:debugLog() - if Debug { - _, file1, pos1, _ := runtime.Caller(1) - analysisLogger.Printf("%s:%d: %s", filepath.Base(file1), pos1, fmt.Sprintf(msg, args...)) - } -} +var debugLog = debug.GetLogger("analysis", os.Getenv("SWAGGER_DEBUG") != "") diff --git a/vendor/github.com/go-openapi/analysis/fixer.go b/vendor/github.com/go-openapi/analysis/fixer.go index 286922befc05..7c2ca084162e 100644 --- a/vendor/github.com/go-openapi/analysis/fixer.go +++ b/vendor/github.com/go-openapi/analysis/fixer.go @@ -24,35 +24,38 @@ import "github.com/go-openapi/spec" // due to zero values being omitted upon re-serializing (omitempty) we // lose them unless we stick some chars in there. func FixEmptyResponseDescriptions(s *spec.Swagger) { - if s.Paths != nil { - for _, v := range s.Paths.Paths { - if v.Get != nil { - FixEmptyDescs(v.Get.Responses) - } - if v.Put != nil { - FixEmptyDescs(v.Put.Responses) - } - if v.Post != nil { - FixEmptyDescs(v.Post.Responses) - } - if v.Delete != nil { - FixEmptyDescs(v.Delete.Responses) - } - if v.Options != nil { - FixEmptyDescs(v.Options.Responses) - } - if v.Head != nil { - FixEmptyDescs(v.Head.Responses) - } - if v.Patch != nil { - FixEmptyDescs(v.Patch.Responses) - } - } - } for k, v := range s.Responses { FixEmptyDesc(&v) //#nosec s.Responses[k] = v } + + if s.Paths == nil { + return + } + + for _, v := range s.Paths.Paths { + if v.Get != nil { + FixEmptyDescs(v.Get.Responses) + } + if v.Put != nil { + FixEmptyDescs(v.Put.Responses) + } + if v.Post != nil { + FixEmptyDescs(v.Post.Responses) + } + if v.Delete != nil { + FixEmptyDescs(v.Delete.Responses) + } + if v.Options != nil { + FixEmptyDescs(v.Options.Responses) + } + if v.Head != nil { + FixEmptyDescs(v.Head.Responses) + } + if v.Patch != nil { + FixEmptyDescs(v.Patch.Responses) + } + } } // FixEmptyDescs adds "(empty)" as the description for any Response in diff --git a/vendor/github.com/go-openapi/analysis/flatten.go b/vendor/github.com/go-openapi/analysis/flatten.go index 51245f197cae..0576220fb3d7 100644 --- a/vendor/github.com/go-openapi/analysis/flatten.go +++ b/vendor/github.com/go-openapi/analysis/flatten.go @@ -17,55 +17,20 @@ package analysis import ( "fmt" "log" - "net/http" - "net/url" - slashpath "path" - "path/filepath" + "path" "sort" "strings" - "strconv" - - "github.com/go-openapi/analysis/internal" + "github.com/go-openapi/analysis/internal/flatten/normalize" + "github.com/go-openapi/analysis/internal/flatten/operations" + "github.com/go-openapi/analysis/internal/flatten/replace" + "github.com/go-openapi/analysis/internal/flatten/schutils" + "github.com/go-openapi/analysis/internal/flatten/sortref" "github.com/go-openapi/jsonpointer" - swspec "github.com/go-openapi/spec" - "github.com/go-openapi/swag" + "github.com/go-openapi/spec" ) -// FlattenOpts configuration for flattening a swagger specification. -// -// The BasePath parameter is used to locate remote relative $ref found in the specification. -// This path is a file: it points to the location of the root document and may be either a local -// file path or a URL. -// -// If none specified, relative references (e.g. "$ref": "folder/schema.yaml#/definitions/...") -// found in the spec are searched from the current working directory. -type FlattenOpts struct { - Spec *Spec // The analyzed spec to work with - flattenContext *context // Internal context to track flattening activity - - BasePath string // The location of the root document for this spec to resolve relative $ref - - // Flattening options - Expand bool // When true, skip flattening the spec and expand it instead (if Minimal is false) - Minimal bool // When true, do not decompose complex structures such as allOf - Verbose bool // enable some reporting on possible name conflicts detected - RemoveUnused bool // When true, remove unused parameters, responses and definitions after expansion/flattening - ContinueOnError bool // Continue when spec expansion issues are found - - /* Extra keys */ - _ struct{} // require keys -} - -// ExpandOpts creates a spec.ExpandOptions to configure expanding a specification document. -func (f *FlattenOpts) ExpandOpts(skipSchemas bool) *swspec.ExpandOptions { - return &swspec.ExpandOptions{RelativeBase: f.BasePath, SkipSchemas: skipSchemas} -} - -// Swagger gets the swagger specification for this flatten operation -func (f *FlattenOpts) Swagger() *swspec.Swagger { - return f.Spec.spec -} +const definitionsPath = "#/definitions" // newRef stores information about refs created during the flattening process type newRef struct { @@ -74,7 +39,7 @@ type newRef struct { path string isOAIGen bool resolved bool - schema *swspec.Schema + schema *spec.Schema parents []string } @@ -146,80 +111,57 @@ func newContext() *context { // func Flatten(opts FlattenOpts) error { debugLog("FlattenOpts: %#v", opts) + opts.flattenContext = newContext() - // recursively expand responses, parameters, path items and items in simple schemas. - // This simplifies the spec and leaves $ref only into schema objects. - expandOpts := opts.ExpandOpts(!opts.Expand) - expandOpts.ContinueOnError = opts.ContinueOnError - if err := swspec.ExpandSpec(opts.Swagger(), expandOpts); err != nil { + // 1. Recursively expand responses, parameters, path items and items in simple schemas. + // + // This simplifies the spec and leaves only the $ref's in schema objects. + if err := expand(&opts); err != nil { return err } - opts.Spec.reload() // re-analyze - - // strip current file from $ref's, so we can recognize them as proper definitions - // In particular, this works around for issue go-openapi/spec#76: leading absolute file in $ref is stripped + // 2. Strip the current document from absolute $ref's that actually a in the root, + // so we can recognize them as proper definitions + // + // In particular, this works around issue go-openapi/spec#76: leading absolute file in $ref is stripped if err := normalizeRef(&opts); err != nil { return err } + // 3. Optionally remove shared parameters and responses already expanded (now unused). + // + // Operation parameters (i.e. under paths) remain. if opts.RemoveUnused { - // optionally removes shared parameters and responses already expanded (now unused) - // default parameters (i.e. under paths) remain. - opts.Swagger().Parameters = nil - opts.Swagger().Responses = nil + removeUnusedShared(&opts) } - opts.Spec.reload() // re-analyze - - // at this point there are no references left but in schemas - - for imported := false; !imported; { - // iteratively import remote references until none left. - // This inlining deals with name conflicts by introducing auto-generated names ("OAIGen") - var err error - if imported, err = importExternalReferences(&opts); err != nil { - debugLog("error in importExternalReferences: %v", err) - return err - } - opts.Spec.reload() // re-analyze + // 4. Import all remote references. + if err := importReferences(&opts); err != nil { + return err } + // 5. full flattening: rewrite inline schemas (schemas that aren't simple types or arrays or maps) if !opts.Minimal && !opts.Expand { - // full flattening: rewrite inline schemas (schemas that aren't simple types or arrays or maps) if err := nameInlinedSchemas(&opts); err != nil { return err } - - opts.Spec.reload() // re-analyze } - // rewrite JSON pointers other than $ref to named definitions + // 6. Rewrite JSON pointers other than $ref to named definitions // and attempt to resolve conflicting names whenever possible. if err := stripPointersAndOAIGen(&opts); err != nil { return err } + // 7. Strip the spec from unused definitions if opts.RemoveUnused { - // remove unused definitions - expected := make(map[string]struct{}) - for k := range opts.Swagger().Definitions { - expected[slashpath.Join(definitionsPath, jsonpointer.Escape(k))] = struct{}{} - } - for _, k := range opts.Spec.AllDefinitionReferences() { - delete(expected, k) - } - for k := range expected { - debugLog("removing unused definition %s", slashpath.Base(k)) - if opts.Verbose { - log.Printf("info: removing unused definition: %s", slashpath.Base(k)) - } - delete(opts.Swagger().Definitions, slashpath.Base(k)) - } - opts.Spec.reload() // re-analyze + removeUnused(&opts) } + // 8. Issue warning notifications, if any + opts.croak() + // TODO: simplify known schema patterns to flat objects with properties // examples: // - lift simple allOf object, @@ -227,579 +169,206 @@ func Flatten(opts FlattenOpts) error { // - rework allOf arrays // - rework allOf additionalProperties - if opts.Verbose { - // issue notifications - croak(&opts) - } return nil } -// isAnalyzedAsComplex determines if an analyzed schema is eligible to flattening (i.e. it is "complex"). -// -// Complex means the schema is any of: -// - a simple type (primitive) -// - an array of something (items are possibly complex ; if this is the case, items will generate a definition) -// - a map of something (additionalProperties are possibly complex ; if this is the case, additionalProperties will -// generate a definition) -func isAnalyzedAsComplex(asch *AnalyzedSchema) bool { - if !asch.IsSimpleSchema && !asch.IsArray && !asch.IsMap { - return true +func expand(opts *FlattenOpts) error { + if err := spec.ExpandSpec(opts.Swagger(), opts.ExpandOpts(!opts.Expand)); err != nil { + return err } - return false -} -// nameInlinedSchemas replaces every complex inline construct by a named definition. -func nameInlinedSchemas(opts *FlattenOpts) error { - debugLog("nameInlinedSchemas") - namer := &inlineSchemaNamer{ - Spec: opts.Swagger(), - Operations: opRefsByRef(gatherOperations(opts.Spec, nil)), - flattenContext: opts.flattenContext, - opts: opts, - } - depthFirst := sortDepthFirst(opts.Spec.allSchemas) - for _, key := range depthFirst { - sch := opts.Spec.allSchemas[key] - if sch.Schema != nil && sch.Schema.Ref.String() == "" && !sch.TopLevel { // inline schema - asch, err := Schema(SchemaOpts{Schema: sch.Schema, Root: opts.Swagger(), BasePath: opts.BasePath}) - if err != nil { - return fmt.Errorf("schema analysis [%s]: %v", key, err) - } + opts.Spec.reload() // re-analyze - if isAnalyzedAsComplex(asch) { // move complex schemas to definitions - if err := namer.Name(key, sch.Schema, asch); err != nil { - return err - } - } - } - } return nil } -var depthGroupOrder = []string{ - "sharedParam", "sharedResponse", "sharedOpParam", "opParam", "codeResponse", "defaultResponse", "definition", -} +// normalizeRef strips the current file from any absolute file $ref. This works around issue go-openapi/spec#76: +// leading absolute file in $ref is stripped +func normalizeRef(opts *FlattenOpts) error { + debugLog("normalizeRef") -func sortDepthFirst(data map[string]SchemaRef) []string { - // group by category (shared params, op param, statuscode response, default response, definitions) - // sort groups internally by number of parts in the key and lexical names - // flatten groups into a single list of keys - sorted := make([]string, 0, len(data)) - grouped := make(map[string]keys, len(data)) - for k := range data { - split := keyParts(k) - var pk string - if split.IsSharedOperationParam() { - pk = "sharedOpParam" - } - if split.IsOperationParam() { - pk = "opParam" - } - if split.IsStatusCodeResponse() { - pk = "codeResponse" - } - if split.IsDefaultResponse() { - pk = "defaultResponse" - } - if split.IsDefinition() { - pk = "definition" - } - if split.IsSharedParam() { - pk = "sharedParam" - } - if split.IsSharedResponse() { - pk = "sharedResponse" + altered := false + for k, w := range opts.Spec.references.allRefs { + if !strings.HasPrefix(w.String(), opts.BasePath+definitionsPath) { // may be a mix of / and \, depending on OS + continue } - grouped[pk] = append(grouped[pk], key{Segments: len(split), Key: k}) - } - for _, pk := range depthGroupOrder { - res := grouped[pk] - sort.Sort(res) - for _, v := range res { - sorted = append(sorted, v.Key) + altered = true + debugLog("stripping absolute path for: %s", w.String()) + + // strip the base path from definition + if err := replace.UpdateRef(opts.Swagger(), k, + spec.MustCreateRef(path.Join(definitionsPath, path.Base(w.String())))); err != nil { + return err } } - return sorted -} -type key struct { - Segments int - Key string -} -type keys []key + if altered { + opts.Spec.reload() // re-analyze + } -func (k keys) Len() int { return len(k) } -func (k keys) Swap(i, j int) { k[i], k[j] = k[j], k[i] } -func (k keys) Less(i, j int) bool { - return k[i].Segments > k[j].Segments || (k[i].Segments == k[j].Segments && k[i].Key < k[j].Key) + return nil } -type inlineSchemaNamer struct { - Spec *swspec.Swagger - Operations map[string]opRef - flattenContext *context - opts *FlattenOpts -} +func removeUnusedShared(opts *FlattenOpts) { + opts.Swagger().Parameters = nil + opts.Swagger().Responses = nil -func opRefsByRef(oprefs map[string]opRef) map[string]opRef { - result := make(map[string]opRef, len(oprefs)) - for _, v := range oprefs { - result[v.Ref.String()] = v - } - return result + opts.Spec.reload() // re-analyze } -func (isn *inlineSchemaNamer) Name(key string, schema *swspec.Schema, aschema *AnalyzedSchema) error { - debugLog("naming inlined schema at %s", key) - - parts := keyParts(key) - for _, name := range namesFromKey(parts, aschema, isn.Operations) { - if name != "" { - // create unique name - newName, isOAIGen := uniqifyName(isn.Spec.Definitions, swag.ToJSONName(name)) +func importReferences(opts *FlattenOpts) error { + var ( + imported bool + err error + ) - // clone schema - sch, err := cloneSchema(schema) - if err != nil { - return err - } - - // replace values on schema - if err := rewriteSchemaToRef(isn.Spec, key, - swspec.MustCreateRef(slashpath.Join(definitionsPath, newName))); err != nil { - return fmt.Errorf("error while creating definition %q from inline schema: %v", newName, err) - } - - // rewrite any dependent $ref pointing to this place, - // when not already pointing to a top-level definition. - // - // NOTE: this is important if such referers use arbitrary JSON pointers. - an := New(isn.Spec) - for k, v := range an.references.allRefs { - r, _, erd := deepestRef(isn.opts, v) - if erd != nil { - return fmt.Errorf("at %s, %v", k, erd) - } - if r.String() == key || - r.String() == slashpath.Join(definitionsPath, newName) && - slashpath.Dir(v.String()) != definitionsPath { - debugLog("found a $ref to a rewritten schema: %s points to %s", k, v.String()) - - // rewrite $ref to the new target - if err := updateRef(isn.Spec, k, - swspec.MustCreateRef(slashpath.Join(definitionsPath, newName))); err != nil { - return err - } - } - } + for !imported && err == nil { + // iteratively import remote references until none left. + // This inlining deals with name conflicts by introducing auto-generated names ("OAIGen") + imported, err = importExternalReferences(opts) - // NOTE: this extension is currently not used by go-swagger (provided for information only) - sch.AddExtension("x-go-gen-location", genLocation(parts)) - - // save cloned schema to definitions - saveSchema(isn.Spec, newName, sch) - - // keep track of created refs - if isn.flattenContext != nil { - debugLog("track created ref: key=%s, newName=%s, isOAIGen=%t", key, newName, isOAIGen) - resolved := false - if _, ok := isn.flattenContext.newRefs[key]; ok { - resolved = isn.flattenContext.newRefs[key].resolved - } - isn.flattenContext.newRefs[key] = &newRef{ - key: key, - newName: newName, - path: slashpath.Join(definitionsPath, newName), - isOAIGen: isOAIGen, - resolved: resolved, - schema: sch, - } - } - } + opts.Spec.reload() // re-analyze } - return nil -} -// genLocation indicates from which section of the specification (models or operations) a definition has been created. -// -// This is reflected in the output spec with a "x-go-gen-location" extension. At the moment, this is is provided -// for information only. -func genLocation(parts splitKey) string { - if parts.IsOperation() { - return "operations" - } - if parts.IsDefinition() { - return "models" - } - return "" + return err } -// uniqifyName yields a unique name for a definition -func uniqifyName(definitions swspec.Definitions, name string) (string, bool) { - isOAIGen := false - if name == "" { - name = "oaiGen" - isOAIGen = true - } - if len(definitions) == 0 { - return name, isOAIGen - } - - unq := true - for k := range definitions { - if strings.EqualFold(k, name) { - unq = false - break - } - } - - if unq { - return name, isOAIGen - } +// nameInlinedSchemas replaces every complex inline construct by a named definition. +func nameInlinedSchemas(opts *FlattenOpts) error { + debugLog("nameInlinedSchemas") - name += "OAIGen" - isOAIGen = true - var idx int - unique := name - _, known := definitions[unique] - for known { - idx++ - unique = fmt.Sprintf("%s%d", name, idx) - _, known = definitions[unique] + namer := &InlineSchemaNamer{ + Spec: opts.Swagger(), + Operations: operations.AllOpRefsByRef(opts.Spec, nil), + flattenContext: opts.flattenContext, + opts: opts, } - return unique, isOAIGen -} -func namesFromKey(parts splitKey, aschema *AnalyzedSchema, operations map[string]opRef) []string { - var baseNames [][]string - var startIndex int - if parts.IsOperation() { - // params - if parts.IsOperationParam() || parts.IsSharedOperationParam() { - piref := parts.PathItemRef() - if piref.String() != "" && parts.IsOperationParam() { - if op, ok := operations[piref.String()]; ok { - startIndex = 5 - baseNames = append(baseNames, []string{op.ID, "params", "body"}) - } - } else if parts.IsSharedOperationParam() { - pref := parts.PathRef() - for k, v := range operations { - if strings.HasPrefix(k, pref.String()) { - startIndex = 4 - baseNames = append(baseNames, []string{v.ID, "params", "body"}) - } - } - } - } - // responses - if parts.IsOperationResponse() { - piref := parts.PathItemRef() - if piref.String() != "" { - if op, ok := operations[piref.String()]; ok { - startIndex = 6 - baseNames = append(baseNames, []string{op.ID, parts.ResponseName(), "body"}) - } - } + depthFirst := sortref.DepthFirst(opts.Spec.allSchemas) + for _, key := range depthFirst { + sch := opts.Spec.allSchemas[key] + if sch.Schema == nil || sch.Schema.Ref.String() != "" || sch.TopLevel { + continue } - } - // definitions - if parts.IsDefinition() { - nm := parts.DefinitionName() - if nm != "" { - startIndex = 2 - baseNames = append(baseNames, []string{parts.DefinitionName()}) + asch, err := Schema(SchemaOpts{Schema: sch.Schema, Root: opts.Swagger(), BasePath: opts.BasePath}) + if err != nil { + return fmt.Errorf("schema analysis [%s]: %w", key, err) } - } - var result []string - for _, segments := range baseNames { - nm := parts.BuildName(segments, startIndex, aschema) - if nm != "" { - result = append(result, nm) + if asch.isAnalyzedAsComplex() { // move complex schemas to definitions + if err := namer.Name(key, sch.Schema, asch); err != nil { + return err + } } } - sort.Strings(result) - return result -} - -const ( - paths = "paths" - responses = "responses" - parameters = "parameters" - definitions = "definitions" - definitionsPath = "#/definitions" -) -var ( - ignoredKeys map[string]struct{} - validMethods map[string]struct{} -) - -func init() { - ignoredKeys = map[string]struct{}{ - "schema": {}, - "properties": {}, - "not": {}, - "anyOf": {}, - "oneOf": {}, - } - - validMethods = map[string]struct{}{ - "GET": {}, - "HEAD": {}, - "OPTIONS": {}, - "PATCH": {}, - "POST": {}, - "PUT": {}, - "DELETE": {}, - } -} - -type splitKey []string + opts.Spec.reload() // re-analyze -func (s splitKey) IsDefinition() bool { - return len(s) > 1 && s[0] == definitions + return nil } -func (s splitKey) DefinitionName() string { - if !s.IsDefinition() { - return "" +func removeUnused(opts *FlattenOpts) { + expected := make(map[string]struct{}) + for k := range opts.Swagger().Definitions { + expected[path.Join(definitionsPath, jsonpointer.Escape(k))] = struct{}{} } - return s[1] -} -func (s splitKey) isKeyName(i int) bool { - if i <= 0 { - return false - } - count := 0 - for idx := i - 1; idx > 0; idx-- { - if s[idx] != "properties" { - break - } - count++ + for _, k := range opts.Spec.AllDefinitionReferences() { + delete(expected, k) } - return count%2 != 0 -} - -func (s splitKey) BuildName(segments []string, startIndex int, aschema *AnalyzedSchema) string { - for i, part := range s[startIndex:] { - if _, ignored := ignoredKeys[part]; !ignored || s.isKeyName(startIndex+i) { - if part == "items" || part == "additionalItems" { - if aschema.IsTuple || aschema.IsTupleWithExtra { - segments = append(segments, "tuple") - } else { - segments = append(segments, "items") - } - if part == "additionalItems" { - segments = append(segments, part) - } - continue - } - segments = append(segments, part) + for k := range expected { + debugLog("removing unused definition %s", path.Base(k)) + if opts.Verbose { + log.Printf("info: removing unused definition: %s", path.Base(k)) } + delete(opts.Swagger().Definitions, path.Base(k)) } - return strings.Join(segments, " ") -} - -func (s splitKey) IsOperation() bool { - return len(s) > 1 && s[0] == paths -} -func (s splitKey) IsSharedOperationParam() bool { - return len(s) > 2 && s[0] == paths && s[2] == parameters -} - -func (s splitKey) IsSharedParam() bool { - return len(s) > 1 && s[0] == parameters -} - -func (s splitKey) IsOperationParam() bool { - return len(s) > 3 && s[0] == paths && s[3] == parameters -} - -func (s splitKey) IsOperationResponse() bool { - return len(s) > 3 && s[0] == paths && s[3] == responses -} - -func (s splitKey) IsSharedResponse() bool { - return len(s) > 1 && s[0] == responses + opts.Spec.reload() // re-analyze } -func (s splitKey) IsDefaultResponse() bool { - return len(s) > 4 && s[0] == paths && s[3] == responses && s[4] == "default" -} +func importKnownRef(entry sortref.RefRevIdx, refStr, newName string, opts *FlattenOpts) error { + // rewrite ref with already resolved external ref (useful for cyclical refs): + // rewrite external refs to local ones + debugLog("resolving known ref [%s] to %s", refStr, newName) -func (s splitKey) IsStatusCodeResponse() bool { - isInt := func() bool { - _, err := strconv.Atoi(s[4]) - return err == nil - } - return len(s) > 4 && s[0] == paths && s[3] == responses && isInt() -} - -func (s splitKey) ResponseName() string { - if s.IsStatusCodeResponse() { - code, _ := strconv.Atoi(s[4]) - return http.StatusText(code) - } - if s.IsDefaultResponse() { - return "Default" + for _, key := range entry.Keys { + if err := replace.UpdateRef(opts.Swagger(), key, spec.MustCreateRef(path.Join(definitionsPath, newName))); err != nil { + return err + } } - return "" -} -func (s splitKey) PathItemRef() swspec.Ref { - if len(s) < 3 { - return swspec.Ref{} - } - pth, method := s[1], s[2] - if _, isValidMethod := validMethods[strings.ToUpper(method)]; !isValidMethod && !strings.HasPrefix(method, "x-") { - return swspec.Ref{} - } - return swspec.MustCreateRef("#" + slashpath.Join("/", paths, jsonpointer.Escape(pth), strings.ToUpper(method))) + return nil } -func (s splitKey) PathRef() swspec.Ref { - if !s.IsOperation() { - return swspec.Ref{} - } - return swspec.MustCreateRef("#" + slashpath.Join("/", paths, jsonpointer.Escape(s[1]))) -} +func importNewRef(entry sortref.RefRevIdx, refStr string, opts *FlattenOpts) error { + var ( + isOAIGen bool + newName string + ) -func keyParts(key string) splitKey { - var res []string - for _, part := range strings.Split(key[1:], "/") { - if part != "" { - res = append(res, jsonpointer.Unescape(part)) - } - } - return res -} + debugLog("resolving schema from remote $ref [%s]", refStr) -func rewriteSchemaToRef(spec *swspec.Swagger, key string, ref swspec.Ref) error { - debugLog("rewriting schema to ref for %s with %s", key, ref.String()) - _, value, err := getPointerFromKey(spec, key) + sch, err := spec.ResolveRefWithBase(opts.Swagger(), &entry.Ref, opts.ExpandOpts(false)) if err != nil { - return err + return fmt.Errorf("could not resolve schema: %w", err) } - switch refable := value.(type) { - case *swspec.Schema: - return rewriteParentRef(spec, key, ref) - - case swspec.Schema: - return rewriteParentRef(spec, key, ref) - - case *swspec.SchemaOrArray: - if refable.Schema != nil { - refable.Schema = &swspec.Schema{SchemaProps: swspec.SchemaProps{Ref: ref}} - } - - case *swspec.SchemaOrBool: - if refable.Schema != nil { - refable.Schema = &swspec.Schema{SchemaProps: swspec.SchemaProps{Ref: ref}} - } - default: - return fmt.Errorf("no schema with ref found at %s for %T", key, value) + // at this stage only $ref analysis matters + partialAnalyzer := &Spec{ + references: referenceAnalysis{}, + patterns: patternAnalysis{}, + enums: enumAnalysis{}, } + partialAnalyzer.reset() + partialAnalyzer.analyzeSchema("", sch, "/") - return nil -} - -func rewriteParentRef(spec *swspec.Swagger, key string, ref swspec.Ref) error { - parent, entry, pvalue, err := getParentFromKey(spec, key) - if err != nil { - return err - } - - debugLog("rewriting holder for %T", pvalue) - switch container := pvalue.(type) { - case swspec.Response: - if err := rewriteParentRef(spec, "#"+parent, ref); err != nil { - return err + // now rewrite those refs with rebase + for key, ref := range partialAnalyzer.references.allRefs { + if err := replace.UpdateRef(sch, key, spec.MustCreateRef(normalize.RebaseRef(entry.Ref.String(), ref.String()))); err != nil { + return fmt.Errorf("failed to rewrite ref for key %q at %s: %w", key, entry.Ref.String(), err) } + } - case *swspec.Response: - container.Schema = &swspec.Schema{SchemaProps: swspec.SchemaProps{Ref: ref}} - - case *swspec.Responses: - statusCode, err := strconv.Atoi(entry) - if err != nil { - return fmt.Errorf("%s not a number: %v", key[1:], err) - } - resp := container.StatusCodeResponses[statusCode] - resp.Schema = &swspec.Schema{SchemaProps: swspec.SchemaProps{Ref: ref}} - container.StatusCodeResponses[statusCode] = resp + // generate a unique name - isOAIGen means that a naming conflict was resolved by changing the name + newName, isOAIGen = uniqifyName(opts.Swagger().Definitions, nameFromRef(entry.Ref)) + debugLog("new name for [%s]: %s - with name conflict:%t", strings.Join(entry.Keys, ", "), newName, isOAIGen) - case map[string]swspec.Response: - resp := container[entry] - resp.Schema = &swspec.Schema{SchemaProps: swspec.SchemaProps{Ref: ref}} - container[entry] = resp + opts.flattenContext.resolved[refStr] = newName - case swspec.Parameter: - if err := rewriteParentRef(spec, "#"+parent, ref); err != nil { + // rewrite the external refs to local ones + for _, key := range entry.Keys { + if err := replace.UpdateRef(opts.Swagger(), key, + spec.MustCreateRef(path.Join(definitionsPath, newName))); err != nil { return err } - case map[string]swspec.Parameter: - param := container[entry] - param.Schema = &swspec.Schema{SchemaProps: swspec.SchemaProps{Ref: ref}} - container[entry] = param - - case []swspec.Parameter: - idx, err := strconv.Atoi(entry) - if err != nil { - return fmt.Errorf("%s not a number: %v", key[1:], err) - } - param := container[idx] - param.Schema = &swspec.Schema{SchemaProps: swspec.SchemaProps{Ref: ref}} - container[idx] = param - - case swspec.Definitions: - container[entry] = swspec.Schema{SchemaProps: swspec.SchemaProps{Ref: ref}} - - case map[string]swspec.Schema: - container[entry] = swspec.Schema{SchemaProps: swspec.SchemaProps{Ref: ref}} - - case []swspec.Schema: - idx, err := strconv.Atoi(entry) - if err != nil { - return fmt.Errorf("%s not a number: %v", key[1:], err) + // keep track of created refs + resolved := false + if _, ok := opts.flattenContext.newRefs[key]; ok { + resolved = opts.flattenContext.newRefs[key].resolved } - container[idx] = swspec.Schema{SchemaProps: swspec.SchemaProps{Ref: ref}} - case *swspec.SchemaOrArray: - // NOTE: this is necessarily an array - otherwise, the parent would be *Schema - idx, err := strconv.Atoi(entry) - if err != nil { - return fmt.Errorf("%s not a number: %v", key[1:], err) + debugLog("keeping track of ref: %s (%s), resolved: %t", key, newName, resolved) + opts.flattenContext.newRefs[key] = &newRef{ + key: key, + newName: newName, + path: path.Join(definitionsPath, newName), + isOAIGen: isOAIGen, + resolved: resolved, + schema: sch, } - container.Schemas[idx] = swspec.Schema{SchemaProps: swspec.SchemaProps{Ref: ref}} - - case swspec.SchemaProperties: - container[entry] = swspec.Schema{SchemaProps: swspec.SchemaProps{Ref: ref}} + } - // NOTE: can't have case *swspec.SchemaOrBool = parent in this case is *Schema + // add the resolved schema to the definitions + schutils.Save(opts.Swagger(), newName, sch) - default: - return fmt.Errorf("unhandled parent schema rewrite %s (%T)", key, pvalue) - } return nil } -func cloneSchema(schema *swspec.Schema) (*swspec.Schema, error) { - var sch swspec.Schema - if err := swag.FromDynamicJSON(schema, &sch); err != nil { - return nil, fmt.Errorf("cannot clone schema: %v", err) - } - return &sch, nil -} - // importExternalReferences iteratively digs remote references and imports them into the main schema. // // At every iteration, new remotes may be found when digging deeper: they are rebased to the current schema before being imported. @@ -808,7 +377,7 @@ func cloneSchema(schema *swspec.Schema) (*swspec.Schema, error) { func importExternalReferences(opts *FlattenOpts) (bool, error) { debugLog("importExternalReferences") - groupedRefs := reverseIndexForSchemaRefs(opts) + groupedRefs := sortref.ReverseIndex(opts.Spec.references.schemas, opts.BasePath) sortedRefStr := make([]string, 0, len(groupedRefs)) if opts.flattenContext == nil { opts.flattenContext = newContext() @@ -827,475 +396,56 @@ func importExternalReferences(opts *FlattenOpts) (bool, error) { if entry.Ref.HasFragmentOnly { continue } + complete = false - var isOAIGen bool newName := opts.flattenContext.resolved[refStr] if newName != "" { - // rewrite ref with already resolved external ref (useful for cyclical refs): - // rewrite external refs to local ones - debugLog("resolving known ref [%s] to %s", refStr, newName) - for _, key := range entry.Keys { - if err := updateRef(opts.Swagger(), key, - swspec.MustCreateRef(slashpath.Join(definitionsPath, newName))); err != nil { - return false, err - } - } - } else { - // resolve schemas - debugLog("resolving schema from remote $ref [%s]", refStr) - sch, err := swspec.ResolveRefWithBase(opts.Swagger(), &entry.Ref, opts.ExpandOpts(false)) - if err != nil { - return false, fmt.Errorf("could not resolve schema: %v", err) - } - - // at this stage only $ref analysis matters - partialAnalyzer := &Spec{ - references: referenceAnalysis{}, - patterns: patternAnalysis{}, - enums: enumAnalysis{}, - } - partialAnalyzer.reset() - partialAnalyzer.analyzeSchema("", sch, "/") - - // now rewrite those refs with rebase - for key, ref := range partialAnalyzer.references.allRefs { - if err := updateRef(sch, key, swspec.MustCreateRef(rebaseRef(entry.Ref.String(), ref.String()))); err != nil { - return false, fmt.Errorf("failed to rewrite ref for key %q at %s: %v", key, entry.Ref.String(), err) - } + if err := importKnownRef(entry, refStr, newName, opts); err != nil { + return false, err } - // generate a unique name - isOAIGen means that a naming conflict was resolved by changing the name - newName, isOAIGen = uniqifyName(opts.Swagger().Definitions, nameFromRef(entry.Ref)) - debugLog("new name for [%s]: %s - with name conflict:%t", - strings.Join(entry.Keys, ", "), newName, isOAIGen) - - opts.flattenContext.resolved[refStr] = newName - - // rewrite the external refs to local ones - for _, key := range entry.Keys { - if err := updateRef(opts.Swagger(), key, - swspec.MustCreateRef(slashpath.Join(definitionsPath, newName))); err != nil { - return false, err - } - - // keep track of created refs - resolved := false - if _, ok := opts.flattenContext.newRefs[key]; ok { - resolved = opts.flattenContext.newRefs[key].resolved - } - debugLog("keeping track of ref: %s (%s), resolved: %t", key, newName, resolved) - opts.flattenContext.newRefs[key] = &newRef{ - key: key, - newName: newName, - path: slashpath.Join(definitionsPath, newName), - isOAIGen: isOAIGen, - resolved: resolved, - schema: sch, - } - } + continue + } - // add the resolved schema to the definitions - saveSchema(opts.Swagger(), newName, sch) + // resolve schemas + if err := importNewRef(entry, refStr, opts); err != nil { + return false, err } } + // maintains ref index entries for k := range opts.flattenContext.newRefs { r := opts.flattenContext.newRefs[k] // update tracking with resolved schemas if r.schema.Ref.String() != "" { - ref := swspec.MustCreateRef(r.path) - sch, err := swspec.ResolveRefWithBase(opts.Swagger(), &ref, opts.ExpandOpts(false)) - if err != nil { - return false, fmt.Errorf("could not resolve schema: %v", err) - } - r.schema = sch - } - // update tracking with renamed keys: got a cascade of refs - if r.path != k { - renamed := *r - renamed.key = r.path - opts.flattenContext.newRefs[renamed.path] = &renamed - - // indirect ref - r.newName = slashpath.Base(k) - r.schema = swspec.RefSchema(r.path) - r.path = k - r.isOAIGen = strings.Contains(k, "OAIGen") - } - } - - return complete, nil -} - -type refRevIdx struct { - Ref swspec.Ref - Keys []string -} - -// rebaseRef rebase a remote ref relative to a base ref. -// -// NOTE: does not support JSONschema ID for $ref (we assume we are working with swagger specs here). -// -// NOTE(windows): -// * refs are assumed to have been normalized with drive letter lower cased (from go-openapi/spec) -// * "/ in paths may appear as escape sequences -func rebaseRef(baseRef string, ref string) string { - debugLog("rebasing ref: %s onto %s", ref, baseRef) - baseRef, _ = url.PathUnescape(baseRef) - ref, _ = url.PathUnescape(ref) - if baseRef == "" || baseRef == "." || strings.HasPrefix(baseRef, "#") { - return ref - } - - parts := strings.Split(ref, "#") - - baseParts := strings.Split(baseRef, "#") - baseURL, _ := url.Parse(baseParts[0]) - if strings.HasPrefix(ref, "#") { - if baseURL.Host == "" { - return strings.Join([]string{baseParts[0], parts[1]}, "#") - } - return strings.Join([]string{baseParts[0], parts[1]}, "#") - } - - refURL, _ := url.Parse(parts[0]) - if refURL.Host != "" || filepath.IsAbs(parts[0]) { - // not rebasing an absolute path - return ref - } - - // there is a relative path - var basePath string - if baseURL.Host != "" { - // when there is a host, standard URI rules apply (with "/") - baseURL.Path = slashpath.Dir(baseURL.Path) - baseURL.Path = slashpath.Join(baseURL.Path, "/"+parts[0]) - return baseURL.String() - } - - // this is a local relative path - // basePart[0] and parts[0] are local filesystem directories/files - basePath = filepath.Dir(baseParts[0]) - relPath := filepath.Join(basePath, string(filepath.Separator)+parts[0]) - if len(parts) > 1 { - return strings.Join([]string{relPath, parts[1]}, "#") - } - return relPath -} - -// normalizePath renders absolute path on remote file refs -// -// NOTE(windows): -// * refs are assumed to have been normalized with drive letter lower cased (from go-openapi/spec) -// * "/ in paths may appear as escape sequences -func normalizePath(ref swspec.Ref, opts *FlattenOpts) (normalizedPath string) { - uri, _ := url.PathUnescape(ref.String()) - if ref.HasFragmentOnly || filepath.IsAbs(uri) { - normalizedPath = uri - return - } - - refURL, _ := url.Parse(uri) - if refURL.Host != "" { - normalizedPath = uri - return - } - - parts := strings.Split(uri, "#") - // BasePath, parts[0] are local filesystem directories, guaranteed to be absolute at this stage - parts[0] = filepath.Join(filepath.Dir(opts.BasePath), parts[0]) - normalizedPath = strings.Join(parts, "#") - return -} - -func reverseIndexForSchemaRefs(opts *FlattenOpts) map[string]refRevIdx { - collected := make(map[string]refRevIdx) - for key, schRef := range opts.Spec.references.schemas { - // normalize paths before sorting, - // so we get together keys in same external file - normalizedPath := normalizePath(schRef, opts) - if entry, ok := collected[normalizedPath]; ok { - entry.Keys = append(entry.Keys, key) - collected[normalizedPath] = entry - } else { - collected[normalizedPath] = refRevIdx{ - Ref: schRef, - Keys: []string{key}, - } - } - } - return collected -} - -func nameFromRef(ref swspec.Ref) string { - u := ref.GetURL() - if u.Fragment != "" { - return swag.ToJSONName(slashpath.Base(u.Fragment)) - } - if u.Path != "" { - bn := slashpath.Base(u.Path) - if bn != "" && bn != "/" { - ext := slashpath.Ext(bn) - if ext != "" { - return swag.ToJSONName(bn[:len(bn)-len(ext)]) - } - return swag.ToJSONName(bn) - } - } - return swag.ToJSONName(strings.ReplaceAll(u.Host, ".", " ")) -} - -func saveSchema(spec *swspec.Swagger, name string, schema *swspec.Schema) { - if schema == nil { - return - } - if spec.Definitions == nil { - spec.Definitions = make(map[string]swspec.Schema, 150) - } - spec.Definitions[name] = *schema -} - -// getPointerFromKey retrieves the content of the JSON pointer "key" -func getPointerFromKey(spec interface{}, key string) (string, interface{}, error) { - switch spec.(type) { - case *swspec.Schema: - case *swspec.Swagger: - default: - panic("unexpected type used in getPointerFromKey") - } - if key == "#/" { - return "", spec, nil - } - // unescape chars in key, e.g. "{}" from path params - pth, _ := internal.PathUnescape(key[1:]) - ptr, err := jsonpointer.New(pth) - if err != nil { - return "", nil, err - } - - value, _, err := ptr.Get(spec) - if err != nil { - debugLog("error when getting key: %s with path: %s", key, pth) - return "", nil, err - } - return pth, value, nil -} - -// getParentFromKey retrieves the container of the JSON pointer "key" -func getParentFromKey(spec interface{}, key string) (string, string, interface{}, error) { - switch spec.(type) { - case *swspec.Schema: - case *swspec.Swagger: - default: - panic("unexpected type used in getPointerFromKey") - } - // unescape chars in key, e.g. "{}" from path params - pth, _ := internal.PathUnescape(key[1:]) - - parent, entry := slashpath.Dir(pth), slashpath.Base(pth) - debugLog("getting schema holder at: %s, with entry: %s", parent, entry) - - pptr, err := jsonpointer.New(parent) - if err != nil { - return "", "", nil, err - } - pvalue, _, err := pptr.Get(spec) - if err != nil { - return "", "", nil, fmt.Errorf("can't get parent for %s: %v", parent, err) - } - return parent, entry, pvalue, nil -} - -// updateRef replaces a ref by another one -func updateRef(spec interface{}, key string, ref swspec.Ref) error { - switch spec.(type) { - case *swspec.Schema: - case *swspec.Swagger: - default: - panic("unexpected type used in getPointerFromKey") - } - debugLog("updating ref for %s with %s", key, ref.String()) - pth, value, err := getPointerFromKey(spec, key) - if err != nil { - return err - } - - switch refable := value.(type) { - case *swspec.Schema: - refable.Ref = ref - case *swspec.SchemaOrArray: - if refable.Schema != nil { - refable.Schema.Ref = ref - } - case *swspec.SchemaOrBool: - if refable.Schema != nil { - refable.Schema.Ref = ref - } - case swspec.Schema: - debugLog("rewriting holder for %T", refable) - _, entry, pvalue, erp := getParentFromKey(spec, key) - if erp != nil { - return err - } - switch container := pvalue.(type) { - case swspec.Definitions: - container[entry] = swspec.Schema{SchemaProps: swspec.SchemaProps{Ref: ref}} - - case map[string]swspec.Schema: - container[entry] = swspec.Schema{SchemaProps: swspec.SchemaProps{Ref: ref}} - - case []swspec.Schema: - idx, err := strconv.Atoi(entry) - if err != nil { - return fmt.Errorf("%s not a number: %v", pth, err) - } - container[idx] = swspec.Schema{SchemaProps: swspec.SchemaProps{Ref: ref}} - - case *swspec.SchemaOrArray: - // NOTE: this is necessarily an array - otherwise, the parent would be *Schema - idx, err := strconv.Atoi(entry) + ref := spec.MustCreateRef(r.path) + sch, err := spec.ResolveRefWithBase(opts.Swagger(), &ref, opts.ExpandOpts(false)) if err != nil { - return fmt.Errorf("%s not a number: %v", pth, err) + return false, fmt.Errorf("could not resolve schema: %w", err) } - container.Schemas[idx] = swspec.Schema{SchemaProps: swspec.SchemaProps{Ref: ref}} - - case swspec.SchemaProperties: - container[entry] = swspec.Schema{SchemaProps: swspec.SchemaProps{Ref: ref}} - // NOTE: can't have case *swspec.SchemaOrBool = parent in this case is *Schema - - default: - return fmt.Errorf("unhandled container type at %s: %T", key, value) - } - - default: - return fmt.Errorf("no schema with ref found at %s for %T", key, value) - } - - return nil -} - -// updateRefWithSchema replaces a ref with a schema (i.e. re-inline schema) -func updateRefWithSchema(spec *swspec.Swagger, key string, sch *swspec.Schema) error { - debugLog("updating ref for %s with schema", key) - pth, value, err := getPointerFromKey(spec, key) - if err != nil { - return err - } - - switch refable := value.(type) { - case *swspec.Schema: - *refable = *sch - case swspec.Schema: - _, entry, pvalue, erp := getParentFromKey(spec, key) - if erp != nil { - return err - } - switch container := pvalue.(type) { - case swspec.Definitions: - container[entry] = *sch - - case map[string]swspec.Schema: - container[entry] = *sch - - case []swspec.Schema: - idx, err := strconv.Atoi(entry) - if err != nil { - return fmt.Errorf("%s not a number: %v", pth, err) - } - container[idx] = *sch - - case *swspec.SchemaOrArray: - // NOTE: this is necessarily an array - otherwise, the parent would be *Schema - idx, err := strconv.Atoi(entry) - if err != nil { - return fmt.Errorf("%s not a number: %v", pth, err) - } - container.Schemas[idx] = *sch - - case swspec.SchemaProperties: - container[entry] = *sch - - // NOTE: can't have case *swspec.SchemaOrBool = parent in this case is *Schema - - default: - return fmt.Errorf("unhandled type for parent of [%s]: %T", key, value) + r.schema = sch } - case *swspec.SchemaOrArray: - *refable.Schema = *sch - // NOTE: can't have case *swspec.SchemaOrBool = parent in this case is *Schema - case *swspec.SchemaOrBool: - *refable.Schema = *sch - default: - return fmt.Errorf("no schema with ref found at %s for %T", key, value) - } - - return nil -} -func containsString(names []string, name string) bool { - for _, nm := range names { - if nm == name { - return true + if r.path == k { + continue } - } - return false -} -type opRef struct { - Method string - Path string - Key string - ID string - Op *swspec.Operation - Ref swspec.Ref -} + // update tracking with renamed keys: got a cascade of refs + renamed := *r + renamed.key = r.path + opts.flattenContext.newRefs[renamed.path] = &renamed -type opRefs []opRef - -func (o opRefs) Len() int { return len(o) } -func (o opRefs) Swap(i, j int) { o[i], o[j] = o[j], o[i] } -func (o opRefs) Less(i, j int) bool { return o[i].Key < o[j].Key } - -func gatherOperations(specDoc *Spec, operationIDs []string) map[string]opRef { - var oprefs opRefs - - for method, pathItem := range specDoc.Operations() { - for pth, operation := range pathItem { - vv := *operation - oprefs = append(oprefs, opRef{ - Key: swag.ToGoName(strings.ToLower(method) + " " + pth), - Method: method, - Path: pth, - ID: vv.ID, - Op: &vv, - Ref: swspec.MustCreateRef("#" + slashpath.Join("/paths", jsonpointer.Escape(pth), method)), - }) - } + // indirect ref + r.newName = path.Base(k) + r.schema = spec.RefSchema(r.path) + r.path = k + r.isOAIGen = strings.Contains(k, "OAIGen") } - sort.Sort(oprefs) - - operations := make(map[string]opRef) - for _, opr := range oprefs { - nm := opr.ID - if nm == "" { - nm = opr.Key - } - - oo, found := operations[nm] - if found && oo.Method != opr.Method && oo.Path != opr.Path { - nm = opr.Key - } - if len(operationIDs) == 0 || containsString(operationIDs, opr.ID) || containsString(operationIDs, nm) { - opr.ID = nm - opr.Op.ID = nm - operations[nm] = opr - } - } - return operations + return complete, nil } // stripPointersAndOAIGen removes anonymous JSON pointers from spec and chain with name conflicts handler. @@ -1326,25 +476,71 @@ func stripPointersAndOAIGen(opts *FlattenOpts) error { } // restrip and re-analyze - if hasIntroducedPointerOrInline, ers = stripOAIGen(opts); ers != nil { - return ers + var err error + if hasIntroducedPointerOrInline, err = stripOAIGen(opts); err != nil { + return err } } + return nil } -func updateRefParents(opts *FlattenOpts, r *newRef) { +// stripOAIGen strips the spec from unnecessary OAIGen constructs, initially created to dedupe flattened definitions. +// +// A dedupe is deemed unnecessary whenever: +// - the only conflict is with its (single) parent: OAIGen is merged into its parent (reinlining) +// - there is a conflict with multiple parents: merge OAIGen in first parent, the rewrite other parents to point to +// the first parent. +// +// This function returns true whenever it re-inlined a complex schema, so the caller may chose to iterate +// pointer and name resolution again. +func stripOAIGen(opts *FlattenOpts) (bool, error) { + debugLog("stripOAIGen") + replacedWithComplex := false + + // figure out referers of OAIGen definitions (doing it before the ref start mutating) + for _, r := range opts.flattenContext.newRefs { + updateRefParents(opts.Spec.references.allRefs, r) + } + + for k := range opts.flattenContext.newRefs { + r := opts.flattenContext.newRefs[k] + debugLog("newRefs[%s]: isOAIGen: %t, resolved: %t, name: %s, path:%s, #parents: %d, parents: %v, ref: %s", + k, r.isOAIGen, r.resolved, r.newName, r.path, len(r.parents), r.parents, r.schema.Ref.String()) + + if !r.isOAIGen || len(r.parents) == 0 { + continue + } + + hasReplacedWithComplex, err := stripOAIGenForRef(opts, k, r) + if err != nil { + return replacedWithComplex, err + } + + replacedWithComplex = replacedWithComplex || hasReplacedWithComplex + } + + debugLog("replacedWithComplex: %t", replacedWithComplex) + opts.Spec.reload() // re-analyze + + return replacedWithComplex, nil +} + +// updateRefParents updates all parents of an updated $ref +func updateRefParents(allRefs map[string]spec.Ref, r *newRef) { if !r.isOAIGen || r.resolved { // bail on already resolved entries (avoid looping) return } - for k, v := range opts.Spec.references.allRefs { + for k, v := range allRefs { if r.path != v.String() { continue } + found := false for _, p := range r.parents { if p == k { found = true + break } } @@ -1354,163 +550,97 @@ func updateRefParents(opts *FlattenOpts, r *newRef) { } } -// topMostRefs is able to sort refs by hierarchical then lexicographic order, -// yielding refs ordered breadth-first. -type topmostRefs []string +func stripOAIGenForRef(opts *FlattenOpts, k string, r *newRef) (bool, error) { + replacedWithComplex := false + + pr := sortref.TopmostFirst(r.parents) -func (k topmostRefs) Len() int { return len(k) } -func (k topmostRefs) Swap(i, j int) { k[i], k[j] = k[j], k[i] } -func (k topmostRefs) Less(i, j int) bool { - li, lj := len(strings.Split(k[i], "/")), len(strings.Split(k[j], "/")) - if li == lj { - return k[i] < k[j] + // rewrite first parent schema in hierarchical then lexicographical order + debugLog("rewrite first parent %s with schema", pr[0]) + if err := replace.UpdateRefWithSchema(opts.Swagger(), pr[0], r.schema); err != nil { + return false, err } - return li < lj -} -func topmostFirst(refs []string) []string { - res := topmostRefs(refs) - sort.Sort(res) - return res -} + if pa, ok := opts.flattenContext.newRefs[pr[0]]; ok && pa.isOAIGen { + // update parent in ref index entry + debugLog("update parent entry: %s", pr[0]) + pa.schema = r.schema + pa.resolved = false + replacedWithComplex = true + } -// stripOAIGen strips the spec from unnecessary OAIGen constructs, initially created to dedupe flattened definitions. -// -// A dedupe is deemed unnecessary whenever: -// - the only conflict is with its (single) parent: OAIGen is merged into its parent (reinlining) -// - there is a conflict with multiple parents: merge OAIGen in first parent, the rewrite other parents to point to -// the first parent. -// -// This function returns true whenever it re-inlined a complex schema, so the caller may chose to iterate -// pointer and name resolution again. -func stripOAIGen(opts *FlattenOpts) (bool, error) { - debugLog("stripOAIGen") - replacedWithComplex := false + // rewrite other parents to point to first parent + if len(pr) > 1 { + for _, p := range pr[1:] { + replacingRef := spec.MustCreateRef(pr[0]) - // figure out referers of OAIGen definitions (doing it before the ref start mutating) - for _, r := range opts.flattenContext.newRefs { - updateRefParents(opts, r) - } - for k := range opts.flattenContext.newRefs { - r := opts.flattenContext.newRefs[k] - debugLog("newRefs[%s]: isOAIGen: %t, resolved: %t, name: %s, path:%s, #parents: %d, parents: %v, ref: %s", - k, r.isOAIGen, r.resolved, r.newName, r.path, len(r.parents), r.parents, r.schema.Ref.String()) - if r.isOAIGen && len(r.parents) >= 1 { - pr := topmostFirst(r.parents) + // set complex when replacing ref is an anonymous jsonpointer: further processing may be required + replacedWithComplex = replacedWithComplex || path.Dir(replacingRef.String()) != definitionsPath + debugLog("rewrite parent with ref: %s", replacingRef.String()) - // rewrite first parent schema in hierarchical then lexicographical order - debugLog("rewrite first parent %s with schema", pr[0]) - if err := updateRefWithSchema(opts.Swagger(), pr[0], r.schema); err != nil { + // NOTE: it is possible at this stage to introduce json pointers (to non-definitions places). + // Those are stripped later on. + if err := replace.UpdateRef(opts.Swagger(), p, replacingRef); err != nil { return false, err } - if pa, ok := opts.flattenContext.newRefs[pr[0]]; ok && pa.isOAIGen { - // update parent in ref index entry - debugLog("update parent entry: %s", pr[0]) + + if pa, ok := opts.flattenContext.newRefs[p]; ok && pa.isOAIGen { + // update parent in ref index + debugLog("update parent entry: %s", p) pa.schema = r.schema pa.resolved = false replacedWithComplex = true } + } + } - // rewrite other parents to point to first parent - if len(pr) > 1 { - for _, p := range pr[1:] { - replacingRef := swspec.MustCreateRef(pr[0]) - - // set complex when replacing ref is an anonymous jsonpointer: further processing may be required - replacedWithComplex = replacedWithComplex || - slashpath.Dir(replacingRef.String()) != definitionsPath - debugLog("rewrite parent with ref: %s", replacingRef.String()) - - // NOTE: it is possible at this stage to introduce json pointers (to non-definitions places). - // Those are stripped later on. - if err := updateRef(opts.Swagger(), p, replacingRef); err != nil { - return false, err - } - - if pa, ok := opts.flattenContext.newRefs[p]; ok && pa.isOAIGen { - // update parent in ref index - debugLog("update parent entry: %s", p) - pa.schema = r.schema - pa.resolved = false - replacedWithComplex = true - } - } - } + // remove OAIGen definition + debugLog("removing definition %s", path.Base(r.path)) + delete(opts.Swagger().Definitions, path.Base(r.path)) - // remove OAIGen definition - debugLog("removing definition %s", slashpath.Base(r.path)) - delete(opts.Swagger().Definitions, slashpath.Base(r.path)) - - // propagate changes in ref index for keys which have this one as a parent - for kk, value := range opts.flattenContext.newRefs { - if kk == k || !value.isOAIGen || value.resolved { - continue - } - found := false - newParents := make([]string, 0, len(value.parents)) - for _, parent := range value.parents { - switch { - case parent == r.path: - found = true - parent = pr[0] - case strings.HasPrefix(parent, r.path+"/"): - found = true - parent = slashpath.Join(pr[0], strings.TrimPrefix(parent, r.path)) - } - newParents = append(newParents, parent) - } - if found { - value.parents = newParents - } - } + // propagate changes in ref index for keys which have this one as a parent + for kk, value := range opts.flattenContext.newRefs { + if kk == k || !value.isOAIGen || value.resolved { + continue + } - // mark naming conflict as resolved - debugLog("marking naming conflict resolved for key: %s", r.key) - opts.flattenContext.newRefs[r.key].isOAIGen = false - opts.flattenContext.newRefs[r.key].resolved = true - - // determine if the previous substitution did inline a complex schema - if r.schema != nil && r.schema.Ref.String() == "" { // inline schema - asch, err := Schema(SchemaOpts{Schema: r.schema, Root: opts.Swagger(), BasePath: opts.BasePath}) - if err != nil { - return false, err - } - debugLog("re-inlined schema: parent: %s, %t", pr[0], isAnalyzedAsComplex(asch)) - replacedWithComplex = replacedWithComplex || - !(slashpath.Dir(pr[0]) == definitionsPath) && isAnalyzedAsComplex(asch) + found := false + newParents := make([]string, 0, len(value.parents)) + for _, parent := range value.parents { + switch { + case parent == r.path: + found = true + parent = pr[0] + case strings.HasPrefix(parent, r.path+"/"): + found = true + parent = path.Join(pr[0], strings.TrimPrefix(parent, r.path)) } - } - } - debugLog("replacedWithComplex: %t", replacedWithComplex) - opts.Spec.reload() // re-analyze - return replacedWithComplex, nil -} + newParents = append(newParents, parent) + } -// croak logs notifications and warnings about valid, but possibly unwanted constructs resulting -// from flattening a spec -func croak(opts *FlattenOpts) { - reported := make(map[string]bool, len(opts.flattenContext.newRefs)) - for _, v := range opts.Spec.references.allRefs { - // warns about duplicate handling - for _, r := range opts.flattenContext.newRefs { - if r.isOAIGen && r.path == v.String() { - reported[r.newName] = true - } + if found { + value.parents = newParents } } - for k := range reported { - log.Printf("warning: duplicate flattened definition name resolved as %s", k) - } - // warns about possible type mismatches - uniqueMsg := make(map[string]bool) - for _, msg := range opts.flattenContext.warnings { - if _, ok := uniqueMsg[msg]; ok { - continue + + // mark naming conflict as resolved + debugLog("marking naming conflict resolved for key: %s", r.key) + opts.flattenContext.newRefs[r.key].isOAIGen = false + opts.flattenContext.newRefs[r.key].resolved = true + + // determine if the previous substitution did inline a complex schema + if r.schema != nil && r.schema.Ref.String() == "" { // inline schema + asch, err := Schema(SchemaOpts{Schema: r.schema, Root: opts.Swagger(), BasePath: opts.BasePath}) + if err != nil { + return false, err } - log.Printf("warning: %s", msg) - uniqueMsg[msg] = true + + debugLog("re-inlined schema: parent: %s, %t", pr[0], asch.isAnalyzedAsComplex()) + replacedWithComplex = replacedWithComplex || !(path.Dir(pr[0]) == definitionsPath) && asch.isAnalyzedAsComplex() } + + return replacedWithComplex, nil } // namePointers replaces all JSON pointers to anonymous documents by a $ref to a new named definitions. @@ -1519,28 +649,38 @@ func croak(opts *FlattenOpts) { // Pointers to simple types are expanded, unless they express commonality (i.e. several such $ref are used). func namePointers(opts *FlattenOpts) error { debugLog("name pointers") + refsToReplace := make(map[string]SchemaRef, len(opts.Spec.references.schemas)) for k, ref := range opts.Spec.references.allRefs { - if slashpath.Dir(ref.String()) == definitionsPath { + if path.Dir(ref.String()) == definitionsPath { // this a ref to a top-level definition: ok continue } - replacingRef, sch, erd := deepestRef(opts, ref) - if erd != nil { - return fmt.Errorf("at %s, %v", k, erd) + + result, err := replace.DeepestRef(opts.Swagger(), opts.ExpandOpts(false), ref) + if err != nil { + return fmt.Errorf("at %s, %w", k, err) } + + replacingRef := result.Ref + sch := result.Schema + if opts.flattenContext != nil { + opts.flattenContext.warnings = append(opts.flattenContext.warnings, result.Warnings...) + } + debugLog("planning pointer to replace at %s: %s, resolved to: %s", k, ref.String(), replacingRef.String()) refsToReplace[k] = SchemaRef{ Name: k, // caller - Ref: replacingRef, // callee + Ref: replacingRef, // called Schema: sch, - TopLevel: slashpath.Dir(replacingRef.String()) == definitionsPath, + TopLevel: path.Dir(replacingRef.String()) == definitionsPath, } } - depthFirst := sortDepthFirst(refsToReplace) - namer := &inlineSchemaNamer{ + + depthFirst := sortref.DepthFirst(refsToReplace) + namer := &InlineSchemaNamer{ Spec: opts.Swagger(), - Operations: opRefsByRef(gatherOperations(opts.Spec, nil)), + Operations: operations.AllOpRefsByRef(opts.Spec, nil), flattenContext: opts.flattenContext, opts: opts, } @@ -1548,226 +688,115 @@ func namePointers(opts *FlattenOpts) error { for _, key := range depthFirst { v := refsToReplace[key] // update current replacement, which may have been updated by previous changes of deeper elements - replacingRef, sch, erd := deepestRef(opts, v.Ref) + result, erd := replace.DeepestRef(opts.Swagger(), opts.ExpandOpts(false), v.Ref) if erd != nil { - return fmt.Errorf("at %s, %v", key, erd) + return fmt.Errorf("at %s, %w", key, erd) } - v.Ref = replacingRef - v.Schema = sch - v.TopLevel = slashpath.Dir(replacingRef.String()) == definitionsPath + + if opts.flattenContext != nil { + opts.flattenContext.warnings = append(opts.flattenContext.warnings, result.Warnings...) + } + + v.Ref = result.Ref + v.Schema = result.Schema + v.TopLevel = path.Dir(result.Ref.String()) == definitionsPath debugLog("replacing pointer at %s: resolved to: %s", key, v.Ref.String()) if v.TopLevel { debugLog("replace pointer %s by canonical definition: %s", key, v.Ref.String()) + // if the schema is a $ref to a top level definition, just rewrite the pointer to this $ref - if err := updateRef(opts.Swagger(), key, v.Ref); err != nil { + if err := replace.UpdateRef(opts.Swagger(), key, v.Ref); err != nil { return err } - } else { - // this is a JSON pointer to an anonymous document (internal or external): - // create a definition for this schema when: - // - it is a complex schema - // - or it is pointed by more than one $ref (i.e. expresses commonality) - // otherwise, expand the pointer (single reference to a simple type) - // - // The named definition for this follows the target's key, not the caller's - debugLog("namePointers at %s for %s", key, v.Ref.String()) - - // qualify the expanded schema - /* - if key == "#/paths/~1some~1where~1{id}/get/parameters/1/items" { - // DEBUG - //func getPointerFromKey(spec interface{}, key string) (string, interface{}, error) { - k, res, err := getPointerFromKey(namer.Spec, key) - debugLog("k = %s, res=%#v, err=%v", k, res, err) - } - */ - asch, ers := Schema(SchemaOpts{Schema: v.Schema, Root: opts.Swagger(), BasePath: opts.BasePath}) - if ers != nil { - return fmt.Errorf("schema analysis [%s]: %v", key, ers) - } - callers := make([]string, 0, 64) - - debugLog("looking for callers") - an := New(opts.Swagger()) - for k, w := range an.references.allRefs { - r, _, erd := deepestRef(opts, w) - if erd != nil { - return fmt.Errorf("at %s, %v", key, erd) - } - if r.String() == v.Ref.String() { - callers = append(callers, k) - } - } - debugLog("callers for %s: %d", v.Ref.String(), len(callers)) - if len(callers) == 0 { - // has already been updated and resolved - continue - } - parts := keyParts(v.Ref.String()) - debugLog("number of callers for %s: %d", v.Ref.String(), len(callers)) - // identifying edge case when the namer did nothing because we point to a non-schema object - // no definition is created and we expand the $ref for all callers - if (!asch.IsSimpleSchema || len(callers) > 1) && !parts.IsSharedParam() && !parts.IsSharedResponse() { - debugLog("replace JSON pointer at [%s] by definition: %s", key, v.Ref.String()) - if err := namer.Name(v.Ref.String(), v.Schema, asch); err != nil { - return err - } - - // regular case: we named the $ref as a definition, and we move all callers to this new $ref - for _, caller := range callers { - if caller != key { - // move $ref for next to resolve - debugLog("identified caller of %s at [%s]", v.Ref.String(), caller) - c := refsToReplace[caller] - c.Ref = v.Ref - refsToReplace[caller] = c - } - } - } else { - debugLog("expand JSON pointer for key=%s", key) - if err := updateRefWithSchema(opts.Swagger(), key, v.Schema); err != nil { - return err - } - // NOTE: there is no other caller to update - } + continue + } + + if err := flattenAnonPointer(key, v, refsToReplace, namer, opts); err != nil { + return err } } + opts.Spec.reload() // re-analyze + return nil } -// deepestRef finds the first definition ref, from a cascade of nested refs which are not definitions. -// - if no definition is found, returns the deepest ref. -// - pointers to external files are expanded -// -// NOTE: all external $ref's are assumed to be already expanded at this stage. -func deepestRef(opts *FlattenOpts, ref swspec.Ref) (swspec.Ref, *swspec.Schema, error) { - if !ref.HasFragmentOnly { - // we found an external $ref, which is odd - // does nothing on external $refs - return ref, nil, nil +func flattenAnonPointer(key string, v SchemaRef, refsToReplace map[string]SchemaRef, namer *InlineSchemaNamer, opts *FlattenOpts) error { + // this is a JSON pointer to an anonymous document (internal or external): + // create a definition for this schema when: + // - it is a complex schema + // - or it is pointed by more than one $ref (i.e. expresses commonality) + // otherwise, expand the pointer (single reference to a simple type) + // + // The named definition for this follows the target's key, not the caller's + debugLog("namePointers at %s for %s", key, v.Ref.String()) + + // qualify the expanded schema + asch, ers := Schema(SchemaOpts{Schema: v.Schema, Root: opts.Swagger(), BasePath: opts.BasePath}) + if ers != nil { + return fmt.Errorf("schema analysis [%s]: %w", key, ers) } - currentRef := ref - visited := make(map[string]bool, 64) -DOWNREF: - for currentRef.String() != "" { - if slashpath.Dir(currentRef.String()) == definitionsPath { - // this is a top-level definition: stop here and return this ref - return currentRef, nil, nil - } - if _, beenThere := visited[currentRef.String()]; beenThere { - return swspec.Ref{}, nil, - fmt.Errorf("cannot resolve cyclic chain of pointers under %s", currentRef.String()) - } - visited[currentRef.String()] = true - value, _, err := currentRef.GetPointer().Get(opts.Swagger()) + callers := make([]string, 0, 64) + + debugLog("looking for callers") + + an := New(opts.Swagger()) + for k, w := range an.references.allRefs { + r, err := replace.DeepestRef(opts.Swagger(), opts.ExpandOpts(false), w) if err != nil { - return swspec.Ref{}, nil, err + return fmt.Errorf("at %s, %w", key, err) } - switch refable := value.(type) { - case *swspec.Schema: - if refable.Ref.String() == "" { - break DOWNREF - } - currentRef = refable.Ref - case swspec.Schema: - if refable.Ref.String() == "" { - break DOWNREF - } - currentRef = refable.Ref - - case *swspec.SchemaOrArray: - if refable.Schema == nil || refable.Schema != nil && refable.Schema.Ref.String() == "" { - break DOWNREF - } - currentRef = refable.Schema.Ref + if opts.flattenContext != nil { + opts.flattenContext.warnings = append(opts.flattenContext.warnings, r.Warnings...) + } - case *swspec.SchemaOrBool: - if refable.Schema == nil || refable.Schema != nil && refable.Schema.Ref.String() == "" { - break DOWNREF - } - currentRef = refable.Schema.Ref - - case swspec.Response: - // a pointer points to a schema initially marshalled in responses section... - // Attempt to convert this to a schema. If this fails, the spec is invalid - asJSON, _ := refable.MarshalJSON() - var asSchema swspec.Schema - err := asSchema.UnmarshalJSON(asJSON) - if err != nil { - return swspec.Ref{}, nil, - fmt.Errorf("invalid type for resolved JSON pointer %s. Expected a schema a, got: %T", - currentRef.String(), value) + if r.Ref.String() == v.Ref.String() { + callers = append(callers, k) + } + } - } - opts.flattenContext.warnings = append(opts.flattenContext.warnings, - fmt.Sprintf("found $ref %q (response) interpreted as schema", currentRef.String())) + debugLog("callers for %s: %d", v.Ref.String(), len(callers)) + if len(callers) == 0 { + // has already been updated and resolved + return nil + } - if asSchema.Ref.String() == "" { - break DOWNREF - } - currentRef = asSchema.Ref - - case swspec.Parameter: - // a pointer points to a schema initially marshalled in parameters section... - // Attempt to convert this to a schema. If this fails, the spec is invalid - asJSON, _ := refable.MarshalJSON() - var asSchema swspec.Schema - err := asSchema.UnmarshalJSON(asJSON) - if err != nil { - return swspec.Ref{}, nil, - fmt.Errorf("invalid type for resolved JSON pointer %s. Expected a schema a, got: %T", - currentRef.String(), value) + parts := sortref.KeyParts(v.Ref.String()) + debugLog("number of callers for %s: %d", v.Ref.String(), len(callers)) - } - opts.flattenContext.warnings = append(opts.flattenContext.warnings, - fmt.Sprintf("found $ref %q (parameter) interpreted as schema", currentRef.String())) + // identifying edge case when the namer did nothing because we point to a non-schema object + // no definition is created and we expand the $ref for all callers + if (!asch.IsSimpleSchema || len(callers) > 1) && !parts.IsSharedParam() && !parts.IsSharedResponse() { + debugLog("replace JSON pointer at [%s] by definition: %s", key, v.Ref.String()) + if err := namer.Name(v.Ref.String(), v.Schema, asch); err != nil { + return err + } - if asSchema.Ref.String() == "" { - break DOWNREF + // regular case: we named the $ref as a definition, and we move all callers to this new $ref + for _, caller := range callers { + if caller == key { + continue } - currentRef = asSchema.Ref - - default: - return swspec.Ref{}, nil, - fmt.Errorf("unhandled type to resolve JSON pointer %s. Expected a Schema, got: %T", - currentRef.String(), value) + // move $ref for next to resolve + debugLog("identified caller of %s at [%s]", v.Ref.String(), caller) + c := refsToReplace[caller] + c.Ref = v.Ref + refsToReplace[caller] = c } - } - // assess what schema we're ending with - sch, erv := swspec.ResolveRefWithBase(opts.Swagger(), ¤tRef, opts.ExpandOpts(false)) - if erv != nil { - return swspec.Ref{}, nil, erv - } - if sch == nil { - return swspec.Ref{}, nil, fmt.Errorf("no schema found at %s", currentRef.String()) - } - return currentRef, sch, nil -} -// normalizeRef strips the current file from any $ref. This works around issue go-openapi/spec#76: -// leading absolute file in $ref is stripped -func normalizeRef(opts *FlattenOpts) error { - debugLog("normalizeRef") - altered := false - for k, w := range opts.Spec.references.allRefs { - if !strings.HasPrefix(w.String(), opts.BasePath+definitionsPath) { // may be a mix of / and \, depending on OS - continue - } - altered = true - // strip base path from definition - debugLog("stripping absolute path for: %s", w.String()) - if err := updateRef(opts.Swagger(), k, - swspec.MustCreateRef(slashpath.Join(definitionsPath, slashpath.Base(w.String())))); err != nil { - return err - } + return nil } - if altered { - opts.Spec.reload() // re-analyze + + debugLog("expand JSON pointer for key=%s", key) + + if err := replace.UpdateRefWithSchema(opts.Swagger(), key, v.Schema); err != nil { + return err } + // NOTE: there is no other caller to update + return nil } diff --git a/vendor/github.com/go-openapi/analysis/flatten_name.go b/vendor/github.com/go-openapi/analysis/flatten_name.go new file mode 100644 index 000000000000..3ad2ccfbfd55 --- /dev/null +++ b/vendor/github.com/go-openapi/analysis/flatten_name.go @@ -0,0 +1,293 @@ +package analysis + +import ( + "fmt" + "path" + "sort" + "strings" + + "github.com/go-openapi/analysis/internal/flatten/operations" + "github.com/go-openapi/analysis/internal/flatten/replace" + "github.com/go-openapi/analysis/internal/flatten/schutils" + "github.com/go-openapi/analysis/internal/flatten/sortref" + "github.com/go-openapi/spec" + "github.com/go-openapi/swag" +) + +// InlineSchemaNamer finds a new name for an inlined type +type InlineSchemaNamer struct { + Spec *spec.Swagger + Operations map[string]operations.OpRef + flattenContext *context + opts *FlattenOpts +} + +// Name yields a new name for the inline schema +func (isn *InlineSchemaNamer) Name(key string, schema *spec.Schema, aschema *AnalyzedSchema) error { + debugLog("naming inlined schema at %s", key) + + parts := sortref.KeyParts(key) + for _, name := range namesFromKey(parts, aschema, isn.Operations) { + if name == "" { + continue + } + + // create unique name + newName, isOAIGen := uniqifyName(isn.Spec.Definitions, swag.ToJSONName(name)) + + // clone schema + sch := schutils.Clone(schema) + + // replace values on schema + if err := replace.RewriteSchemaToRef(isn.Spec, key, + spec.MustCreateRef(path.Join(definitionsPath, newName))); err != nil { + return fmt.Errorf("error while creating definition %q from inline schema: %w", newName, err) + } + + // rewrite any dependent $ref pointing to this place, + // when not already pointing to a top-level definition. + // + // NOTE: this is important if such referers use arbitrary JSON pointers. + an := New(isn.Spec) + for k, v := range an.references.allRefs { + r, erd := replace.DeepestRef(isn.opts.Swagger(), isn.opts.ExpandOpts(false), v) + if erd != nil { + return fmt.Errorf("at %s, %w", k, erd) + } + + if isn.opts.flattenContext != nil { + isn.opts.flattenContext.warnings = append(isn.opts.flattenContext.warnings, r.Warnings...) + } + + if r.Ref.String() != key && (r.Ref.String() != path.Join(definitionsPath, newName) || path.Dir(v.String()) == definitionsPath) { + continue + } + + debugLog("found a $ref to a rewritten schema: %s points to %s", k, v.String()) + + // rewrite $ref to the new target + if err := replace.UpdateRef(isn.Spec, k, + spec.MustCreateRef(path.Join(definitionsPath, newName))); err != nil { + return err + } + } + + // NOTE: this extension is currently not used by go-swagger (provided for information only) + sch.AddExtension("x-go-gen-location", GenLocation(parts)) + + // save cloned schema to definitions + schutils.Save(isn.Spec, newName, sch) + + // keep track of created refs + if isn.flattenContext == nil { + continue + } + + debugLog("track created ref: key=%s, newName=%s, isOAIGen=%t", key, newName, isOAIGen) + resolved := false + + if _, ok := isn.flattenContext.newRefs[key]; ok { + resolved = isn.flattenContext.newRefs[key].resolved + } + + isn.flattenContext.newRefs[key] = &newRef{ + key: key, + newName: newName, + path: path.Join(definitionsPath, newName), + isOAIGen: isOAIGen, + resolved: resolved, + schema: sch, + } + } + + return nil +} + +// uniqifyName yields a unique name for a definition +func uniqifyName(definitions spec.Definitions, name string) (string, bool) { + isOAIGen := false + if name == "" { + name = "oaiGen" + isOAIGen = true + } + + if len(definitions) == 0 { + return name, isOAIGen + } + + unq := true + for k := range definitions { + if strings.EqualFold(k, name) { + unq = false + + break + } + } + + if unq { + return name, isOAIGen + } + + name += "OAIGen" + isOAIGen = true + var idx int + unique := name + _, known := definitions[unique] + + for known { + idx++ + unique = fmt.Sprintf("%s%d", name, idx) + _, known = definitions[unique] + } + + return unique, isOAIGen +} + +func namesFromKey(parts sortref.SplitKey, aschema *AnalyzedSchema, operations map[string]operations.OpRef) []string { + var ( + baseNames [][]string + startIndex int + ) + + if parts.IsOperation() { + baseNames, startIndex = namesForOperation(parts, operations) + } + + // definitions + if parts.IsDefinition() { + baseNames, startIndex = namesForDefinition(parts) + } + + result := make([]string, 0, len(baseNames)) + for _, segments := range baseNames { + nm := parts.BuildName(segments, startIndex, partAdder(aschema)) + if nm == "" { + continue + } + + result = append(result, nm) + } + sort.Strings(result) + + return result +} + +func namesForParam(parts sortref.SplitKey, operations map[string]operations.OpRef) ([][]string, int) { + var ( + baseNames [][]string + startIndex int + ) + + piref := parts.PathItemRef() + if piref.String() != "" && parts.IsOperationParam() { + if op, ok := operations[piref.String()]; ok { + startIndex = 5 + baseNames = append(baseNames, []string{op.ID, "params", "body"}) + } + } else if parts.IsSharedOperationParam() { + pref := parts.PathRef() + for k, v := range operations { + if strings.HasPrefix(k, pref.String()) { + startIndex = 4 + baseNames = append(baseNames, []string{v.ID, "params", "body"}) + } + } + } + + return baseNames, startIndex +} + +func namesForOperation(parts sortref.SplitKey, operations map[string]operations.OpRef) ([][]string, int) { + var ( + baseNames [][]string + startIndex int + ) + + // params + if parts.IsOperationParam() || parts.IsSharedOperationParam() { + baseNames, startIndex = namesForParam(parts, operations) + } + + // responses + if parts.IsOperationResponse() { + piref := parts.PathItemRef() + if piref.String() != "" { + if op, ok := operations[piref.String()]; ok { + startIndex = 6 + baseNames = append(baseNames, []string{op.ID, parts.ResponseName(), "body"}) + } + } + } + + return baseNames, startIndex +} + +func namesForDefinition(parts sortref.SplitKey) ([][]string, int) { + nm := parts.DefinitionName() + if nm != "" { + return [][]string{{parts.DefinitionName()}}, 2 + } + + return [][]string{}, 0 +} + +// partAdder knows how to interpret a schema when it comes to build a name from parts +func partAdder(aschema *AnalyzedSchema) sortref.PartAdder { + return func(part string) []string { + segments := make([]string, 0, 2) + + if part == "items" || part == "additionalItems" { + if aschema.IsTuple || aschema.IsTupleWithExtra { + segments = append(segments, "tuple") + } else { + segments = append(segments, "items") + } + + if part == "additionalItems" { + segments = append(segments, part) + } + + return segments + } + + segments = append(segments, part) + + return segments + } +} + +func nameFromRef(ref spec.Ref) string { + u := ref.GetURL() + if u.Fragment != "" { + return swag.ToJSONName(path.Base(u.Fragment)) + } + + if u.Path != "" { + bn := path.Base(u.Path) + if bn != "" && bn != "/" { + ext := path.Ext(bn) + if ext != "" { + return swag.ToJSONName(bn[:len(bn)-len(ext)]) + } + + return swag.ToJSONName(bn) + } + } + + return swag.ToJSONName(strings.ReplaceAll(u.Host, ".", " ")) +} + +// GenLocation indicates from which section of the specification (models or operations) a definition has been created. +// +// This is reflected in the output spec with a "x-go-gen-location" extension. At the moment, this is is provided +// for information only. +func GenLocation(parts sortref.SplitKey) string { + switch { + case parts.IsOperation(): + return "operations" + case parts.IsDefinition(): + return "models" + default: + return "" + } +} diff --git a/vendor/github.com/go-openapi/analysis/flatten_options.go b/vendor/github.com/go-openapi/analysis/flatten_options.go new file mode 100644 index 000000000000..c5bb97b0a693 --- /dev/null +++ b/vendor/github.com/go-openapi/analysis/flatten_options.go @@ -0,0 +1,78 @@ +package analysis + +import ( + "log" + + "github.com/go-openapi/spec" +) + +// FlattenOpts configuration for flattening a swagger specification. +// +// The BasePath parameter is used to locate remote relative $ref found in the specification. +// This path is a file: it points to the location of the root document and may be either a local +// file path or a URL. +// +// If none specified, relative references (e.g. "$ref": "folder/schema.yaml#/definitions/...") +// found in the spec are searched from the current working directory. +type FlattenOpts struct { + Spec *Spec // The analyzed spec to work with + flattenContext *context // Internal context to track flattening activity + + BasePath string // The location of the root document for this spec to resolve relative $ref + + // Flattening options + Expand bool // When true, skip flattening the spec and expand it instead (if Minimal is false) + Minimal bool // When true, do not decompose complex structures such as allOf + Verbose bool // enable some reporting on possible name conflicts detected + RemoveUnused bool // When true, remove unused parameters, responses and definitions after expansion/flattening + ContinueOnError bool // Continue when spec expansion issues are found + + /* Extra keys */ + _ struct{} // require keys +} + +// ExpandOpts creates a spec.ExpandOptions to configure expanding a specification document. +func (f *FlattenOpts) ExpandOpts(skipSchemas bool) *spec.ExpandOptions { + return &spec.ExpandOptions{ + RelativeBase: f.BasePath, + SkipSchemas: skipSchemas, + ContinueOnError: f.ContinueOnError, + } +} + +// Swagger gets the swagger specification for this flatten operation +func (f *FlattenOpts) Swagger() *spec.Swagger { + return f.Spec.spec +} + +// croak logs notifications and warnings about valid, but possibly unwanted constructs resulting +// from flattening a spec +func (f *FlattenOpts) croak() { + if !f.Verbose { + return + } + + reported := make(map[string]bool, len(f.flattenContext.newRefs)) + for _, v := range f.Spec.references.allRefs { + // warns about duplicate handling + for _, r := range f.flattenContext.newRefs { + if r.isOAIGen && r.path == v.String() { + reported[r.newName] = true + } + } + } + + for k := range reported { + log.Printf("warning: duplicate flattened definition name resolved as %s", k) + } + + // warns about possible type mismatches + uniqueMsg := make(map[string]bool) + for _, msg := range f.flattenContext.warnings { + if _, ok := uniqueMsg[msg]; ok { + continue + } + log.Printf("warning: %s", msg) + uniqueMsg[msg] = true + } +} diff --git a/vendor/github.com/go-openapi/analysis/internal/BUILD.bazel b/vendor/github.com/go-openapi/analysis/internal/BUILD.bazel deleted file mode 100644 index a0f808a2ab0e..000000000000 --- a/vendor/github.com/go-openapi/analysis/internal/BUILD.bazel +++ /dev/null @@ -1,12 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "post_go18.go", - "pre_go18.go", - ], - importmap = "kubevirt.io/kubevirt/vendor/github.com/go-openapi/analysis/internal", - importpath = "github.com/go-openapi/analysis/internal", - visibility = ["//vendor/github.com/go-openapi/analysis:__subpackages__"], -) diff --git a/vendor/github.com/go-openapi/analysis/internal/pre_go18.go b/vendor/github.com/go-openapi/analysis/internal/debug/debug.go similarity index 53% rename from vendor/github.com/go-openapi/analysis/internal/pre_go18.go rename to vendor/github.com/go-openapi/analysis/internal/debug/debug.go index 4cc644182209..ec0fec022986 100644 --- a/vendor/github.com/go-openapi/analysis/internal/pre_go18.go +++ b/vendor/github.com/go-openapi/analysis/internal/debug/debug.go @@ -1,5 +1,3 @@ -// +build !go1.8 - // Copyright 2015 go-swagger maintainers // // Licensed under the Apache License, Version 2.0 (the "License"); @@ -14,16 +12,30 @@ // See the License for the specific language governing permissions and // limitations under the License. -package internal +package debug -import "net/url" +import ( + "fmt" + "log" + "os" + "path/filepath" + "runtime" +) -// PathUnescape provides url.PathUnescape(), with seamless -// go version support for pre-go1.8 -// -// TODO: this function is currently defined in go-openapi/swag, -// but unexported. We might chose to export it, or simple phase -// out pre-go1.8 support. -func PathUnescape(path string) (string, error) { - return url.QueryUnescape(path) +var ( + output = os.Stdout +) + +// GetLogger provides a prefix debug logger +func GetLogger(prefix string, debug bool) func(string, ...interface{}) { + if debug { + logger := log.New(output, fmt.Sprintf("%s:", prefix), log.LstdFlags) + + return func(msg string, args ...interface{}) { + _, file1, pos1, _ := runtime.Caller(1) + logger.Printf("%s:%d: %s", filepath.Base(file1), pos1, fmt.Sprintf(msg, args...)) + } + } + + return func(msg string, args ...interface{}) {} } diff --git a/vendor/github.com/go-openapi/analysis/internal/flatten/normalize/normalize.go b/vendor/github.com/go-openapi/analysis/internal/flatten/normalize/normalize.go new file mode 100644 index 000000000000..8c9df0580da7 --- /dev/null +++ b/vendor/github.com/go-openapi/analysis/internal/flatten/normalize/normalize.go @@ -0,0 +1,87 @@ +package normalize + +import ( + "net/url" + "path" + "path/filepath" + "strings" + + "github.com/go-openapi/spec" +) + +// RebaseRef rebases a remote ref relative to a base ref. +// +// NOTE: does not support JSONschema ID for $ref (we assume we are working with swagger specs here). +// +// NOTE(windows): +// * refs are assumed to have been normalized with drive letter lower cased (from go-openapi/spec) +// * "/ in paths may appear as escape sequences +func RebaseRef(baseRef string, ref string) string { + baseRef, _ = url.PathUnescape(baseRef) + ref, _ = url.PathUnescape(ref) + + if baseRef == "" || baseRef == "." || strings.HasPrefix(baseRef, "#") { + return ref + } + + parts := strings.Split(ref, "#") + + baseParts := strings.Split(baseRef, "#") + baseURL, _ := url.Parse(baseParts[0]) + if strings.HasPrefix(ref, "#") { + if baseURL.Host == "" { + return strings.Join([]string{baseParts[0], parts[1]}, "#") + } + + return strings.Join([]string{baseParts[0], parts[1]}, "#") + } + + refURL, _ := url.Parse(parts[0]) + if refURL.Host != "" || filepath.IsAbs(parts[0]) { + // not rebasing an absolute path + return ref + } + + // there is a relative path + var basePath string + if baseURL.Host != "" { + // when there is a host, standard URI rules apply (with "/") + baseURL.Path = path.Dir(baseURL.Path) + baseURL.Path = path.Join(baseURL.Path, "/"+parts[0]) + + return baseURL.String() + } + + // this is a local relative path + // basePart[0] and parts[0] are local filesystem directories/files + basePath = filepath.Dir(baseParts[0]) + relPath := filepath.Join(basePath, string(filepath.Separator)+parts[0]) + if len(parts) > 1 { + return strings.Join([]string{relPath, parts[1]}, "#") + } + + return relPath +} + +// Path renders absolute path on remote file refs +// +// NOTE(windows): +// * refs are assumed to have been normalized with drive letter lower cased (from go-openapi/spec) +// * "/ in paths may appear as escape sequences +func Path(ref spec.Ref, basePath string) string { + uri, _ := url.PathUnescape(ref.String()) + if ref.HasFragmentOnly || filepath.IsAbs(uri) { + return uri + } + + refURL, _ := url.Parse(uri) + if refURL.Host != "" { + return uri + } + + parts := strings.Split(uri, "#") + // BasePath, parts[0] are local filesystem directories, guaranteed to be absolute at this stage + parts[0] = filepath.Join(filepath.Dir(basePath), parts[0]) + + return strings.Join(parts, "#") +} diff --git a/vendor/github.com/go-openapi/analysis/internal/flatten/operations/operations.go b/vendor/github.com/go-openapi/analysis/internal/flatten/operations/operations.go new file mode 100644 index 000000000000..7f3a2b8717f2 --- /dev/null +++ b/vendor/github.com/go-openapi/analysis/internal/flatten/operations/operations.go @@ -0,0 +1,90 @@ +package operations + +import ( + "path" + "sort" + "strings" + + "github.com/go-openapi/jsonpointer" + "github.com/go-openapi/spec" + "github.com/go-openapi/swag" +) + +// AllOpRefsByRef returns an index of sortable operations +func AllOpRefsByRef(specDoc Provider, operationIDs []string) map[string]OpRef { + return OpRefsByRef(GatherOperations(specDoc, operationIDs)) +} + +// OpRefsByRef indexes a map of sortable operations +func OpRefsByRef(oprefs map[string]OpRef) map[string]OpRef { + result := make(map[string]OpRef, len(oprefs)) + for _, v := range oprefs { + result[v.Ref.String()] = v + } + + return result +} + +// OpRef is an indexable, sortable operation +type OpRef struct { + Method string + Path string + Key string + ID string + Op *spec.Operation + Ref spec.Ref +} + +// OpRefs is a sortable collection of operations +type OpRefs []OpRef + +func (o OpRefs) Len() int { return len(o) } +func (o OpRefs) Swap(i, j int) { o[i], o[j] = o[j], o[i] } +func (o OpRefs) Less(i, j int) bool { return o[i].Key < o[j].Key } + +// Provider knows how to collect operations from a spec +type Provider interface { + Operations() map[string]map[string]*spec.Operation +} + +// GatherOperations builds a map of sorted operations from a spec +func GatherOperations(specDoc Provider, operationIDs []string) map[string]OpRef { + var oprefs OpRefs + + for method, pathItem := range specDoc.Operations() { + for pth, operation := range pathItem { + vv := *operation + oprefs = append(oprefs, OpRef{ + Key: swag.ToGoName(strings.ToLower(method) + " " + pth), + Method: method, + Path: pth, + ID: vv.ID, + Op: &vv, + Ref: spec.MustCreateRef("#" + path.Join("/paths", jsonpointer.Escape(pth), method)), + }) + } + } + + sort.Sort(oprefs) + + operations := make(map[string]OpRef) + for _, opr := range oprefs { + nm := opr.ID + if nm == "" { + nm = opr.Key + } + + oo, found := operations[nm] + if found && oo.Method != opr.Method && oo.Path != opr.Path { + nm = opr.Key + } + + if len(operationIDs) == 0 || swag.ContainsStrings(operationIDs, opr.ID) || swag.ContainsStrings(operationIDs, nm) { + opr.ID = nm + opr.Op.ID = nm + operations[nm] = opr + } + } + + return operations +} diff --git a/vendor/github.com/go-openapi/analysis/internal/flatten/replace/replace.go b/vendor/github.com/go-openapi/analysis/internal/flatten/replace/replace.go new file mode 100644 index 000000000000..26c2a05a3101 --- /dev/null +++ b/vendor/github.com/go-openapi/analysis/internal/flatten/replace/replace.go @@ -0,0 +1,434 @@ +package replace + +import ( + "fmt" + "net/url" + "os" + "path" + "strconv" + + "github.com/go-openapi/analysis/internal/debug" + "github.com/go-openapi/jsonpointer" + "github.com/go-openapi/spec" +) + +const definitionsPath = "#/definitions" + +var debugLog = debug.GetLogger("analysis/flatten/replace", os.Getenv("SWAGGER_DEBUG") != "") + +// RewriteSchemaToRef replaces a schema with a Ref +func RewriteSchemaToRef(sp *spec.Swagger, key string, ref spec.Ref) error { + debugLog("rewriting schema to ref for %s with %s", key, ref.String()) + _, value, err := getPointerFromKey(sp, key) + if err != nil { + return err + } + + switch refable := value.(type) { + case *spec.Schema: + return rewriteParentRef(sp, key, ref) + + case spec.Schema: + return rewriteParentRef(sp, key, ref) + + case *spec.SchemaOrArray: + if refable.Schema != nil { + refable.Schema = &spec.Schema{SchemaProps: spec.SchemaProps{Ref: ref}} + } + + case *spec.SchemaOrBool: + if refable.Schema != nil { + refable.Schema = &spec.Schema{SchemaProps: spec.SchemaProps{Ref: ref}} + } + default: + return fmt.Errorf("no schema with ref found at %s for %T", key, value) + } + + return nil +} + +func rewriteParentRef(sp *spec.Swagger, key string, ref spec.Ref) error { + parent, entry, pvalue, err := getParentFromKey(sp, key) + if err != nil { + return err + } + + debugLog("rewriting holder for %T", pvalue) + switch container := pvalue.(type) { + case spec.Response: + if err := rewriteParentRef(sp, "#"+parent, ref); err != nil { + return err + } + + case *spec.Response: + container.Schema = &spec.Schema{SchemaProps: spec.SchemaProps{Ref: ref}} + + case *spec.Responses: + statusCode, err := strconv.Atoi(entry) + if err != nil { + return fmt.Errorf("%s not a number: %w", key[1:], err) + } + resp := container.StatusCodeResponses[statusCode] + resp.Schema = &spec.Schema{SchemaProps: spec.SchemaProps{Ref: ref}} + container.StatusCodeResponses[statusCode] = resp + + case map[string]spec.Response: + resp := container[entry] + resp.Schema = &spec.Schema{SchemaProps: spec.SchemaProps{Ref: ref}} + container[entry] = resp + + case spec.Parameter: + if err := rewriteParentRef(sp, "#"+parent, ref); err != nil { + return err + } + + case map[string]spec.Parameter: + param := container[entry] + param.Schema = &spec.Schema{SchemaProps: spec.SchemaProps{Ref: ref}} + container[entry] = param + + case []spec.Parameter: + idx, err := strconv.Atoi(entry) + if err != nil { + return fmt.Errorf("%s not a number: %w", key[1:], err) + } + param := container[idx] + param.Schema = &spec.Schema{SchemaProps: spec.SchemaProps{Ref: ref}} + container[idx] = param + + case spec.Definitions: + container[entry] = spec.Schema{SchemaProps: spec.SchemaProps{Ref: ref}} + + case map[string]spec.Schema: + container[entry] = spec.Schema{SchemaProps: spec.SchemaProps{Ref: ref}} + + case []spec.Schema: + idx, err := strconv.Atoi(entry) + if err != nil { + return fmt.Errorf("%s not a number: %w", key[1:], err) + } + container[idx] = spec.Schema{SchemaProps: spec.SchemaProps{Ref: ref}} + + case *spec.SchemaOrArray: + // NOTE: this is necessarily an array - otherwise, the parent would be *Schema + idx, err := strconv.Atoi(entry) + if err != nil { + return fmt.Errorf("%s not a number: %w", key[1:], err) + } + container.Schemas[idx] = spec.Schema{SchemaProps: spec.SchemaProps{Ref: ref}} + + case spec.SchemaProperties: + container[entry] = spec.Schema{SchemaProps: spec.SchemaProps{Ref: ref}} + + // NOTE: can't have case *spec.SchemaOrBool = parent in this case is *Schema + + default: + return fmt.Errorf("unhandled parent schema rewrite %s (%T)", key, pvalue) + } + + return nil +} + +// getPointerFromKey retrieves the content of the JSON pointer "key" +func getPointerFromKey(sp interface{}, key string) (string, interface{}, error) { + switch sp.(type) { + case *spec.Schema: + case *spec.Swagger: + default: + panic("unexpected type used in getPointerFromKey") + } + if key == "#/" { + return "", sp, nil + } + // unescape chars in key, e.g. "{}" from path params + pth, _ := url.PathUnescape(key[1:]) + ptr, err := jsonpointer.New(pth) + if err != nil { + return "", nil, err + } + + value, _, err := ptr.Get(sp) + if err != nil { + debugLog("error when getting key: %s with path: %s", key, pth) + + return "", nil, err + } + + return pth, value, nil +} + +// getParentFromKey retrieves the container of the JSON pointer "key" +func getParentFromKey(sp interface{}, key string) (string, string, interface{}, error) { + switch sp.(type) { + case *spec.Schema: + case *spec.Swagger: + default: + panic("unexpected type used in getPointerFromKey") + } + // unescape chars in key, e.g. "{}" from path params + pth, _ := url.PathUnescape(key[1:]) + + parent, entry := path.Dir(pth), path.Base(pth) + debugLog("getting schema holder at: %s, with entry: %s", parent, entry) + + pptr, err := jsonpointer.New(parent) + if err != nil { + return "", "", nil, err + } + pvalue, _, err := pptr.Get(sp) + if err != nil { + return "", "", nil, fmt.Errorf("can't get parent for %s: %w", parent, err) + } + + return parent, entry, pvalue, nil +} + +// UpdateRef replaces a ref by another one +func UpdateRef(sp interface{}, key string, ref spec.Ref) error { + switch sp.(type) { + case *spec.Schema: + case *spec.Swagger: + default: + panic("unexpected type used in getPointerFromKey") + } + debugLog("updating ref for %s with %s", key, ref.String()) + pth, value, err := getPointerFromKey(sp, key) + if err != nil { + return err + } + + switch refable := value.(type) { + case *spec.Schema: + refable.Ref = ref + case *spec.SchemaOrArray: + if refable.Schema != nil { + refable.Schema.Ref = ref + } + case *spec.SchemaOrBool: + if refable.Schema != nil { + refable.Schema.Ref = ref + } + case spec.Schema: + debugLog("rewriting holder for %T", refable) + _, entry, pvalue, erp := getParentFromKey(sp, key) + if erp != nil { + return err + } + switch container := pvalue.(type) { + case spec.Definitions: + container[entry] = spec.Schema{SchemaProps: spec.SchemaProps{Ref: ref}} + + case map[string]spec.Schema: + container[entry] = spec.Schema{SchemaProps: spec.SchemaProps{Ref: ref}} + + case []spec.Schema: + idx, err := strconv.Atoi(entry) + if err != nil { + return fmt.Errorf("%s not a number: %w", pth, err) + } + container[idx] = spec.Schema{SchemaProps: spec.SchemaProps{Ref: ref}} + + case *spec.SchemaOrArray: + // NOTE: this is necessarily an array - otherwise, the parent would be *Schema + idx, err := strconv.Atoi(entry) + if err != nil { + return fmt.Errorf("%s not a number: %w", pth, err) + } + container.Schemas[idx] = spec.Schema{SchemaProps: spec.SchemaProps{Ref: ref}} + + case spec.SchemaProperties: + container[entry] = spec.Schema{SchemaProps: spec.SchemaProps{Ref: ref}} + + // NOTE: can't have case *spec.SchemaOrBool = parent in this case is *Schema + + default: + return fmt.Errorf("unhandled container type at %s: %T", key, value) + } + + default: + return fmt.Errorf("no schema with ref found at %s for %T", key, value) + } + + return nil +} + +// UpdateRefWithSchema replaces a ref with a schema (i.e. re-inline schema) +func UpdateRefWithSchema(sp *spec.Swagger, key string, sch *spec.Schema) error { + debugLog("updating ref for %s with schema", key) + pth, value, err := getPointerFromKey(sp, key) + if err != nil { + return err + } + + switch refable := value.(type) { + case *spec.Schema: + *refable = *sch + case spec.Schema: + _, entry, pvalue, erp := getParentFromKey(sp, key) + if erp != nil { + return err + } + switch container := pvalue.(type) { + case spec.Definitions: + container[entry] = *sch + + case map[string]spec.Schema: + container[entry] = *sch + + case []spec.Schema: + idx, err := strconv.Atoi(entry) + if err != nil { + return fmt.Errorf("%s not a number: %w", pth, err) + } + container[idx] = *sch + + case *spec.SchemaOrArray: + // NOTE: this is necessarily an array - otherwise, the parent would be *Schema + idx, err := strconv.Atoi(entry) + if err != nil { + return fmt.Errorf("%s not a number: %w", pth, err) + } + container.Schemas[idx] = *sch + + case spec.SchemaProperties: + container[entry] = *sch + + // NOTE: can't have case *spec.SchemaOrBool = parent in this case is *Schema + + default: + return fmt.Errorf("unhandled type for parent of [%s]: %T", key, value) + } + case *spec.SchemaOrArray: + *refable.Schema = *sch + // NOTE: can't have case *spec.SchemaOrBool = parent in this case is *Schema + case *spec.SchemaOrBool: + *refable.Schema = *sch + default: + return fmt.Errorf("no schema with ref found at %s for %T", key, value) + } + + return nil +} + +// DeepestRefResult holds the results from DeepestRef analysis +type DeepestRefResult struct { + Ref spec.Ref + Schema *spec.Schema + Warnings []string +} + +// DeepestRef finds the first definition ref, from a cascade of nested refs which are not definitions. +// - if no definition is found, returns the deepest ref. +// - pointers to external files are expanded +// +// NOTE: all external $ref's are assumed to be already expanded at this stage. +func DeepestRef(sp *spec.Swagger, opts *spec.ExpandOptions, ref spec.Ref) (*DeepestRefResult, error) { + if !ref.HasFragmentOnly { + // we found an external $ref, which is odd at this stage: + // do nothing on external $refs + return &DeepestRefResult{Ref: ref}, nil + } + + currentRef := ref + visited := make(map[string]bool, 64) + warnings := make([]string, 0, 2) + +DOWNREF: + for currentRef.String() != "" { + if path.Dir(currentRef.String()) == definitionsPath { + // this is a top-level definition: stop here and return this ref + return &DeepestRefResult{Ref: currentRef}, nil + } + + if _, beenThere := visited[currentRef.String()]; beenThere { + return nil, + fmt.Errorf("cannot resolve cyclic chain of pointers under %s", currentRef.String()) + } + + visited[currentRef.String()] = true + value, _, err := currentRef.GetPointer().Get(sp) + if err != nil { + return nil, err + } + + switch refable := value.(type) { + case *spec.Schema: + if refable.Ref.String() == "" { + break DOWNREF + } + currentRef = refable.Ref + + case spec.Schema: + if refable.Ref.String() == "" { + break DOWNREF + } + currentRef = refable.Ref + + case *spec.SchemaOrArray: + if refable.Schema == nil || refable.Schema != nil && refable.Schema.Ref.String() == "" { + break DOWNREF + } + currentRef = refable.Schema.Ref + + case *spec.SchemaOrBool: + if refable.Schema == nil || refable.Schema != nil && refable.Schema.Ref.String() == "" { + break DOWNREF + } + currentRef = refable.Schema.Ref + + case spec.Response: + // a pointer points to a schema initially marshalled in responses section... + // Attempt to convert this to a schema. If this fails, the spec is invalid + asJSON, _ := refable.MarshalJSON() + var asSchema spec.Schema + + err := asSchema.UnmarshalJSON(asJSON) + if err != nil { + return nil, + fmt.Errorf("invalid type for resolved JSON pointer %s. Expected a schema a, got: %T", + currentRef.String(), value) + } + warnings = append(warnings, fmt.Sprintf("found $ref %q (response) interpreted as schema", currentRef.String())) + + if asSchema.Ref.String() == "" { + break DOWNREF + } + currentRef = asSchema.Ref + + case spec.Parameter: + // a pointer points to a schema initially marshalled in parameters section... + // Attempt to convert this to a schema. If this fails, the spec is invalid + asJSON, _ := refable.MarshalJSON() + var asSchema spec.Schema + if err := asSchema.UnmarshalJSON(asJSON); err != nil { + return nil, + fmt.Errorf("invalid type for resolved JSON pointer %s. Expected a schema a, got: %T", + currentRef.String(), value) + } + + warnings = append(warnings, fmt.Sprintf("found $ref %q (parameter) interpreted as schema", currentRef.String())) + + if asSchema.Ref.String() == "" { + break DOWNREF + } + currentRef = asSchema.Ref + + default: + return nil, + fmt.Errorf("unhandled type to resolve JSON pointer %s. Expected a Schema, got: %T", + currentRef.String(), value) + } + } + + // assess what schema we're ending with + sch, erv := spec.ResolveRefWithBase(sp, ¤tRef, opts) + if erv != nil { + return nil, erv + } + + if sch == nil { + return nil, fmt.Errorf("no schema found at %s", currentRef.String()) + } + + return &DeepestRefResult{Ref: currentRef, Schema: sch, Warnings: warnings}, nil +} diff --git a/vendor/github.com/go-openapi/analysis/internal/flatten/schutils/flatten_schema.go b/vendor/github.com/go-openapi/analysis/internal/flatten/schutils/flatten_schema.go new file mode 100644 index 000000000000..4590236e683c --- /dev/null +++ b/vendor/github.com/go-openapi/analysis/internal/flatten/schutils/flatten_schema.go @@ -0,0 +1,29 @@ +// Package schutils provides tools to save or clone a schema +// when flattening a spec. +package schutils + +import ( + "github.com/go-openapi/spec" + "github.com/go-openapi/swag" +) + +// Save registers a schema as an entry in spec #/definitions +func Save(sp *spec.Swagger, name string, schema *spec.Schema) { + if schema == nil { + return + } + + if sp.Definitions == nil { + sp.Definitions = make(map[string]spec.Schema, 150) + } + + sp.Definitions[name] = *schema +} + +// Clone deep-clones a schema +func Clone(schema *spec.Schema) *spec.Schema { + var sch spec.Schema + _ = swag.FromDynamicJSON(schema, &sch) + + return &sch +} diff --git a/vendor/github.com/go-openapi/analysis/internal/flatten/sortref/keys.go b/vendor/github.com/go-openapi/analysis/internal/flatten/sortref/keys.go new file mode 100644 index 000000000000..18e552eadcef --- /dev/null +++ b/vendor/github.com/go-openapi/analysis/internal/flatten/sortref/keys.go @@ -0,0 +1,201 @@ +package sortref + +import ( + "net/http" + "path" + "strconv" + "strings" + + "github.com/go-openapi/jsonpointer" + "github.com/go-openapi/spec" +) + +const ( + paths = "paths" + responses = "responses" + parameters = "parameters" + definitions = "definitions" +) + +var ( + ignoredKeys map[string]struct{} + validMethods map[string]struct{} +) + +func init() { + ignoredKeys = map[string]struct{}{ + "schema": {}, + "properties": {}, + "not": {}, + "anyOf": {}, + "oneOf": {}, + } + + validMethods = map[string]struct{}{ + "GET": {}, + "HEAD": {}, + "OPTIONS": {}, + "PATCH": {}, + "POST": {}, + "PUT": {}, + "DELETE": {}, + } +} + +// Key represent a key item constructed from /-separated segments +type Key struct { + Segments int + Key string +} + +// Keys is a sortable collable collection of Keys +type Keys []Key + +func (k Keys) Len() int { return len(k) } +func (k Keys) Swap(i, j int) { k[i], k[j] = k[j], k[i] } +func (k Keys) Less(i, j int) bool { + return k[i].Segments > k[j].Segments || (k[i].Segments == k[j].Segments && k[i].Key < k[j].Key) +} + +// KeyParts construct a SplitKey with all its /-separated segments decomposed. It is sortable. +func KeyParts(key string) SplitKey { + var res []string + for _, part := range strings.Split(key[1:], "/") { + if part != "" { + res = append(res, jsonpointer.Unescape(part)) + } + } + + return res +} + +// SplitKey holds of the parts of a /-separated key, soi that their location may be determined. +type SplitKey []string + +// IsDefinition is true when the split key is in the #/definitions section of a spec +func (s SplitKey) IsDefinition() bool { + return len(s) > 1 && s[0] == definitions +} + +// DefinitionName yields the name of the definition +func (s SplitKey) DefinitionName() string { + if !s.IsDefinition() { + return "" + } + + return s[1] +} + +func (s SplitKey) isKeyName(i int) bool { + if i <= 0 { + return false + } + + count := 0 + for idx := i - 1; idx > 0; idx-- { + if s[idx] != "properties" { + break + } + count++ + } + + return count%2 != 0 +} + +// PartAdder know how to construct the components of a new name +type PartAdder func(string) []string + +// BuildName builds a name from segments +func (s SplitKey) BuildName(segments []string, startIndex int, adder PartAdder) string { + for i, part := range s[startIndex:] { + if _, ignored := ignoredKeys[part]; !ignored || s.isKeyName(startIndex+i) { + segments = append(segments, adder(part)...) + } + } + + return strings.Join(segments, " ") +} + +// IsOperation is true when the split key is in the operations section +func (s SplitKey) IsOperation() bool { + return len(s) > 1 && s[0] == paths +} + +// IsSharedOperationParam is true when the split key is in the parameters section of a path +func (s SplitKey) IsSharedOperationParam() bool { + return len(s) > 2 && s[0] == paths && s[2] == parameters +} + +// IsSharedParam is true when the split key is in the #/parameters section of a spec +func (s SplitKey) IsSharedParam() bool { + return len(s) > 1 && s[0] == parameters +} + +// IsOperationParam is true when the split key is in the parameters section of an operation +func (s SplitKey) IsOperationParam() bool { + return len(s) > 3 && s[0] == paths && s[3] == parameters +} + +// IsOperationResponse is true when the split key is in the responses section of an operation +func (s SplitKey) IsOperationResponse() bool { + return len(s) > 3 && s[0] == paths && s[3] == responses +} + +// IsSharedResponse is true when the split key is in the #/responses section of a spec +func (s SplitKey) IsSharedResponse() bool { + return len(s) > 1 && s[0] == responses +} + +// IsDefaultResponse is true when the split key is the default response for an operation +func (s SplitKey) IsDefaultResponse() bool { + return len(s) > 4 && s[0] == paths && s[3] == responses && s[4] == "default" +} + +// IsStatusCodeResponse is true when the split key is an operation response with a status code +func (s SplitKey) IsStatusCodeResponse() bool { + isInt := func() bool { + _, err := strconv.Atoi(s[4]) + + return err == nil + } + + return len(s) > 4 && s[0] == paths && s[3] == responses && isInt() +} + +// ResponseName yields either the status code or "Default" for a response +func (s SplitKey) ResponseName() string { + if s.IsStatusCodeResponse() { + code, _ := strconv.Atoi(s[4]) + + return http.StatusText(code) + } + + if s.IsDefaultResponse() { + return "Default" + } + + return "" +} + +// PathItemRef constructs a $ref object from a split key of the form /{path}/{method} +func (s SplitKey) PathItemRef() spec.Ref { + if len(s) < 3 { + return spec.Ref{} + } + + pth, method := s[1], s[2] + if _, isValidMethod := validMethods[strings.ToUpper(method)]; !isValidMethod && !strings.HasPrefix(method, "x-") { + return spec.Ref{} + } + + return spec.MustCreateRef("#" + path.Join("/", paths, jsonpointer.Escape(pth), strings.ToUpper(method))) +} + +// PathRef constructs a $ref object from a split key of the form /paths/{reference} +func (s SplitKey) PathRef() spec.Ref { + if !s.IsOperation() { + return spec.Ref{} + } + + return spec.MustCreateRef("#" + path.Join("/", paths, jsonpointer.Escape(s[1]))) +} diff --git a/vendor/github.com/go-openapi/analysis/internal/flatten/sortref/sort_ref.go b/vendor/github.com/go-openapi/analysis/internal/flatten/sortref/sort_ref.go new file mode 100644 index 000000000000..73243df87f03 --- /dev/null +++ b/vendor/github.com/go-openapi/analysis/internal/flatten/sortref/sort_ref.go @@ -0,0 +1,141 @@ +package sortref + +import ( + "reflect" + "sort" + "strings" + + "github.com/go-openapi/analysis/internal/flatten/normalize" + "github.com/go-openapi/spec" +) + +var depthGroupOrder = []string{ + "sharedParam", "sharedResponse", "sharedOpParam", "opParam", "codeResponse", "defaultResponse", "definition", +} + +type mapIterator struct { + len int + mapIter *reflect.MapIter +} + +func (i *mapIterator) Next() bool { + return i.mapIter.Next() +} + +func (i *mapIterator) Len() int { + return i.len +} + +func (i *mapIterator) Key() string { + return i.mapIter.Key().String() +} + +func mustMapIterator(anyMap interface{}) *mapIterator { + val := reflect.ValueOf(anyMap) + + return &mapIterator{mapIter: val.MapRange(), len: val.Len()} +} + +// DepthFirst sorts a map of anything. It groups keys by category +// (shared params, op param, statuscode response, default response, definitions) +// sort groups internally by number of parts in the key and lexical names +// flatten groups into a single list of keys +func DepthFirst(in interface{}) []string { + iterator := mustMapIterator(in) + sorted := make([]string, 0, iterator.Len()) + grouped := make(map[string]Keys, iterator.Len()) + + for iterator.Next() { + k := iterator.Key() + split := KeyParts(k) + var pk string + + if split.IsSharedOperationParam() { + pk = "sharedOpParam" + } + if split.IsOperationParam() { + pk = "opParam" + } + if split.IsStatusCodeResponse() { + pk = "codeResponse" + } + if split.IsDefaultResponse() { + pk = "defaultResponse" + } + if split.IsDefinition() { + pk = "definition" + } + if split.IsSharedParam() { + pk = "sharedParam" + } + if split.IsSharedResponse() { + pk = "sharedResponse" + } + grouped[pk] = append(grouped[pk], Key{Segments: len(split), Key: k}) + } + + for _, pk := range depthGroupOrder { + res := grouped[pk] + sort.Sort(res) + + for _, v := range res { + sorted = append(sorted, v.Key) + } + } + + return sorted +} + +// topMostRefs is able to sort refs by hierarchical then lexicographic order, +// yielding refs ordered breadth-first. +type topmostRefs []string + +func (k topmostRefs) Len() int { return len(k) } +func (k topmostRefs) Swap(i, j int) { k[i], k[j] = k[j], k[i] } +func (k topmostRefs) Less(i, j int) bool { + li, lj := len(strings.Split(k[i], "/")), len(strings.Split(k[j], "/")) + if li == lj { + return k[i] < k[j] + } + + return li < lj +} + +// TopmostFirst sorts references by depth +func TopmostFirst(refs []string) []string { + res := topmostRefs(refs) + sort.Sort(res) + + return res +} + +// RefRevIdx is a reverse index for references +type RefRevIdx struct { + Ref spec.Ref + Keys []string +} + +// ReverseIndex builds a reverse index for references in schemas +func ReverseIndex(schemas map[string]spec.Ref, basePath string) map[string]RefRevIdx { + collected := make(map[string]RefRevIdx) + for key, schRef := range schemas { + // normalize paths before sorting, + // so we get together keys that are from the same external file + normalizedPath := normalize.Path(schRef, basePath) + + entry, ok := collected[normalizedPath] + if ok { + entry.Keys = append(entry.Keys, key) + collected[normalizedPath] = entry + + continue + } + + collected[normalizedPath] = RefRevIdx{ + Ref: schRef, + Keys: []string{key}, + } + } + + return collected +} diff --git a/vendor/github.com/go-openapi/analysis/internal/post_go18.go b/vendor/github.com/go-openapi/analysis/internal/post_go18.go deleted file mode 100644 index f96f55c08733..000000000000 --- a/vendor/github.com/go-openapi/analysis/internal/post_go18.go +++ /dev/null @@ -1,29 +0,0 @@ -// +build go1.8 - -// Copyright 2015 go-swagger maintainers -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package internal - -import "net/url" - -// PathUnescape provides url.PathUnescape(), with seamless -// go version support for pre-go1.8 -// -// TODO: this function is currently defined in go-openapi/swag, -// but unexported. We might chose to export it, or simple phase -// out pre-go1.8 support. -func PathUnescape(path string) (string, error) { - return url.PathUnescape(path) -} diff --git a/vendor/github.com/go-openapi/analysis/mixin.go b/vendor/github.com/go-openapi/analysis/mixin.go index d5797042a733..b253052648cd 100644 --- a/vendor/github.com/go-openapi/analysis/mixin.go +++ b/vendor/github.com/go-openapi/analysis/mixin.go @@ -80,6 +80,7 @@ func Mixin(primary *spec.Swagger, mixins ...*spec.Swagger) []string { skipped = append(skipped, mergeResponses(primary, m)...) } + return skipped } @@ -90,12 +91,15 @@ func getOpIds(s *spec.Swagger) map[string]bool { if s.Paths == nil { return rv } + for _, v := range s.Paths.Paths { piops := pathItemOps(v) + for _, op := range piops { rv[op.ID] = true } } + return rv } @@ -107,6 +111,7 @@ func pathItemOps(p spec.PathItem) []*spec.Operation { rv = appendOp(rv, p.Delete) rv = appendOp(rv, p.Head) rv = appendOp(rv, p.Patch) + return rv } @@ -114,6 +119,7 @@ func appendOp(ops []*spec.Operation, op *spec.Operation) []*spec.Operation { if op == nil { return ops } + return append(ops, op) } @@ -123,10 +129,13 @@ func mergeSecurityDefinitions(primary *spec.Swagger, m *spec.Swagger) (skipped [ warn := fmt.Sprintf( "SecurityDefinitions entry '%v' already exists in primary or higher priority mixin, skipping\n", k) skipped = append(skipped, warn) + continue } + primary.SecurityDefinitions[k] = v } + return } @@ -136,17 +145,21 @@ func mergeSecurityRequirements(primary *spec.Swagger, m *spec.Swagger) (skipped for _, vv := range primary.Security { if reflect.DeepEqual(v, vv) { found = true + break } } + if found { warn := fmt.Sprintf( "Security requirement: '%v' already exists in primary or higher priority mixin, skipping\n", v) skipped = append(skipped, warn) + continue } primary.Security = append(primary.Security, v) } + return } @@ -157,10 +170,12 @@ func mergeDefinitions(primary *spec.Swagger, m *spec.Swagger) (skipped []string) warn := fmt.Sprintf( "definitions entry '%v' already exists in primary or higher priority mixin, skipping\n", k) skipped = append(skipped, warn) + continue } primary.Definitions[k] = v } + return } @@ -171,6 +186,7 @@ func mergePaths(primary *spec.Swagger, m *spec.Swagger, opIds map[string]bool, m warn := fmt.Sprintf( "paths entry '%v' already exists in primary or higher priority mixin, skipping\n", k) skipped = append(skipped, warn) + continue } @@ -190,6 +206,7 @@ func mergePaths(primary *spec.Swagger, m *spec.Swagger, opIds map[string]bool, m primary.Paths.Paths[k] = v } } + return } @@ -202,10 +219,12 @@ func mergeParameters(primary *spec.Swagger, m *spec.Swagger) (skipped []string) warn := fmt.Sprintf( "top level parameters entry '%v' already exists in primary or higher priority mixin, skipping\n", k) skipped = append(skipped, warn) + continue } primary.Parameters[k] = v } + return } @@ -218,10 +237,12 @@ func mergeResponses(primary *spec.Swagger, m *spec.Swagger) (skipped []string) { warn := fmt.Sprintf( "top level responses entry '%v' already exists in primary or higher priority mixin, skipping\n", k) skipped = append(skipped, warn) + continue } primary.Responses[k] = v } + return skipped } @@ -231,15 +252,18 @@ func mergeConsumes(primary *spec.Swagger, m *spec.Swagger) []string { for _, vv := range primary.Consumes { if v == vv { found = true + break } } + if found { // no warning here: we just skip it continue } primary.Consumes = append(primary.Consumes, v) } + return []string{} } @@ -249,15 +273,18 @@ func mergeProduces(primary *spec.Swagger, m *spec.Swagger) []string { for _, vv := range primary.Produces { if v == vv { found = true + break } } + if found { // no warning here: we just skip it continue } primary.Produces = append(primary.Produces, v) } + return []string{} } @@ -267,17 +294,24 @@ func mergeTags(primary *spec.Swagger, m *spec.Swagger) (skipped []string) { for _, vv := range primary.Tags { if v.Name == vv.Name { found = true + break } } + if found { warn := fmt.Sprintf( - "top level tags entry with name '%v' already exists in primary or higher priority mixin, skipping\n", v.Name) + "top level tags entry with name '%v' already exists in primary or higher priority mixin, skipping\n", + v.Name, + ) skipped = append(skipped, warn) + continue } + primary.Tags = append(primary.Tags, v) } + return } @@ -287,110 +321,150 @@ func mergeSchemes(primary *spec.Swagger, m *spec.Swagger) []string { for _, vv := range primary.Schemes { if v == vv { found = true + break } } + if found { // no warning here: we just skip it continue } primary.Schemes = append(primary.Schemes, v) } + return []string{} } func mergeSwaggerProps(primary *spec.Swagger, m *spec.Swagger) []string { - var skipped []string + var skipped, skippedInfo, skippedDocs []string + primary.Extensions, skipped = mergeExtensions(primary.Extensions, m.Extensions) // merging details in swagger top properties if primary.Host == "" { primary.Host = m.Host } + if primary.BasePath == "" { primary.BasePath = m.BasePath } + if primary.Info == nil { primary.Info = m.Info } else if m.Info != nil { - var sk []string - primary.Info.Extensions, sk = mergeExtensions(primary.Info.Extensions, m.Info.Extensions) - skipped = append(skipped, sk...) - if primary.Info.Description == "" { - primary.Info.Description = m.Info.Description - } - if primary.Info.Title == "" { - primary.Info.Description = m.Info.Description - } - if primary.Info.TermsOfService == "" { - primary.Info.TermsOfService = m.Info.TermsOfService - } - if primary.Info.Version == "" { - primary.Info.Version = m.Info.Version - } + skippedInfo = mergeInfo(primary.Info, m.Info) + skipped = append(skipped, skippedInfo...) + } - if primary.Info.Contact == nil { - primary.Info.Contact = m.Info.Contact - } else if m.Info.Contact != nil { - var csk []string - primary.Info.Contact.Extensions, csk = mergeExtensions(primary.Info.Contact.Extensions, m.Info.Contact.Extensions) - skipped = append(skipped, csk...) - if primary.Info.Contact.Name == "" { - primary.Info.Contact.Name = m.Info.Contact.Name - } - if primary.Info.Contact.URL == "" { - primary.Info.Contact.URL = m.Info.Contact.URL - } - if primary.Info.Contact.Email == "" { - primary.Info.Contact.Email = m.Info.Contact.Email - } + if primary.ExternalDocs == nil { + primary.ExternalDocs = m.ExternalDocs + } else if m != nil { + skippedDocs = mergeExternalDocs(primary.ExternalDocs, m.ExternalDocs) + skipped = append(skipped, skippedDocs...) + } + + return skipped +} + +// nolint: unparam +func mergeExternalDocs(primary *spec.ExternalDocumentation, m *spec.ExternalDocumentation) []string { + if primary.Description == "" { + primary.Description = m.Description + } + + if primary.URL == "" { + primary.URL = m.URL + } + + return nil +} + +func mergeInfo(primary *spec.Info, m *spec.Info) []string { + var sk, skipped []string + + primary.Extensions, sk = mergeExtensions(primary.Extensions, m.Extensions) + skipped = append(skipped, sk...) + + if primary.Description == "" { + primary.Description = m.Description + } + + if primary.Title == "" { + primary.Description = m.Description + } + + if primary.TermsOfService == "" { + primary.TermsOfService = m.TermsOfService + } + + if primary.Version == "" { + primary.Version = m.Version + } + + if primary.Contact == nil { + primary.Contact = m.Contact + } else if m.Contact != nil { + var csk []string + primary.Contact.Extensions, csk = mergeExtensions(primary.Contact.Extensions, m.Contact.Extensions) + skipped = append(skipped, csk...) + + if primary.Contact.Name == "" { + primary.Contact.Name = m.Contact.Name } - if primary.Info.License == nil { - primary.Info.License = m.Info.License - } else if m.Info.License != nil { - var lsk []string - primary.Info.License.Extensions, lsk = mergeExtensions(primary.Info.License.Extensions, m.Info.License.Extensions) - skipped = append(skipped, lsk...) - if primary.Info.License.Name == "" { - primary.Info.License.Name = m.Info.License.Name - } - if primary.Info.License.URL == "" { - primary.Info.License.URL = m.Info.License.URL - } + if primary.Contact.URL == "" { + primary.Contact.URL = m.Contact.URL } + if primary.Contact.Email == "" { + primary.Contact.Email = m.Contact.Email + } } - if primary.ExternalDocs == nil { - primary.ExternalDocs = m.ExternalDocs - } else if m.ExternalDocs != nil { - if primary.ExternalDocs.Description == "" { - primary.ExternalDocs.Description = m.ExternalDocs.Description + + if primary.License == nil { + primary.License = m.License + } else if m.License != nil { + var lsk []string + primary.License.Extensions, lsk = mergeExtensions(primary.License.Extensions, m.License.Extensions) + skipped = append(skipped, lsk...) + + if primary.License.Name == "" { + primary.License.Name = m.License.Name } - if primary.ExternalDocs.URL == "" { - primary.ExternalDocs.URL = m.ExternalDocs.URL + + if primary.License.URL == "" { + primary.License.URL = m.License.URL } } + return skipped } func mergeExtensions(primary spec.Extensions, m spec.Extensions) (result spec.Extensions, skipped []string) { if primary == nil { result = m + return } + if m == nil { result = primary + return } + result = primary for k, v := range m { if _, found := primary[k]; found { skipped = append(skipped, k) + continue } + primary[k] = v } + return } @@ -398,33 +472,43 @@ func initPrimary(primary *spec.Swagger) { if primary.SecurityDefinitions == nil { primary.SecurityDefinitions = make(map[string]*spec.SecurityScheme) } + if primary.Security == nil { primary.Security = make([]map[string][]string, 0, 10) } + if primary.Produces == nil { primary.Produces = make([]string, 0, 10) } + if primary.Consumes == nil { primary.Consumes = make([]string, 0, 10) } + if primary.Tags == nil { primary.Tags = make([]spec.Tag, 0, 10) } + if primary.Schemes == nil { primary.Schemes = make([]string, 0, 10) } + if primary.Paths == nil { primary.Paths = &spec.Paths{Paths: make(map[string]spec.PathItem)} } + if primary.Paths.Paths == nil { primary.Paths.Paths = make(map[string]spec.PathItem) } + if primary.Definitions == nil { primary.Definitions = make(spec.Definitions) } + if primary.Parameters == nil { primary.Parameters = make(map[string]spec.Parameter) } + if primary.Responses == nil { primary.Responses = make(map[string]spec.Response) } diff --git a/vendor/github.com/go-openapi/analysis/schema.go b/vendor/github.com/go-openapi/analysis/schema.go index ceb4e564b572..fc055095cbb6 100644 --- a/vendor/github.com/go-openapi/analysis/schema.go +++ b/vendor/github.com/go-openapi/analysis/schema.go @@ -47,6 +47,7 @@ func Schema(opts SchemaOpts) (*AnalyzedSchema, error) { } a.inferSimpleSchema() + return a, nil } @@ -123,6 +124,7 @@ func (a *AnalyzedSchema) inferFromRef() error { } a.inherits(rsch) } + return nil } @@ -142,26 +144,33 @@ func (a *AnalyzedSchema) inferKnownType() { } func (a *AnalyzedSchema) inferMap() error { - if a.isObjectType() { - hasExtra := a.hasProps || a.hasAllOf - a.IsMap = a.hasAdditionalProps && !hasExtra - a.IsExtendedObject = a.hasAdditionalProps && hasExtra - if a.IsMap { - if a.schema.AdditionalProperties.Schema != nil { - msch, err := Schema(SchemaOpts{ - Schema: a.schema.AdditionalProperties.Schema, - Root: a.root, - BasePath: a.basePath, - }) - if err != nil { - return err - } - a.IsSimpleMap = msch.IsSimpleSchema - } else if a.schema.AdditionalProperties.Allows { - a.IsSimpleMap = true - } + if !a.isObjectType() { + return nil + } + + hasExtra := a.hasProps || a.hasAllOf + a.IsMap = a.hasAdditionalProps && !hasExtra + a.IsExtendedObject = a.hasAdditionalProps && hasExtra + + if !a.IsMap { + return nil + } + + // maps + if a.schema.AdditionalProperties.Schema != nil { + msch, err := Schema(SchemaOpts{ + Schema: a.schema.AdditionalProperties.Schema, + Root: a.root, + BasePath: a.basePath, + }) + if err != nil { + return err } + a.IsSimpleMap = msch.IsSimpleSchema + } else if a.schema.AdditionalProperties.Allows { + a.IsSimpleMap = true } + return nil } @@ -184,12 +193,15 @@ func (a *AnalyzedSchema) inferArray() error { if err != nil { return err } + a.IsSimpleArray = itsch.IsSimpleSchema } } + if a.IsArray && !a.hasItems { a.IsSimpleArray = true } + return nil } @@ -222,7 +234,6 @@ func (a *AnalyzedSchema) initializeFlags() { a.hasAdditionalItems = a.schema.AdditionalItems != nil && (a.schema.AdditionalItems.Schema != nil || a.schema.AdditionalItems.Allows) - } func (a *AnalyzedSchema) isObjectType() bool { @@ -232,3 +243,14 @@ func (a *AnalyzedSchema) isObjectType() bool { func (a *AnalyzedSchema) isArrayType() bool { return !a.hasRef && (a.schema.Type != nil && a.schema.Type.Contains("array")) } + +// isAnalyzedAsComplex determines if an analyzed schema is eligible to flattening (i.e. it is "complex"). +// +// Complex means the schema is any of: +// - a simple type (primitive) +// - an array of something (items are possibly complex ; if this is the case, items will generate a definition) +// - a map of something (additionalProperties are possibly complex ; if this is the case, additionalProperties will +// generate a definition) +func (a *AnalyzedSchema) isAnalyzedAsComplex() bool { + return !a.IsSimpleSchema && !a.IsArray && !a.IsMap +} diff --git a/vendor/github.com/go-openapi/errors/BUILD.bazel b/vendor/github.com/go-openapi/errors/BUILD.bazel deleted file mode 100644 index 335b789cde24..000000000000 --- a/vendor/github.com/go-openapi/errors/BUILD.bazel +++ /dev/null @@ -1,17 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "api.go", - "auth.go", - "doc.go", - "headers.go", - "middleware.go", - "parsing.go", - "schema.go", - ], - importmap = "kubevirt.io/kubevirt/vendor/github.com/go-openapi/errors", - importpath = "github.com/go-openapi/errors", - visibility = ["//visibility:public"], -) diff --git a/vendor/github.com/go-openapi/jsonpointer/BUILD.bazel b/vendor/github.com/go-openapi/jsonpointer/BUILD.bazel deleted file mode 100644 index af0766b91148..000000000000 --- a/vendor/github.com/go-openapi/jsonpointer/BUILD.bazel +++ /dev/null @@ -1,10 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = ["pointer.go"], - importmap = "kubevirt.io/kubevirt/vendor/github.com/go-openapi/jsonpointer", - importpath = "github.com/go-openapi/jsonpointer", - visibility = ["//visibility:public"], - deps = ["//vendor/github.com/go-openapi/swag:go_default_library"], -) diff --git a/vendor/github.com/go-openapi/jsonreference/BUILD.bazel b/vendor/github.com/go-openapi/jsonreference/BUILD.bazel deleted file mode 100644 index c1b616cf6cf6..000000000000 --- a/vendor/github.com/go-openapi/jsonreference/BUILD.bazel +++ /dev/null @@ -1,13 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = ["reference.go"], - importmap = "kubevirt.io/kubevirt/vendor/github.com/go-openapi/jsonreference", - importpath = "github.com/go-openapi/jsonreference", - visibility = ["//visibility:public"], - deps = [ - "//vendor/github.com/PuerkitoBio/purell:go_default_library", - "//vendor/github.com/go-openapi/jsonpointer:go_default_library", - ], -) diff --git a/vendor/github.com/go-openapi/loads/.travis.yml b/vendor/github.com/go-openapi/loads/.travis.yml index 9a65c1296e36..cd4a7c331bc7 100644 --- a/vendor/github.com/go-openapi/loads/.travis.yml +++ b/vendor/github.com/go-openapi/loads/.travis.yml @@ -1,11 +1,14 @@ after_success: - bash <(curl -s https://codecov.io/bash) go: -- 1.14.x +- 1.16.x - 1.x install: - go get gotest.tools/gotestsum language: go +arch: +- amd64 +- ppc64le jobs: include: # include linting job, but only for latest go version and amd64 arch diff --git a/vendor/github.com/go-openapi/loads/BUILD.bazel b/vendor/github.com/go-openapi/loads/BUILD.bazel deleted file mode 100644 index 8072a3a2feaa..000000000000 --- a/vendor/github.com/go-openapi/loads/BUILD.bazel +++ /dev/null @@ -1,19 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "loaders.go", - "options.go", - "spec.go", - ], - importmap = "kubevirt.io/kubevirt/vendor/github.com/go-openapi/loads", - importpath = "github.com/go-openapi/loads", - visibility = ["//visibility:public"], - deps = [ - "//vendor/github.com/go-openapi/analysis:go_default_library", - "//vendor/github.com/go-openapi/spec:go_default_library", - "//vendor/github.com/go-openapi/swag:go_default_library", - ], -) diff --git a/vendor/github.com/go-openapi/loads/README.md b/vendor/github.com/go-openapi/loads/README.md index 8071d6c95c45..df1f6264623e 100644 --- a/vendor/github.com/go-openapi/loads/README.md +++ b/vendor/github.com/go-openapi/loads/README.md @@ -1,4 +1,4 @@ -# Loads OAI specs [![Build Status](https://travis-ci.org/go-openapi/loads.svg?branch=master)](https://travis-ci.org/go-openapi/loads) [![codecov](https://codecov.io/gh/go-openapi/loads/branch/master/graph/badge.svg)](https://codecov.io/gh/go-openapi/loads) [![Slack Status](https://slackin.goswagger.io/badge.svg)](https://slackin.goswagger.io) +# Loads OAI specs [![Build Status](https://travis-ci.org/go-openapi/loads.svg?branch=master)](https://travis-ci.org/go-openapi/loads) [![codecov](https://codecov.io/gh/go-openapi/loads/branch/master/graph/badge.svg)](https://codecov.io/gh/go-openapi/loads) [![Slack Status](https://slackin.goswagger.io/badge.svg)](https://slackin.goswagger.io) [![Actions/Go Test Status](https://github.com/go-openapi/loads/workflows/Go%20Test/badge.svg)](https://github.com/go-openapi/loads/actions?query=workflow%3A"Go+Test") [![license](http://img.shields.io/badge/license-Apache%20v2-orange.svg)](https://raw.githubusercontent.com/go-openapi/loads/master/LICENSE) [![GoDoc](https://godoc.org/github.com/go-openapi/loads?status.svg)](http://godoc.org/github.com/go-openapi/loads) [![Go Report Card](https://goreportcard.com/badge/github.com/go-openapi/loads)](https://goreportcard.com/report/github.com/go-openapi/loads) diff --git a/vendor/github.com/go-openapi/runtime/BUILD.bazel b/vendor/github.com/go-openapi/runtime/BUILD.bazel deleted file mode 100644 index 240b972fca13..000000000000 --- a/vendor/github.com/go-openapi/runtime/BUILD.bazel +++ /dev/null @@ -1,32 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "bytestream.go", - "client_auth_info.go", - "client_operation.go", - "client_request.go", - "client_response.go", - "constants.go", - "csv.go", - "discard.go", - "file.go", - "headers.go", - "interfaces.go", - "json.go", - "request.go", - "statuses.go", - "text.go", - "values.go", - "xml.go", - ], - importmap = "kubevirt.io/kubevirt/vendor/github.com/go-openapi/runtime", - importpath = "github.com/go-openapi/runtime", - visibility = ["//visibility:public"], - deps = [ - "//vendor/github.com/go-openapi/errors:go_default_library", - "//vendor/github.com/go-openapi/strfmt:go_default_library", - "//vendor/github.com/go-openapi/swag:go_default_library", - ], -) diff --git a/vendor/github.com/go-openapi/runtime/client/BUILD.bazel b/vendor/github.com/go-openapi/runtime/client/BUILD.bazel deleted file mode 100644 index 0c171d370b76..000000000000 --- a/vendor/github.com/go-openapi/runtime/client/BUILD.bazel +++ /dev/null @@ -1,22 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "auth_info.go", - "keepalive.go", - "request.go", - "response.go", - "runtime.go", - ], - importmap = "kubevirt.io/kubevirt/vendor/github.com/go-openapi/runtime/client", - importpath = "github.com/go-openapi/runtime/client", - visibility = ["//visibility:public"], - deps = [ - "//vendor/github.com/go-openapi/runtime:go_default_library", - "//vendor/github.com/go-openapi/runtime/logger:go_default_library", - "//vendor/github.com/go-openapi/runtime/middleware:go_default_library", - "//vendor/github.com/go-openapi/runtime/yamlpc:go_default_library", - "//vendor/github.com/go-openapi/strfmt:go_default_library", - ], -) diff --git a/vendor/github.com/go-openapi/runtime/logger/BUILD.bazel b/vendor/github.com/go-openapi/runtime/logger/BUILD.bazel deleted file mode 100644 index b0d9d5ff64e8..000000000000 --- a/vendor/github.com/go-openapi/runtime/logger/BUILD.bazel +++ /dev/null @@ -1,12 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "logger.go", - "standard.go", - ], - importmap = "kubevirt.io/kubevirt/vendor/github.com/go-openapi/runtime/logger", - importpath = "github.com/go-openapi/runtime/logger", - visibility = ["//visibility:public"], -) diff --git a/vendor/github.com/go-openapi/runtime/middleware/BUILD.bazel b/vendor/github.com/go-openapi/runtime/middleware/BUILD.bazel deleted file mode 100644 index 6dedf414f4d2..000000000000 --- a/vendor/github.com/go-openapi/runtime/middleware/BUILD.bazel +++ /dev/null @@ -1,41 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "context.go", - "doc.go", - "go18.go", - "negotiate.go", - "not_implemented.go", - "operation.go", - "parameter.go", - "pre_go18.go", - "rapidoc.go", - "redoc.go", - "request.go", - "router.go", - "security.go", - "spec.go", - "swaggerui.go", - "validation.go", - ], - importmap = "kubevirt.io/kubevirt/vendor/github.com/go-openapi/runtime/middleware", - importpath = "github.com/go-openapi/runtime/middleware", - visibility = ["//visibility:public"], - deps = [ - "//vendor/github.com/go-openapi/analysis:go_default_library", - "//vendor/github.com/go-openapi/errors:go_default_library", - "//vendor/github.com/go-openapi/loads:go_default_library", - "//vendor/github.com/go-openapi/runtime:go_default_library", - "//vendor/github.com/go-openapi/runtime/logger:go_default_library", - "//vendor/github.com/go-openapi/runtime/middleware/denco:go_default_library", - "//vendor/github.com/go-openapi/runtime/middleware/header:go_default_library", - "//vendor/github.com/go-openapi/runtime/middleware/untyped:go_default_library", - "//vendor/github.com/go-openapi/runtime/security:go_default_library", - "//vendor/github.com/go-openapi/spec:go_default_library", - "//vendor/github.com/go-openapi/strfmt:go_default_library", - "//vendor/github.com/go-openapi/swag:go_default_library", - "//vendor/github.com/go-openapi/validate:go_default_library", - ], -) diff --git a/vendor/github.com/go-openapi/runtime/middleware/denco/BUILD.bazel b/vendor/github.com/go-openapi/runtime/middleware/denco/BUILD.bazel deleted file mode 100644 index 7c1465c3022e..000000000000 --- a/vendor/github.com/go-openapi/runtime/middleware/denco/BUILD.bazel +++ /dev/null @@ -1,13 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "router.go", - "server.go", - "util.go", - ], - importmap = "kubevirt.io/kubevirt/vendor/github.com/go-openapi/runtime/middleware/denco", - importpath = "github.com/go-openapi/runtime/middleware/denco", - visibility = ["//visibility:public"], -) diff --git a/vendor/github.com/go-openapi/runtime/middleware/header/BUILD.bazel b/vendor/github.com/go-openapi/runtime/middleware/header/BUILD.bazel deleted file mode 100644 index cea961542c8f..000000000000 --- a/vendor/github.com/go-openapi/runtime/middleware/header/BUILD.bazel +++ /dev/null @@ -1,9 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = ["header.go"], - importmap = "kubevirt.io/kubevirt/vendor/github.com/go-openapi/runtime/middleware/header", - importpath = "github.com/go-openapi/runtime/middleware/header", - visibility = ["//visibility:public"], -) diff --git a/vendor/github.com/go-openapi/runtime/middleware/untyped/BUILD.bazel b/vendor/github.com/go-openapi/runtime/middleware/untyped/BUILD.bazel deleted file mode 100644 index fdf0b01e6554..000000000000 --- a/vendor/github.com/go-openapi/runtime/middleware/untyped/BUILD.bazel +++ /dev/null @@ -1,17 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = ["api.go"], - importmap = "kubevirt.io/kubevirt/vendor/github.com/go-openapi/runtime/middleware/untyped", - importpath = "github.com/go-openapi/runtime/middleware/untyped", - visibility = ["//visibility:public"], - deps = [ - "//vendor/github.com/go-openapi/analysis:go_default_library", - "//vendor/github.com/go-openapi/errors:go_default_library", - "//vendor/github.com/go-openapi/loads:go_default_library", - "//vendor/github.com/go-openapi/runtime:go_default_library", - "//vendor/github.com/go-openapi/spec:go_default_library", - "//vendor/github.com/go-openapi/strfmt:go_default_library", - ], -) diff --git a/vendor/github.com/go-openapi/runtime/security/BUILD.bazel b/vendor/github.com/go-openapi/runtime/security/BUILD.bazel deleted file mode 100644 index 94f8affd3bbe..000000000000 --- a/vendor/github.com/go-openapi/runtime/security/BUILD.bazel +++ /dev/null @@ -1,16 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "authenticator.go", - "authorizer.go", - ], - importmap = "kubevirt.io/kubevirt/vendor/github.com/go-openapi/runtime/security", - importpath = "github.com/go-openapi/runtime/security", - visibility = ["//visibility:public"], - deps = [ - "//vendor/github.com/go-openapi/errors:go_default_library", - "//vendor/github.com/go-openapi/runtime:go_default_library", - ], -) diff --git a/vendor/github.com/go-openapi/runtime/yamlpc/BUILD.bazel b/vendor/github.com/go-openapi/runtime/yamlpc/BUILD.bazel deleted file mode 100644 index 6dde0033dde4..000000000000 --- a/vendor/github.com/go-openapi/runtime/yamlpc/BUILD.bazel +++ /dev/null @@ -1,13 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = ["yaml.go"], - importmap = "kubevirt.io/kubevirt/vendor/github.com/go-openapi/runtime/yamlpc", - importpath = "github.com/go-openapi/runtime/yamlpc", - visibility = ["//visibility:public"], - deps = [ - "//vendor/github.com/go-openapi/runtime:go_default_library", - "//vendor/gopkg.in/yaml.v2:go_default_library", - ], -) diff --git a/vendor/github.com/go-openapi/spec/.travis.yml b/vendor/github.com/go-openapi/spec/.travis.yml index e8ceca446b4a..2281a07b0577 100644 --- a/vendor/github.com/go-openapi/spec/.travis.yml +++ b/vendor/github.com/go-openapi/spec/.travis.yml @@ -1,7 +1,7 @@ after_success: - bash <(curl -s https://codecov.io/bash) go: -- 1.14.x +- 1.16.x - 1.x arch: - amd64 diff --git a/vendor/github.com/go-openapi/spec/BUILD.bazel b/vendor/github.com/go-openapi/spec/BUILD.bazel deleted file mode 100644 index e01f674b97df..000000000000 --- a/vendor/github.com/go-openapi/spec/BUILD.bazel +++ /dev/null @@ -1,46 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "bindata.go", - "cache.go", - "contact_info.go", - "debug.go", - "errors.go", - "expander.go", - "external_docs.go", - "header.go", - "info.go", - "items.go", - "license.go", - "normalizer.go", - "normalizer_nonwindows.go", - "normalizer_windows.go", - "operation.go", - "parameter.go", - "path_item.go", - "paths.go", - "properties.go", - "ref.go", - "resolver.go", - "response.go", - "responses.go", - "schema.go", - "schema_loader.go", - "security_scheme.go", - "spec.go", - "swagger.go", - "tag.go", - "validations.go", - "xml_object.go", - ], - importmap = "kubevirt.io/kubevirt/vendor/github.com/go-openapi/spec", - importpath = "github.com/go-openapi/spec", - visibility = ["//visibility:public"], - deps = [ - "//vendor/github.com/go-openapi/jsonpointer:go_default_library", - "//vendor/github.com/go-openapi/jsonreference:go_default_library", - "//vendor/github.com/go-openapi/swag:go_default_library", - ], -) diff --git a/vendor/github.com/go-openapi/spec/schema_loader.go b/vendor/github.com/go-openapi/spec/schema_loader.go index 0059b99aed52..b81175afdf42 100644 --- a/vendor/github.com/go-openapi/spec/schema_loader.go +++ b/vendor/github.com/go-openapi/spec/schema_loader.go @@ -168,7 +168,14 @@ func (r *schemaLoader) load(refURL *url.URL) (interface{}, url.URL, bool, error) normalized := normalizeBase(pth) debugLog("loading doc from: %s", normalized) - data, fromCache := r.cache.Get(normalized) + unescaped, err := url.PathUnescape(normalized) + if err != nil { + return nil, url.URL{}, false, err + } + + u := url.URL{Path: unescaped} + + data, fromCache := r.cache.Get(u.RequestURI()) if fromCache { return data, toFetch, fromCache, nil } diff --git a/vendor/github.com/go-openapi/strfmt/.gitattributes b/vendor/github.com/go-openapi/strfmt/.gitattributes new file mode 100644 index 000000000000..d020be8ea4e7 --- /dev/null +++ b/vendor/github.com/go-openapi/strfmt/.gitattributes @@ -0,0 +1,2 @@ +*.go text eol=lf + diff --git a/vendor/github.com/go-openapi/strfmt/.travis.yml b/vendor/github.com/go-openapi/strfmt/.travis.yml deleted file mode 100644 index eaee5b65a93e..000000000000 --- a/vendor/github.com/go-openapi/strfmt/.travis.yml +++ /dev/null @@ -1,31 +0,0 @@ -after_success: -- bash <(curl -s https://codecov.io/bash) -go: -- 1.14.x -- 1.x -arch: -- amd64 -jobs: - include: - # only run fast tests on ppc64le - - go: 1.x - arch: ppc64le - script: - - gotestsum -f short-verbose -- ./... - - # include linting job, but only for latest go version and amd64 arch - - go: 1.x - arch: amd64 - install: - go get github.com/golangci/golangci-lint/cmd/golangci-lint - script: - - golangci-lint run --new-from-rev master - -install: -- GO111MODULE=off go get -u gotest.tools/gotestsum -language: go -notifications: - slack: - secure: zE5AtIYTpYfQPnTzP+EaQPN7JKtfFAGv6PrJqoIZLOXa8B6zGb6+J1JRNNxWi7faWbyJOxa4FSSsuPsKZMycUK6wlLFIdhDxwqeo7Ew8r6rdZKdfUHQggfNS9wO79ARoNYUDHtmnaBUS+eWSM1YqSc4i99QxyyfuURLOeAaA/q14YbdlTlaw3lrZ0qT92ot1FnVGNOx064zuHtFeUf+jAVRMZ6Q3rvqllwIlPszE6rmHGXBt2VoJxRaBetdwd7FgkcYw9FPXKHhadwC7/75ZAdmxIukhxNMw4Tr5NuPcqNcnbYLenDP7B3lssGVIrP4BRSqekS1d/tqvdvnnFWHMwrNCkSnSc065G5+qWTlXKAemIclgiXXqE2furBNLm05MDdG8fn5epS0UNarkjD+zX336RiqwBlOX4KbF+vPyqcO98CsN0lnd+H6loc9reiTHs37orFFpQ+309av9be2GGsHUsRB9ssIyrewmhAccOmkRtr2dVTZJNFQwa5Kph5TNJuTjnZEwG/xUkEX2YSfwShOsb062JWiflV6PJdnl80pc9Tn7D5sO5Bf9DbijGRJwwP+YiiJtwtr+vsvS+n4sM0b5eqm4UoRo+JJO8ffoJtHS7ItuyRbVQCwEPJ4221WLcf5PquEEDdAPwR+K4Gj8qTXqTDdxOiES1xFUKVgmzhI= -script: -- gotestsum -f short-verbose -- -race -coverprofile=coverage.txt -covermode=atomic ./... diff --git a/vendor/github.com/go-openapi/strfmt/BUILD.bazel b/vendor/github.com/go-openapi/strfmt/BUILD.bazel deleted file mode 100644 index fb2b065392ad..000000000000 --- a/vendor/github.com/go-openapi/strfmt/BUILD.bazel +++ /dev/null @@ -1,25 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "bson.go", - "date.go", - "default.go", - "doc.go", - "duration.go", - "format.go", - "time.go", - ], - importmap = "kubevirt.io/kubevirt/vendor/github.com/go-openapi/strfmt", - importpath = "github.com/go-openapi/strfmt", - visibility = ["//visibility:public"], - deps = [ - "//vendor/github.com/asaskevich/govalidator:go_default_library", - "//vendor/github.com/go-openapi/errors:go_default_library", - "//vendor/github.com/mitchellh/mapstructure:go_default_library", - "//vendor/go.mongodb.org/mongo-driver/bson:go_default_library", - "//vendor/go.mongodb.org/mongo-driver/bson/bsontype:go_default_library", - "//vendor/go.mongodb.org/mongo-driver/bson/primitive:go_default_library", - ], -) diff --git a/vendor/github.com/go-openapi/strfmt/README.md b/vendor/github.com/go-openapi/strfmt/README.md index b2645ce18a37..0cf89d776615 100644 --- a/vendor/github.com/go-openapi/strfmt/README.md +++ b/vendor/github.com/go-openapi/strfmt/README.md @@ -38,6 +38,7 @@ It also provides convenient extensions to go-openapi users. - ssn - uuid, uuid3, uuid4, uuid5 - cidr (e.g. "192.0.2.1/24", "2001:db8:a0b:12f0::1/32") + - ulid (e.g. "00000PP9HGSBSSDZ1JTEXBJ0PW", [spec](https://github.com/ulid/spec)) > NOTE: as the name stands for, this package is intended to support string formatting only. > It does not provide validation for numerical values with swagger format extension for JSON types "number" or @@ -84,3 +85,4 @@ List of defined types: - UUID3 - UUID4 - UUID5 +- [ULID](https://github.com/ulid/spec) diff --git a/vendor/github.com/go-openapi/strfmt/bson.go b/vendor/github.com/go-openapi/strfmt/bson.go index c14961221825..8740b150599c 100644 --- a/vendor/github.com/go-openapi/strfmt/bson.go +++ b/vendor/github.com/go-openapi/strfmt/bson.go @@ -39,10 +39,10 @@ func IsBSONObjectID(str string) bool { // ObjectId represents a BSON object ID (alias to go.mongodb.org/mongo-driver/bson/primitive.ObjectID) // // swagger:strfmt bsonobjectid -type ObjectId bsonprim.ObjectID +type ObjectId bsonprim.ObjectID //nolint:revive // NewObjectId creates a ObjectId from a Hex String -func NewObjectId(hex string) ObjectId { +func NewObjectId(hex string) ObjectId { //nolint:revive oid, err := bsonprim.ObjectIDFromHex(hex) if err != nil { panic(err) @@ -95,7 +95,7 @@ func (id ObjectId) Value() (driver.Value, error) { } func (id ObjectId) String() string { - return bsonprim.ObjectID(id).String() + return bsonprim.ObjectID(id).Hex() } // MarshalJSON returns the ObjectId as JSON diff --git a/vendor/github.com/go-openapi/strfmt/format.go b/vendor/github.com/go-openapi/strfmt/format.go index 3f93a72c86e1..602e4780672b 100644 --- a/vendor/github.com/go-openapi/strfmt/format.go +++ b/vendor/github.com/go-openapi/strfmt/format.go @@ -93,73 +93,84 @@ func NewSeededFormats(seeds []knownFormat, normalizer NameNormalizer) Registry { } // MapStructureHookFunc is a decode hook function for mapstructure -func (f *defaultFormats) MapStructureHookFunc() mapstructure.DecodeHookFunc { - return func(from reflect.Type, to reflect.Type, data interface{}) (interface{}, error) { +func (f *defaultFormats) MapStructureHookFunc() mapstructure.DecodeHookFunc { //nolint:gocyclo,cyclop + return func(from reflect.Type, to reflect.Type, obj interface{}) (interface{}, error) { if from.Kind() != reflect.String { - return data, nil + return obj, nil } + data, ok := obj.(string) + if !ok { + return nil, fmt.Errorf("failed to cast %+v to string", obj) + } + for _, v := range f.data { tpe, _ := f.GetType(v.Name) if to == tpe { switch v.Name { case "date": - d, err := time.Parse(RFC3339FullDate, data.(string)) + d, err := time.Parse(RFC3339FullDate, data) if err != nil { return nil, err } return Date(d), nil case "datetime": - input := data.(string) + input := data if len(input) == 0 { return nil, fmt.Errorf("empty string is an invalid datetime format") } return ParseDateTime(input) case "duration": - dur, err := ParseDuration(data.(string)) + dur, err := ParseDuration(data) if err != nil { return nil, err } return Duration(dur), nil case "uri": - return URI(data.(string)), nil + return URI(data), nil case "email": - return Email(data.(string)), nil + return Email(data), nil case "uuid": - return UUID(data.(string)), nil + return UUID(data), nil case "uuid3": - return UUID3(data.(string)), nil + return UUID3(data), nil case "uuid4": - return UUID4(data.(string)), nil + return UUID4(data), nil case "uuid5": - return UUID5(data.(string)), nil + return UUID5(data), nil case "hostname": - return Hostname(data.(string)), nil + return Hostname(data), nil case "ipv4": - return IPv4(data.(string)), nil + return IPv4(data), nil case "ipv6": - return IPv6(data.(string)), nil + return IPv6(data), nil case "cidr": - return CIDR(data.(string)), nil + return CIDR(data), nil case "mac": - return MAC(data.(string)), nil + return MAC(data), nil case "isbn": - return ISBN(data.(string)), nil + return ISBN(data), nil case "isbn10": - return ISBN10(data.(string)), nil + return ISBN10(data), nil case "isbn13": - return ISBN13(data.(string)), nil + return ISBN13(data), nil case "creditcard": - return CreditCard(data.(string)), nil + return CreditCard(data), nil case "ssn": - return SSN(data.(string)), nil + return SSN(data), nil case "hexcolor": - return HexColor(data.(string)), nil + return HexColor(data), nil case "rgbcolor": - return RGBColor(data.(string)), nil + return RGBColor(data), nil case "byte": - return Base64(data.(string)), nil + return Base64(data), nil case "password": - return Password(data.(string)), nil + return Password(data), nil + case "ulid": + ulid, err := ParseULID(data) + if err != nil { + return nil, err + } + return ulid, nil default: return nil, errors.InvalidTypeName(v.Name) } diff --git a/vendor/github.com/go-openapi/strfmt/time.go b/vendor/github.com/go-openapi/strfmt/time.go index 425413f7ec96..9c9359a5405e 100644 --- a/vendor/github.com/go-openapi/strfmt/time.go +++ b/vendor/github.com/go-openapi/strfmt/time.go @@ -210,9 +210,12 @@ func (t *DateTime) UnmarshalBSON(data []byte) error { // Marshals a DateTime as a bsontype.DateTime, an int64 representing // milliseconds since epoch. func (t DateTime) MarshalBSONValue() (bsontype.Type, []byte, error) { - // UnixNano cannot be used, the result of calling UnixNano on the zero - // Time is undefined. - i64 := NormalizeTimeForMarshal(time.Time(t)).Unix() * 1000 + // UnixNano cannot be used directly, the result of calling UnixNano on the zero + // Time is undefined. Thats why we use time.Nanosecond() instead. + + tNorm := NormalizeTimeForMarshal(time.Time(t)) + i64 := tNorm.Unix()*1000 + int64(tNorm.Nanosecond())/1e6 + buf := make([]byte, 8) binary.LittleEndian.PutUint64(buf, uint64(i64)) diff --git a/vendor/github.com/go-openapi/strfmt/ulid.go b/vendor/github.com/go-openapi/strfmt/ulid.go new file mode 100644 index 000000000000..4bd2ccd8f66d --- /dev/null +++ b/vendor/github.com/go-openapi/strfmt/ulid.go @@ -0,0 +1,225 @@ +package strfmt + +import ( + cryptorand "crypto/rand" + "database/sql/driver" + "encoding/json" + "errors" + "fmt" + "io" + "sync" + + "github.com/oklog/ulid" + "go.mongodb.org/mongo-driver/bson" +) + +// ULID represents a ulid string format +// ref: +// https://github.com/ulid/spec +// impl: +// https://github.com/oklog/ulid +// +// swagger:strfmt ulid +type ULID struct { + ulid.ULID +} + +var ( + ulidEntropyPool = sync.Pool{ + New: func() interface{} { + return cryptorand.Reader + }, + } + + ULIDScanDefaultFunc = func(raw interface{}) (ULID, error) { + u := NewULIDZero() + switch x := raw.(type) { + case nil: + // zerp ulid + return u, nil + case string: + if x == "" { + // zero ulid + return u, nil + } + return u, u.UnmarshalText([]byte(x)) + case []byte: + return u, u.UnmarshalText(x) + } + + return u, fmt.Errorf("cannot sql.Scan() strfmt.ULID from: %#v: %w", raw, ulid.ErrScanValue) + } + + // ULIDScanOverrideFunc allows you to override the Scan method of the ULID type + ULIDScanOverrideFunc = ULIDScanDefaultFunc + + ULIDValueDefaultFunc = func(u ULID) (driver.Value, error) { + return driver.Value(u.String()), nil + } + + // ULIDValueOverrideFunc allows you to override the Value method of the ULID type + ULIDValueOverrideFunc = ULIDValueDefaultFunc +) + +func init() { + // register formats in the default registry: + // - ulid + ulid := ULID{} + Default.Add("ulid", &ulid, IsULID) +} + +// IsULID checks if provided string is ULID format +// Be noticed that this function considers overflowed ULID as non-ulid. +// For more details see https://github.com/ulid/spec +func IsULID(str string) bool { + _, err := ulid.ParseStrict(str) + return err == nil +} + +// ParseULID parses a string that represents an valid ULID +func ParseULID(str string) (ULID, error) { + var u ULID + + return u, u.UnmarshalText([]byte(str)) +} + +// NewULIDZero returns a zero valued ULID type +func NewULIDZero() ULID { + return ULID{} +} + +// NewULID generates new unique ULID value and a error if any +func NewULID() (u ULID, err error) { + obj := ulidEntropyPool.Get() + entropy, ok := obj.(io.Reader) + if !ok { + return u, fmt.Errorf("failed to cast %+v to io.Reader", obj) + } + + id, err := ulid.New(ulid.Now(), entropy) + if err != nil { + return u, err + } + ulidEntropyPool.Put(entropy) + + u.ULID = id + return u, nil +} + +// GetULID returns underlying instance of ULID +func (u *ULID) GetULID() interface{} { + return u.ULID +} + +// MarshalText returns this instance into text +func (u ULID) MarshalText() ([]byte, error) { + return u.ULID.MarshalText() +} + +// UnmarshalText hydrates this instance from text +func (u *ULID) UnmarshalText(data []byte) error { // validation is performed later on + return u.ULID.UnmarshalText(data) +} + +// Scan reads a value from a database driver +func (u *ULID) Scan(raw interface{}) error { + ul, err := ULIDScanOverrideFunc(raw) + if err == nil { + *u = ul + } + return err +} + +// Value converts a value to a database driver value +func (u ULID) Value() (driver.Value, error) { + return ULIDValueOverrideFunc(u) +} + +func (u ULID) String() string { + return u.ULID.String() +} + +// MarshalJSON returns the ULID as JSON +func (u ULID) MarshalJSON() ([]byte, error) { + return json.Marshal(u.String()) +} + +// UnmarshalJSON sets the ULID from JSON +func (u *ULID) UnmarshalJSON(data []byte) error { + if string(data) == jsonNull { + return nil + } + var ustr string + if err := json.Unmarshal(data, &ustr); err != nil { + return err + } + id, err := ulid.ParseStrict(ustr) + if err != nil { + return fmt.Errorf("couldn't parse JSON value as ULID: %w", err) + } + u.ULID = id + return nil +} + +// MarshalBSON document from this value +func (u ULID) MarshalBSON() ([]byte, error) { + return bson.Marshal(bson.M{"data": u.String()}) +} + +// UnmarshalBSON document into this value +func (u *ULID) UnmarshalBSON(data []byte) error { + var m bson.M + if err := bson.Unmarshal(data, &m); err != nil { + return err + } + + if ud, ok := m["data"].(string); ok { + id, err := ulid.ParseStrict(ud) + if err != nil { + return fmt.Errorf("couldn't parse bson bytes as ULID: %w", err) + } + u.ULID = id + return nil + } + return errors.New("couldn't unmarshal bson bytes as ULID") +} + +// DeepCopyInto copies the receiver and writes its value into out. +func (u *ULID) DeepCopyInto(out *ULID) { + *out = *u +} + +// DeepCopy copies the receiver into a new ULID. +func (u *ULID) DeepCopy() *ULID { + if u == nil { + return nil + } + out := new(ULID) + u.DeepCopyInto(out) + return out +} + +// GobEncode implements the gob.GobEncoder interface. +func (u ULID) GobEncode() ([]byte, error) { + return u.ULID.MarshalBinary() +} + +// GobDecode implements the gob.GobDecoder interface. +func (u *ULID) GobDecode(data []byte) error { + return u.ULID.UnmarshalBinary(data) +} + +// MarshalBinary implements the encoding.BinaryMarshaler interface. +func (u ULID) MarshalBinary() ([]byte, error) { + return u.ULID.MarshalBinary() +} + +// UnmarshalBinary implements the encoding.BinaryUnmarshaler interface. +func (u *ULID) UnmarshalBinary(data []byte) error { + return u.ULID.UnmarshalBinary(data) +} + +// Equal checks if two ULID instances are equal by their underlying type +func (u ULID) Equal(other ULID) bool { + return u.ULID == other.ULID +} diff --git a/vendor/github.com/go-openapi/swag/BUILD.bazel b/vendor/github.com/go-openapi/swag/BUILD.bazel deleted file mode 100644 index 5164297548b1..000000000000 --- a/vendor/github.com/go-openapi/swag/BUILD.bazel +++ /dev/null @@ -1,31 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "convert.go", - "convert_types.go", - "doc.go", - "file.go", - "json.go", - "loading.go", - "name_lexem.go", - "net.go", - "path.go", - "post_go18.go", - "post_go19.go", - "pre_go18.go", - "pre_go19.go", - "split.go", - "util.go", - "yaml.go", - ], - importmap = "kubevirt.io/kubevirt/vendor/github.com/go-openapi/swag", - importpath = "github.com/go-openapi/swag", - visibility = ["//visibility:public"], - deps = [ - "//vendor/github.com/mailru/easyjson/jlexer:go_default_library", - "//vendor/github.com/mailru/easyjson/jwriter:go_default_library", - "//vendor/gopkg.in/yaml.v2:go_default_library", - ], -) diff --git a/vendor/github.com/go-openapi/validate/.gitattributes b/vendor/github.com/go-openapi/validate/.gitattributes new file mode 100644 index 000000000000..49ad52766abb --- /dev/null +++ b/vendor/github.com/go-openapi/validate/.gitattributes @@ -0,0 +1,2 @@ +# gofmt always uses LF, whereas Git uses CRLF on Windows. +*.go text eol=lf diff --git a/vendor/github.com/go-openapi/validate/.golangci.yml b/vendor/github.com/go-openapi/validate/.golangci.yml index 7dbddddfec26..81818ca67885 100644 --- a/vendor/github.com/go-openapi/validate/.golangci.yml +++ b/vendor/github.com/go-openapi/validate/.golangci.yml @@ -1,8 +1,6 @@ linters-settings: govet: check-shadowing: true - golint: - min-confidence: 0 gocyclo: min-complexity: 50 maligned: @@ -40,3 +38,13 @@ linters: - godot - tparallel - paralleltest + - cyclop # because we have gocyclo already + # TODO: review the linters below. We disabled them to make the CI pass first. + - ireturn + - varnamelen + - forcetypeassert + - thelper + # Disable deprecated linters. + # They will be removed from golangci-lint in future. + - interfacer + - golint \ No newline at end of file diff --git a/vendor/github.com/go-openapi/validate/.travis.yml b/vendor/github.com/go-openapi/validate/.travis.yml deleted file mode 100644 index 6fb3fb00563f..000000000000 --- a/vendor/github.com/go-openapi/validate/.travis.yml +++ /dev/null @@ -1,52 +0,0 @@ -after_success: -- bash <(curl -s https://codecov.io/bash) -go: -- 1.14.x -- 1.x -arch: -- amd64 -jobs: - include: - # only run fast tests on ppc64le - - go: 1.x - arch: ppc64le - script: - - gotestsum -f short-verbose -- ./... - - # include large spec validation sample (run once) - - go: 1.x - arch: amd64 - script: - - gotestsum -f short-verbose -- -timeout=30m -args -enable-go-swagger ./... - - # include linting job, but only for latest go version and amd64 arch (run once) - - go: 1.x - arch: amd64 - install: - - GO111MODULE=off go get -u gotest.tools/gotestsum - - go get -u github.com/go-openapi/runtime@master - script: - - gotestsum -f short-verbose -- -timeout=30m github.com/go-openapi/runtime/... - - # include go-openapi/runtime non reg job (run once) - - go: 1.x - arch: amd64 - install: - go get github.com/golangci/golangci-lint/cmd/golangci-lint - script: - - golangci-lint run --new-from-rev master - - # include -race test on short tests only (run once) - - go: 1.x - arch: amd64 - script: - - gotestsum -f short-verbose -- -race ./... - -install: -- GO111MODULE=off go get -u gotest.tools/gotestsum -language: go -notifications: - slack: - secure: EmObnQuM9Mw8J9vpFaKKHqSMN4Wsr/A9+v7ewAD5cEhA0T1P4m7MbJMiJOhxUhj/X+BFh2DamW+P2lT8mybj5wg8wnkQ2BteKA8Tawi6f9PRw2NRheO8tAi8o/npLnlmet0kc93mn+oLuqHw36w4+j5mkOl2FghkfGiUVhwrhkCP7KXQN+3TU87e+/HzQumlJ3nsE+6terVxkH3PmaUTsS5ONaODZfuxFpfb7RsoEl3skHf6d+tr+1nViLxxly7558Nc33C+W1mr0qiEvMLZ+kJ/CpGWBJ6CUJM3jm6hNe2eMuIPwEK2hxZob8c7n22VPap4K6a0bBRoydoDXaba+2sD7Ym6ivDO/DVyL44VeBBLyIiIBylDGQdZH+6SoWm90Qe/i7tnY/T5Ao5igT8f3cfQY1c3EsTfqmlDfrhmACBmwSlgkdVBLTprHL63JMY24LWmh4jhxsmMRZhCL4dze8su1w6pLN/pD1pGHtKYCEVbdTmaM3PblNRFf12XB7qosmQsgUndH4Vq3bTbU0s1pKjeDhRyLvFzvR0TBbo0pDLEoF1A/i5GVFWa7yLZNUDudQERRh7qv/xBl2excIaQ1sV4DSVm7bAE9l6Kp+yeHQJW2uN6Y3X8wu9gB9nv9l5HBze7wh8KE6PyWAOLYYqZg9/sAtsv/2GcQqXcKFF1zcA= -script: -- gotestsum -f short-verbose -- -timeout=20m -coverprofile=coverage.txt -covermode=atomic -args -enable-long ./... diff --git a/vendor/github.com/go-openapi/validate/BUILD.bazel b/vendor/github.com/go-openapi/validate/BUILD.bazel deleted file mode 100644 index 371f74ad9016..000000000000 --- a/vendor/github.com/go-openapi/validate/BUILD.bazel +++ /dev/null @@ -1,41 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "context.go", - "debug.go", - "default_validator.go", - "doc.go", - "example_validator.go", - "formats.go", - "helpers.go", - "object_validator.go", - "options.go", - "result.go", - "rexp.go", - "schema.go", - "schema_messages.go", - "schema_option.go", - "schema_props.go", - "slice_validator.go", - "spec.go", - "spec_messages.go", - "type.go", - "validator.go", - "values.go", - ], - importmap = "kubevirt.io/kubevirt/vendor/github.com/go-openapi/validate", - importpath = "github.com/go-openapi/validate", - visibility = ["//visibility:public"], - deps = [ - "//vendor/github.com/go-openapi/analysis:go_default_library", - "//vendor/github.com/go-openapi/errors:go_default_library", - "//vendor/github.com/go-openapi/jsonpointer:go_default_library", - "//vendor/github.com/go-openapi/loads:go_default_library", - "//vendor/github.com/go-openapi/runtime:go_default_library", - "//vendor/github.com/go-openapi/spec:go_default_library", - "//vendor/github.com/go-openapi/strfmt:go_default_library", - "//vendor/github.com/go-openapi/swag:go_default_library", - ], -) diff --git a/vendor/github.com/go-openapi/validate/context.go b/vendor/github.com/go-openapi/validate/context.go index bf02e94629d1..89977173b934 100644 --- a/vendor/github.com/go-openapi/validate/context.go +++ b/vendor/github.com/go-openapi/validate/context.go @@ -19,7 +19,7 @@ const ( none operationType = "none" // not specified in ctx ) -var operationTypeEnum []operationType = []operationType{request, response, none} +var operationTypeEnum = []operationType{request, response, none} // WithOperationRequest returns a new context with operationType request // in context value diff --git a/vendor/github.com/go-openapi/validate/default_validator.go b/vendor/github.com/go-openapi/validate/default_validator.go index 3e0d8c770d3c..bd14c2a269f1 100644 --- a/vendor/github.com/go-openapi/validate/default_validator.go +++ b/vendor/github.com/go-openapi/validate/default_validator.go @@ -92,7 +92,7 @@ func (d *defaultValidator) validateDefaultValueValidAgainstSchema() *Result { res := new(Result) s := d.SpecValidator - for method, pathItem := range s.analyzer.Operations() { + for method, pathItem := range s.expandedAnalyzer().Operations() { for path, op := range pathItem { // parameters for _, param := range paramHelp.safeExpandedParamsFor(path, method, op.ID, res, s) { diff --git a/vendor/github.com/go-openapi/validate/example_validator.go b/vendor/github.com/go-openapi/validate/example_validator.go index f4b7a2dfe98b..c8bffd78e5ae 100644 --- a/vendor/github.com/go-openapi/validate/example_validator.go +++ b/vendor/github.com/go-openapi/validate/example_validator.go @@ -68,7 +68,7 @@ func (ex *exampleValidator) validateExampleValueValidAgainstSchema() *Result { res := new(Result) s := ex.SpecValidator - for method, pathItem := range s.analyzer.Operations() { + for method, pathItem := range s.expandedAnalyzer().Operations() { for path, op := range pathItem { // parameters for _, param := range paramHelp.safeExpandedParamsFor(path, method, op.ID, res, s) { diff --git a/vendor/github.com/go-openapi/validate/helpers.go b/vendor/github.com/go-openapi/validate/helpers.go index 5d901dda7177..48ebfab58e54 100644 --- a/vendor/github.com/go-openapi/validate/helpers.go +++ b/vendor/github.com/go-openapi/validate/helpers.go @@ -210,7 +210,7 @@ type paramHelper struct { } func (h *paramHelper) safeExpandedParamsFor(path, method, operationID string, res *Result, s *SpecValidator) (params []spec.Parameter) { - operation, ok := s.analyzer.OperationFor(method, path) + operation, ok := s.expandedAnalyzer().OperationFor(method, path) if ok { // expand parameters first if necessary resolvedParams := []spec.Parameter{} @@ -224,7 +224,7 @@ func (h *paramHelper) safeExpandedParamsFor(path, method, operationID string, re // remove params with invalid expansion from Slice operation.Parameters = resolvedParams - for _, ppr := range s.analyzer.SafeParamsFor(method, path, + for _, ppr := range s.expandedAnalyzer().SafeParamsFor(method, path, func(p spec.Parameter, err error) bool { // since params have already been expanded, there are few causes for error res.AddErrors(someParametersBrokenMsg(path, method, operationID)) diff --git a/vendor/github.com/go-openapi/validate/schema_props.go b/vendor/github.com/go-openapi/validate/schema_props.go index 1f6950788e68..9bac3d29fb9d 100644 --- a/vendor/github.com/go-openapi/validate/schema_props.go +++ b/vendor/github.com/go-openapi/validate/schema_props.go @@ -163,7 +163,7 @@ func (s *schemaPropsValidator) Validate(data interface{}) *Result { } if validated != 1 { - additionalMsg := "" + var additionalMsg string if validated == 0 { additionalMsg = "Found none valid" } else { diff --git a/vendor/github.com/go-openapi/validate/spec.go b/vendor/github.com/go-openapi/validate/spec.go index cdf5627a2c81..dff01f00be73 100644 --- a/vendor/github.com/go-openapi/validate/spec.go +++ b/vendor/github.com/go-openapi/validate/spec.go @@ -624,7 +624,7 @@ func (s *SpecValidator) validateParameters() *Result { // - path param must be required res := new(Result) rexGarbledPathSegment := mustCompileRegexp(`.*[{}\s]+.*`) - for method, pi := range s.analyzer.Operations() { + for method, pi := range s.expandedAnalyzer().Operations() { methodPaths := make(map[string]map[string]string) for path, op := range pi { pathToAdd := pathHelp.stripParametersInPath(path) @@ -793,3 +793,12 @@ func (s *SpecValidator) checkUniqueParams(path, method string, op *spec.Operatio func (s *SpecValidator) SetContinueOnErrors(c bool) { s.Options.ContinueOnErrors = c } + +// expandedAnalyzer returns expanded.Analyzer when it is available. +// otherwise just analyzer. +func (s *SpecValidator) expandedAnalyzer() *analysis.Spec { + if s.expanded != nil && s.expanded.Analyzer != nil { + return s.expanded.Analyzer + } + return s.analyzer +} diff --git a/vendor/github.com/go-openapi/validate/type.go b/vendor/github.com/go-openapi/validate/type.go index dc77bff93b76..876467588f55 100644 --- a/vendor/github.com/go-openapi/validate/type.go +++ b/vendor/github.com/go-openapi/validate/type.go @@ -19,7 +19,6 @@ import ( "strings" "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" "github.com/go-openapi/spec" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" @@ -48,7 +47,7 @@ func (t *typeValidator) schemaInfoForType(data interface{}) (string, string) { return stringType, stringFormatDateTime case strfmt.Duration, *strfmt.Duration: return stringType, stringFormatDuration - case runtime.File, *runtime.File: + case swag.File, *swag.File: return fileType, "" case strfmt.Email, *strfmt.Email: return stringType, stringFormatEmail diff --git a/vendor/github.com/go-openapi/validate/values.go b/vendor/github.com/go-openapi/validate/values.go index 321de6737315..c88d35d7f234 100644 --- a/vendor/github.com/go-openapi/validate/values.go +++ b/vendor/github.com/go-openapi/validate/values.go @@ -394,7 +394,7 @@ func IsValueValidAgainstRange(val interface{}, typeName, format, prefix, path st kind := reflect.ValueOf(val).Type().Kind() // What is the string representation of val - stringRep := "" + var stringRep string switch kind { case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: stringRep = swag.FormatUint64(valueHelp.asUint64(val)) diff --git a/vendor/github.com/go-stack/stack/BUILD.bazel b/vendor/github.com/go-stack/stack/BUILD.bazel deleted file mode 100644 index 485bf64ff2a4..000000000000 --- a/vendor/github.com/go-stack/stack/BUILD.bazel +++ /dev/null @@ -1,9 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = ["stack.go"], - importmap = "kubevirt.io/kubevirt/vendor/github.com/go-stack/stack", - importpath = "github.com/go-stack/stack", - visibility = ["//visibility:public"], -) diff --git a/vendor/github.com/go-task/slim-sprig/BUILD.bazel b/vendor/github.com/go-task/slim-sprig/BUILD.bazel deleted file mode 100644 index 8d061ecbc7e5..000000000000 --- a/vendor/github.com/go-task/slim-sprig/BUILD.bazel +++ /dev/null @@ -1,23 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "crypto.go", - "date.go", - "defaults.go", - "dict.go", - "doc.go", - "functions.go", - "list.go", - "network.go", - "numeric.go", - "reflect.go", - "regex.go", - "strings.go", - "url.go", - ], - importmap = "kubevirt.io/kubevirt/vendor/github.com/go-task/slim-sprig", - importpath = "github.com/go-task/slim-sprig", - visibility = ["//visibility:public"], -) diff --git a/vendor/github.com/godbus/dbus/v5/BUILD.bazel b/vendor/github.com/godbus/dbus/v5/BUILD.bazel deleted file mode 100644 index 742a0280160b..000000000000 --- a/vendor/github.com/godbus/dbus/v5/BUILD.bazel +++ /dev/null @@ -1,48 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "auth.go", - "auth_anonymous.go", - "auth_external.go", - "auth_sha1.go", - "call.go", - "conn.go", - "conn_darwin.go", - "conn_other.go", - "conn_unix.go", - "conn_windows.go", - "dbus.go", - "decoder.go", - "default_handler.go", - "doc.go", - "encoder.go", - "export.go", - "homedir.go", - "homedir_dynamic.go", - "match.go", - "message.go", - "object.go", - "sequence.go", - "sequential_handler.go", - "server_interfaces.go", - "sig.go", - "transport_darwin.go", - "transport_generic.go", - "transport_nonce_tcp.go", - "transport_tcp.go", - "transport_unix.go", - "transport_unixcred_dragonfly.go", - "transport_unixcred_freebsd.go", - "transport_unixcred_linux.go", - "transport_unixcred_openbsd.go", - "variant.go", - "variant_lexer.go", - "variant_parser.go", - ], - cgo = True, - importmap = "kubevirt.io/kubevirt/vendor/github.com/godbus/dbus/v5", - importpath = "github.com/godbus/dbus/v5", - visibility = ["//visibility:public"], -) diff --git a/vendor/github.com/gogo/protobuf/gogoproto/BUILD.bazel b/vendor/github.com/gogo/protobuf/gogoproto/BUILD.bazel deleted file mode 100644 index 3887947f8fd1..000000000000 --- a/vendor/github.com/gogo/protobuf/gogoproto/BUILD.bazel +++ /dev/null @@ -1,17 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "gogo.pb.go", - "helper.go", - ], - importmap = "kubevirt.io/kubevirt/vendor/github.com/gogo/protobuf/gogoproto", - importpath = "github.com/gogo/protobuf/gogoproto", - visibility = ["//visibility:public"], - deps = [ - "//vendor/github.com/gogo/protobuf/proto:go_default_library", - "//vendor/github.com/gogo/protobuf/protoc-gen-gogo/descriptor:go_default_library", - ], -) diff --git a/vendor/github.com/gogo/protobuf/proto/BUILD.bazel b/vendor/github.com/gogo/protobuf/proto/BUILD.bazel deleted file mode 100644 index 6aa7f6dab817..000000000000 --- a/vendor/github.com/gogo/protobuf/proto/BUILD.bazel +++ /dev/null @@ -1,44 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "clone.go", - "custom_gogo.go", - "decode.go", - "deprecated.go", - "discard.go", - "duration.go", - "duration_gogo.go", - "encode.go", - "encode_gogo.go", - "equal.go", - "extensions.go", - "extensions_gogo.go", - "lib.go", - "lib_gogo.go", - "message_set.go", - "pointer_reflect.go", - "pointer_reflect_gogo.go", - "pointer_unsafe.go", - "pointer_unsafe_gogo.go", - "properties.go", - "properties_gogo.go", - "skip_gogo.go", - "table_marshal.go", - "table_marshal_gogo.go", - "table_merge.go", - "table_unmarshal.go", - "table_unmarshal_gogo.go", - "text.go", - "text_gogo.go", - "text_parser.go", - "timestamp.go", - "timestamp_gogo.go", - "wrappers.go", - "wrappers_gogo.go", - ], - importmap = "kubevirt.io/kubevirt/vendor/github.com/gogo/protobuf/proto", - importpath = "github.com/gogo/protobuf/proto", - visibility = ["//visibility:public"], -) diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/descriptor/BUILD.bazel b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/descriptor/BUILD.bazel deleted file mode 100644 index 91d26750fa7f..000000000000 --- a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/descriptor/BUILD.bazel +++ /dev/null @@ -1,15 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "descriptor.go", - "descriptor.pb.go", - "descriptor_gostring.gen.go", - "helper.go", - ], - importmap = "kubevirt.io/kubevirt/vendor/github.com/gogo/protobuf/protoc-gen-gogo/descriptor", - importpath = "github.com/gogo/protobuf/protoc-gen-gogo/descriptor", - visibility = ["//visibility:public"], - deps = ["//vendor/github.com/gogo/protobuf/proto:go_default_library"], -) diff --git a/vendor/github.com/gogo/protobuf/sortkeys/BUILD.bazel b/vendor/github.com/gogo/protobuf/sortkeys/BUILD.bazel deleted file mode 100644 index db44fad11437..000000000000 --- a/vendor/github.com/gogo/protobuf/sortkeys/BUILD.bazel +++ /dev/null @@ -1,9 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = ["sortkeys.go"], - importmap = "kubevirt.io/kubevirt/vendor/github.com/gogo/protobuf/sortkeys", - importpath = "github.com/gogo/protobuf/sortkeys", - visibility = ["//visibility:public"], -) diff --git a/vendor/github.com/golang/glog b/vendor/github.com/golang/glog deleted file mode 120000 index 336af1d33494..000000000000 --- a/vendor/github.com/golang/glog +++ /dev/null @@ -1 +0,0 @@ -../../../staging/src/github.com/golang/glog/ \ No newline at end of file diff --git a/vendor/golang.org/x/time/rate/BUILD.bazel b/vendor/github.com/golang/glog/BUILD.bazel similarity index 51% rename from vendor/golang.org/x/time/rate/BUILD.bazel rename to vendor/github.com/golang/glog/BUILD.bazel index eaf9fc9e56a2..4fe697d54022 100644 --- a/vendor/golang.org/x/time/rate/BUILD.bazel +++ b/vendor/github.com/golang/glog/BUILD.bazel @@ -2,8 +2,8 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library") go_library( name = "go_default_library", - srcs = ["rate.go"], - importmap = "kubevirt.io/kubevirt/vendor/golang.org/x/time/rate", - importpath = "golang.org/x/time/rate", + srcs = ["glog.go"], + importpath = "github.com/golang/glog", visibility = ["//visibility:public"], + deps = ["//vendor/github.com/go-kit/kit/log:go_default_library"], ) diff --git a/vendor/github.com/golang/glog/glog.go b/vendor/github.com/golang/glog/glog.go new file mode 100644 index 000000000000..e225a19817cd --- /dev/null +++ b/vendor/github.com/golang/glog/glog.go @@ -0,0 +1,427 @@ +// Go support for leveled logs, analogous to https://code.google.com/p/google-glog/ +// +// Copyright 2013 Google Inc. All Rights Reserved. +// Copyright 2018 The KubeVirt Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// This package reimplements github.com/golang/glog and logs to a structured logger. +package glog + +import ( + "bytes" + "flag" + "fmt" + stdLog "log" + "os" + "path/filepath" + "runtime" + "strconv" + "strings" + "sync/atomic" + "time" + + log2 "github.com/go-kit/kit/log" +) + +const timestampNow = "2006-01-02T15:04:05.000000Z" + +type logLevel int32 + +const ( + infoLevel logLevel = iota + warningLevel + errorLevel + fatalLevel +) + +var logLevelNames = map[logLevel]string{ + infoLevel: "info", + warningLevel: "warning", + errorLevel: "error", + fatalLevel: "fatal", +} + +var glogVerbosity string +var glogComponent string +var toStderr bool +var logger log2.Logger + +func init() { + flag.StringVar(&glogVerbosity, "v", "2", "log level for V logs") + flag.StringVar(&glogComponent, "component", "", "logger component") + flag.BoolVar(&toStderr, "logtostderr", false, "log to standard error instead of files") + logger = log2.NewJSONLogger(os.Stderr) +} + +func severityByName(s string) (logLevel, bool) { + s = strings.ToLower(s) + for i, name := range logLevelNames { + if name == s { + return logLevel(i), true + } + } + return 0, false +} + +// OutputStats tracks the number of output lines and bytes written. +type OutputStats struct { + lines int64 + bytes int64 +} + +// Lines returns the number of lines written. +func (s *OutputStats) Lines() int64 { + return atomic.LoadInt64(&s.lines) +} + +// Bytes returns the number of bytes written. +func (s *OutputStats) Bytes() int64 { + return atomic.LoadInt64(&s.bytes) +} + +// Stats tracks the number of lines of output and number of bytes +// per severity level. Values must be read with atomic.LoadInt64. +var Stats struct { + Info, Warning, Error OutputStats +} + +// level is exported because it appears in the arguments to V and is +// the type of the glogVerbosity flag, which can be set programmatically. +// It's a distinct type because we want to discriminate it from logType. +// Variables of type level are only changed under logging.mu. +// The -glogVerbosity flag is read only with atomic ops, so the state of the logging +// module is consistent. + +// level is treated as a sync/atomic int32. + +// level specifies a level of glogVerbosity for V logs. *level implements +// flag.Value; the -glogVerbosity flag is of type level and should be modified +// only through the flag.Value interface. +type Level int32 + +// get returns the value of the level. +func (l *Level) get() Level { + return Level(atomic.LoadInt32((*int32)(l))) +} + +// set sets the value of the level. +func (l *Level) set(val Level) { + atomic.StoreInt32((*int32)(l), int32(val)) +} + +// String is part of the flag.Value interface. +func (l *Level) String() string { + return strconv.FormatInt(int64(*l), 10) +} + +// Get is part of the flag.Value interface. +func (l *Level) Get() interface{} { + return *l +} + +// Set is part of the flag.Value interface. +func (l *Level) Set(value string) error { + v, err := strconv.Atoi(value) + if err != nil { + return err + } + l.set(Level(v)) + return nil +} + +// Flush flushes all pending log I/O. +func Flush() { + // Does nothing, only here for compatibility +} + +// CopyStandardLogTo arranges for messages written to the Go "log" package's +// default logs to also appear in the Google logs for the named and lower +// severities. Subsequent changes to the standard log's default output location +// or format may break this behavior. +// +// Valid names are "infoLevel", "warningLevel", "errorLevel", and "fatalLevel". If the name is not +// recognized, CopyStandardLogTo panics. +func CopyStandardLogTo(name string) { + sev, ok := severityByName(name) + if !ok { + panic(fmt.Sprintf("log.CopyStandardLogTo(%q): unrecognized severity name", name)) + } + // Set a log format that captures the user's file and line: + // d.go:23: message + stdLog.SetFlags(stdLog.Lshortfile) + stdLog.SetOutput(logBridge(sev)) +} + +// logBridge provides the Write method that enables CopyStandardLogTo to connect +// Go's standard logs to the logs provided by this package. +type logBridge logLevel + +// Write parses the standard logging line and passes its components to the +// logger for severity(lb). +func (lb logBridge) Write(b []byte) (n int, err error) { + var ( + file = "???" + line = 1 + text string + ) + // Split "d.go:23: message" into "d.go", "23", and "message". + if parts := bytes.SplitN(b, []byte{':'}, 3); len(parts) != 3 || len(parts[0]) < 1 || len(parts[2]) < 1 { + text = fmt.Sprintf("bad log format: %s", b) + } else { + file = string(parts[0]) + text = string(parts[2][1:]) // skip leading space + line, err = strconv.Atoi(string(parts[1])) + if err != nil { + text = fmt.Sprintf("bad line number: %s", b) + line = 1 + } + } + + doLogPos(logLevel(lb), file, line, text) + return len(b), nil +} + +// Verbose is a boolean type that implements Infof (like Printf) etc. +// See the documentation of V for more information. +type Verbose bool + +// V reports whether glogVerbosity at the call site is at least the requested level. +// The returned value is a boolean of type Verbose, which implements Info, Infoln +// and Infof. These methods will write to the Info log if called. +// Thus, one may write either +// if glog.V(2) { glog.Info("log this") } +// or +// glog.V(2).Info("log this") +// The second form is shorter but the first is cheaper if logging is off because it does +// not evaluate its arguments. +// +// Whether an individual call to V generates a log record depends on the setting of +// the -glogVerbosity and --vmodule flags; both are off by default. If the level in the call to +// V is at least the value of -glogVerbosity, or of -vmodule for the source file containing the +// call, the V call will log. +func V(level Level) Verbose { + // This function tries hard to be cheap unless there's work to do. + // The fast path is two atomic loads and compares. + + glogVerbosity, err := strconv.Atoi(glogVerbosity) + if err != nil { + Fatalf("Verbosity level is invalid: %v", err) + } + if glogVerbosity >= int(level) { + return Verbose(true) + } + return Verbose(false) +} + +// Info is equivalent to the global Info function, guarded by the value of glogVerbosity. +// See the documentation of V for usage. +func (v Verbose) Info(args ...interface{}) { + if v { + doLog(2, infoLevel, args...) + } +} + +// Infoln is equivalent to the global Infoln function, guarded by the value of glogVerbosity. +// See the documentation of V for usage. +func (v Verbose) Infoln(args ...interface{}) { + if v { + doLog(2, infoLevel, args...) + } +} + +// Infof is equivalent to the global Infof function, guarded by the value of glogVerbosity. +// See the documentation of V for usage. +func (v Verbose) Infof(format string, args ...interface{}) { + if v { + doLogf(2, infoLevel, format, args...) + } +} + +// Info logs to the infoLevel log. +// Arguments are handled in the manner of fmt.Print; a newline is appended if missing. +func Info(args ...interface{}) { + doLog(2, infoLevel, args...) +} + +// InfoDepth acts as Info but uses depth to determine which call frame to log. +// InfoDepth(0, "msg") is the same as Info("msg"). +func InfoDepth(depth int, args ...interface{}) { + doLog(2+depth, infoLevel, args...) +} + +// Infoln logs to the infoLevel log. +// Arguments are handled in the manner of fmt.Println; a newline is appended if missing. +func Infoln(args ...interface{}) { + doLog(2, infoLevel, args...) +} + +// Infof logs to the infoLevel log. +// Arguments are handled in the manner of fmt.Printf; a newline is appended if missing. +func Infof(format string, args ...interface{}) { + doLogf(2, infoLevel, format, args...) +} + +// Warning logs to the warningLevel and infoLevel logs. +// Arguments are handled in the manner of fmt.Print; a newline is appended if missing. +func Warning(args ...interface{}) { + doLog(2, warningLevel, args...) +} + +// WarningDepth acts as Warning but uses depth to determine which call frame to log. +// WarningDepth(0, "msg") is the same as Warning("msg"). +func WarningDepth(depth int, args ...interface{}) { + doLog(2+depth, warningLevel, args...) +} + +// Warningln logs to the warningLevel and infoLevel logs. +// Arguments are handled in the manner of fmt.Println; a newline is appended if missing. +func Warningln(args ...interface{}) { + doLog(2, warningLevel, args...) +} + +// Warningf logs to the warningLevel and infoLevel logs. +// Arguments are handled in the manner of fmt.Printf; a newline is appended if missing. +func Warningf(format string, args ...interface{}) { + doLogf(2, warningLevel, format, args...) +} + +// Error logs to the errorLevel, warningLevel, and infoLevel logs. +// Arguments are handled in the manner of fmt.Print; a newline is appended if missing. +func Error(args ...interface{}) { + doLog(2, errorLevel, args...) +} + +// ErrorDepth acts as Error but uses depth to determine which call frame to log. +// ErrorDepth(0, "msg") is the same as Error("msg"). +func ErrorDepth(depth int, args ...interface{}) { + doLog(2+depth, errorLevel, args...) +} + +// Errorln logs to the errorLevel, warningLevel, and infoLevel logs. +// Arguments are handled in the manner of fmt.Println; a newline is appended if missing. +func Errorln(args ...interface{}) { + doLog(2, errorLevel, args...) +} + +// Errorf logs to the errorLevel, warningLevel, and infoLevel logs. +// Arguments are handled in the manner of fmt.Printf; a newline is appended if missing. +func Errorf(format string, args ...interface{}) { + doLogf(2, errorLevel, format, args...) +} + +// Fatal logs to the fatalLevel, errorLevel, warningLevel, and infoLevel logs, +// including a stack trace of all running goroutines, then calls os.Exit(255). +// Arguments are handled in the manner of fmt.Print; a newline is appended if missing. +func Fatal(args ...interface{}) { + doLog(2, fatalLevel, args...) + os.Exit(255) +} + +// FatalDepth acts as Fatal but uses depth to determine which call frame to log. +// FatalDepth(0, "msg") is the same as Fatal("msg"). +func FatalDepth(depth int, args ...interface{}) { + doLog(2+depth, fatalLevel, args...) + os.Exit(255) +} + +// Fatalln logs to the fatalLevel, errorLevel, warningLevel, and infoLevel logs, +// including a stack trace of all running goroutines, then calls os.Exit(255). +// Arguments are handled in the manner of fmt.Println; a newline is appended if missing. +func Fatalln(args ...interface{}) { + doLog(2, fatalLevel, args...) + os.Exit(255) +} + +// Fatalf logs to the fatalLevel, errorLevel, warningLevel, and infoLevel logs, +// including a stack trace of all running goroutines, then calls os.Exit(255). +// Arguments are handled in the manner of fmt.Printf; a newline is appended if missing. +func Fatalf(format string, args ...interface{}) { + doLogf(2, fatalLevel, format, args...) + os.Exit(255) +} + +// fatalNoStacks is non-zero if we are to exit without dumping goroutine stacks. +// It allows Exit and relatives to use the Fatal logs. +var fatalNoStacks uint32 + +// Exit logs to the fatalLevel, errorLevel, warningLevel, and infoLevel logs, then calls os.Exit(1). +// Arguments are handled in the manner of fmt.Print; a newline is appended if missing. +func Exit(args ...interface{}) { + doLog(2, fatalLevel, args...) + os.Exit(1) +} + +// ExitDepth acts as Exit but uses depth to determine which call frame to log. +// ExitDepth(0, "msg") is the same as Exit("msg"). +func ExitDepth(depth int, args ...interface{}) { + doLog(2+depth, fatalLevel, args...) + os.Exit(1) +} + +// Exitln logs to the fatalLevel, errorLevel, warningLevel, and infoLevel logs, then calls os.Exit(1). +func Exitln(args ...interface{}) { + doLog(2, fatalLevel, args...) + os.Exit(1) +} + +// Exitf logs to the fatalLevel, errorLevel, warningLevel, and infoLevel logs, then calls os.Exit(1). +// Arguments are handled in the manner of fmt.Printf; a newline is appended if missing. +func Exitf(format string, args ...interface{}) { + doLogf(2, fatalLevel, format, args...) + os.Exit(1) +} + +func doLogf(skipFrames int, severity logLevel, format string, args ...interface{}) { + if !toStderr { + return + } + now := time.Now() + _, fileName, lineNumber, _ := runtime.Caller(skipFrames) + logger.Log( + "level", logLevelNames[severity], + "timestamp", now.Format(timestampNow), + "pos", fmt.Sprintf("%s:%d", filepath.Base(fileName), lineNumber), + "component", glogComponent, + "msg", fmt.Sprintf(format, args...), + ) +} + +func doLog(skipFrames int, severity logLevel, args ...interface{}) { + if !toStderr { + return + } + now := time.Now() + _, fileName, lineNumber, _ := runtime.Caller(skipFrames) + logger.Log( + "level", logLevelNames[severity], + "timestamp", now.Format(timestampNow), + "pos", fmt.Sprintf("%s:%d", filepath.Base(fileName), lineNumber), + "component", glogComponent, + "msg", fmt.Sprint(args...), + ) +} + +func doLogPos(severity logLevel, fileName string, lineNumber int, args ...interface{}) { + if !toStderr { + return + } + now := time.Now() + logger.Log( + "level", logLevelNames[severity], + "timestamp", now.Format(timestampNow), + "pos", fmt.Sprintf("%s:%d", filepath.Base(fileName), lineNumber), + "component", glogComponent, + "msg", fmt.Sprint(args...), + ) +} diff --git a/vendor/github.com/golang/groupcache/lru/BUILD.bazel b/vendor/github.com/golang/groupcache/lru/BUILD.bazel deleted file mode 100644 index dcc1f06fc4a4..000000000000 --- a/vendor/github.com/golang/groupcache/lru/BUILD.bazel +++ /dev/null @@ -1,9 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = ["lru.go"], - importmap = "kubevirt.io/kubevirt/vendor/github.com/golang/groupcache/lru", - importpath = "github.com/golang/groupcache/lru", - visibility = ["//visibility:public"], -) diff --git a/vendor/github.com/golang/mock/gomock/BUILD.bazel b/vendor/github.com/golang/mock/gomock/BUILD.bazel deleted file mode 100644 index efb350abbfb3..000000000000 --- a/vendor/github.com/golang/mock/gomock/BUILD.bazel +++ /dev/null @@ -1,14 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "call.go", - "callset.go", - "controller.go", - "matchers.go", - ], - importmap = "kubevirt.io/kubevirt/vendor/github.com/golang/mock/gomock", - importpath = "github.com/golang/mock/gomock", - visibility = ["//visibility:public"], -) diff --git a/vendor/github.com/golang/protobuf/proto/BUILD.bazel b/vendor/github.com/golang/protobuf/proto/BUILD.bazel deleted file mode 100644 index c1a0cd362067..000000000000 --- a/vendor/github.com/golang/protobuf/proto/BUILD.bazel +++ /dev/null @@ -1,32 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "buffer.go", - "defaults.go", - "deprecated.go", - "discard.go", - "extensions.go", - "properties.go", - "proto.go", - "registry.go", - "text_decode.go", - "text_encode.go", - "wire.go", - "wrappers.go", - ], - importmap = "kubevirt.io/kubevirt/vendor/github.com/golang/protobuf/proto", - importpath = "github.com/golang/protobuf/proto", - visibility = ["//visibility:public"], - deps = [ - "//vendor/google.golang.org/protobuf/encoding/prototext:go_default_library", - "//vendor/google.golang.org/protobuf/encoding/protowire:go_default_library", - "//vendor/google.golang.org/protobuf/proto:go_default_library", - "//vendor/google.golang.org/protobuf/reflect/protodesc:go_default_library", - "//vendor/google.golang.org/protobuf/reflect/protoreflect:go_default_library", - "//vendor/google.golang.org/protobuf/reflect/protoregistry:go_default_library", - "//vendor/google.golang.org/protobuf/runtime/protoiface:go_default_library", - "//vendor/google.golang.org/protobuf/runtime/protoimpl:go_default_library", - ], -) diff --git a/vendor/github.com/golang/protobuf/ptypes/BUILD.bazel b/vendor/github.com/golang/protobuf/ptypes/BUILD.bazel deleted file mode 100644 index af2b0d8c97e6..000000000000 --- a/vendor/github.com/golang/protobuf/ptypes/BUILD.bazel +++ /dev/null @@ -1,22 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "any.go", - "doc.go", - "duration.go", - "timestamp.go", - ], - importmap = "kubevirt.io/kubevirt/vendor/github.com/golang/protobuf/ptypes", - importpath = "github.com/golang/protobuf/ptypes", - visibility = ["//visibility:public"], - deps = [ - "//vendor/github.com/golang/protobuf/proto:go_default_library", - "//vendor/github.com/golang/protobuf/ptypes/any:go_default_library", - "//vendor/github.com/golang/protobuf/ptypes/duration:go_default_library", - "//vendor/github.com/golang/protobuf/ptypes/timestamp:go_default_library", - "//vendor/google.golang.org/protobuf/reflect/protoreflect:go_default_library", - "//vendor/google.golang.org/protobuf/reflect/protoregistry:go_default_library", - ], -) diff --git a/vendor/github.com/golang/protobuf/ptypes/any/BUILD.bazel b/vendor/github.com/golang/protobuf/ptypes/any/BUILD.bazel deleted file mode 100644 index cd199562c6b8..000000000000 --- a/vendor/github.com/golang/protobuf/ptypes/any/BUILD.bazel +++ /dev/null @@ -1,14 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = ["any.pb.go"], - importmap = "kubevirt.io/kubevirt/vendor/github.com/golang/protobuf/ptypes/any", - importpath = "github.com/golang/protobuf/ptypes/any", - visibility = ["//visibility:public"], - deps = [ - "//vendor/google.golang.org/protobuf/reflect/protoreflect:go_default_library", - "//vendor/google.golang.org/protobuf/runtime/protoimpl:go_default_library", - "//vendor/google.golang.org/protobuf/types/known/anypb:go_default_library", - ], -) diff --git a/vendor/github.com/golang/protobuf/ptypes/duration/BUILD.bazel b/vendor/github.com/golang/protobuf/ptypes/duration/BUILD.bazel deleted file mode 100644 index e61e5bde609e..000000000000 --- a/vendor/github.com/golang/protobuf/ptypes/duration/BUILD.bazel +++ /dev/null @@ -1,14 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = ["duration.pb.go"], - importmap = "kubevirt.io/kubevirt/vendor/github.com/golang/protobuf/ptypes/duration", - importpath = "github.com/golang/protobuf/ptypes/duration", - visibility = ["//visibility:public"], - deps = [ - "//vendor/google.golang.org/protobuf/reflect/protoreflect:go_default_library", - "//vendor/google.golang.org/protobuf/runtime/protoimpl:go_default_library", - "//vendor/google.golang.org/protobuf/types/known/durationpb:go_default_library", - ], -) diff --git a/vendor/github.com/golang/protobuf/ptypes/timestamp/BUILD.bazel b/vendor/github.com/golang/protobuf/ptypes/timestamp/BUILD.bazel deleted file mode 100644 index 8b677957f5dd..000000000000 --- a/vendor/github.com/golang/protobuf/ptypes/timestamp/BUILD.bazel +++ /dev/null @@ -1,14 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = ["timestamp.pb.go"], - importmap = "kubevirt.io/kubevirt/vendor/github.com/golang/protobuf/ptypes/timestamp", - importpath = "github.com/golang/protobuf/ptypes/timestamp", - visibility = ["//visibility:public"], - deps = [ - "//vendor/google.golang.org/protobuf/reflect/protoreflect:go_default_library", - "//vendor/google.golang.org/protobuf/runtime/protoimpl:go_default_library", - "//vendor/google.golang.org/protobuf/types/known/timestamppb:go_default_library", - ], -) diff --git a/vendor/github.com/google/go-cmp/cmp/BUILD.bazel b/vendor/github.com/google/go-cmp/cmp/BUILD.bazel deleted file mode 100644 index 2b12f607f878..000000000000 --- a/vendor/github.com/google/go-cmp/cmp/BUILD.bazel +++ /dev/null @@ -1,27 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "compare.go", - "export_unsafe.go", - "options.go", - "path.go", - "report.go", - "report_compare.go", - "report_references.go", - "report_reflect.go", - "report_slices.go", - "report_text.go", - "report_value.go", - ], - importmap = "kubevirt.io/kubevirt/vendor/github.com/google/go-cmp/cmp", - importpath = "github.com/google/go-cmp/cmp", - visibility = ["//visibility:public"], - deps = [ - "//vendor/github.com/google/go-cmp/cmp/internal/diff:go_default_library", - "//vendor/github.com/google/go-cmp/cmp/internal/flags:go_default_library", - "//vendor/github.com/google/go-cmp/cmp/internal/function:go_default_library", - "//vendor/github.com/google/go-cmp/cmp/internal/value:go_default_library", - ], -) diff --git a/vendor/github.com/google/go-cmp/cmp/internal/diff/BUILD.bazel b/vendor/github.com/google/go-cmp/cmp/internal/diff/BUILD.bazel deleted file mode 100644 index 13b26e86cc47..000000000000 --- a/vendor/github.com/google/go-cmp/cmp/internal/diff/BUILD.bazel +++ /dev/null @@ -1,13 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "debug_disable.go", - "diff.go", - ], - importmap = "kubevirt.io/kubevirt/vendor/github.com/google/go-cmp/cmp/internal/diff", - importpath = "github.com/google/go-cmp/cmp/internal/diff", - visibility = ["//vendor/github.com/google/go-cmp/cmp:__subpackages__"], - deps = ["//vendor/github.com/google/go-cmp/cmp/internal/flags:go_default_library"], -) diff --git a/vendor/github.com/google/go-cmp/cmp/internal/flags/BUILD.bazel b/vendor/github.com/google/go-cmp/cmp/internal/flags/BUILD.bazel deleted file mode 100644 index 60175f2a6454..000000000000 --- a/vendor/github.com/google/go-cmp/cmp/internal/flags/BUILD.bazel +++ /dev/null @@ -1,13 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "flags.go", - "toolchain_legacy.go", - "toolchain_recent.go", - ], - importmap = "kubevirt.io/kubevirt/vendor/github.com/google/go-cmp/cmp/internal/flags", - importpath = "github.com/google/go-cmp/cmp/internal/flags", - visibility = ["//vendor/github.com/google/go-cmp/cmp:__subpackages__"], -) diff --git a/vendor/github.com/google/go-cmp/cmp/internal/function/BUILD.bazel b/vendor/github.com/google/go-cmp/cmp/internal/function/BUILD.bazel deleted file mode 100644 index ca8ed1220714..000000000000 --- a/vendor/github.com/google/go-cmp/cmp/internal/function/BUILD.bazel +++ /dev/null @@ -1,9 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = ["func.go"], - importmap = "kubevirt.io/kubevirt/vendor/github.com/google/go-cmp/cmp/internal/function", - importpath = "github.com/google/go-cmp/cmp/internal/function", - visibility = ["//vendor/github.com/google/go-cmp/cmp:__subpackages__"], -) diff --git a/vendor/github.com/google/go-cmp/cmp/internal/value/BUILD.bazel b/vendor/github.com/google/go-cmp/cmp/internal/value/BUILD.bazel deleted file mode 100644 index 5dd7c1823901..000000000000 --- a/vendor/github.com/google/go-cmp/cmp/internal/value/BUILD.bazel +++ /dev/null @@ -1,14 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "name.go", - "pointer_unsafe.go", - "sort.go", - "zero.go", - ], - importmap = "kubevirt.io/kubevirt/vendor/github.com/google/go-cmp/cmp/internal/value", - importpath = "github.com/google/go-cmp/cmp/internal/value", - visibility = ["//vendor/github.com/google/go-cmp/cmp:__subpackages__"], -) diff --git a/vendor/github.com/google/go-github/v32/github/BUILD.bazel b/vendor/github.com/google/go-github/v32/github/BUILD.bazel deleted file mode 100644 index ce9358fdf508..000000000000 --- a/vendor/github.com/google/go-github/v32/github/BUILD.bazel +++ /dev/null @@ -1,113 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "actions.go", - "actions_artifacts.go", - "actions_runners.go", - "actions_secrets.go", - "actions_workflow_jobs.go", - "actions_workflow_runs.go", - "actions_workflows.go", - "activity.go", - "activity_events.go", - "activity_notifications.go", - "activity_star.go", - "activity_watching.go", - "admin.go", - "admin_orgs.go", - "admin_stats.go", - "admin_users.go", - "apps.go", - "apps_installation.go", - "apps_manifest.go", - "apps_marketplace.go", - "authorizations.go", - "checks.go", - "doc.go", - "event.go", - "event_types.go", - "gists.go", - "gists_comments.go", - "git.go", - "git_blobs.go", - "git_commits.go", - "git_refs.go", - "git_tags.go", - "git_trees.go", - "github.go", - "github-accessors.go", - "gitignore.go", - "interactions.go", - "interactions_orgs.go", - "interactions_repos.go", - "issues.go", - "issues_assignees.go", - "issues_comments.go", - "issues_events.go", - "issues_labels.go", - "issues_milestones.go", - "issues_timeline.go", - "licenses.go", - "messages.go", - "migrations.go", - "migrations_source_import.go", - "migrations_user.go", - "misc.go", - "orgs.go", - "orgs_hooks.go", - "orgs_members.go", - "orgs_outside_collaborators.go", - "orgs_projects.go", - "orgs_users_blocking.go", - "projects.go", - "pulls.go", - "pulls_comments.go", - "pulls_reviewers.go", - "pulls_reviews.go", - "reactions.go", - "repos.go", - "repos_collaborators.go", - "repos_comments.go", - "repos_commits.go", - "repos_community_health.go", - "repos_contents.go", - "repos_deployments.go", - "repos_forks.go", - "repos_hooks.go", - "repos_invitations.go", - "repos_keys.go", - "repos_merging.go", - "repos_pages.go", - "repos_prereceive_hooks.go", - "repos_projects.go", - "repos_releases.go", - "repos_stats.go", - "repos_statuses.go", - "repos_traffic.go", - "search.go", - "strings.go", - "teams.go", - "teams_discussion_comments.go", - "teams_discussions.go", - "teams_members.go", - "timestamp.go", - "users.go", - "users_administration.go", - "users_blocking.go", - "users_emails.go", - "users_followers.go", - "users_gpg_keys.go", - "users_keys.go", - "users_projects.go", - "without_appengine.go", - ], - importmap = "kubevirt.io/kubevirt/vendor/github.com/google/go-github/v32/github", - importpath = "github.com/google/go-github/v32/github", - visibility = ["//visibility:public"], - deps = [ - "//vendor/github.com/google/go-querystring/query:go_default_library", - "//vendor/golang.org/x/crypto/openpgp:go_default_library", - ], -) diff --git a/vendor/github.com/google/go-querystring/query/BUILD.bazel b/vendor/github.com/google/go-querystring/query/BUILD.bazel deleted file mode 100644 index c0c3c9722669..000000000000 --- a/vendor/github.com/google/go-querystring/query/BUILD.bazel +++ /dev/null @@ -1,9 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = ["encode.go"], - importmap = "kubevirt.io/kubevirt/vendor/github.com/google/go-querystring/query", - importpath = "github.com/google/go-querystring/query", - visibility = ["//visibility:public"], -) diff --git a/vendor/github.com/google/goexpect/BUILD.bazel b/vendor/github.com/google/goexpect/BUILD.bazel deleted file mode 100644 index 534318f39b04..000000000000 --- a/vendor/github.com/google/goexpect/BUILD.bazel +++ /dev/null @@ -1,14 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = ["expect.go"], - importmap = "kubevirt.io/kubevirt/vendor/github.com/google/goexpect", - importpath = "github.com/google/goexpect", - visibility = ["//visibility:public"], - deps = [ - "//vendor/github.com/google/goterm/term:go_default_library", - "//vendor/golang.org/x/crypto/ssh:go_default_library", - "@org_golang_google_grpc//codes:go_default_library", - ], -) diff --git a/vendor/github.com/google/gofuzz/BUILD.bazel b/vendor/github.com/google/gofuzz/BUILD.bazel deleted file mode 100644 index 6dd7f6919e23..000000000000 --- a/vendor/github.com/google/gofuzz/BUILD.bazel +++ /dev/null @@ -1,12 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "fuzz.go", - ], - importmap = "kubevirt.io/kubevirt/vendor/github.com/google/gofuzz", - importpath = "github.com/google/gofuzz", - visibility = ["//visibility:public"], -) diff --git a/vendor/github.com/google/goterm/term/BUILD.bazel b/vendor/github.com/google/goterm/term/BUILD.bazel deleted file mode 100644 index 3765673ce935..000000000000 --- a/vendor/github.com/google/goterm/term/BUILD.bazel +++ /dev/null @@ -1,13 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "color.go", - "ssh.go", - "termios.go", - ], - importmap = "kubevirt.io/kubevirt/vendor/github.com/google/goterm/term", - importpath = "github.com/google/goterm/term", - visibility = ["//visibility:public"], -) diff --git a/vendor/github.com/google/pprof/profile/BUILD.bazel b/vendor/github.com/google/pprof/profile/BUILD.bazel deleted file mode 100644 index 2b4a9eaf05fb..000000000000 --- a/vendor/github.com/google/pprof/profile/BUILD.bazel +++ /dev/null @@ -1,19 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "encode.go", - "filter.go", - "index.go", - "legacy_java_profile.go", - "legacy_profile.go", - "merge.go", - "profile.go", - "proto.go", - "prune.go", - ], - importmap = "kubevirt.io/kubevirt/vendor/github.com/google/pprof/profile", - importpath = "github.com/google/pprof/profile", - visibility = ["//visibility:public"], -) diff --git a/vendor/github.com/google/renameio/BUILD.bazel b/vendor/github.com/google/renameio/BUILD.bazel deleted file mode 100644 index 81da5ff06a01..000000000000 --- a/vendor/github.com/google/renameio/BUILD.bazel +++ /dev/null @@ -1,13 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "tempfile.go", - "writefile.go", - ], - importmap = "kubevirt.io/kubevirt/vendor/github.com/google/renameio", - importpath = "github.com/google/renameio", - visibility = ["//visibility:public"], -) diff --git a/vendor/github.com/google/uuid/BUILD.bazel b/vendor/github.com/google/uuid/BUILD.bazel deleted file mode 100644 index b5b7490d4934..000000000000 --- a/vendor/github.com/google/uuid/BUILD.bazel +++ /dev/null @@ -1,24 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "dce.go", - "doc.go", - "hash.go", - "marshal.go", - "node.go", - "node_js.go", - "node_net.go", - "null.go", - "sql.go", - "time.go", - "util.go", - "uuid.go", - "version1.go", - "version4.go", - ], - importmap = "kubevirt.io/kubevirt/vendor/github.com/google/uuid", - importpath = "github.com/google/uuid", - visibility = ["//visibility:public"], -) diff --git a/vendor/github.com/googleapis/gnostic/compiler/BUILD.bazel b/vendor/github.com/googleapis/gnostic/compiler/BUILD.bazel deleted file mode 100644 index 4ad2a9f6181d..000000000000 --- a/vendor/github.com/googleapis/gnostic/compiler/BUILD.bazel +++ /dev/null @@ -1,23 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "context.go", - "error.go", - "extensions.go", - "helpers.go", - "main.go", - "reader.go", - ], - importmap = "kubevirt.io/kubevirt/vendor/github.com/googleapis/gnostic/compiler", - importpath = "github.com/googleapis/gnostic/compiler", - visibility = ["//visibility:public"], - deps = [ - "//vendor/github.com/golang/protobuf/proto:go_default_library", - "//vendor/github.com/golang/protobuf/ptypes/any:go_default_library", - "//vendor/github.com/googleapis/gnostic/extensions:go_default_library", - "//vendor/github.com/googleapis/gnostic/jsonschema:go_default_library", - "//vendor/gopkg.in/yaml.v3:go_default_library", - ], -) diff --git a/vendor/github.com/googleapis/gnostic/extensions/BUILD.bazel b/vendor/github.com/googleapis/gnostic/extensions/BUILD.bazel deleted file mode 100644 index 659f018eddc7..000000000000 --- a/vendor/github.com/googleapis/gnostic/extensions/BUILD.bazel +++ /dev/null @@ -1,19 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "extension.pb.go", - "extensions.go", - ], - importmap = "kubevirt.io/kubevirt/vendor/github.com/googleapis/gnostic/extensions", - importpath = "github.com/googleapis/gnostic/extensions", - visibility = ["//visibility:public"], - deps = [ - "//vendor/github.com/golang/protobuf/proto:go_default_library", - "//vendor/github.com/golang/protobuf/ptypes:go_default_library", - "//vendor/google.golang.org/protobuf/reflect/protoreflect:go_default_library", - "//vendor/google.golang.org/protobuf/runtime/protoimpl:go_default_library", - "//vendor/google.golang.org/protobuf/types/known/anypb:go_default_library", - ], -) diff --git a/vendor/github.com/googleapis/gnostic/jsonschema/BUILD.bazel b/vendor/github.com/googleapis/gnostic/jsonschema/BUILD.bazel deleted file mode 100644 index 25db8596ec0a..000000000000 --- a/vendor/github.com/googleapis/gnostic/jsonschema/BUILD.bazel +++ /dev/null @@ -1,17 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "base.go", - "display.go", - "models.go", - "operations.go", - "reader.go", - "writer.go", - ], - importmap = "kubevirt.io/kubevirt/vendor/github.com/googleapis/gnostic/jsonschema", - importpath = "github.com/googleapis/gnostic/jsonschema", - visibility = ["//visibility:public"], - deps = ["//vendor/gopkg.in/yaml.v3:go_default_library"], -) diff --git a/vendor/github.com/googleapis/gnostic/openapiv2/BUILD.bazel b/vendor/github.com/googleapis/gnostic/openapiv2/BUILD.bazel deleted file mode 100644 index ee0e761bb64c..000000000000 --- a/vendor/github.com/googleapis/gnostic/openapiv2/BUILD.bazel +++ /dev/null @@ -1,20 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "OpenAPIv2.go", - "OpenAPIv2.pb.go", - "document.go", - ], - importmap = "kubevirt.io/kubevirt/vendor/github.com/googleapis/gnostic/openapiv2", - importpath = "github.com/googleapis/gnostic/openapiv2", - visibility = ["//visibility:public"], - deps = [ - "//vendor/github.com/googleapis/gnostic/compiler:go_default_library", - "//vendor/google.golang.org/protobuf/reflect/protoreflect:go_default_library", - "//vendor/google.golang.org/protobuf/runtime/protoimpl:go_default_library", - "//vendor/google.golang.org/protobuf/types/known/anypb:go_default_library", - "//vendor/gopkg.in/yaml.v3:go_default_library", - ], -) diff --git a/vendor/github.com/gordonklaus/ineffassign/pkg/ineffassign/BUILD.bazel b/vendor/github.com/gordonklaus/ineffassign/pkg/ineffassign/BUILD.bazel deleted file mode 100644 index a405fe687af2..000000000000 --- a/vendor/github.com/gordonklaus/ineffassign/pkg/ineffassign/BUILD.bazel +++ /dev/null @@ -1,11 +0,0 @@ -# gazelle:ignore -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = ["ineffassign.go"], - importmap = "kubevirt.io/kubevirt/vendor/github.com/gordonklaus/ineffassign/pkg/ineffassign", - importpath = "github.com/gordonklaus/ineffassign/pkg/ineffassign", - visibility = ["//visibility:public"], - deps = ["@org_golang_x_tools//go/analysis:go_default_library"], -) diff --git a/vendor/github.com/gorilla/websocket/BUILD.bazel b/vendor/github.com/gorilla/websocket/BUILD.bazel deleted file mode 100644 index 1da837bb6e98..000000000000 --- a/vendor/github.com/gorilla/websocket/BUILD.bazel +++ /dev/null @@ -1,24 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "client.go", - "compression.go", - "conn.go", - "doc.go", - "join.go", - "json.go", - "mask.go", - "prepared.go", - "proxy.go", - "server.go", - "tls_handshake.go", - "tls_handshake_116.go", - "util.go", - "x_net_proxy.go", - ], - importmap = "kubevirt.io/kubevirt/vendor/github.com/gorilla/websocket", - importpath = "github.com/gorilla/websocket", - visibility = ["//visibility:public"], -) diff --git a/vendor/github.com/imdario/mergo/BUILD.bazel b/vendor/github.com/imdario/mergo/BUILD.bazel deleted file mode 100644 index 5c1c7406d790..000000000000 --- a/vendor/github.com/imdario/mergo/BUILD.bazel +++ /dev/null @@ -1,14 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "map.go", - "merge.go", - "mergo.go", - ], - importmap = "kubevirt.io/kubevirt/vendor/github.com/imdario/mergo", - importpath = "github.com/imdario/mergo", - visibility = ["//visibility:public"], -) diff --git a/vendor/github.com/inconshreveable/mousetrap/BUILD.bazel b/vendor/github.com/inconshreveable/mousetrap/BUILD.bazel deleted file mode 100644 index f27deb81345f..000000000000 --- a/vendor/github.com/inconshreveable/mousetrap/BUILD.bazel +++ /dev/null @@ -1,13 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "trap_others.go", - "trap_windows.go", - "trap_windows_1.4.go", - ], - importmap = "kubevirt.io/kubevirt/vendor/github.com/inconshreveable/mousetrap", - importpath = "github.com/inconshreveable/mousetrap", - visibility = ["//visibility:public"], -) diff --git a/vendor/github.com/insomniacslk/dhcp/dhcpv4/BUILD.bazel b/vendor/github.com/insomniacslk/dhcp/dhcpv4/BUILD.bazel deleted file mode 100644 index 0d092c503556..000000000000 --- a/vendor/github.com/insomniacslk/dhcp/dhcpv4/BUILD.bazel +++ /dev/null @@ -1,37 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "bindtointerface.go", - "defaults.go", - "dhcpv4.go", - "modifiers.go", - "option_generic.go", - "option_ip.go", - "option_ip_address_lease_time.go", - "option_ips.go", - "option_maximum_dhcp_message_size.go", - "option_message_type.go", - "option_misc.go", - "option_parameter_request_list.go", - "option_relay_agent_information.go", - "option_routes.go", - "option_string.go", - "option_strings.go", - "option_subnet_mask.go", - "option_vivc.go", - "options.go", - "types.go", - ], - importmap = "kubevirt.io/kubevirt/vendor/github.com/insomniacslk/dhcp/dhcpv4", - importpath = "github.com/insomniacslk/dhcp/dhcpv4", - visibility = ["//visibility:public"], - deps = [ - "//vendor/github.com/insomniacslk/dhcp/iana:go_default_library", - "//vendor/github.com/insomniacslk/dhcp/interfaces:go_default_library", - "//vendor/github.com/insomniacslk/dhcp/rfc1035label:go_default_library", - "//vendor/github.com/u-root/u-root/pkg/rand:go_default_library", - "//vendor/github.com/u-root/u-root/pkg/uio:go_default_library", - ], -) diff --git a/vendor/github.com/insomniacslk/dhcp/dhcpv6/BUILD.bazel b/vendor/github.com/insomniacslk/dhcp/dhcpv6/BUILD.bazel deleted file mode 100644 index b6d811e54795..000000000000 --- a/vendor/github.com/insomniacslk/dhcp/dhcpv6/BUILD.bazel +++ /dev/null @@ -1,54 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "defaults.go", - "dhcpv6.go", - "dhcpv6message.go", - "dhcpv6relay.go", - "duid.go", - "iputils.go", - "modifiers.go", - "option_4rd.go", - "option_archtype.go", - "option_bootfileparam.go", - "option_bootfileurl.go", - "option_clientid.go", - "option_clientlinklayeraddress.go", - "option_dhcpv4_msg.go", - "option_dhcpv4_o_dhcpv6_server.go", - "option_dns.go", - "option_domainsearchlist.go", - "option_elapsedtime.go", - "option_fqdn.go", - "option_iaaddress.go", - "option_iapd.go", - "option_iaprefix.go", - "option_informationrefreshtime.go", - "option_interfaceid.go", - "option_nii.go", - "option_nontemporaryaddress.go", - "option_relaymsg.go", - "option_remoteid.go", - "option_requestedoption.go", - "option_serverid.go", - "option_statuscode.go", - "option_temporaryaddress.go", - "option_userclass.go", - "option_vendor_opts.go", - "option_vendorclass.go", - "options.go", - "types.go", - ], - importmap = "kubevirt.io/kubevirt/vendor/github.com/insomniacslk/dhcp/dhcpv6", - importpath = "github.com/insomniacslk/dhcp/dhcpv6", - visibility = ["//visibility:public"], - deps = [ - "//vendor/github.com/insomniacslk/dhcp/dhcpv4:go_default_library", - "//vendor/github.com/insomniacslk/dhcp/iana:go_default_library", - "//vendor/github.com/insomniacslk/dhcp/rfc1035label:go_default_library", - "//vendor/github.com/u-root/u-root/pkg/rand:go_default_library", - "//vendor/github.com/u-root/u-root/pkg/uio:go_default_library", - ], -) diff --git a/vendor/github.com/insomniacslk/dhcp/dhcpv6/server6/BUILD.bazel b/vendor/github.com/insomniacslk/dhcp/dhcpv6/server6/BUILD.bazel deleted file mode 100644 index 8ca4edd7adb4..000000000000 --- a/vendor/github.com/insomniacslk/dhcp/dhcpv6/server6/BUILD.bazel +++ /dev/null @@ -1,19 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "conn.go", - "logger.go", - "server.go", - ], - importmap = "kubevirt.io/kubevirt/vendor/github.com/insomniacslk/dhcp/dhcpv6/server6", - importpath = "github.com/insomniacslk/dhcp/dhcpv6/server6", - visibility = ["//visibility:public"], - deps = [ - "//vendor/github.com/insomniacslk/dhcp/dhcpv6:go_default_library", - "//vendor/github.com/insomniacslk/dhcp/interfaces:go_default_library", - "//vendor/golang.org/x/net/ipv6:go_default_library", - "//vendor/golang.org/x/sys/unix:go_default_library", - ], -) diff --git a/vendor/github.com/insomniacslk/dhcp/iana/BUILD.bazel b/vendor/github.com/insomniacslk/dhcp/iana/BUILD.bazel deleted file mode 100644 index f5a838287797..000000000000 --- a/vendor/github.com/insomniacslk/dhcp/iana/BUILD.bazel +++ /dev/null @@ -1,15 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "archtype.go", - "hwtypes.go", - "iana.go", - "statuscodes.go", - ], - importmap = "kubevirt.io/kubevirt/vendor/github.com/insomniacslk/dhcp/iana", - importpath = "github.com/insomniacslk/dhcp/iana", - visibility = ["//visibility:public"], - deps = ["//vendor/github.com/u-root/u-root/pkg/uio:go_default_library"], -) diff --git a/vendor/github.com/insomniacslk/dhcp/interfaces/BUILD.bazel b/vendor/github.com/insomniacslk/dhcp/interfaces/BUILD.bazel deleted file mode 100644 index 034ce5bbba51..000000000000 --- a/vendor/github.com/insomniacslk/dhcp/interfaces/BUILD.bazel +++ /dev/null @@ -1,22 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "bindtodevice_bsd.go", - "bindtodevice_linux.go", - "interfaces.go", - ], - importmap = "kubevirt.io/kubevirt/vendor/github.com/insomniacslk/dhcp/interfaces", - importpath = "github.com/insomniacslk/dhcp/interfaces", - visibility = ["//visibility:public"], - deps = select({ - "@io_bazel_rules_go//go/platform:android": [ - "//vendor/golang.org/x/sys/unix:go_default_library", - ], - "@io_bazel_rules_go//go/platform:linux": [ - "//vendor/golang.org/x/sys/unix:go_default_library", - ], - "//conditions:default": [], - }), -) diff --git a/vendor/github.com/insomniacslk/dhcp/rfc1035label/BUILD.bazel b/vendor/github.com/insomniacslk/dhcp/rfc1035label/BUILD.bazel deleted file mode 100644 index 9774a628cc1e..000000000000 --- a/vendor/github.com/insomniacslk/dhcp/rfc1035label/BUILD.bazel +++ /dev/null @@ -1,9 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = ["label.go"], - importmap = "kubevirt.io/kubevirt/vendor/github.com/insomniacslk/dhcp/rfc1035label", - importpath = "github.com/insomniacslk/dhcp/rfc1035label", - visibility = ["//visibility:public"], -) diff --git a/vendor/github.com/josharian/intern/BUILD.bazel b/vendor/github.com/josharian/intern/BUILD.bazel deleted file mode 100644 index 48cca03a7536..000000000000 --- a/vendor/github.com/josharian/intern/BUILD.bazel +++ /dev/null @@ -1,9 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = ["intern.go"], - importmap = "kubevirt.io/kubevirt/vendor/github.com/josharian/intern", - importpath = "github.com/josharian/intern", - visibility = ["//visibility:public"], -) diff --git a/vendor/github.com/json-iterator/go/BUILD.bazel b/vendor/github.com/json-iterator/go/BUILD.bazel deleted file mode 100644 index 3160e23db36c..000000000000 --- a/vendor/github.com/json-iterator/go/BUILD.bazel +++ /dev/null @@ -1,56 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "adapter.go", - "any.go", - "any_array.go", - "any_bool.go", - "any_float.go", - "any_int32.go", - "any_int64.go", - "any_invalid.go", - "any_nil.go", - "any_number.go", - "any_object.go", - "any_str.go", - "any_uint32.go", - "any_uint64.go", - "config.go", - "iter.go", - "iter_array.go", - "iter_float.go", - "iter_int.go", - "iter_object.go", - "iter_skip.go", - "iter_skip_strict.go", - "iter_str.go", - "jsoniter.go", - "pool.go", - "reflect.go", - "reflect_array.go", - "reflect_dynamic.go", - "reflect_extension.go", - "reflect_json_number.go", - "reflect_json_raw_message.go", - "reflect_map.go", - "reflect_marshaler.go", - "reflect_native.go", - "reflect_optional.go", - "reflect_slice.go", - "reflect_struct_decoder.go", - "reflect_struct_encoder.go", - "stream.go", - "stream_float.go", - "stream_int.go", - "stream_str.go", - ], - importmap = "kubevirt.io/kubevirt/vendor/github.com/json-iterator/go", - importpath = "github.com/json-iterator/go", - visibility = ["//visibility:public"], - deps = [ - "//vendor/github.com/modern-go/concurrent:go_default_library", - "//vendor/github.com/modern-go/reflect2:go_default_library", - ], -) diff --git a/vendor/github.com/k8snetworkplumbingwg/network-attachment-definition-client/pkg/apis/k8s.cni.cncf.io/BUILD.bazel b/vendor/github.com/k8snetworkplumbingwg/network-attachment-definition-client/pkg/apis/k8s.cni.cncf.io/BUILD.bazel deleted file mode 100644 index 0aa3f49f399e..000000000000 --- a/vendor/github.com/k8snetworkplumbingwg/network-attachment-definition-client/pkg/apis/k8s.cni.cncf.io/BUILD.bazel +++ /dev/null @@ -1,9 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = ["register.go"], - importmap = "kubevirt.io/kubevirt/vendor/github.com/k8snetworkplumbingwg/network-attachment-definition-client/pkg/apis/k8s.cni.cncf.io", - importpath = "github.com/k8snetworkplumbingwg/network-attachment-definition-client/pkg/apis/k8s.cni.cncf.io", - visibility = ["//visibility:public"], -) diff --git a/vendor/github.com/krolaw/dhcp4/BUILD.bazel b/vendor/github.com/krolaw/dhcp4/BUILD.bazel deleted file mode 100644 index 5757c4d149dd..000000000000 --- a/vendor/github.com/krolaw/dhcp4/BUILD.bazel +++ /dev/null @@ -1,21 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "helpers.go", - "messagetype_string.go", - "opcode_string.go", - "optioncode_string.go", - "packet.go", - "server.go", - "serverif.go", - ], - importmap = "kubevirt.io/kubevirt/vendor/github.com/krolaw/dhcp4", - importpath = "github.com/krolaw/dhcp4", - visibility = ["//visibility:public"], - deps = [ - "//vendor/github.com/krolaw/dhcp4/conn:go_default_library", - "//vendor/golang.org/x/net/ipv4:go_default_library", - ], -) diff --git a/vendor/github.com/krolaw/dhcp4/conn/BUILD.bazel b/vendor/github.com/krolaw/dhcp4/conn/BUILD.bazel deleted file mode 100644 index 0bae45dfa90e..000000000000 --- a/vendor/github.com/krolaw/dhcp4/conn/BUILD.bazel +++ /dev/null @@ -1,13 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "bound_linux.go", - "filter.go", - ], - importmap = "kubevirt.io/kubevirt/vendor/github.com/krolaw/dhcp4/conn", - importpath = "github.com/krolaw/dhcp4/conn", - visibility = ["//visibility:public"], - deps = ["//vendor/golang.org/x/net/ipv4:go_default_library"], -) diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v4/apis/volumesnapshot/v1/BUILD.bazel b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v4/apis/volumesnapshot/v1/BUILD.bazel deleted file mode 100644 index 5d8fa0f5db2f..000000000000 --- a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v4/apis/volumesnapshot/v1/BUILD.bazel +++ /dev/null @@ -1,21 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "register.go", - "types.go", - "zz_generated.deepcopy.go", - ], - importmap = "kubevirt.io/kubevirt/vendor/github.com/kubernetes-csi/external-snapshotter/client/v4/apis/volumesnapshot/v1", - importpath = "github.com/kubernetes-csi/external-snapshotter/client/v4/apis/volumesnapshot/v1", - visibility = ["//visibility:public"], - deps = [ - "//vendor/k8s.io/api/core/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/resource:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - ], -) diff --git a/vendor/github.com/mailru/easyjson/buffer/BUILD.bazel b/vendor/github.com/mailru/easyjson/buffer/BUILD.bazel deleted file mode 100644 index 06a9f90a71ed..000000000000 --- a/vendor/github.com/mailru/easyjson/buffer/BUILD.bazel +++ /dev/null @@ -1,9 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = ["pool.go"], - importmap = "kubevirt.io/kubevirt/vendor/github.com/mailru/easyjson/buffer", - importpath = "github.com/mailru/easyjson/buffer", - visibility = ["//visibility:public"], -) diff --git a/vendor/github.com/mailru/easyjson/jlexer/BUILD.bazel b/vendor/github.com/mailru/easyjson/jlexer/BUILD.bazel deleted file mode 100644 index 525854da2a2d..000000000000 --- a/vendor/github.com/mailru/easyjson/jlexer/BUILD.bazel +++ /dev/null @@ -1,14 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "bytestostr.go", - "error.go", - "lexer.go", - ], - importmap = "kubevirt.io/kubevirt/vendor/github.com/mailru/easyjson/jlexer", - importpath = "github.com/mailru/easyjson/jlexer", - visibility = ["//visibility:public"], - deps = ["//vendor/github.com/josharian/intern:go_default_library"], -) diff --git a/vendor/github.com/mailru/easyjson/jwriter/BUILD.bazel b/vendor/github.com/mailru/easyjson/jwriter/BUILD.bazel deleted file mode 100644 index 976ae73c8342..000000000000 --- a/vendor/github.com/mailru/easyjson/jwriter/BUILD.bazel +++ /dev/null @@ -1,10 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = ["writer.go"], - importmap = "kubevirt.io/kubevirt/vendor/github.com/mailru/easyjson/jwriter", - importpath = "github.com/mailru/easyjson/jwriter", - visibility = ["//visibility:public"], - deps = ["//vendor/github.com/mailru/easyjson/buffer:go_default_library"], -) diff --git a/vendor/github.com/mattn/go-runewidth/BUILD.bazel b/vendor/github.com/mattn/go-runewidth/BUILD.bazel deleted file mode 100644 index 689c9d58a719..000000000000 --- a/vendor/github.com/mattn/go-runewidth/BUILD.bazel +++ /dev/null @@ -1,15 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "runewidth.go", - "runewidth_js.go", - "runewidth_posix.go", - "runewidth_table.go", - "runewidth_windows.go", - ], - importmap = "kubevirt.io/kubevirt/vendor/github.com/mattn/go-runewidth", - importpath = "github.com/mattn/go-runewidth", - visibility = ["//visibility:public"], -) diff --git a/vendor/github.com/matttproud/golang_protobuf_extensions/pbutil/BUILD.bazel b/vendor/github.com/matttproud/golang_protobuf_extensions/pbutil/BUILD.bazel deleted file mode 100644 index 5f5c2678bdad..000000000000 --- a/vendor/github.com/matttproud/golang_protobuf_extensions/pbutil/BUILD.bazel +++ /dev/null @@ -1,14 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "decode.go", - "doc.go", - "encode.go", - ], - importmap = "kubevirt.io/kubevirt/vendor/github.com/matttproud/golang_protobuf_extensions/pbutil", - importpath = "github.com/matttproud/golang_protobuf_extensions/pbutil", - visibility = ["//visibility:public"], - deps = ["//vendor/github.com/golang/protobuf/proto:go_default_library"], -) diff --git a/vendor/github.com/mitchellh/go-ps/BUILD.bazel b/vendor/github.com/mitchellh/go-ps/BUILD.bazel deleted file mode 100644 index 9e24fb5e23f4..000000000000 --- a/vendor/github.com/mitchellh/go-ps/BUILD.bazel +++ /dev/null @@ -1,17 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "process.go", - "process_darwin.go", - "process_freebsd.go", - "process_linux.go", - "process_solaris.go", - "process_unix.go", - "process_windows.go", - ], - importmap = "kubevirt.io/kubevirt/vendor/github.com/mitchellh/go-ps", - importpath = "github.com/mitchellh/go-ps", - visibility = ["//visibility:public"], -) diff --git a/vendor/github.com/mitchellh/go-vnc/BUILD.bazel b/vendor/github.com/mitchellh/go-vnc/BUILD.bazel deleted file mode 100644 index aab165e7e69d..000000000000 --- a/vendor/github.com/mitchellh/go-vnc/BUILD.bazel +++ /dev/null @@ -1,17 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "client.go", - "client_auth.go", - "color.go", - "encoding.go", - "pixel_format.go", - "pointer.go", - "server_messages.go", - ], - importmap = "kubevirt.io/kubevirt/vendor/github.com/mitchellh/go-vnc", - importpath = "github.com/mitchellh/go-vnc", - visibility = ["//visibility:public"], -) diff --git a/vendor/github.com/mitchellh/mapstructure/BUILD.bazel b/vendor/github.com/mitchellh/mapstructure/BUILD.bazel deleted file mode 100644 index 80bf68b60573..000000000000 --- a/vendor/github.com/mitchellh/mapstructure/BUILD.bazel +++ /dev/null @@ -1,13 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "decode_hooks.go", - "error.go", - "mapstructure.go", - ], - importmap = "kubevirt.io/kubevirt/vendor/github.com/mitchellh/mapstructure", - importpath = "github.com/mitchellh/mapstructure", - visibility = ["//visibility:public"], -) diff --git a/vendor/github.com/moby/spdystream/BUILD.bazel b/vendor/github.com/moby/spdystream/BUILD.bazel deleted file mode 100644 index d26e9072efc3..000000000000 --- a/vendor/github.com/moby/spdystream/BUILD.bazel +++ /dev/null @@ -1,16 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "connection.go", - "handlers.go", - "priority.go", - "stream.go", - "utils.go", - ], - importmap = "kubevirt.io/kubevirt/vendor/github.com/moby/spdystream", - importpath = "github.com/moby/spdystream", - visibility = ["//visibility:public"], - deps = ["//vendor/github.com/moby/spdystream/spdy:go_default_library"], -) diff --git a/vendor/github.com/moby/spdystream/spdy/BUILD.bazel b/vendor/github.com/moby/spdystream/spdy/BUILD.bazel deleted file mode 100644 index f65271e5ab4d..000000000000 --- a/vendor/github.com/moby/spdystream/spdy/BUILD.bazel +++ /dev/null @@ -1,14 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "dictionary.go", - "read.go", - "types.go", - "write.go", - ], - importmap = "kubevirt.io/kubevirt/vendor/github.com/moby/spdystream/spdy", - importpath = "github.com/moby/spdystream/spdy", - visibility = ["//visibility:public"], -) diff --git a/vendor/github.com/moby/sys/mountinfo/BUILD.bazel b/vendor/github.com/moby/sys/mountinfo/BUILD.bazel deleted file mode 100644 index 06844d1b817b..000000000000 --- a/vendor/github.com/moby/sys/mountinfo/BUILD.bazel +++ /dev/null @@ -1,35 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "mounted_linux.go", - "mounted_unix.go", - "mountinfo.go", - "mountinfo_bsd.go", - "mountinfo_filters.go", - "mountinfo_linux.go", - "mountinfo_unsupported.go", - "mountinfo_windows.go", - ], - cgo = True, - importmap = "kubevirt.io/kubevirt/vendor/github.com/moby/sys/mountinfo", - importpath = "github.com/moby/sys/mountinfo", - visibility = ["//visibility:public"], - deps = select({ - "@io_bazel_rules_go//go/platform:android": [ - "//vendor/golang.org/x/sys/unix:go_default_library", - ], - "@io_bazel_rules_go//go/platform:freebsd": [ - "//vendor/golang.org/x/sys/unix:go_default_library", - ], - "@io_bazel_rules_go//go/platform:linux": [ - "//vendor/golang.org/x/sys/unix:go_default_library", - ], - "@io_bazel_rules_go//go/platform:openbsd": [ - "//vendor/golang.org/x/sys/unix:go_default_library", - ], - "//conditions:default": [], - }), -) diff --git a/vendor/github.com/modern-go/concurrent/BUILD.bazel b/vendor/github.com/modern-go/concurrent/BUILD.bazel deleted file mode 100644 index bba7bde83eb3..000000000000 --- a/vendor/github.com/modern-go/concurrent/BUILD.bazel +++ /dev/null @@ -1,15 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "executor.go", - "go_above_19.go", - "go_below_19.go", - "log.go", - "unbounded_executor.go", - ], - importmap = "kubevirt.io/kubevirt/vendor/github.com/modern-go/concurrent", - importpath = "github.com/modern-go/concurrent", - visibility = ["//visibility:public"], -) diff --git a/vendor/github.com/modern-go/reflect2/BUILD.bazel b/vendor/github.com/modern-go/reflect2/BUILD.bazel deleted file mode 100644 index b65f9612499c..000000000000 --- a/vendor/github.com/modern-go/reflect2/BUILD.bazel +++ /dev/null @@ -1,40 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "go_above_118.go", - "go_above_19.go", - "go_below_118.go", - "reflect2.go", - "reflect2_amd64.s", - "reflect2_kind.go", - "relfect2_386.s", - "relfect2_amd64p32.s", - "relfect2_arm.s", - "relfect2_arm64.s", - "relfect2_mips64x.s", - "relfect2_mipsx.s", - "relfect2_ppc64x.s", - "relfect2_s390x.s", - "safe_field.go", - "safe_map.go", - "safe_slice.go", - "safe_struct.go", - "safe_type.go", - "type_map.go", - "unsafe_array.go", - "unsafe_eface.go", - "unsafe_field.go", - "unsafe_iface.go", - "unsafe_link.go", - "unsafe_map.go", - "unsafe_ptr.go", - "unsafe_slice.go", - "unsafe_struct.go", - "unsafe_type.go", - ], - importmap = "kubevirt.io/kubevirt/vendor/github.com/modern-go/reflect2", - importpath = "github.com/modern-go/reflect2", - visibility = ["//visibility:public"], -) diff --git a/vendor/github.com/oklog/ulid/.gitignore b/vendor/github.com/oklog/ulid/.gitignore new file mode 100644 index 000000000000..c92c4d56084b --- /dev/null +++ b/vendor/github.com/oklog/ulid/.gitignore @@ -0,0 +1,29 @@ +#### joe made this: http://goel.io/joe + +#####=== Go ===##### + +# Compiled Object files, Static and Dynamic libs (Shared Objects) +*.o +*.a +*.so + +# Folders +_obj +_test + +# Architecture specific extensions/prefixes +*.[568vq] +[568vq].out + +*.cgo1.go +*.cgo2.c +_cgo_defun.c +_cgo_gotypes.go +_cgo_export.* + +_testmain.go + +*.exe +*.test +*.prof + diff --git a/vendor/github.com/oklog/ulid/.travis.yml b/vendor/github.com/oklog/ulid/.travis.yml new file mode 100644 index 000000000000..43eb762fa349 --- /dev/null +++ b/vendor/github.com/oklog/ulid/.travis.yml @@ -0,0 +1,16 @@ +language: go +sudo: false +go: + - 1.10.x +install: + - go get -v github.com/golang/lint/golint + - go get golang.org/x/tools/cmd/cover + - go get github.com/mattn/goveralls + - go get -d -t -v ./... + - go build -v ./... +script: + - go vet ./... + - $HOME/gopath/bin/golint . + - go test -v -race ./... + - go test -v -covermode=count -coverprofile=cov.out + - $HOME/gopath/bin/goveralls -coverprofile=cov.out -service=travis-ci -repotoken "$COVERALLS_TOKEN" || true diff --git a/vendor/github.com/oklog/ulid/AUTHORS.md b/vendor/github.com/oklog/ulid/AUTHORS.md new file mode 100644 index 000000000000..95581c78b062 --- /dev/null +++ b/vendor/github.com/oklog/ulid/AUTHORS.md @@ -0,0 +1,2 @@ +- Peter Bourgon (@peterbourgon) +- Tomás Senart (@tsenart) diff --git a/vendor/github.com/oklog/ulid/CHANGELOG.md b/vendor/github.com/oklog/ulid/CHANGELOG.md new file mode 100644 index 000000000000..8da38c6b00d3 --- /dev/null +++ b/vendor/github.com/oklog/ulid/CHANGELOG.md @@ -0,0 +1,33 @@ +## 1.3.1 / 2018-10-02 + +* Use underlying entropy source for random increments in Monotonic (#32) + +## 1.3.0 / 2018-09-29 + +* Monotonic entropy support (#31) + +## 1.2.0 / 2018-09-09 + +* Add a function to convert Unix time in milliseconds back to time.Time (#30) + +## 1.1.0 / 2018-08-15 + +* Ensure random part is always read from the entropy reader in full (#28) + +## 1.0.0 / 2018-07-29 + +* Add ParseStrict and MustParseStrict functions (#26) +* Enforce overflow checking when parsing (#20) + +## 0.3.0 / 2017-01-03 + +* Implement ULID.Compare method + +## 0.2.0 / 2016-12-13 + +* Remove year 2262 Timestamp bug. (#1) +* Gracefully handle invalid encodings when parsing. + +## 0.1.0 / 2016-12-06 + +* First ULID release diff --git a/vendor/github.com/oklog/ulid/CONTRIBUTING.md b/vendor/github.com/oklog/ulid/CONTRIBUTING.md new file mode 100644 index 000000000000..68f03f26eba0 --- /dev/null +++ b/vendor/github.com/oklog/ulid/CONTRIBUTING.md @@ -0,0 +1,17 @@ +# Contributing + +We use GitHub to manage reviews of pull requests. + +* If you have a trivial fix or improvement, go ahead and create a pull + request, addressing (with `@...`) one or more of the maintainers + (see [AUTHORS.md](AUTHORS.md)) in the description of the pull request. + +* If you plan to do something more involved, first propose your ideas + in a Github issue. This will avoid unnecessary work and surely give + you and us a good deal of inspiration. + +* Relevant coding style guidelines are the [Go Code Review + Comments](https://code.google.com/p/go-wiki/wiki/CodeReviewComments) + and the _Formatting and style_ section of Peter Bourgon's [Go: Best + Practices for Production + Environments](http://peter.bourgon.org/go-in-production/#formatting-and-style). diff --git a/vendor/github.com/oklog/ulid/Gopkg.lock b/vendor/github.com/oklog/ulid/Gopkg.lock new file mode 100644 index 000000000000..349b449a6ea6 --- /dev/null +++ b/vendor/github.com/oklog/ulid/Gopkg.lock @@ -0,0 +1,15 @@ +# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'. + + +[[projects]] + branch = "master" + name = "github.com/pborman/getopt" + packages = ["v2"] + revision = "7148bc3a4c3008adfcab60cbebfd0576018f330b" + +[solve-meta] + analyzer-name = "dep" + analyzer-version = 1 + inputs-digest = "6779b05abd5cd429c5393641d2453005a3cb74a400d161b2b5c5d0ca2e10e116" + solver-name = "gps-cdcl" + solver-version = 1 diff --git a/vendor/github.com/oklog/ulid/Gopkg.toml b/vendor/github.com/oklog/ulid/Gopkg.toml new file mode 100644 index 000000000000..624a7a019c70 --- /dev/null +++ b/vendor/github.com/oklog/ulid/Gopkg.toml @@ -0,0 +1,26 @@ + +# Gopkg.toml example +# +# Refer to https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md +# for detailed Gopkg.toml documentation. +# +# required = ["github.com/user/thing/cmd/thing"] +# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"] +# +# [[constraint]] +# name = "github.com/user/project" +# version = "1.0.0" +# +# [[constraint]] +# name = "github.com/user/project2" +# branch = "dev" +# source = "github.com/myfork/project2" +# +# [[override]] +# name = "github.com/x/y" +# version = "2.4.0" + + +[[constraint]] + branch = "master" + name = "github.com/pborman/getopt" diff --git a/vendor/github.com/oklog/ulid/LICENSE b/vendor/github.com/oklog/ulid/LICENSE new file mode 100644 index 000000000000..261eeb9e9f8b --- /dev/null +++ b/vendor/github.com/oklog/ulid/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/vendor/github.com/oklog/ulid/README.md b/vendor/github.com/oklog/ulid/README.md new file mode 100644 index 000000000000..0a3d2f82b255 --- /dev/null +++ b/vendor/github.com/oklog/ulid/README.md @@ -0,0 +1,150 @@ +# Universally Unique Lexicographically Sortable Identifier + +![Project status](https://img.shields.io/badge/version-1.3.0-yellow.svg) +[![Build Status](https://secure.travis-ci.org/oklog/ulid.png)](http://travis-ci.org/oklog/ulid) +[![Go Report Card](https://goreportcard.com/badge/oklog/ulid?cache=0)](https://goreportcard.com/report/oklog/ulid) +[![Coverage Status](https://coveralls.io/repos/github/oklog/ulid/badge.svg?branch=master&cache=0)](https://coveralls.io/github/oklog/ulid?branch=master) +[![GoDoc](https://godoc.org/github.com/oklog/ulid?status.svg)](https://godoc.org/github.com/oklog/ulid) +[![Apache 2 licensed](https://img.shields.io/badge/license-Apache2-blue.svg)](https://raw.githubusercontent.com/oklog/ulid/master/LICENSE) + +A Go port of [alizain/ulid](https://github.com/alizain/ulid) with binary format implemented. + +## Background + +A GUID/UUID can be suboptimal for many use-cases because: + +- It isn't the most character efficient way of encoding 128 bits +- UUID v1/v2 is impractical in many environments, as it requires access to a unique, stable MAC address +- UUID v3/v5 requires a unique seed and produces randomly distributed IDs, which can cause fragmentation in many data structures +- UUID v4 provides no other information than randomness which can cause fragmentation in many data structures + +A ULID however: + +- Is compatible with UUID/GUID's +- 1.21e+24 unique ULIDs per millisecond (1,208,925,819,614,629,174,706,176 to be exact) +- Lexicographically sortable +- Canonically encoded as a 26 character string, as opposed to the 36 character UUID +- Uses Crockford's base32 for better efficiency and readability (5 bits per character) +- Case insensitive +- No special characters (URL safe) +- Monotonic sort order (correctly detects and handles the same millisecond) + +## Install + +```shell +go get github.com/oklog/ulid +``` + +## Usage + +An ULID is constructed with a `time.Time` and an `io.Reader` entropy source. +This design allows for greater flexibility in choosing your trade-offs. + +Please note that `rand.Rand` from the `math` package is *not* safe for concurrent use. +Instantiate one per long living go-routine or use a `sync.Pool` if you want to avoid the potential contention of a locked `rand.Source` as its been frequently observed in the package level functions. + + +```go +func ExampleULID() { + t := time.Unix(1000000, 0) + entropy := ulid.Monotonic(rand.New(rand.NewSource(t.UnixNano())), 0) + fmt.Println(ulid.MustNew(ulid.Timestamp(t), entropy)) + // Output: 0000XSNJG0MQJHBF4QX1EFD6Y3 +} + +``` + +## Specification + +Below is the current specification of ULID as implemented in this repository. + +### Components + +**Timestamp** +- 48 bits +- UNIX-time in milliseconds +- Won't run out of space till the year 10895 AD + +**Entropy** +- 80 bits +- User defined entropy source. +- Monotonicity within the same millisecond with [`ulid.Monotonic`](https://godoc.org/github.com/oklog/ulid#Monotonic) + +### Encoding + +[Crockford's Base32](http://www.crockford.com/wrmg/base32.html) is used as shown. +This alphabet excludes the letters I, L, O, and U to avoid confusion and abuse. + +``` +0123456789ABCDEFGHJKMNPQRSTVWXYZ +``` + +### Binary Layout and Byte Order + +The components are encoded as 16 octets. Each component is encoded with the Most Significant Byte first (network byte order). + +``` +0 1 2 3 + 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 ++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +| 32_bit_uint_time_high | ++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +| 16_bit_uint_time_low | 16_bit_uint_random | ++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +| 32_bit_uint_random | ++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +| 32_bit_uint_random | ++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +``` + +### String Representation + +``` + 01AN4Z07BY 79KA1307SR9X4MV3 +|----------| |----------------| + Timestamp Entropy + 10 chars 16 chars + 48bits 80bits + base32 base32 +``` + +## Test + +```shell +go test ./... +``` + +## Benchmarks + +On a Intel Core i7 Ivy Bridge 2.7 GHz, MacOS 10.12.1 and Go 1.8.0beta1 + +``` +BenchmarkNew/WithCryptoEntropy-8 2000000 771 ns/op 20.73 MB/s 16 B/op 1 allocs/op +BenchmarkNew/WithEntropy-8 20000000 65.8 ns/op 243.01 MB/s 16 B/op 1 allocs/op +BenchmarkNew/WithoutEntropy-8 50000000 30.0 ns/op 534.06 MB/s 16 B/op 1 allocs/op +BenchmarkMustNew/WithCryptoEntropy-8 2000000 781 ns/op 20.48 MB/s 16 B/op 1 allocs/op +BenchmarkMustNew/WithEntropy-8 20000000 70.0 ns/op 228.51 MB/s 16 B/op 1 allocs/op +BenchmarkMustNew/WithoutEntropy-8 50000000 34.6 ns/op 462.98 MB/s 16 B/op 1 allocs/op +BenchmarkParse-8 50000000 30.0 ns/op 866.16 MB/s 0 B/op 0 allocs/op +BenchmarkMustParse-8 50000000 35.2 ns/op 738.94 MB/s 0 B/op 0 allocs/op +BenchmarkString-8 20000000 64.9 ns/op 246.40 MB/s 32 B/op 1 allocs/op +BenchmarkMarshal/Text-8 20000000 55.8 ns/op 286.84 MB/s 32 B/op 1 allocs/op +BenchmarkMarshal/TextTo-8 100000000 22.4 ns/op 714.91 MB/s 0 B/op 0 allocs/op +BenchmarkMarshal/Binary-8 300000000 4.02 ns/op 3981.77 MB/s 0 B/op 0 allocs/op +BenchmarkMarshal/BinaryTo-8 2000000000 1.18 ns/op 13551.75 MB/s 0 B/op 0 allocs/op +BenchmarkUnmarshal/Text-8 100000000 20.5 ns/op 1265.27 MB/s 0 B/op 0 allocs/op +BenchmarkUnmarshal/Binary-8 300000000 4.94 ns/op 3240.01 MB/s 0 B/op 0 allocs/op +BenchmarkNow-8 100000000 15.1 ns/op 528.09 MB/s 0 B/op 0 allocs/op +BenchmarkTimestamp-8 2000000000 0.29 ns/op 27271.59 MB/s 0 B/op 0 allocs/op +BenchmarkTime-8 2000000000 0.58 ns/op 13717.80 MB/s 0 B/op 0 allocs/op +BenchmarkSetTime-8 2000000000 0.89 ns/op 9023.95 MB/s 0 B/op 0 allocs/op +BenchmarkEntropy-8 200000000 7.62 ns/op 1311.66 MB/s 0 B/op 0 allocs/op +BenchmarkSetEntropy-8 2000000000 0.88 ns/op 11376.54 MB/s 0 B/op 0 allocs/op +BenchmarkCompare-8 200000000 7.34 ns/op 4359.23 MB/s 0 B/op 0 allocs/op +``` + +## Prior Art + +- [alizain/ulid](https://github.com/alizain/ulid) +- [RobThree/NUlid](https://github.com/RobThree/NUlid) +- [imdario/go-ulid](https://github.com/imdario/go-ulid) diff --git a/vendor/github.com/oklog/ulid/ulid.go b/vendor/github.com/oklog/ulid/ulid.go new file mode 100644 index 000000000000..c5d0d66fd2a4 --- /dev/null +++ b/vendor/github.com/oklog/ulid/ulid.go @@ -0,0 +1,614 @@ +// Copyright 2016 The Oklog Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package ulid + +import ( + "bufio" + "bytes" + "database/sql/driver" + "encoding/binary" + "errors" + "io" + "math" + "math/bits" + "math/rand" + "time" +) + +/* +An ULID is a 16 byte Universally Unique Lexicographically Sortable Identifier + + The components are encoded as 16 octets. + Each component is encoded with the MSB first (network byte order). + + 0 1 2 3 + 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + | 32_bit_uint_time_high | + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + | 16_bit_uint_time_low | 16_bit_uint_random | + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + | 32_bit_uint_random | + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + | 32_bit_uint_random | + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +*/ +type ULID [16]byte + +var ( + // ErrDataSize is returned when parsing or unmarshaling ULIDs with the wrong + // data size. + ErrDataSize = errors.New("ulid: bad data size when unmarshaling") + + // ErrInvalidCharacters is returned when parsing or unmarshaling ULIDs with + // invalid Base32 encodings. + ErrInvalidCharacters = errors.New("ulid: bad data characters when unmarshaling") + + // ErrBufferSize is returned when marshalling ULIDs to a buffer of insufficient + // size. + ErrBufferSize = errors.New("ulid: bad buffer size when marshaling") + + // ErrBigTime is returned when constructing an ULID with a time that is larger + // than MaxTime. + ErrBigTime = errors.New("ulid: time too big") + + // ErrOverflow is returned when unmarshaling a ULID whose first character is + // larger than 7, thereby exceeding the valid bit depth of 128. + ErrOverflow = errors.New("ulid: overflow when unmarshaling") + + // ErrMonotonicOverflow is returned by a Monotonic entropy source when + // incrementing the previous ULID's entropy bytes would result in overflow. + ErrMonotonicOverflow = errors.New("ulid: monotonic entropy overflow") + + // ErrScanValue is returned when the value passed to scan cannot be unmarshaled + // into the ULID. + ErrScanValue = errors.New("ulid: source value must be a string or byte slice") +) + +// New returns an ULID with the given Unix milliseconds timestamp and an +// optional entropy source. Use the Timestamp function to convert +// a time.Time to Unix milliseconds. +// +// ErrBigTime is returned when passing a timestamp bigger than MaxTime. +// Reading from the entropy source may also return an error. +func New(ms uint64, entropy io.Reader) (id ULID, err error) { + if err = id.SetTime(ms); err != nil { + return id, err + } + + switch e := entropy.(type) { + case nil: + return id, err + case *monotonic: + err = e.MonotonicRead(ms, id[6:]) + default: + _, err = io.ReadFull(e, id[6:]) + } + + return id, err +} + +// MustNew is a convenience function equivalent to New that panics on failure +// instead of returning an error. +func MustNew(ms uint64, entropy io.Reader) ULID { + id, err := New(ms, entropy) + if err != nil { + panic(err) + } + return id +} + +// Parse parses an encoded ULID, returning an error in case of failure. +// +// ErrDataSize is returned if the len(ulid) is different from an encoded +// ULID's length. Invalid encodings produce undefined ULIDs. For a version that +// returns an error instead, see ParseStrict. +func Parse(ulid string) (id ULID, err error) { + return id, parse([]byte(ulid), false, &id) +} + +// ParseStrict parses an encoded ULID, returning an error in case of failure. +// +// It is like Parse, but additionally validates that the parsed ULID consists +// only of valid base32 characters. It is slightly slower than Parse. +// +// ErrDataSize is returned if the len(ulid) is different from an encoded +// ULID's length. Invalid encodings return ErrInvalidCharacters. +func ParseStrict(ulid string) (id ULID, err error) { + return id, parse([]byte(ulid), true, &id) +} + +func parse(v []byte, strict bool, id *ULID) error { + // Check if a base32 encoded ULID is the right length. + if len(v) != EncodedSize { + return ErrDataSize + } + + // Check if all the characters in a base32 encoded ULID are part of the + // expected base32 character set. + if strict && + (dec[v[0]] == 0xFF || + dec[v[1]] == 0xFF || + dec[v[2]] == 0xFF || + dec[v[3]] == 0xFF || + dec[v[4]] == 0xFF || + dec[v[5]] == 0xFF || + dec[v[6]] == 0xFF || + dec[v[7]] == 0xFF || + dec[v[8]] == 0xFF || + dec[v[9]] == 0xFF || + dec[v[10]] == 0xFF || + dec[v[11]] == 0xFF || + dec[v[12]] == 0xFF || + dec[v[13]] == 0xFF || + dec[v[14]] == 0xFF || + dec[v[15]] == 0xFF || + dec[v[16]] == 0xFF || + dec[v[17]] == 0xFF || + dec[v[18]] == 0xFF || + dec[v[19]] == 0xFF || + dec[v[20]] == 0xFF || + dec[v[21]] == 0xFF || + dec[v[22]] == 0xFF || + dec[v[23]] == 0xFF || + dec[v[24]] == 0xFF || + dec[v[25]] == 0xFF) { + return ErrInvalidCharacters + } + + // Check if the first character in a base32 encoded ULID will overflow. This + // happens because the base32 representation encodes 130 bits, while the + // ULID is only 128 bits. + // + // See https://github.com/oklog/ulid/issues/9 for details. + if v[0] > '7' { + return ErrOverflow + } + + // Use an optimized unrolled loop (from https://github.com/RobThree/NUlid) + // to decode a base32 ULID. + + // 6 bytes timestamp (48 bits) + (*id)[0] = ((dec[v[0]] << 5) | dec[v[1]]) + (*id)[1] = ((dec[v[2]] << 3) | (dec[v[3]] >> 2)) + (*id)[2] = ((dec[v[3]] << 6) | (dec[v[4]] << 1) | (dec[v[5]] >> 4)) + (*id)[3] = ((dec[v[5]] << 4) | (dec[v[6]] >> 1)) + (*id)[4] = ((dec[v[6]] << 7) | (dec[v[7]] << 2) | (dec[v[8]] >> 3)) + (*id)[5] = ((dec[v[8]] << 5) | dec[v[9]]) + + // 10 bytes of entropy (80 bits) + (*id)[6] = ((dec[v[10]] << 3) | (dec[v[11]] >> 2)) + (*id)[7] = ((dec[v[11]] << 6) | (dec[v[12]] << 1) | (dec[v[13]] >> 4)) + (*id)[8] = ((dec[v[13]] << 4) | (dec[v[14]] >> 1)) + (*id)[9] = ((dec[v[14]] << 7) | (dec[v[15]] << 2) | (dec[v[16]] >> 3)) + (*id)[10] = ((dec[v[16]] << 5) | dec[v[17]]) + (*id)[11] = ((dec[v[18]] << 3) | dec[v[19]]>>2) + (*id)[12] = ((dec[v[19]] << 6) | (dec[v[20]] << 1) | (dec[v[21]] >> 4)) + (*id)[13] = ((dec[v[21]] << 4) | (dec[v[22]] >> 1)) + (*id)[14] = ((dec[v[22]] << 7) | (dec[v[23]] << 2) | (dec[v[24]] >> 3)) + (*id)[15] = ((dec[v[24]] << 5) | dec[v[25]]) + + return nil +} + +// MustParse is a convenience function equivalent to Parse that panics on failure +// instead of returning an error. +func MustParse(ulid string) ULID { + id, err := Parse(ulid) + if err != nil { + panic(err) + } + return id +} + +// MustParseStrict is a convenience function equivalent to ParseStrict that +// panics on failure instead of returning an error. +func MustParseStrict(ulid string) ULID { + id, err := ParseStrict(ulid) + if err != nil { + panic(err) + } + return id +} + +// String returns a lexicographically sortable string encoded ULID +// (26 characters, non-standard base 32) e.g. 01AN4Z07BY79KA1307SR9X4MV3 +// Format: tttttttttteeeeeeeeeeeeeeee where t is time and e is entropy +func (id ULID) String() string { + ulid := make([]byte, EncodedSize) + _ = id.MarshalTextTo(ulid) + return string(ulid) +} + +// MarshalBinary implements the encoding.BinaryMarshaler interface by +// returning the ULID as a byte slice. +func (id ULID) MarshalBinary() ([]byte, error) { + ulid := make([]byte, len(id)) + return ulid, id.MarshalBinaryTo(ulid) +} + +// MarshalBinaryTo writes the binary encoding of the ULID to the given buffer. +// ErrBufferSize is returned when the len(dst) != 16. +func (id ULID) MarshalBinaryTo(dst []byte) error { + if len(dst) != len(id) { + return ErrBufferSize + } + + copy(dst, id[:]) + return nil +} + +// UnmarshalBinary implements the encoding.BinaryUnmarshaler interface by +// copying the passed data and converting it to an ULID. ErrDataSize is +// returned if the data length is different from ULID length. +func (id *ULID) UnmarshalBinary(data []byte) error { + if len(data) != len(*id) { + return ErrDataSize + } + + copy((*id)[:], data) + return nil +} + +// Encoding is the base 32 encoding alphabet used in ULID strings. +const Encoding = "0123456789ABCDEFGHJKMNPQRSTVWXYZ" + +// MarshalText implements the encoding.TextMarshaler interface by +// returning the string encoded ULID. +func (id ULID) MarshalText() ([]byte, error) { + ulid := make([]byte, EncodedSize) + return ulid, id.MarshalTextTo(ulid) +} + +// MarshalTextTo writes the ULID as a string to the given buffer. +// ErrBufferSize is returned when the len(dst) != 26. +func (id ULID) MarshalTextTo(dst []byte) error { + // Optimized unrolled loop ahead. + // From https://github.com/RobThree/NUlid + + if len(dst) != EncodedSize { + return ErrBufferSize + } + + // 10 byte timestamp + dst[0] = Encoding[(id[0]&224)>>5] + dst[1] = Encoding[id[0]&31] + dst[2] = Encoding[(id[1]&248)>>3] + dst[3] = Encoding[((id[1]&7)<<2)|((id[2]&192)>>6)] + dst[4] = Encoding[(id[2]&62)>>1] + dst[5] = Encoding[((id[2]&1)<<4)|((id[3]&240)>>4)] + dst[6] = Encoding[((id[3]&15)<<1)|((id[4]&128)>>7)] + dst[7] = Encoding[(id[4]&124)>>2] + dst[8] = Encoding[((id[4]&3)<<3)|((id[5]&224)>>5)] + dst[9] = Encoding[id[5]&31] + + // 16 bytes of entropy + dst[10] = Encoding[(id[6]&248)>>3] + dst[11] = Encoding[((id[6]&7)<<2)|((id[7]&192)>>6)] + dst[12] = Encoding[(id[7]&62)>>1] + dst[13] = Encoding[((id[7]&1)<<4)|((id[8]&240)>>4)] + dst[14] = Encoding[((id[8]&15)<<1)|((id[9]&128)>>7)] + dst[15] = Encoding[(id[9]&124)>>2] + dst[16] = Encoding[((id[9]&3)<<3)|((id[10]&224)>>5)] + dst[17] = Encoding[id[10]&31] + dst[18] = Encoding[(id[11]&248)>>3] + dst[19] = Encoding[((id[11]&7)<<2)|((id[12]&192)>>6)] + dst[20] = Encoding[(id[12]&62)>>1] + dst[21] = Encoding[((id[12]&1)<<4)|((id[13]&240)>>4)] + dst[22] = Encoding[((id[13]&15)<<1)|((id[14]&128)>>7)] + dst[23] = Encoding[(id[14]&124)>>2] + dst[24] = Encoding[((id[14]&3)<<3)|((id[15]&224)>>5)] + dst[25] = Encoding[id[15]&31] + + return nil +} + +// Byte to index table for O(1) lookups when unmarshaling. +// We use 0xFF as sentinel value for invalid indexes. +var dec = [...]byte{ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x01, + 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, + 0x0F, 0x10, 0x11, 0xFF, 0x12, 0x13, 0xFF, 0x14, 0x15, 0xFF, + 0x16, 0x17, 0x18, 0x19, 0x1A, 0xFF, 0x1B, 0x1C, 0x1D, 0x1E, + 0x1F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x0A, 0x0B, 0x0C, + 0x0D, 0x0E, 0x0F, 0x10, 0x11, 0xFF, 0x12, 0x13, 0xFF, 0x14, + 0x15, 0xFF, 0x16, 0x17, 0x18, 0x19, 0x1A, 0xFF, 0x1B, 0x1C, + 0x1D, 0x1E, 0x1F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +} + +// EncodedSize is the length of a text encoded ULID. +const EncodedSize = 26 + +// UnmarshalText implements the encoding.TextUnmarshaler interface by +// parsing the data as string encoded ULID. +// +// ErrDataSize is returned if the len(v) is different from an encoded +// ULID's length. Invalid encodings produce undefined ULIDs. +func (id *ULID) UnmarshalText(v []byte) error { + return parse(v, false, id) +} + +// Time returns the Unix time in milliseconds encoded in the ULID. +// Use the top level Time function to convert the returned value to +// a time.Time. +func (id ULID) Time() uint64 { + return uint64(id[5]) | uint64(id[4])<<8 | + uint64(id[3])<<16 | uint64(id[2])<<24 | + uint64(id[1])<<32 | uint64(id[0])<<40 +} + +// maxTime is the maximum Unix time in milliseconds that can be +// represented in an ULID. +var maxTime = ULID{0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}.Time() + +// MaxTime returns the maximum Unix time in milliseconds that +// can be encoded in an ULID. +func MaxTime() uint64 { return maxTime } + +// Now is a convenience function that returns the current +// UTC time in Unix milliseconds. Equivalent to: +// Timestamp(time.Now().UTC()) +func Now() uint64 { return Timestamp(time.Now().UTC()) } + +// Timestamp converts a time.Time to Unix milliseconds. +// +// Because of the way ULID stores time, times from the year +// 10889 produces undefined results. +func Timestamp(t time.Time) uint64 { + return uint64(t.Unix())*1000 + + uint64(t.Nanosecond()/int(time.Millisecond)) +} + +// Time converts Unix milliseconds in the format +// returned by the Timestamp function to a time.Time. +func Time(ms uint64) time.Time { + s := int64(ms / 1e3) + ns := int64((ms % 1e3) * 1e6) + return time.Unix(s, ns) +} + +// SetTime sets the time component of the ULID to the given Unix time +// in milliseconds. +func (id *ULID) SetTime(ms uint64) error { + if ms > maxTime { + return ErrBigTime + } + + (*id)[0] = byte(ms >> 40) + (*id)[1] = byte(ms >> 32) + (*id)[2] = byte(ms >> 24) + (*id)[3] = byte(ms >> 16) + (*id)[4] = byte(ms >> 8) + (*id)[5] = byte(ms) + + return nil +} + +// Entropy returns the entropy from the ULID. +func (id ULID) Entropy() []byte { + e := make([]byte, 10) + copy(e, id[6:]) + return e +} + +// SetEntropy sets the ULID entropy to the passed byte slice. +// ErrDataSize is returned if len(e) != 10. +func (id *ULID) SetEntropy(e []byte) error { + if len(e) != 10 { + return ErrDataSize + } + + copy((*id)[6:], e) + return nil +} + +// Compare returns an integer comparing id and other lexicographically. +// The result will be 0 if id==other, -1 if id < other, and +1 if id > other. +func (id ULID) Compare(other ULID) int { + return bytes.Compare(id[:], other[:]) +} + +// Scan implements the sql.Scanner interface. It supports scanning +// a string or byte slice. +func (id *ULID) Scan(src interface{}) error { + switch x := src.(type) { + case nil: + return nil + case string: + return id.UnmarshalText([]byte(x)) + case []byte: + return id.UnmarshalBinary(x) + } + + return ErrScanValue +} + +// Value implements the sql/driver.Valuer interface. This returns the value +// represented as a byte slice. If instead a string is desirable, a wrapper +// type can be created that calls String(). +// +// // stringValuer wraps a ULID as a string-based driver.Valuer. +// type stringValuer ULID +// +// func (id stringValuer) Value() (driver.Value, error) { +// return ULID(id).String(), nil +// } +// +// // Example usage. +// db.Exec("...", stringValuer(id)) +func (id ULID) Value() (driver.Value, error) { + return id.MarshalBinary() +} + +// Monotonic returns an entropy source that is guaranteed to yield +// strictly increasing entropy bytes for the same ULID timestamp. +// On conflicts, the previous ULID entropy is incremented with a +// random number between 1 and `inc` (inclusive). +// +// The provided entropy source must actually yield random bytes or else +// monotonic reads are not guaranteed to terminate, since there isn't +// enough randomness to compute an increment number. +// +// When `inc == 0`, it'll be set to a secure default of `math.MaxUint32`. +// The lower the value of `inc`, the easier the next ULID within the +// same millisecond is to guess. If your code depends on ULIDs having +// secure entropy bytes, then don't go under this default unless you know +// what you're doing. +// +// The returned io.Reader isn't safe for concurrent use. +func Monotonic(entropy io.Reader, inc uint64) io.Reader { + m := monotonic{ + Reader: bufio.NewReader(entropy), + inc: inc, + } + + if m.inc == 0 { + m.inc = math.MaxUint32 + } + + if rng, ok := entropy.(*rand.Rand); ok { + m.rng = rng + } + + return &m +} + +type monotonic struct { + io.Reader + ms uint64 + inc uint64 + entropy uint80 + rand [8]byte + rng *rand.Rand +} + +func (m *monotonic) MonotonicRead(ms uint64, entropy []byte) (err error) { + if !m.entropy.IsZero() && m.ms == ms { + err = m.increment() + m.entropy.AppendTo(entropy) + } else if _, err = io.ReadFull(m.Reader, entropy); err == nil { + m.ms = ms + m.entropy.SetBytes(entropy) + } + return err +} + +// increment the previous entropy number with a random number +// of up to m.inc (inclusive). +func (m *monotonic) increment() error { + if inc, err := m.random(); err != nil { + return err + } else if m.entropy.Add(inc) { + return ErrMonotonicOverflow + } + return nil +} + +// random returns a uniform random value in [1, m.inc), reading entropy +// from m.Reader. When m.inc == 0 || m.inc == 1, it returns 1. +// Adapted from: https://golang.org/pkg/crypto/rand/#Int +func (m *monotonic) random() (inc uint64, err error) { + if m.inc <= 1 { + return 1, nil + } + + // Fast path for using a underlying rand.Rand directly. + if m.rng != nil { + // Range: [1, m.inc) + return 1 + uint64(m.rng.Int63n(int64(m.inc))), nil + } + + // bitLen is the maximum bit length needed to encode a value < m.inc. + bitLen := bits.Len64(m.inc) + + // byteLen is the maximum byte length needed to encode a value < m.inc. + byteLen := uint(bitLen+7) / 8 + + // msbitLen is the number of bits in the most significant byte of m.inc-1. + msbitLen := uint(bitLen % 8) + if msbitLen == 0 { + msbitLen = 8 + } + + for inc == 0 || inc >= m.inc { + if _, err = io.ReadFull(m.Reader, m.rand[:byteLen]); err != nil { + return 0, err + } + + // Clear bits in the first byte to increase the probability + // that the candidate is < m.inc. + m.rand[0] &= uint8(int(1< 0, used to determine ordering of boot devices. + // Lower values take precedence. + // Each disk or interface that has a boot order must have a unique value. + // Disks without a boot order are not tried if a disk with a boot order exists. + // +optional + BootOrder *uint `json:"bootOrder,omitempty"` + // Serial provides the ability to specify a serial number for the disk device. + // +optional + Serial string `json:"serial,omitempty"` + // dedicatedIOThread indicates this disk should have an exclusive IO Thread. + // Enabling this implies useIOThreads = true. + // Defaults to false. + // +optional + DedicatedIOThread *bool `json:"dedicatedIOThread,omitempty"` + // Cache specifies which kvm disk cache mode should be used. + // Supported values are: CacheNone, CacheWriteThrough. + // +optional + Cache DriverCache `json:"cache,omitempty"` + // IO specifies which QEMU disk IO mode should be used. + // Supported values are: native, default, threads. + // +optional + IO DriverIO `json:"io,omitempty"` + // If specified, disk address and its tag will be provided to the guest via config drive metadata + // +optional + Tag string `json:"tag,omitempty"` + // If specified, the virtual disk will be presented with the given block sizes. + // +optional + BlockSize *BlockSize `json:"blockSize,omitempty"` + // If specified the disk is made sharable and multiple write from different VMs are permitted + // +optional + Shareable *bool `json:"shareable,omitempty"` +} + +// CustomBlockSize represents the desired logical and physical block size for a VM disk. +type CustomBlockSize struct { + Logical uint `json:"logical"` + Physical uint `json:"physical"` +} + +// BlockSize provides the option to change the block size presented to the VM for a disk. +// Only one of its members may be specified. +type BlockSize struct { + Custom *CustomBlockSize `json:"custom,omitempty"` + MatchVolume *FeatureState `json:"matchVolume,omitempty"` +} + +// Represents the target of a volume to mount. +// Only one of its members may be specified. +type DiskDevice struct { + // Attach a volume as a disk to the vmi. + Disk *DiskTarget `json:"disk,omitempty"` + // Attach a volume as a LUN to the vmi. + LUN *LunTarget `json:"lun,omitempty"` + // Attach a volume as a cdrom to the vmi. + CDRom *CDRomTarget `json:"cdrom,omitempty"` +} + +type DiskBus string + +const ( + DiskBusSCSI DiskBus = "scsi" + DiskBusSATA DiskBus = "sata" + DiskBusVirtio DiskBus = "virtio" +) + +type DiskTarget struct { + // Bus indicates the type of disk device to emulate. + // supported values: virtio, sata, scsi. + Bus DiskBus `json:"bus,omitempty"` + // ReadOnly. + // Defaults to false. + ReadOnly bool `json:"readonly,omitempty"` + // If specified, the virtual disk will be placed on the guests pci address with the specified PCI address. For example: 0000:81:01.10 + // +optional + PciAddress string `json:"pciAddress,omitempty"` +} + +type LaunchSecurity struct { + // AMD Secure Encrypted Virtualization (SEV). + SEV *SEV `json:"sev,omitempty"` +} + +type SEV struct { +} + +type LunTarget struct { + // Bus indicates the type of disk device to emulate. + // supported values: virtio, sata, scsi. + Bus DiskBus `json:"bus,omitempty"` + // ReadOnly. + // Defaults to false. + ReadOnly bool `json:"readonly,omitempty"` +} + +// TrayState indicates if a tray of a cdrom is open or closed. +type TrayState string + +const ( + // TrayStateOpen indicates that the tray of a cdrom is open. + TrayStateOpen TrayState = "open" + // TrayStateClosed indicates that the tray of a cdrom is closed. + TrayStateClosed TrayState = "closed" +) + +type CDRomTarget struct { + // Bus indicates the type of disk device to emulate. + // supported values: virtio, sata, scsi. + Bus DiskBus `json:"bus,omitempty"` + // ReadOnly. + // Defaults to true. + ReadOnly *bool `json:"readonly,omitempty"` + // Tray indicates if the tray of the device is open or closed. + // Allowed values are "open" and "closed". + // Defaults to closed. + // +optional + Tray TrayState `json:"tray,omitempty"` +} + +// Volume represents a named volume in a vmi. +type Volume struct { + // Volume's name. + // Must be a DNS_LABEL and unique within the vmi. + // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + Name string `json:"name"` + // VolumeSource represents the location and type of the mounted volume. + // Defaults to Disk, if no type is specified. + VolumeSource `json:",inline"` +} + +// Represents the source of a volume to mount. +// Only one of its members may be specified. +type VolumeSource struct { + // HostDisk represents a disk created on the cluster level + // +optional + HostDisk *HostDisk `json:"hostDisk,omitempty"` + // PersistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace. + // Directly attached to the vmi via qemu. + // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims + // +optional + PersistentVolumeClaim *PersistentVolumeClaimVolumeSource `json:"persistentVolumeClaim,omitempty"` + // CloudInitNoCloud represents a cloud-init NoCloud user-data source. + // The NoCloud data will be added as a disk to the vmi. A proper cloud-init installation is required inside the guest. + // More info: http://cloudinit.readthedocs.io/en/latest/topics/datasources/nocloud.html + // +optional + CloudInitNoCloud *CloudInitNoCloudSource `json:"cloudInitNoCloud,omitempty"` + // CloudInitConfigDrive represents a cloud-init Config Drive user-data source. + // The Config Drive data will be added as a disk to the vmi. A proper cloud-init installation is required inside the guest. + // More info: https://cloudinit.readthedocs.io/en/latest/topics/datasources/configdrive.html + // +optional + CloudInitConfigDrive *CloudInitConfigDriveSource `json:"cloudInitConfigDrive,omitempty"` + // Represents a Sysprep volume source. + // +optional + Sysprep *SysprepSource `json:"sysprep,omitempty"` + // ContainerDisk references a docker image, embedding a qcow or raw disk. + // More info: https://kubevirt.gitbooks.io/user-guide/registry-disk.html + // +optional + ContainerDisk *ContainerDiskSource `json:"containerDisk,omitempty"` + // Ephemeral is a special volume source that "wraps" specified source and provides copy-on-write image on top of it. + // +optional + Ephemeral *EphemeralVolumeSource `json:"ephemeral,omitempty"` + // EmptyDisk represents a temporary disk which shares the vmis lifecycle. + // More info: https://kubevirt.gitbooks.io/user-guide/disks-and-volumes.html + // +optional + EmptyDisk *EmptyDiskSource `json:"emptyDisk,omitempty"` + // DataVolume represents the dynamic creation a PVC for this volume as well as + // the process of populating that PVC with a disk image. + // +optional + DataVolume *DataVolumeSource `json:"dataVolume,omitempty"` + // ConfigMapSource represents a reference to a ConfigMap in the same namespace. + // More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/ + // +optional + ConfigMap *ConfigMapVolumeSource `json:"configMap,omitempty"` + // SecretVolumeSource represents a reference to a secret data in the same namespace. + // More info: https://kubernetes.io/docs/concepts/configuration/secret/ + // +optional + Secret *SecretVolumeSource `json:"secret,omitempty"` + // DownwardAPI represents downward API about the pod that should populate this volume + // +optional + DownwardAPI *DownwardAPIVolumeSource `json:"downwardAPI,omitempty"` + // ServiceAccountVolumeSource represents a reference to a service account. + // There can only be one volume of this type! + // More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ + // +optional + ServiceAccount *ServiceAccountVolumeSource `json:"serviceAccount,omitempty"` + // DownwardMetrics adds a very small disk to VMIs which contains a limited view of host and guest + // metrics. The disk content is compatible with vhostmd (https://github.com/vhostmd/vhostmd) and vm-dump-metrics. + DownwardMetrics *DownwardMetricsVolumeSource `json:"downwardMetrics,omitempty"` +} + +// HotplugVolumeSource Represents the source of a volume to mount which are capable +// of being hotplugged on a live running VMI. +// Only one of its members may be specified. +type HotplugVolumeSource struct { + // PersistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace. + // Directly attached to the vmi via qemu. + // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims + // +optional + PersistentVolumeClaim *PersistentVolumeClaimVolumeSource `json:"persistentVolumeClaim,omitempty"` + // DataVolume represents the dynamic creation a PVC for this volume as well as + // the process of populating that PVC with a disk image. + // +optional + DataVolume *DataVolumeSource `json:"dataVolume,omitempty"` +} + +type DataVolumeSource struct { + // Name represents the name of the DataVolume in the same namespace + Name string `json:"name"` + // Hotpluggable indicates whether the volume can be hotplugged and hotunplugged. + // +optional + Hotpluggable bool `json:"hotpluggable,omitempty"` +} + +// PersistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace. +// Directly attached to the vmi via qemu. +// More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims +type PersistentVolumeClaimVolumeSource struct { + v1.PersistentVolumeClaimVolumeSource `json:",inline"` + // Hotpluggable indicates whether the volume can be hotplugged and hotunplugged. + // +optional + Hotpluggable bool `json:"hotpluggable,omitempty"` +} + +type EphemeralVolumeSource struct { + // PersistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace. + // Directly attached to the vmi via qemu. + // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims + // +optional + PersistentVolumeClaim *v1.PersistentVolumeClaimVolumeSource `json:"persistentVolumeClaim,omitempty"` +} + +// EmptyDisk represents a temporary disk which shares the vmis lifecycle. +type EmptyDiskSource struct { + // Capacity of the sparse disk. + Capacity resource.Quantity `json:"capacity"` +} + +// Represents a docker image with an embedded disk. +type ContainerDiskSource struct { + // Image is the name of the image with the embedded disk. + Image string `json:"image"` + // ImagePullSecret is the name of the Docker registry secret required to pull the image. The secret must already exist. + ImagePullSecret string `json:"imagePullSecret,omitempty"` + // Path defines the path to disk file in the container + Path string `json:"path,omitempty"` + // Image pull policy. + // One of Always, Never, IfNotPresent. + // Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. + // Cannot be updated. + // More info: https://kubernetes.io/docs/concepts/containers/images#updating-images + // +optional + ImagePullPolicy v1.PullPolicy `json:"imagePullPolicy,omitempty"` +} + +// Exactly one of its members must be set. +type ClockOffset struct { + // UTC sets the guest clock to UTC on each boot. If an offset is specified, + // guest changes to the clock will be kept during reboots and are not reset. + UTC *ClockOffsetUTC `json:"utc,omitempty"` + // Timezone sets the guest clock to the specified timezone. + // Zone name follows the TZ environment variable format (e.g. 'America/New_York'). + Timezone *ClockOffsetTimezone `json:"timezone,omitempty"` +} + +// UTC sets the guest clock to UTC on each boot. +type ClockOffsetUTC struct { + // OffsetSeconds specifies an offset in seconds, relative to UTC. If set, + // guest changes to the clock will be kept during reboots and not reset. + OffsetSeconds *int `json:"offsetSeconds,omitempty"` +} + +// ClockOffsetTimezone sets the guest clock to the specified timezone. +// Zone name follows the TZ environment variable format (e.g. 'America/New_York'). +type ClockOffsetTimezone string + +// Represents the clock and timers of a vmi. +// +kubebuilder:pruning:PreserveUnknownFields +type Clock struct { + // ClockOffset allows specifying the UTC offset or the timezone of the guest clock. + ClockOffset `json:",inline"` + // Timer specifies whih timers are attached to the vmi. + // +optional + Timer *Timer `json:"timer"` +} + +// Represents all available timers in a vmi. +type Timer struct { + // HPET (High Precision Event Timer) - multiple timers with periodic interrupts. + HPET *HPETTimer `json:"hpet,omitempty"` + // KVM (KVM clock) - lets guests read the host’s wall clock time (paravirtualized). For linux guests. + KVM *KVMTimer `json:"kvm,omitempty"` + // PIT (Programmable Interval Timer) - a timer with periodic interrupts. + PIT *PITTimer `json:"pit,omitempty"` + // RTC (Real Time Clock) - a continuously running timer with periodic interrupts. + RTC *RTCTimer `json:"rtc,omitempty"` + // Hyperv (Hypervclock) - lets guests read the host’s wall clock time (paravirtualized). For windows guests. + Hyperv *HypervTimer `json:"hyperv,omitempty"` +} + +// HPETTickPolicy determines what happens when QEMU misses a deadline for injecting a tick to the guest. +type HPETTickPolicy string + +// PITTickPolicy determines what happens when QEMU misses a deadline for injecting a tick to the guest. +type PITTickPolicy string + +// RTCTickPolicy determines what happens when QEMU misses a deadline for injecting a tick to the guest. +type RTCTickPolicy string + +const ( + // HPETTickPolicyDelay delivers ticks at a constant rate. The guest time will + // be delayed due to the late tick + HPETTickPolicyDelay HPETTickPolicy = "delay" + // HPETTickPolicyCatchup Delivers ticks at a higher rate to catch up with the + // missed tick. The guest time should not be delayed once catchup is complete + HPETTickPolicyCatchup HPETTickPolicy = "catchup" + // HPETTickPolicyMerge merges the missed tick(s) into one tick and inject. The + // guest time may be delayed, depending on how the OS reacts to the merging + // of ticks. + HPETTickPolicyMerge HPETTickPolicy = "merge" + // HPETTickPolicyDiscard discards all missed ticks. + HPETTickPolicyDiscard HPETTickPolicy = "discard" + + // PITTickPolicyDelay delivers ticks at a constant rate. The guest time will + // be delayed due to the late tick. + PITTickPolicyDelay PITTickPolicy = "delay" + // PITTickPolicyCatchup Delivers ticks at a higher rate to catch up with the + // missed tick. The guest time should not be delayed once catchup is complete. + PITTickPolicyCatchup PITTickPolicy = "catchup" + // PITTickPolicyDiscard discards all missed ticks. + PITTickPolicyDiscard PITTickPolicy = "discard" + + // RTCTickPolicyDelay delivers ticks at a constant rate. The guest time will + // be delayed due to the late tick. + RTCTickPolicyDelay RTCTickPolicy = "delay" + // RTCTickPolicyCatchup Delivers ticks at a higher rate to catch up with the + // missed tick. The guest time should not be delayed once catchup is complete. + RTCTickPolicyCatchup RTCTickPolicy = "catchup" +) + +// RTCTimerTrack specifies from which source to track the time. +type RTCTimerTrack string + +const ( + // TrackGuest tracks the guest time. + TrackGuest RTCTimerTrack = "guest" + // TrackWall tracks the host time. + TrackWall RTCTimerTrack = "wall" +) + +type RTCTimer struct { + // TickPolicy determines what happens when QEMU misses a deadline for injecting a tick to the guest. + // One of "delay", "catchup". + TickPolicy RTCTickPolicy `json:"tickPolicy,omitempty"` + // Enabled set to false makes sure that the machine type or a preset can't add the timer. + // Defaults to true. + // +optional + Enabled *bool `json:"present,omitempty"` + // Track the guest or the wall clock. + Track RTCTimerTrack `json:"track,omitempty"` +} + +type HPETTimer struct { + // TickPolicy determines what happens when QEMU misses a deadline for injecting a tick to the guest. + // One of "delay", "catchup", "merge", "discard". + TickPolicy HPETTickPolicy `json:"tickPolicy,omitempty"` + // Enabled set to false makes sure that the machine type or a preset can't add the timer. + // Defaults to true. + // +optional + Enabled *bool `json:"present,omitempty"` +} + +type PITTimer struct { + // TickPolicy determines what happens when QEMU misses a deadline for injecting a tick to the guest. + // One of "delay", "catchup", "discard". + TickPolicy PITTickPolicy `json:"tickPolicy,omitempty"` + // Enabled set to false makes sure that the machine type or a preset can't add the timer. + // Defaults to true. + // +optional + Enabled *bool `json:"present,omitempty"` +} + +type KVMTimer struct { + // Enabled set to false makes sure that the machine type or a preset can't add the timer. + // Defaults to true. + // +optional + Enabled *bool `json:"present,omitempty"` +} + +type HypervTimer struct { + // Enabled set to false makes sure that the machine type or a preset can't add the timer. + // Defaults to true. + // +optional + Enabled *bool `json:"present,omitempty"` +} + +type Features struct { + // ACPI enables/disables ACPI inside the guest. + // Defaults to enabled. + // +optional + ACPI FeatureState `json:"acpi,omitempty"` + // Defaults to the machine type setting. + // +optional + APIC *FeatureAPIC `json:"apic,omitempty"` + // Defaults to the machine type setting. + // +optional + Hyperv *FeatureHyperv `json:"hyperv,omitempty"` + // SMM enables/disables System Management Mode. + // TSEG not yet implemented. + // +optional + SMM *FeatureState `json:"smm,omitempty"` + // Configure how KVM presence is exposed to the guest. + // +optional + KVM *FeatureKVM `json:"kvm,omitempty"` + // Notify the guest that the host supports paravirtual spinlocks. + // For older kernels this feature should be explicitly disabled. + // +optional + Pvspinlock *FeatureState `json:"pvspinlock,omitempty"` +} + +type SyNICTimer struct { + Enabled *bool `json:"enabled,omitempty"` + Direct *FeatureState `json:"direct,omitempty"` +} + +// Represents if a feature is enabled or disabled. +type FeatureState struct { + // Enabled determines if the feature should be enabled or disabled on the guest. + // Defaults to true. + // +optional + Enabled *bool `json:"enabled,omitempty"` +} + +type FeatureAPIC struct { + // Enabled determines if the feature should be enabled or disabled on the guest. + // Defaults to true. + // +optional + Enabled *bool `json:"enabled,omitempty"` + // EndOfInterrupt enables the end of interrupt notification in the guest. + // Defaults to false. + // +optional + EndOfInterrupt bool `json:"endOfInterrupt,omitempty"` +} + +type FeatureSpinlocks struct { + // Enabled determines if the feature should be enabled or disabled on the guest. + // Defaults to true. + // +optional + Enabled *bool `json:"enabled,omitempty"` + // Retries indicates the number of retries. + // Must be a value greater or equal 4096. + // Defaults to 4096. + // +optional + Retries *uint32 `json:"spinlocks,omitempty"` +} + +type FeatureVendorID struct { + // Enabled determines if the feature should be enabled or disabled on the guest. + // Defaults to true. + // +optional + Enabled *bool `json:"enabled,omitempty"` + // VendorID sets the hypervisor vendor id, visible to the vmi. + // String up to twelve characters. + VendorID string `json:"vendorid,omitempty"` +} + +// Hyperv specific features. +type FeatureHyperv struct { + // Relaxed instructs the guest OS to disable watchdog timeouts. + // Defaults to the machine type setting. + // +optional + Relaxed *FeatureState `json:"relaxed,omitempty"` + // VAPIC improves the paravirtualized handling of interrupts. + // Defaults to the machine type setting. + // +optional + VAPIC *FeatureState `json:"vapic,omitempty"` + // Spinlocks allows to configure the spinlock retry attempts. + // +optional + Spinlocks *FeatureSpinlocks `json:"spinlocks,omitempty"` + // VPIndex enables the Virtual Processor Index to help windows identifying virtual processors. + // Defaults to the machine type setting. + // +optional + VPIndex *FeatureState `json:"vpindex,omitempty"` + // Runtime improves the time accounting to improve scheduling in the guest. + // Defaults to the machine type setting. + // +optional + Runtime *FeatureState `json:"runtime,omitempty"` + // SyNIC enables the Synthetic Interrupt Controller. + // Defaults to the machine type setting. + // +optional + SyNIC *FeatureState `json:"synic,omitempty"` + // SyNICTimer enables Synthetic Interrupt Controller Timers, reducing CPU load. + // Defaults to the machine type setting. + // +optional + SyNICTimer *SyNICTimer `json:"synictimer,omitempty"` + // Reset enables Hyperv reboot/reset for the vmi. Requires synic. + // Defaults to the machine type setting. + // +optional + Reset *FeatureState `json:"reset,omitempty"` + // VendorID allows setting the hypervisor vendor id. + // Defaults to the machine type setting. + // +optional + VendorID *FeatureVendorID `json:"vendorid,omitempty"` + // Frequencies improves the TSC clock source handling for Hyper-V on KVM. + // Defaults to the machine type setting. + // +optional + Frequencies *FeatureState `json:"frequencies,omitempty"` + // Reenlightenment enables the notifications on TSC frequency changes. + // Defaults to the machine type setting. + // +optional + Reenlightenment *FeatureState `json:"reenlightenment,omitempty"` + // TLBFlush improves performances in overcommited environments. Requires vpindex. + // Defaults to the machine type setting. + // +optional + TLBFlush *FeatureState `json:"tlbflush,omitempty"` + // IPI improves performances in overcommited environments. Requires vpindex. + // Defaults to the machine type setting. + // +optional + IPI *FeatureState `json:"ipi,omitempty"` + // EVMCS Speeds up L2 vmexits, but disables other virtualization features. Requires vapic. + // Defaults to the machine type setting. + // +optional + EVMCS *FeatureState `json:"evmcs,omitempty"` +} + +type FeatureKVM struct { + // Hide the KVM hypervisor from standard MSR based discovery. + // Defaults to false + Hidden bool `json:"hidden,omitempty"` +} + +// WatchdogAction defines the watchdog action, if a watchdog gets triggered. +type WatchdogAction string + +const ( + // WatchdogActionPoweroff will poweroff the vmi if the watchdog gets triggered. + WatchdogActionPoweroff WatchdogAction = "poweroff" + // WatchdogActionReset will reset the vmi if the watchdog gets triggered. + WatchdogActionReset WatchdogAction = "reset" + // WatchdogActionShutdown will shutdown the vmi if the watchdog gets triggered. + WatchdogActionShutdown WatchdogAction = "shutdown" +) + +// Named watchdog device. +type Watchdog struct { + // Name of the watchdog. + Name string `json:"name"` + // WatchdogDevice contains the watchdog type and actions. + // Defaults to i6300esb. + WatchdogDevice `json:",inline"` +} + +// Hardware watchdog device. +// Exactly one of its members must be set. +type WatchdogDevice struct { + // i6300esb watchdog device. + // +optional + I6300ESB *I6300ESBWatchdog `json:"i6300esb,omitempty"` +} + +// i6300esb watchdog device. +type I6300ESBWatchdog struct { + // The action to take. Valid values are poweroff, reset, shutdown. + // Defaults to reset. + Action WatchdogAction `json:"action,omitempty"` +} + +type Interface struct { + // Logical name of the interface as well as a reference to the associated networks. + // Must match the Name of a Network. + Name string `json:"name"` + // Interface model. + // One of: e1000, e1000e, ne2k_pci, pcnet, rtl8139, virtio. + // Defaults to virtio. + // TODO:(ihar) switch to enums once opengen-api supports them. See: https://github.com/kubernetes/kube-openapi/issues/51 + Model string `json:"model,omitempty"` + // BindingMethod specifies the method which will be used to connect the interface to the guest. + // Defaults to Bridge. + InterfaceBindingMethod `json:",inline"` + // List of ports to be forwarded to the virtual machine. + Ports []Port `json:"ports,omitempty"` + // Interface MAC address. For example: de:ad:00:00:be:af or DE-AD-00-00-BE-AF. + MacAddress string `json:"macAddress,omitempty"` + // BootOrder is an integer value > 0, used to determine ordering of boot devices. + // Lower values take precedence. + // Each interface or disk that has a boot order must have a unique value. + // Interfaces without a boot order are not tried. + // +optional + BootOrder *uint `json:"bootOrder,omitempty"` + // If specified, the virtual network interface will be placed on the guests pci address with the specified PCI address. For example: 0000:81:01.10 + // +optional + PciAddress string `json:"pciAddress,omitempty"` + // If specified the network interface will pass additional DHCP options to the VMI + // +optional + DHCPOptions *DHCPOptions `json:"dhcpOptions,omitempty"` + // If specified, the virtual network interface address and its tag will be provided to the guest via config drive + // +optional + Tag string `json:"tag,omitempty"` +} + +// Extra DHCP options to use in the interface. +type DHCPOptions struct { + // If specified will pass option 67 to interface's DHCP server + // +optional + BootFileName string `json:"bootFileName,omitempty"` + // If specified will pass option 66 to interface's DHCP server + // +optional + TFTPServerName string `json:"tftpServerName,omitempty"` + // If specified will pass the configured NTP server to the VM via DHCP option 042. + // +optional + NTPServers []string `json:"ntpServers,omitempty"` + // If specified will pass extra DHCP options for private use, range: 224-254 + // +optional + PrivateOptions []DHCPPrivateOptions `json:"privateOptions,omitempty"` +} + +func (d *DHCPOptions) UnmarshalJSON(data []byte) error { + type DHCPOptionsAlias DHCPOptions + var dhcpOptionsAlias DHCPOptionsAlias + + if err := json.Unmarshal(data, &dhcpOptionsAlias); err != nil { + return err + } + + for i, ntpServer := range dhcpOptionsAlias.NTPServers { + if sanitizedIP, err := sanitizeIP(ntpServer); err == nil { + dhcpOptionsAlias.NTPServers[i] = sanitizedIP + } + } + + *d = DHCPOptions(dhcpOptionsAlias) + return nil +} + +// DHCPExtraOptions defines Extra DHCP options for a VM. +type DHCPPrivateOptions struct { + // Option is an Integer value from 224-254 + // Required. + Option int `json:"option"` + // Value is a String value for the Option provided + // Required. + Value string `json:"value"` +} + +// Represents the method which will be used to connect the interface to the guest. +// Only one of its members may be specified. +type InterfaceBindingMethod struct { + Bridge *InterfaceBridge `json:"bridge,omitempty"` + Slirp *InterfaceSlirp `json:"slirp,omitempty"` + Masquerade *InterfaceMasquerade `json:"masquerade,omitempty"` + SRIOV *InterfaceSRIOV `json:"sriov,omitempty"` + Macvtap *InterfaceMacvtap `json:"macvtap,omitempty"` +} + +// InterfaceBridge connects to a given network via a linux bridge. +type InterfaceBridge struct{} + +// InterfaceSlirp connects to a given network using QEMU user networking mode. +type InterfaceSlirp struct{} + +// InterfaceMasquerade connects to a given network using netfilter rules to nat the traffic. +type InterfaceMasquerade struct{} + +// InterfaceSRIOV connects to a given network by passing-through an SR-IOV PCI device via vfio. +type InterfaceSRIOV struct{} + +// InterfaceMacvtap connects to a given network by extending the Kubernetes node's L2 networks via a macvtap interface. +type InterfaceMacvtap struct{} + +// Port represents a port to expose from the virtual machine. +// Default protocol TCP. +// The port field is mandatory +type Port struct { + // If specified, this must be an IANA_SVC_NAME and unique within the pod. Each + // named port in a pod must have a unique name. Name for the port that can be + // referred to by services. + // +optional + Name string `json:"name,omitempty"` + // Protocol for port. Must be UDP or TCP. + // Defaults to "TCP". + // +optional + Protocol string `json:"protocol,omitempty"` + // Number of port to expose for the virtual machine. + // This must be a valid port number, 0 < x < 65536. + Port int32 `json:"port"` +} + +type AccessCredentialSecretSource struct { + // SecretName represents the name of the secret in the VMI's namespace + SecretName string `json:"secretName"` +} + +type ConfigDriveSSHPublicKeyAccessCredentialPropagation struct{} + +// AuthorizedKeysFile represents a path within the guest +// that ssh public keys should be propagated to +type AuthorizedKeysFile struct { + // FilePath represents the place on the guest that the authorized_keys + // file should be writen to. This is expected to be a full path including + // both the base directory and file name. + FilePath string `json:"filePath"` +} + +type QemuGuestAgentUserPasswordAccessCredentialPropagation struct{} + +type QemuGuestAgentSSHPublicKeyAccessCredentialPropagation struct { + // Users represents a list of guest users that should have the ssh public keys + // added to their authorized_keys file. + // +listType=set + Users []string `json:"users"` +} + +// SSHPublicKeyAccessCredentialSource represents where to retrieve the ssh key +// credentials +// Only one of its members may be specified. +type SSHPublicKeyAccessCredentialSource struct { + // Secret means that the access credential is pulled from a kubernetes secret + // +optional + Secret *AccessCredentialSecretSource `json:"secret,omitempty"` +} + +// SSHPublicKeyAccessCredentialPropagationMethod represents the method used to +// inject a ssh public key into the vm guest. +// Only one of its members may be specified. +type SSHPublicKeyAccessCredentialPropagationMethod struct { + // ConfigDrivePropagation means that the ssh public keys are injected + // into the VM using metadata using the configDrive cloud-init provider + // +optional + ConfigDrive *ConfigDriveSSHPublicKeyAccessCredentialPropagation `json:"configDrive,omitempty"` + + // QemuGuestAgentAccessCredentailPropagation means ssh public keys are + // dynamically injected into the vm at runtime via the qemu guest agent. + // This feature requires the qemu guest agent to be running within the guest. + // +optional + QemuGuestAgent *QemuGuestAgentSSHPublicKeyAccessCredentialPropagation `json:"qemuGuestAgent,omitempty"` +} + +// SSHPublicKeyAccessCredential represents a source and propagation method for +// injecting ssh public keys into a vm guest +type SSHPublicKeyAccessCredential struct { + // Source represents where the public keys are pulled from + Source SSHPublicKeyAccessCredentialSource `json:"source"` + + // PropagationMethod represents how the public key is injected into the vm guest. + PropagationMethod SSHPublicKeyAccessCredentialPropagationMethod `json:"propagationMethod"` +} + +// UserPasswordAccessCredentialSource represents where to retrieve the user password +// credentials +// Only one of its members may be specified. +type UserPasswordAccessCredentialSource struct { + // Secret means that the access credential is pulled from a kubernetes secret + // +optional + Secret *AccessCredentialSecretSource `json:"secret,omitempty"` +} + +// UserPasswordAccessCredentialPropagationMethod represents the method used to +// inject a user passwords into the vm guest. +// Only one of its members may be specified. +type UserPasswordAccessCredentialPropagationMethod struct { + // QemuGuestAgentAccessCredentailPropagation means passwords are + // dynamically injected into the vm at runtime via the qemu guest agent. + // This feature requires the qemu guest agent to be running within the guest. + // +optional + QemuGuestAgent *QemuGuestAgentUserPasswordAccessCredentialPropagation `json:"qemuGuestAgent,omitempty"` +} + +// UserPasswordAccessCredential represents a source and propagation method for +// injecting user passwords into a vm guest +// Only one of its members may be specified. +type UserPasswordAccessCredential struct { + // Source represents where the user passwords are pulled from + Source UserPasswordAccessCredentialSource `json:"source"` + + // propagationMethod represents how the user passwords are injected into the vm guest. + PropagationMethod UserPasswordAccessCredentialPropagationMethod `json:"propagationMethod"` +} + +// AccessCredential represents a credential source that can be used to +// authorize remote access to the vm guest +// Only one of its members may be specified. +type AccessCredential struct { + // SSHPublicKey represents the source and method of applying a ssh public + // key into a guest virtual machine. + // +optional + SSHPublicKey *SSHPublicKeyAccessCredential `json:"sshPublicKey,omitempty"` + // UserPassword represents the source and method for applying a guest user's + // password + // +optional + UserPassword *UserPasswordAccessCredential `json:"userPassword,omitempty"` +} + +// Network represents a network type and a resource that should be connected to the vm. +type Network struct { + // Network name. + // Must be a DNS_LABEL and unique within the vm. + // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + Name string `json:"name"` + // NetworkSource represents the network type and the source interface that should be connected to the virtual machine. + // Defaults to Pod, if no type is specified. + NetworkSource `json:",inline"` +} + +// Represents the source resource that will be connected to the vm. +// Only one of its members may be specified. +type NetworkSource struct { + Pod *PodNetwork `json:"pod,omitempty"` + Multus *MultusNetwork `json:"multus,omitempty"` +} + +// Represents the stock pod network interface. +type PodNetwork struct { + // CIDR for vm network. + // Default 10.0.2.0/24 if not specified. + VMNetworkCIDR string `json:"vmNetworkCIDR,omitempty"` + + // IPv6 CIDR for the vm network. + // Defaults to fd10:0:2::/120 if not specified. + VMIPv6NetworkCIDR string `json:"vmIPv6NetworkCIDR,omitempty"` +} + +func (podNet *PodNetwork) UnmarshalJSON(data []byte) error { + type PodNetworkAlias PodNetwork + var podNetAlias PodNetworkAlias + + if err := json.Unmarshal(data, &podNetAlias); err != nil { + return err + } + + if sanitizedCIDR, err := sanitizeCIDR(podNetAlias.VMNetworkCIDR); err == nil { + podNetAlias.VMNetworkCIDR = sanitizedCIDR + } + + *podNet = PodNetwork(podNetAlias) + return nil +} + +// Rng represents the random device passed from host +type Rng struct { +} + +// Represents the multus cni network. +type MultusNetwork struct { + // References to a NetworkAttachmentDefinition CRD object. Format: + // , /. If namespace is not + // specified, VMI namespace is assumed. + NetworkName string `json:"networkName"` + + // Select the default network and add it to the + // multus-cni.io/default-network annotation. + Default bool `json:"default,omitempty"` +} diff --git a/vendor/kubevirt.io/api/core/v1/schema_swagger_generated.go b/vendor/kubevirt.io/api/core/v1/schema_swagger_generated.go new file mode 100644 index 000000000000..76829720a7d7 --- /dev/null +++ b/vendor/kubevirt.io/api/core/v1/schema_swagger_generated.go @@ -0,0 +1,800 @@ +// Code generated by swagger-doc. DO NOT EDIT. + +package v1 + +func (HostDisk) SwaggerDoc() map[string]string { + return map[string]string{ + "": "Represents a disk created on the cluster level", + "path": "The path to HostDisk image located on the cluster", + "type": "Contains information if disk.img exists or should be created\nallowed options are 'Disk' and 'DiskOrCreate'", + "capacity": "Capacity of the sparse disk\n+optional", + "shared": "Shared indicate whether the path is shared between nodes", + } +} + +func (ConfigMapVolumeSource) SwaggerDoc() map[string]string { + return map[string]string{ + "": "ConfigMapVolumeSource adapts a ConfigMap into a volume.\nMore info: https://kubernetes.io/docs/concepts/storage/volumes/#configmap", + "optional": "Specify whether the ConfigMap or it's keys must be defined\n+optional", + "volumeLabel": "The volume label of the resulting disk inside the VMI.\nDifferent bootstrapping mechanisms require different values.\nTypical values are \"cidata\" (cloud-init), \"config-2\" (cloud-init) or \"OEMDRV\" (kickstart).\n+optional", + } +} + +func (SecretVolumeSource) SwaggerDoc() map[string]string { + return map[string]string{ + "": "SecretVolumeSource adapts a Secret into a volume.", + "secretName": "Name of the secret in the pod's namespace to use.\nMore info: https://kubernetes.io/docs/concepts/storage/volumes#secret\n+optional", + "optional": "Specify whether the Secret or it's keys must be defined\n+optional", + "volumeLabel": "The volume label of the resulting disk inside the VMI.\nDifferent bootstrapping mechanisms require different values.\nTypical values are \"cidata\" (cloud-init), \"config-2\" (cloud-init) or \"OEMDRV\" (kickstart).\n+optional", + } +} + +func (DownwardAPIVolumeSource) SwaggerDoc() map[string]string { + return map[string]string{ + "": "DownwardAPIVolumeSource represents a volume containing downward API info.", + "fields": "Fields is a list of downward API volume file\n+optional", + "volumeLabel": "The volume label of the resulting disk inside the VMI.\nDifferent bootstrapping mechanisms require different values.\nTypical values are \"cidata\" (cloud-init), \"config-2\" (cloud-init) or \"OEMDRV\" (kickstart).\n+optional", + } +} + +func (ServiceAccountVolumeSource) SwaggerDoc() map[string]string { + return map[string]string{ + "": "ServiceAccountVolumeSource adapts a ServiceAccount into a volume.", + "serviceAccountName": "Name of the service account in the pod's namespace to use.\nMore info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/", + } +} + +func (DownwardMetricsVolumeSource) SwaggerDoc() map[string]string { + return map[string]string{ + "": "DownwardMetricsVolumeSource adds a very small disk to VMIs which contains a limited view of host and guest\nmetrics. The disk content is compatible with vhostmd (https://github.com/vhostmd/vhostmd) and vm-dump-metrics.", + } +} + +func (SysprepSource) SwaggerDoc() map[string]string { + return map[string]string{ + "": "Represents a Sysprep volume source.", + "secret": "Secret references a k8s Secret that contains Sysprep answer file named autounattend.xml that should be attached as disk of CDROM type.\n+ optional", + "configMap": "ConfigMap references a ConfigMap that contains Sysprep answer file named autounattend.xml that should be attached as disk of CDROM type.\n+ optional", + } +} + +func (CloudInitNoCloudSource) SwaggerDoc() map[string]string { + return map[string]string{ + "": "Represents a cloud-init nocloud user data source.\nMore info: http://cloudinit.readthedocs.io/en/latest/topics/datasources/nocloud.html", + "secretRef": "UserDataSecretRef references a k8s secret that contains NoCloud userdata.\n+ optional", + "userDataBase64": "UserDataBase64 contains NoCloud cloud-init userdata as a base64 encoded string.\n+ optional", + "userData": "UserData contains NoCloud inline cloud-init userdata.\n+ optional", + "networkDataSecretRef": "NetworkDataSecretRef references a k8s secret that contains NoCloud networkdata.\n+ optional", + "networkDataBase64": "NetworkDataBase64 contains NoCloud cloud-init networkdata as a base64 encoded string.\n+ optional", + "networkData": "NetworkData contains NoCloud inline cloud-init networkdata.\n+ optional", + } +} + +func (CloudInitConfigDriveSource) SwaggerDoc() map[string]string { + return map[string]string{ + "": "Represents a cloud-init config drive user data source.\nMore info: https://cloudinit.readthedocs.io/en/latest/topics/datasources/configdrive.html", + "secretRef": "UserDataSecretRef references a k8s secret that contains config drive userdata.\n+ optional", + "userDataBase64": "UserDataBase64 contains config drive cloud-init userdata as a base64 encoded string.\n+ optional", + "userData": "UserData contains config drive inline cloud-init userdata.\n+ optional", + "networkDataSecretRef": "NetworkDataSecretRef references a k8s secret that contains config drive networkdata.\n+ optional", + "networkDataBase64": "NetworkDataBase64 contains config drive cloud-init networkdata as a base64 encoded string.\n+ optional", + "networkData": "NetworkData contains config drive inline cloud-init networkdata.\n+ optional", + } +} + +func (DomainSpec) SwaggerDoc() map[string]string { + return map[string]string{ + "resources": "Resources describes the Compute Resources required by this vmi.", + "cpu": "CPU allow specified the detailed CPU topology inside the vmi.\n+optional", + "memory": "Memory allow specifying the VMI memory features.\n+optional", + "machine": "Machine type.\n+optional", + "firmware": "Firmware.\n+optional", + "clock": "Clock sets the clock and timers of the vmi.\n+optional", + "features": "Features like acpi, apic, hyperv, smm.\n+optional", + "devices": "Devices allows adding disks, network interfaces, and others", + "ioThreadsPolicy": "Controls whether or not disks will share IOThreads.\nOmitting IOThreadsPolicy disables use of IOThreads.\nOne of: shared, auto\n+optional", + "chassis": "Chassis specifies the chassis info passed to the domain.\n+optional", + "launchSecurity": "Launch Security setting of the vmi.\n+optional", + } +} + +func (Chassis) SwaggerDoc() map[string]string { + return map[string]string{ + "": "Chassis specifies the chassis info passed to the domain.", + } +} + +func (Bootloader) SwaggerDoc() map[string]string { + return map[string]string{ + "": "Represents the firmware blob used to assist in the domain creation process.\nUsed for setting the QEMU BIOS file path for the libvirt domain.", + "bios": "If set (default), BIOS will be used.\n+optional", + "efi": "If set, EFI will be used instead of BIOS.\n+optional", + } +} + +func (BIOS) SwaggerDoc() map[string]string { + return map[string]string{ + "": "If set (default), BIOS will be used.", + "useSerial": "If set, the BIOS output will be transmitted over serial\n+optional", + } +} + +func (EFI) SwaggerDoc() map[string]string { + return map[string]string{ + "": "If set, EFI will be used instead of BIOS.", + "secureBoot": "If set, SecureBoot will be enabled and the OVMF roms will be swapped for\nSecureBoot-enabled ones.\nRequires SMM to be enabled.\nDefaults to true\n+optional", + } +} + +func (KernelBootContainer) SwaggerDoc() map[string]string { + return map[string]string{ + "": "If set, the VM will be booted from the defined kernel / initrd.", + "image": "Image that contains initrd / kernel files.", + "imagePullSecret": "ImagePullSecret is the name of the Docker registry secret required to pull the image. The secret must already exist.\n+optional", + "imagePullPolicy": "Image pull policy.\nOne of Always, Never, IfNotPresent.\nDefaults to Always if :latest tag is specified, or IfNotPresent otherwise.\nCannot be updated.\nMore info: https://kubernetes.io/docs/concepts/containers/images#updating-images\n+optional", + "kernelPath": "The fully-qualified path to the kernel image in the host OS\n+optional", + "initrdPath": "the fully-qualified path to the ramdisk image in the host OS\n+optional", + } +} + +func (KernelBoot) SwaggerDoc() map[string]string { + return map[string]string{ + "": "Represents the firmware blob used to assist in the kernel boot process.\nUsed for setting the kernel, initrd and command line arguments", + "kernelArgs": "Arguments to be passed to the kernel at boot time", + "container": "Container defines the container that containes kernel artifacts", + } +} + +func (ResourceRequirements) SwaggerDoc() map[string]string { + return map[string]string{ + "requests": "Requests is a description of the initial vmi resources.\nValid resource keys are \"memory\" and \"cpu\".\n+optional", + "limits": "Limits describes the maximum amount of compute resources allowed.\nValid resource keys are \"memory\" and \"cpu\".\n+optional", + "overcommitGuestOverhead": "Don't ask the scheduler to take the guest-management overhead into account. Instead\nput the overhead only into the container's memory limit. This can lead to crashes if\nall memory is in use on a node. Defaults to false.", + } +} + +func (CPU) SwaggerDoc() map[string]string { + return map[string]string{ + "": "CPU allows specifying the CPU topology.", + "cores": "Cores specifies the number of cores inside the vmi.\nMust be a value greater or equal 1.", + "sockets": "Sockets specifies the number of sockets inside the vmi.\nMust be a value greater or equal 1.", + "threads": "Threads specifies the number of threads inside the vmi.\nMust be a value greater or equal 1.", + "model": "Model specifies the CPU model inside the VMI.\nList of available models https://github.com/libvirt/libvirt/tree/master/src/cpu_map.\nIt is possible to specify special cases like \"host-passthrough\" to get the same CPU as the node\nand \"host-model\" to get CPU closest to the node one.\nDefaults to host-model.\n+optional", + "features": "Features specifies the CPU features list inside the VMI.\n+optional", + "dedicatedCpuPlacement": "DedicatedCPUPlacement requests the scheduler to place the VirtualMachineInstance on a node\nwith enough dedicated pCPUs and pin the vCPUs to it.\n+optional", + "numa": "NUMA allows specifying settings for the guest NUMA topology\n+optional", + "isolateEmulatorThread": "IsolateEmulatorThread requests one more dedicated pCPU to be allocated for the VMI to place\nthe emulator thread on it.\n+optional", + "realtime": "Realtime instructs the virt-launcher to tune the VMI for lower latency, optional for real time workloads\n+optional", + } +} + +func (Realtime) SwaggerDoc() map[string]string { + return map[string]string{ + "": "Realtime holds the tuning knobs specific for realtime workloads.", + "mask": "Mask defines the vcpu mask expression that defines which vcpus are used for realtime. Format matches libvirt's expressions.\nExample: \"0-3,^1\",\"0,2,3\",\"2-3\"\n+optional", + } +} + +func (NUMAGuestMappingPassthrough) SwaggerDoc() map[string]string { + return map[string]string{ + "": "NUMAGuestMappingPassthrough instructs kubevirt to model numa topology which is compatible with the CPU pinning on the guest.\nThis will result in a subset of the node numa topology being passed through, ensuring that virtual numa nodes and their memory\nnever cross boundaries coming from the node numa mapping.", + } +} + +func (NUMA) SwaggerDoc() map[string]string { + return map[string]string{ + "guestMappingPassthrough": "GuestMappingPassthrough will create an efficient guest topology based on host CPUs exclusively assigned to a pod.\nThe created topology ensures that memory and CPUs on the virtual numa nodes never cross boundaries of host numa nodes.\n+opitonal", + } +} + +func (CPUFeature) SwaggerDoc() map[string]string { + return map[string]string{ + "": "CPUFeature allows specifying a CPU feature.", + "name": "Name of the CPU feature", + "policy": "Policy is the CPU feature attribute which can have the following attributes:\nforce - The virtual CPU will claim the feature is supported regardless of it being supported by host CPU.\nrequire - Guest creation will fail unless the feature is supported by the host CPU or the hypervisor is able to emulate it.\noptional - The feature will be supported by virtual CPU if and only if it is supported by host CPU.\ndisable - The feature will not be supported by virtual CPU.\nforbid - Guest creation will fail if the feature is supported by host CPU.\nDefaults to require\n+optional", + } +} + +func (Memory) SwaggerDoc() map[string]string { + return map[string]string{ + "": "Memory allows specifying the VirtualMachineInstance memory features.", + "hugepages": "Hugepages allow to use hugepages for the VirtualMachineInstance instead of regular memory.\n+optional", + "guest": "Guest allows to specifying the amount of memory which is visible inside the Guest OS.\nThe Guest must lie between Requests and Limits from the resources section.\nDefaults to the requested memory in the resources section if not specified.\n+ optional", + } +} + +func (Hugepages) SwaggerDoc() map[string]string { + return map[string]string{ + "": "Hugepages allow to use hugepages for the VirtualMachineInstance instead of regular memory.", + "pageSize": "PageSize specifies the hugepage size, for x86_64 architecture valid values are 1Gi and 2Mi.", + } +} + +func (Machine) SwaggerDoc() map[string]string { + return map[string]string{ + "type": "QEMU machine type is the actual chipset of the VirtualMachineInstance.\n+optional", + } +} + +func (Firmware) SwaggerDoc() map[string]string { + return map[string]string{ + "uuid": "UUID reported by the vmi bios.\nDefaults to a random generated uid.", + "bootloader": "Settings to control the bootloader that is used.\n+optional", + "serial": "The system-serial-number in SMBIOS", + "kernelBoot": "Settings to set the kernel for booting.\n+optional", + } +} + +func (Devices) SwaggerDoc() map[string]string { + return map[string]string{ + "useVirtioTransitional": "Fall back to legacy virtio 0.9 support if virtio bus is selected on devices.\nThis is helpful for old machines like CentOS6 or RHEL6 which\ndo not understand virtio_non_transitional (virtio 1.0).", + "disableHotplug": "DisableHotplug disabled the ability to hotplug disks.", + "disks": "Disks describes disks, cdroms and luns which are connected to the vmi.", + "watchdog": "Watchdog describes a watchdog device which can be added to the vmi.", + "interfaces": "Interfaces describe network interfaces which are added to the vmi.", + "inputs": "Inputs describe input devices", + "autoattachPodInterface": "Whether to attach a pod network interface. Defaults to true.", + "autoattachGraphicsDevice": "Whether to attach the default graphics device or not.\nVNC will not be available if set to false. Defaults to true.", + "autoattachSerialConsole": "Whether to attach the default serial console or not.\nSerial console access will not be available if set to false. Defaults to true.", + "autoattachMemBalloon": "Whether to attach the Memory balloon device with default period.\nPeriod can be adjusted in virt-config.\nDefaults to true.\n+optional", + "rng": "Whether to have random number generator from host\n+optional", + "blockMultiQueue": "Whether or not to enable virtio multi-queue for block devices.\nDefaults to false.\n+optional", + "networkInterfaceMultiqueue": "If specified, virtual network interfaces configured with a virtio bus will also enable the vhost multiqueue feature for network devices. The number of queues created depends on additional factors of the VirtualMachineInstance, like the number of guest CPUs.\n+optional", + "gpus": "Whether to attach a GPU device to the vmi.\n+optional\n+listType=atomic", + "filesystems": "Filesystems describes filesystem which is connected to the vmi.\n+optional\n+listType=atomic", + "hostDevices": "Whether to attach a host device to the vmi.\n+optional\n+listType=atomic", + "clientPassthrough": "To configure and access client devices such as redirecting USB\n+optional", + "sound": "Whether to emulate a sound device.\n+optional", + "tpm": "Whether to emulate a TPM device.\n+optional", + } +} + +func (ClientPassthroughDevices) SwaggerDoc() map[string]string { + return map[string]string{ + "": "Represent a subset of client devices that can be accessed by VMI. At the\nmoment only, USB devices using Usbredir's library and tooling. Another fit\nwould be a smartcard with libcacard.\n\nThe struct is currently empty as there is no immediate request for\nuser-facing APIs. This structure simply turns on USB redirection of\nUsbClientPassthroughMaxNumberOf devices.", + } +} + +func (SoundDevice) SwaggerDoc() map[string]string { + return map[string]string{ + "": "Represents the user's configuration to emulate sound cards in the VMI.", + "name": "User's defined name for this sound device", + "model": "We only support ich9 or ac97.\nIf SoundDevice is not set: No sound card is emulated.\nIf SoundDevice is set but Model is not: ich9\n+optional", + } +} + +func (TPMDevice) SwaggerDoc() map[string]string { + return map[string]string{} +} + +func (Input) SwaggerDoc() map[string]string { + return map[string]string{ + "bus": "Bus indicates the bus of input device to emulate.\nSupported values: virtio, usb.", + "type": "Type indicated the type of input device.\nSupported values: tablet.", + "name": "Name is the device name", + } +} + +func (Filesystem) SwaggerDoc() map[string]string { + return map[string]string{ + "name": "Name is the device name", + "virtiofs": "Virtiofs is supported", + } +} + +func (FilesystemVirtiofs) SwaggerDoc() map[string]string { + return map[string]string{} +} + +func (GPU) SwaggerDoc() map[string]string { + return map[string]string{ + "name": "Name of the GPU device as exposed by a device plugin", + "tag": "If specified, the virtual network interface address and its tag will be provided to the guest via config drive\n+optional", + } +} + +func (VGPUOptions) SwaggerDoc() map[string]string { + return map[string]string{} +} + +func (VGPUDisplayOptions) SwaggerDoc() map[string]string { + return map[string]string{ + "enabled": "Enabled determines if a display addapter backed by a vGPU should be enabled or disabled on the guest.\nDefaults to true.\n+optional", + "ramFB": "Enables a boot framebuffer, until the guest OS loads a real GPU driver\nDefaults to true.\n+optional", + } +} + +func (HostDevice) SwaggerDoc() map[string]string { + return map[string]string{ + "deviceName": "DeviceName is the resource name of the host device exposed by a device plugin", + "tag": "If specified, the virtual network interface address and its tag will be provided to the guest via config drive\n+optional", + } +} + +func (Disk) SwaggerDoc() map[string]string { + return map[string]string{ + "name": "Name is the device name", + "bootOrder": "BootOrder is an integer value > 0, used to determine ordering of boot devices.\nLower values take precedence.\nEach disk or interface that has a boot order must have a unique value.\nDisks without a boot order are not tried if a disk with a boot order exists.\n+optional", + "serial": "Serial provides the ability to specify a serial number for the disk device.\n+optional", + "dedicatedIOThread": "dedicatedIOThread indicates this disk should have an exclusive IO Thread.\nEnabling this implies useIOThreads = true.\nDefaults to false.\n+optional", + "cache": "Cache specifies which kvm disk cache mode should be used.\nSupported values are: CacheNone, CacheWriteThrough.\n+optional", + "io": "IO specifies which QEMU disk IO mode should be used.\nSupported values are: native, default, threads.\n+optional", + "tag": "If specified, disk address and its tag will be provided to the guest via config drive metadata\n+optional", + "blockSize": "If specified, the virtual disk will be presented with the given block sizes.\n+optional", + "shareable": "If specified the disk is made sharable and multiple write from different VMs are permitted\n+optional", + } +} + +func (CustomBlockSize) SwaggerDoc() map[string]string { + return map[string]string{ + "": "CustomBlockSize represents the desired logical and physical block size for a VM disk.", + } +} + +func (BlockSize) SwaggerDoc() map[string]string { + return map[string]string{ + "": "BlockSize provides the option to change the block size presented to the VM for a disk.\nOnly one of its members may be specified.", + } +} + +func (DiskDevice) SwaggerDoc() map[string]string { + return map[string]string{ + "": "Represents the target of a volume to mount.\nOnly one of its members may be specified.", + "disk": "Attach a volume as a disk to the vmi.", + "lun": "Attach a volume as a LUN to the vmi.", + "cdrom": "Attach a volume as a cdrom to the vmi.", + } +} + +func (DiskTarget) SwaggerDoc() map[string]string { + return map[string]string{ + "bus": "Bus indicates the type of disk device to emulate.\nsupported values: virtio, sata, scsi.", + "readonly": "ReadOnly.\nDefaults to false.", + "pciAddress": "If specified, the virtual disk will be placed on the guests pci address with the specified PCI address. For example: 0000:81:01.10\n+optional", + } +} + +func (LaunchSecurity) SwaggerDoc() map[string]string { + return map[string]string{ + "sev": "AMD Secure Encrypted Virtualization (SEV).", + } +} + +func (SEV) SwaggerDoc() map[string]string { + return map[string]string{} +} + +func (LunTarget) SwaggerDoc() map[string]string { + return map[string]string{ + "bus": "Bus indicates the type of disk device to emulate.\nsupported values: virtio, sata, scsi.", + "readonly": "ReadOnly.\nDefaults to false.", + } +} + +func (CDRomTarget) SwaggerDoc() map[string]string { + return map[string]string{ + "bus": "Bus indicates the type of disk device to emulate.\nsupported values: virtio, sata, scsi.", + "readonly": "ReadOnly.\nDefaults to true.", + "tray": "Tray indicates if the tray of the device is open or closed.\nAllowed values are \"open\" and \"closed\".\nDefaults to closed.\n+optional", + } +} + +func (Volume) SwaggerDoc() map[string]string { + return map[string]string{ + "": "Volume represents a named volume in a vmi.", + "name": "Volume's name.\nMust be a DNS_LABEL and unique within the vmi.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", + } +} + +func (VolumeSource) SwaggerDoc() map[string]string { + return map[string]string{ + "": "Represents the source of a volume to mount.\nOnly one of its members may be specified.", + "hostDisk": "HostDisk represents a disk created on the cluster level\n+optional", + "persistentVolumeClaim": "PersistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace.\nDirectly attached to the vmi via qemu.\nMore info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims\n+optional", + "cloudInitNoCloud": "CloudInitNoCloud represents a cloud-init NoCloud user-data source.\nThe NoCloud data will be added as a disk to the vmi. A proper cloud-init installation is required inside the guest.\nMore info: http://cloudinit.readthedocs.io/en/latest/topics/datasources/nocloud.html\n+optional", + "cloudInitConfigDrive": "CloudInitConfigDrive represents a cloud-init Config Drive user-data source.\nThe Config Drive data will be added as a disk to the vmi. A proper cloud-init installation is required inside the guest.\nMore info: https://cloudinit.readthedocs.io/en/latest/topics/datasources/configdrive.html\n+optional", + "sysprep": "Represents a Sysprep volume source.\n+optional", + "containerDisk": "ContainerDisk references a docker image, embedding a qcow or raw disk.\nMore info: https://kubevirt.gitbooks.io/user-guide/registry-disk.html\n+optional", + "ephemeral": "Ephemeral is a special volume source that \"wraps\" specified source and provides copy-on-write image on top of it.\n+optional", + "emptyDisk": "EmptyDisk represents a temporary disk which shares the vmis lifecycle.\nMore info: https://kubevirt.gitbooks.io/user-guide/disks-and-volumes.html\n+optional", + "dataVolume": "DataVolume represents the dynamic creation a PVC for this volume as well as\nthe process of populating that PVC with a disk image.\n+optional", + "configMap": "ConfigMapSource represents a reference to a ConfigMap in the same namespace.\nMore info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/\n+optional", + "secret": "SecretVolumeSource represents a reference to a secret data in the same namespace.\nMore info: https://kubernetes.io/docs/concepts/configuration/secret/\n+optional", + "downwardAPI": "DownwardAPI represents downward API about the pod that should populate this volume\n+optional", + "serviceAccount": "ServiceAccountVolumeSource represents a reference to a service account.\nThere can only be one volume of this type!\nMore info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/\n+optional", + "downwardMetrics": "DownwardMetrics adds a very small disk to VMIs which contains a limited view of host and guest\nmetrics. The disk content is compatible with vhostmd (https://github.com/vhostmd/vhostmd) and vm-dump-metrics.", + } +} + +func (HotplugVolumeSource) SwaggerDoc() map[string]string { + return map[string]string{ + "": "HotplugVolumeSource Represents the source of a volume to mount which are capable\nof being hotplugged on a live running VMI.\nOnly one of its members may be specified.", + "persistentVolumeClaim": "PersistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace.\nDirectly attached to the vmi via qemu.\nMore info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims\n+optional", + "dataVolume": "DataVolume represents the dynamic creation a PVC for this volume as well as\nthe process of populating that PVC with a disk image.\n+optional", + } +} + +func (DataVolumeSource) SwaggerDoc() map[string]string { + return map[string]string{ + "name": "Name represents the name of the DataVolume in the same namespace", + "hotpluggable": "Hotpluggable indicates whether the volume can be hotplugged and hotunplugged.\n+optional", + } +} + +func (PersistentVolumeClaimVolumeSource) SwaggerDoc() map[string]string { + return map[string]string{ + "": "PersistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace.\nDirectly attached to the vmi via qemu.\nMore info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims", + "hotpluggable": "Hotpluggable indicates whether the volume can be hotplugged and hotunplugged.\n+optional", + } +} + +func (EphemeralVolumeSource) SwaggerDoc() map[string]string { + return map[string]string{ + "persistentVolumeClaim": "PersistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace.\nDirectly attached to the vmi via qemu.\nMore info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims\n+optional", + } +} + +func (EmptyDiskSource) SwaggerDoc() map[string]string { + return map[string]string{ + "": "EmptyDisk represents a temporary disk which shares the vmis lifecycle.", + "capacity": "Capacity of the sparse disk.", + } +} + +func (ContainerDiskSource) SwaggerDoc() map[string]string { + return map[string]string{ + "": "Represents a docker image with an embedded disk.", + "image": "Image is the name of the image with the embedded disk.", + "imagePullSecret": "ImagePullSecret is the name of the Docker registry secret required to pull the image. The secret must already exist.", + "path": "Path defines the path to disk file in the container", + "imagePullPolicy": "Image pull policy.\nOne of Always, Never, IfNotPresent.\nDefaults to Always if :latest tag is specified, or IfNotPresent otherwise.\nCannot be updated.\nMore info: https://kubernetes.io/docs/concepts/containers/images#updating-images\n+optional", + } +} + +func (ClockOffset) SwaggerDoc() map[string]string { + return map[string]string{ + "": "Exactly one of its members must be set.", + "utc": "UTC sets the guest clock to UTC on each boot. If an offset is specified,\nguest changes to the clock will be kept during reboots and are not reset.", + "timezone": "Timezone sets the guest clock to the specified timezone.\nZone name follows the TZ environment variable format (e.g. 'America/New_York').", + } +} + +func (ClockOffsetUTC) SwaggerDoc() map[string]string { + return map[string]string{ + "": "UTC sets the guest clock to UTC on each boot.", + "offsetSeconds": "OffsetSeconds specifies an offset in seconds, relative to UTC. If set,\nguest changes to the clock will be kept during reboots and not reset.", + } +} + +func (Clock) SwaggerDoc() map[string]string { + return map[string]string{ + "": "Represents the clock and timers of a vmi.\n+kubebuilder:pruning:PreserveUnknownFields", + "timer": "Timer specifies whih timers are attached to the vmi.\n+optional", + } +} + +func (Timer) SwaggerDoc() map[string]string { + return map[string]string{ + "": "Represents all available timers in a vmi.", + "hpet": "HPET (High Precision Event Timer) - multiple timers with periodic interrupts.", + "kvm": "KVM \t(KVM clock) - lets guests read the host’s wall clock time (paravirtualized). For linux guests.", + "pit": "PIT (Programmable Interval Timer) - a timer with periodic interrupts.", + "rtc": "RTC (Real Time Clock) - a continuously running timer with periodic interrupts.", + "hyperv": "Hyperv (Hypervclock) - lets guests read the host’s wall clock time (paravirtualized). For windows guests.", + } +} + +func (RTCTimer) SwaggerDoc() map[string]string { + return map[string]string{ + "tickPolicy": "TickPolicy determines what happens when QEMU misses a deadline for injecting a tick to the guest.\nOne of \"delay\", \"catchup\".", + "present": "Enabled set to false makes sure that the machine type or a preset can't add the timer.\nDefaults to true.\n+optional", + "track": "Track the guest or the wall clock.", + } +} + +func (HPETTimer) SwaggerDoc() map[string]string { + return map[string]string{ + "tickPolicy": "TickPolicy determines what happens when QEMU misses a deadline for injecting a tick to the guest.\nOne of \"delay\", \"catchup\", \"merge\", \"discard\".", + "present": "Enabled set to false makes sure that the machine type or a preset can't add the timer.\nDefaults to true.\n+optional", + } +} + +func (PITTimer) SwaggerDoc() map[string]string { + return map[string]string{ + "tickPolicy": "TickPolicy determines what happens when QEMU misses a deadline for injecting a tick to the guest.\nOne of \"delay\", \"catchup\", \"discard\".", + "present": "Enabled set to false makes sure that the machine type or a preset can't add the timer.\nDefaults to true.\n+optional", + } +} + +func (KVMTimer) SwaggerDoc() map[string]string { + return map[string]string{ + "present": "Enabled set to false makes sure that the machine type or a preset can't add the timer.\nDefaults to true.\n+optional", + } +} + +func (HypervTimer) SwaggerDoc() map[string]string { + return map[string]string{ + "present": "Enabled set to false makes sure that the machine type or a preset can't add the timer.\nDefaults to true.\n+optional", + } +} + +func (Features) SwaggerDoc() map[string]string { + return map[string]string{ + "acpi": "ACPI enables/disables ACPI inside the guest.\nDefaults to enabled.\n+optional", + "apic": "Defaults to the machine type setting.\n+optional", + "hyperv": "Defaults to the machine type setting.\n+optional", + "smm": "SMM enables/disables System Management Mode.\nTSEG not yet implemented.\n+optional", + "kvm": "Configure how KVM presence is exposed to the guest.\n+optional", + "pvspinlock": "Notify the guest that the host supports paravirtual spinlocks.\nFor older kernels this feature should be explicitly disabled.\n+optional", + } +} + +func (SyNICTimer) SwaggerDoc() map[string]string { + return map[string]string{} +} + +func (FeatureState) SwaggerDoc() map[string]string { + return map[string]string{ + "": "Represents if a feature is enabled or disabled.", + "enabled": "Enabled determines if the feature should be enabled or disabled on the guest.\nDefaults to true.\n+optional", + } +} + +func (FeatureAPIC) SwaggerDoc() map[string]string { + return map[string]string{ + "enabled": "Enabled determines if the feature should be enabled or disabled on the guest.\nDefaults to true.\n+optional", + "endOfInterrupt": "EndOfInterrupt enables the end of interrupt notification in the guest.\nDefaults to false.\n+optional", + } +} + +func (FeatureSpinlocks) SwaggerDoc() map[string]string { + return map[string]string{ + "enabled": "Enabled determines if the feature should be enabled or disabled on the guest.\nDefaults to true.\n+optional", + "spinlocks": "Retries indicates the number of retries.\nMust be a value greater or equal 4096.\nDefaults to 4096.\n+optional", + } +} + +func (FeatureVendorID) SwaggerDoc() map[string]string { + return map[string]string{ + "enabled": "Enabled determines if the feature should be enabled or disabled on the guest.\nDefaults to true.\n+optional", + "vendorid": "VendorID sets the hypervisor vendor id, visible to the vmi.\nString up to twelve characters.", + } +} + +func (FeatureHyperv) SwaggerDoc() map[string]string { + return map[string]string{ + "": "Hyperv specific features.", + "relaxed": "Relaxed instructs the guest OS to disable watchdog timeouts.\nDefaults to the machine type setting.\n+optional", + "vapic": "VAPIC improves the paravirtualized handling of interrupts.\nDefaults to the machine type setting.\n+optional", + "spinlocks": "Spinlocks allows to configure the spinlock retry attempts.\n+optional", + "vpindex": "VPIndex enables the Virtual Processor Index to help windows identifying virtual processors.\nDefaults to the machine type setting.\n+optional", + "runtime": "Runtime improves the time accounting to improve scheduling in the guest.\nDefaults to the machine type setting.\n+optional", + "synic": "SyNIC enables the Synthetic Interrupt Controller.\nDefaults to the machine type setting.\n+optional", + "synictimer": "SyNICTimer enables Synthetic Interrupt Controller Timers, reducing CPU load.\nDefaults to the machine type setting.\n+optional", + "reset": "Reset enables Hyperv reboot/reset for the vmi. Requires synic.\nDefaults to the machine type setting.\n+optional", + "vendorid": "VendorID allows setting the hypervisor vendor id.\nDefaults to the machine type setting.\n+optional", + "frequencies": "Frequencies improves the TSC clock source handling for Hyper-V on KVM.\nDefaults to the machine type setting.\n+optional", + "reenlightenment": "Reenlightenment enables the notifications on TSC frequency changes.\nDefaults to the machine type setting.\n+optional", + "tlbflush": "TLBFlush improves performances in overcommited environments. Requires vpindex.\nDefaults to the machine type setting.\n+optional", + "ipi": "IPI improves performances in overcommited environments. Requires vpindex.\nDefaults to the machine type setting.\n+optional", + "evmcs": "EVMCS Speeds up L2 vmexits, but disables other virtualization features. Requires vapic.\nDefaults to the machine type setting.\n+optional", + } +} + +func (FeatureKVM) SwaggerDoc() map[string]string { + return map[string]string{ + "hidden": "Hide the KVM hypervisor from standard MSR based discovery.\nDefaults to false", + } +} + +func (Watchdog) SwaggerDoc() map[string]string { + return map[string]string{ + "": "Named watchdog device.", + "name": "Name of the watchdog.", + } +} + +func (WatchdogDevice) SwaggerDoc() map[string]string { + return map[string]string{ + "": "Hardware watchdog device.\nExactly one of its members must be set.", + "i6300esb": "i6300esb watchdog device.\n+optional", + } +} + +func (I6300ESBWatchdog) SwaggerDoc() map[string]string { + return map[string]string{ + "": "i6300esb watchdog device.", + "action": "The action to take. Valid values are poweroff, reset, shutdown.\nDefaults to reset.", + } +} + +func (Interface) SwaggerDoc() map[string]string { + return map[string]string{ + "name": "Logical name of the interface as well as a reference to the associated networks.\nMust match the Name of a Network.", + "model": "Interface model.\nOne of: e1000, e1000e, ne2k_pci, pcnet, rtl8139, virtio.\nDefaults to virtio.", + "ports": "List of ports to be forwarded to the virtual machine.", + "macAddress": "Interface MAC address. For example: de:ad:00:00:be:af or DE-AD-00-00-BE-AF.", + "bootOrder": "BootOrder is an integer value > 0, used to determine ordering of boot devices.\nLower values take precedence.\nEach interface or disk that has a boot order must have a unique value.\nInterfaces without a boot order are not tried.\n+optional", + "pciAddress": "If specified, the virtual network interface will be placed on the guests pci address with the specified PCI address. For example: 0000:81:01.10\n+optional", + "dhcpOptions": "If specified the network interface will pass additional DHCP options to the VMI\n+optional", + "tag": "If specified, the virtual network interface address and its tag will be provided to the guest via config drive\n+optional", + } +} + +func (DHCPOptions) SwaggerDoc() map[string]string { + return map[string]string{ + "": "Extra DHCP options to use in the interface.", + "bootFileName": "If specified will pass option 67 to interface's DHCP server\n+optional", + "tftpServerName": "If specified will pass option 66 to interface's DHCP server\n+optional", + "ntpServers": "If specified will pass the configured NTP server to the VM via DHCP option 042.\n+optional", + "privateOptions": "If specified will pass extra DHCP options for private use, range: 224-254\n+optional", + } +} + +func (DHCPPrivateOptions) SwaggerDoc() map[string]string { + return map[string]string{ + "": "DHCPExtraOptions defines Extra DHCP options for a VM.", + "option": "Option is an Integer value from 224-254\nRequired.", + "value": "Value is a String value for the Option provided\nRequired.", + } +} + +func (InterfaceBindingMethod) SwaggerDoc() map[string]string { + return map[string]string{ + "": "Represents the method which will be used to connect the interface to the guest.\nOnly one of its members may be specified.", + } +} + +func (InterfaceBridge) SwaggerDoc() map[string]string { + return map[string]string{ + "": "InterfaceBridge connects to a given network via a linux bridge.", + } +} + +func (InterfaceSlirp) SwaggerDoc() map[string]string { + return map[string]string{ + "": "InterfaceSlirp connects to a given network using QEMU user networking mode.", + } +} + +func (InterfaceMasquerade) SwaggerDoc() map[string]string { + return map[string]string{ + "": "InterfaceMasquerade connects to a given network using netfilter rules to nat the traffic.", + } +} + +func (InterfaceSRIOV) SwaggerDoc() map[string]string { + return map[string]string{ + "": "InterfaceSRIOV connects to a given network by passing-through an SR-IOV PCI device via vfio.", + } +} + +func (InterfaceMacvtap) SwaggerDoc() map[string]string { + return map[string]string{ + "": "InterfaceMacvtap connects to a given network by extending the Kubernetes node's L2 networks via a macvtap interface.", + } +} + +func (Port) SwaggerDoc() map[string]string { + return map[string]string{ + "": "Port represents a port to expose from the virtual machine.\nDefault protocol TCP.\nThe port field is mandatory", + "name": "If specified, this must be an IANA_SVC_NAME and unique within the pod. Each\nnamed port in a pod must have a unique name. Name for the port that can be\nreferred to by services.\n+optional", + "protocol": "Protocol for port. Must be UDP or TCP.\nDefaults to \"TCP\".\n+optional", + "port": "Number of port to expose for the virtual machine.\nThis must be a valid port number, 0 < x < 65536.", + } +} + +func (AccessCredentialSecretSource) SwaggerDoc() map[string]string { + return map[string]string{ + "secretName": "SecretName represents the name of the secret in the VMI's namespace", + } +} + +func (ConfigDriveSSHPublicKeyAccessCredentialPropagation) SwaggerDoc() map[string]string { + return map[string]string{} +} + +func (AuthorizedKeysFile) SwaggerDoc() map[string]string { + return map[string]string{ + "": "AuthorizedKeysFile represents a path within the guest\nthat ssh public keys should be propagated to", + "filePath": "FilePath represents the place on the guest that the authorized_keys\nfile should be writen to. This is expected to be a full path including\nboth the base directory and file name.", + } +} + +func (QemuGuestAgentUserPasswordAccessCredentialPropagation) SwaggerDoc() map[string]string { + return map[string]string{} +} + +func (QemuGuestAgentSSHPublicKeyAccessCredentialPropagation) SwaggerDoc() map[string]string { + return map[string]string{ + "users": "Users represents a list of guest users that should have the ssh public keys\nadded to their authorized_keys file.\n+listType=set", + } +} + +func (SSHPublicKeyAccessCredentialSource) SwaggerDoc() map[string]string { + return map[string]string{ + "": "SSHPublicKeyAccessCredentialSource represents where to retrieve the ssh key\ncredentials\nOnly one of its members may be specified.", + "secret": "Secret means that the access credential is pulled from a kubernetes secret\n+optional", + } +} + +func (SSHPublicKeyAccessCredentialPropagationMethod) SwaggerDoc() map[string]string { + return map[string]string{ + "": "SSHPublicKeyAccessCredentialPropagationMethod represents the method used to\ninject a ssh public key into the vm guest.\nOnly one of its members may be specified.", + "configDrive": "ConfigDrivePropagation means that the ssh public keys are injected\ninto the VM using metadata using the configDrive cloud-init provider\n+optional", + "qemuGuestAgent": "QemuGuestAgentAccessCredentailPropagation means ssh public keys are\ndynamically injected into the vm at runtime via the qemu guest agent.\nThis feature requires the qemu guest agent to be running within the guest.\n+optional", + } +} + +func (SSHPublicKeyAccessCredential) SwaggerDoc() map[string]string { + return map[string]string{ + "": "SSHPublicKeyAccessCredential represents a source and propagation method for\ninjecting ssh public keys into a vm guest", + "source": "Source represents where the public keys are pulled from", + "propagationMethod": "PropagationMethod represents how the public key is injected into the vm guest.", + } +} + +func (UserPasswordAccessCredentialSource) SwaggerDoc() map[string]string { + return map[string]string{ + "": "UserPasswordAccessCredentialSource represents where to retrieve the user password\ncredentials\nOnly one of its members may be specified.", + "secret": "Secret means that the access credential is pulled from a kubernetes secret\n+optional", + } +} + +func (UserPasswordAccessCredentialPropagationMethod) SwaggerDoc() map[string]string { + return map[string]string{ + "": "UserPasswordAccessCredentialPropagationMethod represents the method used to\ninject a user passwords into the vm guest.\nOnly one of its members may be specified.", + "qemuGuestAgent": "QemuGuestAgentAccessCredentailPropagation means passwords are\ndynamically injected into the vm at runtime via the qemu guest agent.\nThis feature requires the qemu guest agent to be running within the guest.\n+optional", + } +} + +func (UserPasswordAccessCredential) SwaggerDoc() map[string]string { + return map[string]string{ + "": "UserPasswordAccessCredential represents a source and propagation method for\ninjecting user passwords into a vm guest\nOnly one of its members may be specified.", + "source": "Source represents where the user passwords are pulled from", + "propagationMethod": "propagationMethod represents how the user passwords are injected into the vm guest.", + } +} + +func (AccessCredential) SwaggerDoc() map[string]string { + return map[string]string{ + "": "AccessCredential represents a credential source that can be used to\nauthorize remote access to the vm guest\nOnly one of its members may be specified.", + "sshPublicKey": "SSHPublicKey represents the source and method of applying a ssh public\nkey into a guest virtual machine.\n+optional", + "userPassword": "UserPassword represents the source and method for applying a guest user's\npassword\n+optional", + } +} + +func (Network) SwaggerDoc() map[string]string { + return map[string]string{ + "": "Network represents a network type and a resource that should be connected to the vm.", + "name": "Network name.\nMust be a DNS_LABEL and unique within the vm.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", + } +} + +func (NetworkSource) SwaggerDoc() map[string]string { + return map[string]string{ + "": "Represents the source resource that will be connected to the vm.\nOnly one of its members may be specified.", + } +} + +func (PodNetwork) SwaggerDoc() map[string]string { + return map[string]string{ + "": "Represents the stock pod network interface.", + "vmNetworkCIDR": "CIDR for vm network.\nDefault 10.0.2.0/24 if not specified.", + "vmIPv6NetworkCIDR": "IPv6 CIDR for the vm network.\nDefaults to fd10:0:2::/120 if not specified.", + } +} + +func (Rng) SwaggerDoc() map[string]string { + return map[string]string{ + "": "Rng represents the random device passed from host", + } +} + +func (MultusNetwork) SwaggerDoc() map[string]string { + return map[string]string{ + "": "Represents the multus cni network.", + "networkName": "References to a NetworkAttachmentDefinition CRD object. Format:\n, /. If namespace is not\nspecified, VMI namespace is assumed.", + "default": "Select the default network and add it to the\nmultus-cni.io/default-network annotation.", + } +} diff --git a/vendor/kubevirt.io/api/core/v1/types.go b/vendor/kubevirt.io/api/core/v1/types.go new file mode 100644 index 000000000000..d534c824b9be --- /dev/null +++ b/vendor/kubevirt.io/api/core/v1/types.go @@ -0,0 +1,2233 @@ +/* + * This file is part of the KubeVirt project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Copyright 2017 Red Hat, Inc. + * + */ + +package v1 + +/* + ATTENTION: Rerun code generators when comments on structs or fields are modified. +*/ + +import ( + "encoding/json" + "fmt" + + k8sv1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/api/resource" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/types" + + cdiv1 "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1" +) + +const DefaultGracePeriodSeconds int64 = 30 + +// VirtualMachineInstance is *the* VirtualMachineInstance Definition. It represents a virtual machine in the runtime environment of kubernetes. +// +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +genclient +type VirtualMachineInstance struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + // VirtualMachineInstance Spec contains the VirtualMachineInstance specification. + Spec VirtualMachineInstanceSpec `json:"spec" valid:"required"` + // Status is the high level overview of how the VirtualMachineInstance is doing. It contains information available to controllers and users. + Status VirtualMachineInstanceStatus `json:"status,omitempty"` +} + +func (v *VirtualMachineInstance) MarshalBinary() (data []byte, err error) { + return json.Marshal(*v) +} + +func (v *VirtualMachineInstance) UnmarshalBinary(data []byte) error { + return json.Unmarshal(data, v) +} + +// VirtualMachineInstanceList is a list of VirtualMachines +// +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +type VirtualMachineInstanceList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []VirtualMachineInstance `json:"items"` +} + +type EvictionStrategy string + +type StartStrategy string + +const ( + StartStrategyPaused StartStrategy = "Paused" +) + +// VirtualMachineInstanceSpec is a description of a VirtualMachineInstance. +type VirtualMachineInstanceSpec struct { + + // If specified, indicates the pod's priority. + // If not specified, the pod priority will be default or zero if there is no + // default. + // +optional + PriorityClassName string `json:"priorityClassName,omitempty"` + + // Specification of the desired behavior of the VirtualMachineInstance on the host. + Domain DomainSpec `json:"domain"` + // NodeSelector is a selector which must be true for the vmi to fit on a node. + // Selector which must match a node's labels for the vmi to be scheduled on that node. + // More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ + // +optional + NodeSelector map[string]string `json:"nodeSelector,omitempty"` + // If affinity is specifies, obey all the affinity rules + Affinity *k8sv1.Affinity `json:"affinity,omitempty"` + // If specified, the VMI will be dispatched by specified scheduler. + // If not specified, the VMI will be dispatched by default scheduler. + // +optional + SchedulerName string `json:"schedulerName,omitempty"` + // If toleration is specified, obey all the toleration rules. + Tolerations []k8sv1.Toleration `json:"tolerations,omitempty"` + + // EvictionStrategy can be set to "LiveMigrate" if the VirtualMachineInstance should be + // migrated instead of shut-off in case of a node drain. + // + // +optional + EvictionStrategy *EvictionStrategy `json:"evictionStrategy,omitempty"` + // StartStrategy can be set to "Paused" if Virtual Machine should be started in paused state. + // + // +optional + StartStrategy *StartStrategy `json:"startStrategy,omitempty"` + // Grace period observed after signalling a VirtualMachineInstance to stop after which the VirtualMachineInstance is force terminated. + TerminationGracePeriodSeconds *int64 `json:"terminationGracePeriodSeconds,omitempty"` + // List of volumes that can be mounted by disks belonging to the vmi. + Volumes []Volume `json:"volumes,omitempty"` + // Periodic probe of VirtualMachineInstance liveness. + // VirtualmachineInstances will be stopped if the probe fails. + // Cannot be updated. + // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + // +optional + LivenessProbe *Probe `json:"livenessProbe,omitempty"` + // Periodic probe of VirtualMachineInstance service readiness. + // VirtualmachineInstances will be removed from service endpoints if the probe fails. + // Cannot be updated. + // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + // +optional + ReadinessProbe *Probe `json:"readinessProbe,omitempty"` + // Specifies the hostname of the vmi + // If not specified, the hostname will be set to the name of the vmi, if dhcp or cloud-init is configured properly. + // +optional + Hostname string `json:"hostname,omitempty"` + // If specified, the fully qualified vmi hostname will be "...svc.". + // If not specified, the vmi will not have a domainname at all. The DNS entry will resolve to the vmi, + // no matter if the vmi itself can pick up a hostname. + // +optional + Subdomain string `json:"subdomain,omitempty"` + // List of networks that can be attached to a vm's virtual interface. + Networks []Network `json:"networks,omitempty"` + // Set DNS policy for the pod. + // Defaults to "ClusterFirst". + // Valid values are 'ClusterFirstWithHostNet', 'ClusterFirst', 'Default' or 'None'. + // DNS parameters given in DNSConfig will be merged with the policy selected with DNSPolicy. + // To have DNS options set along with hostNetwork, you have to specify DNS policy + // explicitly to 'ClusterFirstWithHostNet'. + // +optional + DNSPolicy k8sv1.DNSPolicy `json:"dnsPolicy,omitempty" protobuf:"bytes,6,opt,name=dnsPolicy,casttype=DNSPolicy"` + // Specifies the DNS parameters of a pod. + // Parameters specified here will be merged to the generated DNS + // configuration based on DNSPolicy. + // +optional + DNSConfig *k8sv1.PodDNSConfig `json:"dnsConfig,omitempty" protobuf:"bytes,26,opt,name=dnsConfig"` + // Specifies a set of public keys to inject into the vm guest + // +listType=atomic + // +optional + AccessCredentials []AccessCredential `json:"accessCredentials,omitempty"` +} + +func (vmiSpec *VirtualMachineInstanceSpec) UnmarshalJSON(data []byte) error { + type VMISpecAlias VirtualMachineInstanceSpec + var vmiSpecAlias VMISpecAlias + + if err := json.Unmarshal(data, &vmiSpecAlias); err != nil { + return err + } + + if vmiSpecAlias.DNSConfig != nil { + for i, ns := range vmiSpecAlias.DNSConfig.Nameservers { + if sanitizedIP, err := sanitizeIP(ns); err == nil { + vmiSpecAlias.DNSConfig.Nameservers[i] = sanitizedIP + } + } + } + + *vmiSpec = VirtualMachineInstanceSpec(vmiSpecAlias) + return nil +} + +// VirtualMachineInstancePhaseTransitionTimestamp gives a timestamp in relation to when a phase is set on a vmi +type VirtualMachineInstancePhaseTransitionTimestamp struct { + // Phase is the status of the VirtualMachineInstance in kubernetes world. It is not the VirtualMachineInstance status, but partially correlates to it. + Phase VirtualMachineInstancePhase `json:"phase,omitempty"` + // PhaseTransitionTimestamp is the timestamp of when the phase change occurred + PhaseTransitionTimestamp metav1.Time `json:"phaseTransitionTimestamp,omitempty"` +} + +type TopologyHints struct { + TSCFrequency *int64 `json:"tscFrequency,omitempty"` +} + +// VirtualMachineInstanceStatus represents information about the status of a VirtualMachineInstance. Status may trail the actual +// state of a system. +type VirtualMachineInstanceStatus struct { + // NodeName is the name where the VirtualMachineInstance is currently running. + NodeName string `json:"nodeName,omitempty"` + // A brief CamelCase message indicating details about why the VMI is in this state. e.g. 'NodeUnresponsive' + // +optional + Reason string `json:"reason,omitempty"` + // Conditions are specific points in VirtualMachineInstance's pod runtime. + Conditions []VirtualMachineInstanceCondition `json:"conditions,omitempty"` + // Phase is the status of the VirtualMachineInstance in kubernetes world. It is not the VirtualMachineInstance status, but partially correlates to it. + Phase VirtualMachineInstancePhase `json:"phase,omitempty"` + // PhaseTransitionTimestamp is the timestamp of when the last phase change occurred + // +listType=atomic + // +optional + PhaseTransitionTimestamps []VirtualMachineInstancePhaseTransitionTimestamp `json:"phaseTransitionTimestamps,omitempty"` + // Interfaces represent the details of available network interfaces. + Interfaces []VirtualMachineInstanceNetworkInterface `json:"interfaces,omitempty"` + // Guest OS Information + GuestOSInfo VirtualMachineInstanceGuestOSInfo `json:"guestOSInfo,omitempty"` + // Represents the status of a live migration + MigrationState *VirtualMachineInstanceMigrationState `json:"migrationState,omitempty"` + // Represents the method using which the vmi can be migrated: live migration or block migration + MigrationMethod VirtualMachineInstanceMigrationMethod `json:"migrationMethod,omitempty"` + // This represents the migration transport + MigrationTransport VirtualMachineInstanceMigrationTransport `json:"migrationTransport,omitempty"` + // The Quality of Service (QOS) classification assigned to the virtual machine instance based on resource requirements + // See PodQOSClass type for available QOS classes + // More info: https://git.k8s.io/community/contributors/design-proposals/node/resource-qos.md + // +optional + QOSClass *k8sv1.PodQOSClass `json:"qosClass,omitempty"` + + // LauncherContainerImageVersion indicates what container image is currently active for the vmi. + LauncherContainerImageVersion string `json:"launcherContainerImageVersion,omitempty"` + + // EvacuationNodeName is used to track the eviction process of a VMI. It stores the name of the node that we want + // to evacuate. It is meant to be used by KubeVirt core components only and can't be set or modified by users. + // +optional + EvacuationNodeName string `json:"evacuationNodeName,omitempty"` + + // ActivePods is a mapping of pod UID to node name. + // It is possible for multiple pods to be running for a single VMI during migration. + ActivePods map[types.UID]string `json:"activePods,omitempty"` + + // VolumeStatus contains the statuses of all the volumes + // +optional + // +listType=atomic + VolumeStatus []VolumeStatus `json:"volumeStatus,omitempty"` + + // FSFreezeStatus is the state of the fs of the guest + // it can be either frozen or thawed + // +optional + FSFreezeStatus string `json:"fsFreezeStatus,omitempty"` + + // +optional + TopologyHints *TopologyHints `json:"topologyHints,omitempty"` + + //VirtualMachineRevisionName is used to get the vm revision of the vmi when doing + // an online vm snapshot + // +optional + VirtualMachineRevisionName string `json:"virtualMachineRevisionName,omitempty"` + + // RuntimeUser is used to determine what user will be used in launcher + // +optional + RuntimeUser uint64 `json:"runtimeUser"` +} + +// PersistentVolumeClaimInfo contains the relavant information virt-handler needs cached about a PVC +type PersistentVolumeClaimInfo struct { + // AccessModes contains the desired access modes the volume should have. + // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1 + // +listType=atomic + // +optional + AccessModes []k8sv1.PersistentVolumeAccessMode `json:"accessModes,omitempty"` + + // VolumeMode defines what type of volume is required by the claim. + // Value of Filesystem is implied when not included in claim spec. + // +optional + VolumeMode *k8sv1.PersistentVolumeMode `json:"volumeMode,omitempty"` + + // Capacity represents the capacity set on the corresponding PVC status + // +optional + Capacity k8sv1.ResourceList `json:"capacity,omitempty"` + + // Requests represents the resources requested by the corresponding PVC spec + // +optional + Requests k8sv1.ResourceList `json:"requests,omitempty"` + + // Preallocated indicates if the PVC's storage is preallocated or not + // +optional + Preallocated bool `json:"preallocated,omitempty"` + + // Percentage of filesystem's size to be reserved when resizing the PVC + // +optional + FilesystemOverhead *cdiv1.Percent `json:"filesystemOverhead,omitempty"` +} + +// VolumeStatus represents information about the status of volumes attached to the VirtualMachineInstance. +type VolumeStatus struct { + // Name is the name of the volume + Name string `json:"name"` + // Target is the target name used when adding the volume to the VM, eg: vda + Target string `json:"target"` + // Phase is the phase + Phase VolumePhase `json:"phase,omitempty"` + // Reason is a brief description of why we are in the current hotplug volume phase + Reason string `json:"reason,omitempty"` + // Message is a detailed message about the current hotplug volume phase + Message string `json:"message,omitempty"` + // PersistentVolumeClaimInfo is information about the PVC that handler requires during start flow + PersistentVolumeClaimInfo *PersistentVolumeClaimInfo `json:"persistentVolumeClaimInfo,omitempty"` + // If the volume is hotplug, this will contain the hotplug status. + HotplugVolume *HotplugVolumeStatus `json:"hotplugVolume,omitempty"` + // Represents the size of the volume + Size int64 `json:"size,omitempty"` +} + +// HotplugVolumeStatus represents the hotplug status of the volume +type HotplugVolumeStatus struct { + // AttachPodName is the name of the pod used to attach the volume to the node. + AttachPodName string `json:"attachPodName,omitempty"` + // AttachPodUID is the UID of the pod used to attach the volume to the node. + AttachPodUID types.UID `json:"attachPodUID,omitempty"` +} + +// VolumePhase indicates the current phase of the hotplug process. +type VolumePhase string + +const ( + // VolumePending means the Volume is pending and cannot be attached to the node yet. + VolumePending VolumePhase = "Pending" + // VolumeBound means the Volume is bound and can be attach to the node. + VolumeBound VolumePhase = "Bound" + // HotplugVolumeAttachedToNode means the volume has been attached to the node. + HotplugVolumeAttachedToNode VolumePhase = "AttachedToNode" + // HotplugVolumeMounted means the volume has been attached to the node and is mounted to the virt-launcher pod. + HotplugVolumeMounted VolumePhase = "MountedToPod" + // VolumeReady means the volume is ready to be used by the VirtualMachineInstance. + VolumeReady VolumePhase = "Ready" + // HotplugVolumeDetaching means the volume is being detached from the node, and the attachment pod is being removed. + HotplugVolumeDetaching VolumePhase = "Detaching" + // HotplugVolumeUnMounted means the volume has been unmounted from the virt-launcer pod. + HotplugVolumeUnMounted VolumePhase = "UnMountedFromPod" +) + +func (v *VirtualMachineInstance) IsScheduling() bool { + return v.Status.Phase == Scheduling +} + +func (v *VirtualMachineInstance) IsScheduled() bool { + return v.Status.Phase == Scheduled +} + +func (v *VirtualMachineInstance) IsRunning() bool { + return v.Status.Phase == Running +} + +func (v *VirtualMachineInstance) IsMarkedForEviction() bool { + return v.Status.EvacuationNodeName != "" +} + +func (v *VirtualMachineInstance) IsMigratable() bool { + for _, cond := range v.Status.Conditions { + if cond.Type == VirtualMachineInstanceIsMigratable && cond.Status == k8sv1.ConditionTrue { + return true + } + } + return false +} + +func (v *VirtualMachineInstance) IsFinal() bool { + return v.Status.Phase == Failed || v.Status.Phase == Succeeded +} + +func (v *VirtualMachineInstance) IsMarkedForDeletion() bool { + return v.ObjectMeta.DeletionTimestamp != nil +} + +func (v *VirtualMachineInstance) IsUnknown() bool { + return v.Status.Phase == Unknown +} + +func (v *VirtualMachineInstance) IsUnprocessed() bool { + return v.Status.Phase == Pending || v.Status.Phase == VmPhaseUnset +} + +// Checks if CPU pinning has been requested +func (v *VirtualMachineInstance) IsCPUDedicated() bool { + return v.Spec.Domain.CPU != nil && v.Spec.Domain.CPU.DedicatedCPUPlacement +} + +func (v *VirtualMachineInstance) IsBootloaderEFI() bool { + return v.Spec.Domain.Firmware != nil && v.Spec.Domain.Firmware.Bootloader != nil && + v.Spec.Domain.Firmware.Bootloader.EFI != nil +} + +// WantsToHaveQOSGuaranteed checks if cpu and memoyr limits and requests are identical on the VMI. +// This is the indicator that people want a VMI with QOS of guaranteed +func (v *VirtualMachineInstance) WantsToHaveQOSGuaranteed() bool { + resources := v.Spec.Domain.Resources + return !resources.Requests.Memory().IsZero() && resources.Requests.Memory().Cmp(*resources.Limits.Memory()) == 0 && + !resources.Requests.Cpu().IsZero() && resources.Requests.Cpu().Cmp(*resources.Limits.Cpu()) == 0 +} + +// ShouldStartPaused returns true if VMI should be started in paused state +func (v *VirtualMachineInstance) ShouldStartPaused() bool { + return v.Spec.StartStrategy != nil && *v.Spec.StartStrategy == StartStrategyPaused +} + +func (v *VirtualMachineInstance) IsRealtimeEnabled() bool { + return v.Spec.Domain.CPU != nil && v.Spec.Domain.CPU.Realtime != nil +} + +type VirtualMachineInstanceConditionType string + +// These are valid conditions of VMIs. +const ( + // Provisioning means, a VMI depends on DataVolumes which are in Pending/WaitForFirstConsumer status, + // and some actions are taken to provision the PVCs for the DataVolumes + VirtualMachineInstanceProvisioning VirtualMachineInstanceConditionType = "Provisioning" + + // Ready means the VMI is able to service requests and should be added to the + // load balancing pools of all matching services. + VirtualMachineInstanceReady VirtualMachineInstanceConditionType = "Ready" + + // If there happens any error while trying to synchronize the VirtualMachineInstance with the Domain, + // this is reported as false. + VirtualMachineInstanceSynchronized VirtualMachineInstanceConditionType = "Synchronized" + + // If the VMI was paused by the user, this is reported as true. + VirtualMachineInstancePaused VirtualMachineInstanceConditionType = "Paused" + + // Reflects whether the QEMU guest agent is connected through the channel + VirtualMachineInstanceAgentConnected VirtualMachineInstanceConditionType = "AgentConnected" + + // Reflects whether the QEMU guest agent updated access credentials successfully + VirtualMachineInstanceAccessCredentialsSynchronized VirtualMachineInstanceConditionType = "AccessCredentialsSynchronized" + + // Reflects whether the QEMU guest agent is connected through the channel + VirtualMachineInstanceUnsupportedAgent VirtualMachineInstanceConditionType = "AgentVersionNotSupported" + + // Indicates whether the VMI is live migratable + VirtualMachineInstanceIsMigratable VirtualMachineInstanceConditionType = "LiveMigratable" + // Reason means that VMI is not live migratioable because of it's disks collection + VirtualMachineInstanceReasonDisksNotMigratable = "DisksNotLiveMigratable" + // Reason means that VMI is not live migratioable because of it's network interfaces collection + VirtualMachineInstanceReasonInterfaceNotMigratable = "InterfaceNotLiveMigratable" + // Reason means that VMI is not live migratioable because it uses hotplug + VirtualMachineInstanceReasonHotplugNotMigratable = "HotplugNotLiveMigratable" + // Reason means that VMI is not live migratioable because of it's CPU mode + VirtualMachineInstanceReasonCPUModeNotMigratable = "CPUModeLiveMigratable" + // Reason means that VMI is not live migratable because it uses virtiofs + VirtualMachineInstanceReasonVirtIOFSNotMigratable = "VirtIOFSNotLiveMigratable" + // Reason means that VMI is not live migratable because it uses PCI host devices + VirtualMachineInstanceReasonHostDeviceNotMigratable = "HostDeviceNotLiveMigratable" + // Reason means that VMI is not live migratable because it uses Secure Encrypted Virtualization (SEV) + VirtualMachineInstanceReasonSEVNotMigratable = "SEVNotLiveMigratable" +) + +const ( + // PodTerminatingReason indicates on the Ready condition on the VMI if the underlying pod is terminating + PodTerminatingReason = "PodTerminating" + + // PodNotExistsReason indicates on the Ready condition on the VMI if the underlying pod does not exist + PodNotExistsReason = "PodNotExists" + + // PodConditionMissingReason indicates on the Ready condition on the VMI if the underlying pod does not report a Ready condition + PodConditionMissingReason = "PodConditionMissing" + + // GuestNotRunningReason indicates on the Ready condition on the VMI if the underlying guest VM is not running + GuestNotRunningReason = "GuestNotRunning" +) + +type VirtualMachineInstanceMigrationConditionType string + +// These are valid conditions of VMIs. +const ( + // VirtualMachineInstanceMigrationAbortRequested indicates that live migration abort has been requested + VirtualMachineInstanceMigrationAbortRequested VirtualMachineInstanceMigrationConditionType = "migrationAbortRequested" +) + +type VirtualMachineInstanceCondition struct { + Type VirtualMachineInstanceConditionType `json:"type"` + Status k8sv1.ConditionStatus `json:"status"` + // +nullable + LastProbeTime metav1.Time `json:"lastProbeTime,omitempty"` + // +nullable + LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"` + Reason string `json:"reason,omitempty"` + Message string `json:"message,omitempty"` +} + +type VirtualMachineInstanceMigrationCondition struct { + Type VirtualMachineInstanceMigrationConditionType `json:"type"` + Status k8sv1.ConditionStatus `json:"status"` + // +nullable + LastProbeTime metav1.Time `json:"lastProbeTime,omitempty"` + // +nullable + LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"` + Reason string `json:"reason,omitempty"` + Message string `json:"message,omitempty"` +} + +// The migration phase indicates that the job has completed +func (m *VirtualMachineInstanceMigration) IsFinal() bool { + return m.Status.Phase == MigrationFailed || m.Status.Phase == MigrationSucceeded +} + +func (m *VirtualMachineInstanceMigration) IsRunning() bool { + switch m.Status.Phase { + case MigrationFailed, MigrationPending, MigrationPhaseUnset, MigrationSucceeded: + return false + } + return true +} + +// The migration phase indicates that the target pod should have already been created +func (m *VirtualMachineInstanceMigration) TargetIsCreated() bool { + return m.Status.Phase != MigrationPhaseUnset && + m.Status.Phase != MigrationPending +} + +// The migration phase indicates that job has been handed off to the VMI controllers to complete. +func (m *VirtualMachineInstanceMigration) TargetIsHandedOff() bool { + return m.Status.Phase != MigrationPhaseUnset && + m.Status.Phase != MigrationPending && + m.Status.Phase != MigrationScheduling && + m.Status.Phase != MigrationScheduled +} + +type VirtualMachineInstanceNetworkInterface struct { + // IP address of a Virtual Machine interface. It is always the first item of + // IPs + IP string `json:"ipAddress,omitempty"` + // Hardware address of a Virtual Machine interface + MAC string `json:"mac,omitempty"` + // Name of the interface, corresponds to name of the network assigned to the interface + Name string `json:"name,omitempty"` + // List of all IP addresses of a Virtual Machine interface + IPs []string `json:"ipAddresses,omitempty"` + // The interface name inside the Virtual Machine + InterfaceName string `json:"interfaceName,omitempty"` + // Specifies the origin of the interface data collected. values: domain, guest-agent, or both + InfoSource string `json:"infoSource,omitempty"` +} + +type VirtualMachineInstanceGuestOSInfo struct { + // Name of the Guest OS + Name string `json:"name,omitempty"` + // Guest OS Kernel Release + KernelRelease string `json:"kernelRelease,omitempty"` + // Guest OS Version + Version string `json:"version,omitempty"` + // Guest OS Pretty Name + PrettyName string `json:"prettyName,omitempty"` + // Version ID of the Guest OS + VersionID string `json:"versionId,omitempty"` + // Kernel version of the Guest OS + KernelVersion string `json:"kernelVersion,omitempty"` + // Machine type of the Guest OS + Machine string `json:"machine,omitempty"` + // Guest OS Id + ID string `json:"id,omitempty"` +} + +// MigrationConfigSource indicates the source of migration configuration. +// +// +k8s:openapi-gen=true +type MigrationConfigSource string + +// +k8s:openapi-gen=true +type VirtualMachineInstanceMigrationState struct { + // The time the migration action began + // +nullable + StartTimestamp *metav1.Time `json:"startTimestamp,omitempty"` + // The time the migration action ended + // +nullable + EndTimestamp *metav1.Time `json:"endTimestamp,omitempty"` + // The Target Node has seen the Domain Start Event + TargetNodeDomainDetected bool `json:"targetNodeDomainDetected,omitempty"` + // The address of the target node to use for the migration + TargetNodeAddress string `json:"targetNodeAddress,omitempty"` + // The list of ports opened for live migration on the destination node + TargetDirectMigrationNodePorts map[string]int `json:"targetDirectMigrationNodePorts,omitempty"` + // The target node that the VMI is moving to + TargetNode string `json:"targetNode,omitempty"` + // The target pod that the VMI is moving to + TargetPod string `json:"targetPod,omitempty"` + // The UID of the target attachment pod for hotplug volumes + TargetAttachmentPodUID types.UID `json:"targetAttachmentPodUID,omitempty"` + // The source node that the VMI originated on + SourceNode string `json:"sourceNode,omitempty"` + // Indicates the migration completed + Completed bool `json:"completed,omitempty"` + // Indicates that the migration failed + Failed bool `json:"failed,omitempty"` + // Indicates that the migration has been requested to abort + AbortRequested bool `json:"abortRequested,omitempty"` + // Indicates the final status of the live migration abortion + AbortStatus MigrationAbortStatus `json:"abortStatus,omitempty"` + // The VirtualMachineInstanceMigration object associated with this migration + MigrationUID types.UID `json:"migrationUid,omitempty"` + // Lets us know if the vmi is currently running pre or post copy migration + Mode MigrationMode `json:"mode,omitempty"` + // Name of the migration policy. If string is empty, no policy is matched + MigrationPolicyName *string `json:"migrationPolicyName,omitempty"` + // Migration configurations to apply + MigrationConfiguration *MigrationConfiguration `json:"migrationConfiguration,omitempty"` + // If the VMI requires dedicated CPUs, this field will + // hold the dedicated CPU set on the target node + // +listType=atomic + TargetCPUSet []int `json:"targetCPUSet,omitempty"` + // If the VMI requires dedicated CPUs, this field will + // hold the numa topology on the target node + TargetNodeTopology string `json:"targetNodeTopology,omitempty"` +} + +type MigrationAbortStatus string + +const ( + // MigrationAbortSucceeded means that the VirtualMachineInstance live migration has been aborted + MigrationAbortSucceeded MigrationAbortStatus = "Succeeded" + // MigrationAbortFailed means that the vmi live migration has failed to be abort + MigrationAbortFailed MigrationAbortStatus = "Failed" + // MigrationAbortInProgress mean that the vmi live migration is aborting + MigrationAbortInProgress MigrationAbortStatus = "Aborting" +) + +type MigrationMode string + +const ( + // MigrationPreCopy means the VMI migrations that is currently running is in pre copy mode + MigrationPreCopy MigrationMode = "PreCopy" + // MigrationPostCopy means the VMI migrations that is currently running is in post copy mode + MigrationPostCopy MigrationMode = "PostCopy" +) + +type VirtualMachineInstanceMigrationTransport string + +const ( + // MigrationTransportUnix means that the VMI will be migrated using the unix URI + MigrationTransportUnix VirtualMachineInstanceMigrationTransport = "Unix" +) + +type VirtualMachineInstanceMigrationMethod string + +const ( + // BlockMigration means that all VirtualMachineInstance disks should be copied over to the destination host + BlockMigration VirtualMachineInstanceMigrationMethod = "BlockMigration" + // LiveMigration means that VirtualMachineInstance disks will not be copied over to the destination host + LiveMigration VirtualMachineInstanceMigrationMethod = "LiveMigration" +) + +// VirtualMachineInstancePhase is a label for the condition of a VirtualMachineInstance at the current time. +type VirtualMachineInstancePhase string + +// These are the valid statuses of pods. +const ( + //When a VirtualMachineInstance Object is first initialized and no phase, or Pending is present. + VmPhaseUnset VirtualMachineInstancePhase = "" + // Pending means the VirtualMachineInstance has been accepted by the system. + Pending VirtualMachineInstancePhase = "Pending" + // A target Pod exists but is not yet scheduled and in running state. + Scheduling VirtualMachineInstancePhase = "Scheduling" + // A target pod was scheduled and the system saw that Pod in runnig state. + // Here is where the responsibility of virt-controller ends and virt-handler takes over. + Scheduled VirtualMachineInstancePhase = "Scheduled" + // Running means the pod has been bound to a node and the VirtualMachineInstance is started. + Running VirtualMachineInstancePhase = "Running" + // Succeeded means that the VirtualMachineInstance stopped voluntarily, e.g. reacted to SIGTERM or shutdown was invoked from + // inside the VirtualMachineInstance. + Succeeded VirtualMachineInstancePhase = "Succeeded" + // Failed means that the vmi crashed, disappeared unexpectedly or got deleted from the cluster before it was ever started. + Failed VirtualMachineInstancePhase = "Failed" + // Unknown means that for some reason the state of the VirtualMachineInstance could not be obtained, typically due + // to an error in communicating with the host of the VirtualMachineInstance. + Unknown VirtualMachineInstancePhase = "Unknown" +) + +const ( + // AppLabel and AppName labels marks resources that belong to KubeVirt. An optional value + // may indicate which specific KubeVirt component a resource belongs to. + AppLabel string = "kubevirt.io" + AppName string = "name" + // This annotation is used to match virtual machine instances represented as + // libvirt XML domains with their pods. Among other things, the annotation is + // used to detect virtual machines with dead pods. Used on Pod. + DomainAnnotation string = "kubevirt.io/domain" + // Represents the name of the migration job this target pod is associated with + MigrationJobNameAnnotation string = "kubevirt.io/migrationJobName" + ControllerAPILatestVersionObservedAnnotation string = "kubevirt.io/latest-observed-api-version" + ControllerAPIStorageVersionObservedAnnotation string = "kubevirt.io/storage-observed-api-version" + // Used by functional tests to force a VMI to fail the migration internally within launcher + FuncTestForceLauncherMigrationFailureAnnotation string = "kubevirt.io/func-test-force-launcher-migration-failure" + // Used by functional tests to prevent virt launcher from finishing the target pod preparation. + FuncTestBlockLauncherPrepareMigrationTargetAnnotation string = "kubevirt.io/func-test-block-migration-target-preparation" + + // Used by functional tests set custom image on migration target pod + FuncTestMigrationTargetImageOverrideAnnotation string = "kubevirt.io/func-test-migration-target-image-override" + + // Used by functional tests to simulate virt-launcher crash looping + FuncTestLauncherFailFastAnnotation string = "kubevirt.io/func-test-virt-launcher-fail-fast" + // This label is used to match virtual machine instance IDs with pods. + // Similar to kubevirt.io/domain. Used on Pod. + // Internal use only. + CreatedByLabel string = "kubevirt.io/created-by" + // This label is used to indicate that this pod is the target of a migration job. + MigrationJobLabel string = "kubevirt.io/migrationJobUID" + // This label indicates the migration name that a PDB is protecting. + MigrationNameLabel string = "kubevirt.io/migrationName" + // This label describes which cluster node runs the virtual machine + // instance. Needed because with CRDs we can't use field selectors. Used on + // VirtualMachineInstance. + NodeNameLabel string = "kubevirt.io/nodeName" + // This label describes which cluster node runs the target Pod for a Virtual + // Machine Instance migration job. Needed because with CRDs we can't use field + // selectors. Used on VirtualMachineInstance. + MigrationTargetNodeNameLabel string = "kubevirt.io/migrationTargetNodeName" + // This annotation indicates that a migration is the result of an + // automated evacuation + EvacuationMigrationAnnotation string = "kubevirt.io/evacuationMigration" + // This annotation indicates that a migration is the result of an + // automated workload update + WorkloadUpdateMigrationAnnotation string = "kubevirt.io/workloadUpdateMigration" + // This label declares whether a particular node is available for + // scheduling virtual machine instances on it. Used on Node. + NodeSchedulable string = "kubevirt.io/schedulable" + // This annotation is regularly updated by virt-handler to help determine + // if a particular node is alive and hence should be available for new + // virtual machine instance scheduling. Used on Node. + VirtHandlerHeartbeat string = "kubevirt.io/heartbeat" + // This label indicates what launcher image a VMI is currently running with. + OutdatedLauncherImageLabel string = "kubevirt.io/outdatedLauncherImage" + // Namespace recommended by Kubernetes for commonly recognized labels + AppLabelPrefix = "app.kubernetes.io" + // This label is commonly used by 3rd party management tools to identify + // an application's name. + AppNameLabel = AppLabelPrefix + "/name" + // This label is commonly used by 3rd party management tools to identify + // an application's version. + AppVersionLabel = AppLabelPrefix + "/version" + // This label is commonly used by 3rd party management tools to identify + // a higher level application. + AppPartOfLabel = AppLabelPrefix + "/part-of" + // This label is commonly used by 3rd party management tools to identify + // the component this application is a part of. + AppComponentLabel = AppLabelPrefix + "/component" + // This label identifies each resource as part of KubeVirt + AppComponent = "kubevirt" + // This label will be set on all resources created by the operator + ManagedByLabel = AppLabelPrefix + "/managed-by" + ManagedByLabelOperatorValue = "virt-operator" + ManagedByLabelOperatorOldValue = "kubevirt-operator" + // This annotation represents the kubevirt version for an install strategy configmap. + InstallStrategyVersionAnnotation = "kubevirt.io/install-strategy-version" + // This annotation represents the kubevirt registry used for an install strategy configmap. + InstallStrategyRegistryAnnotation = "kubevirt.io/install-strategy-registry" + // This annotation represents the kubevirt deployment identifier used for an install strategy configmap. + InstallStrategyIdentifierAnnotation = "kubevirt.io/install-strategy-identifier" + // This annotation shows the enconding used for the manifests in the Install Strategy ConfigMap. + InstallStrategyConfigMapEncoding = "kubevirt.io/install-strategy-cm-encoding" + // This annotation is a hash of all customizations that live under spec.CustomizeComponents + KubeVirtCustomizeComponentAnnotationHash = "kubevirt.io/customizer-identifier" + // This annotation represents the kubevirt generation that was used to create a resource + KubeVirtGenerationAnnotation = "kubevirt.io/generation" + // This annotation represents that this object is for temporary use during updates + EphemeralBackupObject = "kubevirt.io/ephemeral-backup-object" + // This annotation represents that the annotated object is for temporary use during pod/volume provisioning + EphemeralProvisioningObject string = "kubevirt.io/ephemeral-provisioning" + + // This label indicates the object is a part of the install strategy retrieval process. + InstallStrategyLabel = "kubevirt.io/install-strategy" + + // Set by virt-operator to coordinate component deletion + VirtOperatorComponentFinalizer string = "kubevirt.io/virtOperatorFinalizer" + + // Set by VMI controller to ensure VMIs are processed during deletion + VirtualMachineInstanceFinalizer string = "foregroundDeleteVirtualMachine" + // Set By VM controller on VMIs to ensure VMIs are processed by VM controller during deletion + VirtualMachineControllerFinalizer string = "kubevirt.io/virtualMachineControllerFinalize" + VirtualMachineInstanceMigrationFinalizer string = "kubevirt.io/migrationJobFinalize" + CPUManager string = "cpumanager" + // This annotation is used to inject ignition data + // Used on VirtualMachineInstance. + IgnitionAnnotation string = "kubevirt.io/ignitiondata" + PlacePCIDevicesOnRootComplex string = "kubevirt.io/placePCIDevicesOnRootComplex" + + // This label represents supported cpu features on the node + CPUFeatureLabel = "cpu-feature.node.kubevirt.io/" + // This label represents supported cpu models on the node + CPUModelLabel = "cpu-model.node.kubevirt.io/" + CPUTimerLabel = "cpu-timer.node.kubevirt.io/" + // This label represents supported HyperV features on the node + HypervLabel = "hyperv.node.kubevirt.io/" + // This label represents vendor of cpu model on the node + CPUModelVendorLabel = "cpu-vendor.node.kubevirt.io/" + + // This label represents the host model CPU name + HostModelCPULabel = "host-model-cpu.node.kubevirt.io/" + // This label represents the host model required features + HostModelRequiredFeaturesLabel = "host-model-required-features.node.kubevirt.io/" + + LabellerSkipNodeAnnotation = "node-labeller.kubevirt.io/skip-node" + VirtualMachineLabel = AppLabel + "/vm" + MemfdMemoryBackend string = "kubevirt.io/memfd" + + MigrationSelectorLabel = "kubevirt.io/vmi-name" + + // This annotation represents vmi running nonroot implementation + DeprecatedNonRootVMIAnnotation = "kubevirt.io/nonroot" + + // This annotation is to keep virt launcher container alive when an VMI encounters a failure for debugging purpose + KeepLauncherAfterFailureAnnotation string = "kubevirt.io/keep-launcher-alive-after-failure" + + // MigrationTransportUnixAnnotation means that the VMI will be migrated using the unix URI + MigrationTransportUnixAnnotation string = "kubevirt.io/migrationTransportUnix" + + // MigrationUnschedulablePodTimeoutSecondsAnnotation represents a custom timeout period used for unschedulable target pods + // This exists for functional testing + MigrationUnschedulablePodTimeoutSecondsAnnotation string = "kubevirt.io/migrationUnschedulablePodTimeoutSeconds" + + // MigrationPendingPodTimeoutSecondsAnnotation represents a custom timeout period used for target pods stuck in pending for any reason + // This exists for functional testing + MigrationPendingPodTimeoutSecondsAnnotation string = "kubevirt.io/migrationPendingPodTimeoutSeconds" + + // CustomLibvirtLogFiltersAnnotation can be used to customized libvirt log filters. Example value could be + // "3:remote 4:event 3:util.json 3:util.object 3:util.dbus 3:util.netlink 3:node_device 3:rpc 3:access 1:*". + // For more info: https://libvirt.org/kbase/debuglogs.html + CustomLibvirtLogFiltersAnnotation string = "kubevirt.io/libvirt-log-filters" + + // RealtimeLabel marks the node as capable of running realtime workloads + RealtimeLabel string = "kubevirt.io/realtime" + + // VirtualMachineUnpaused is a custom pod condition set for the virt-launcher pod. + // It's used as a readiness gate to prevent paused VMs from being marked as ready. + VirtualMachineUnpaused k8sv1.PodConditionType = "kubevirt.io/virtual-machine-unpaused" + + // SEVLabel marks the node as capable of running workloads with SEV + SEVLabel string = "kubevirt.io/sev" + + // FlavorAnnotation is the name of a VirtualMachineFlavor + FlavorAnnotation string = "kubevirt.io/flavor-name" + + // ClusterFlavorAnnotation is the name of a VirtualMachineClusterFlavor + ClusterFlavorAnnotation string = "kubevirt.io/cluster-flavor-name" + + // VirtualMachinePoolRevisionName is used to store the vmpool revision's name this object + // originated from. + VirtualMachinePoolRevisionName string = "kubevirt.io/vm-pool-revision-name" + + // VirtualMachineNameLabel is the name of the Virtual Machine + VirtualMachineNameLabel string = "vm.kubevirt.io/name" +) + +func NewVMI(name string, uid types.UID) *VirtualMachineInstance { + return &VirtualMachineInstance{ + Spec: VirtualMachineInstanceSpec{}, + ObjectMeta: metav1.ObjectMeta{ + Name: name, + UID: uid, + Namespace: k8sv1.NamespaceDefault, + }, + Status: VirtualMachineInstanceStatus{}, + TypeMeta: metav1.TypeMeta{ + APIVersion: GroupVersion.String(), + Kind: VirtualMachineInstanceGroupVersionKind.Kind, + }, + } +} + +type SyncEvent string + +const ( + Created SyncEvent = "Created" + Deleted SyncEvent = "Deleted" + PresetFailed SyncEvent = "PresetFailed" + Override SyncEvent = "Override" + Started SyncEvent = "Started" + ShuttingDown SyncEvent = "ShuttingDown" + Stopped SyncEvent = "Stopped" + PreparingTarget SyncEvent = "PreparingTarget" + Migrating SyncEvent = "Migrating" + Migrated SyncEvent = "Migrated" + SyncFailed SyncEvent = "SyncFailed" + Resumed SyncEvent = "Resumed" + AccessCredentialsSyncFailed SyncEvent = "AccessCredentialsSyncFailed" + AccessCredentialsSyncSuccess SyncEvent = "AccessCredentialsSyncSuccess" +) + +func (s SyncEvent) String() string { + return string(s) +} + +// TODO Namespace could be different, also store it somewhere in the domain, so that we can report deletes on handler startup properly +func NewVMIReferenceFromName(name string) *VirtualMachineInstance { + return NewVMIReferenceFromNameWithNS(k8sv1.NamespaceDefault, name) +} + +func NewVMIReferenceFromNameWithNS(namespace string, name string) *VirtualMachineInstance { + vmi := &VirtualMachineInstance{ + ObjectMeta: metav1.ObjectMeta{ + Name: name, + Namespace: namespace, + SelfLink: fmt.Sprintf("/apis/%s/namespaces/%s/virtualmachineinstances/%s", GroupVersion.String(), namespace, name), + }, + } + vmi.SetGroupVersionKind(schema.GroupVersionKind{Group: GroupVersion.Group, Kind: "VirtualMachineInstance", Version: GroupVersion.Version}) + return vmi +} + +func NewVMIReferenceWithUUID(namespace string, name string, uuid types.UID) *VirtualMachineInstance { + vmi := NewVMIReferenceFromNameWithNS(namespace, name) + vmi.UID = uuid + return vmi +} + +type VMISelector struct { + // Name of the VirtualMachineInstance to migrate + Name string `json:"name" valid:"required"` +} + +func NewVMReferenceFromNameWithNS(namespace string, name string) *VirtualMachine { + vm := &VirtualMachine{ + ObjectMeta: metav1.ObjectMeta{ + Name: name, + Namespace: namespace, + SelfLink: fmt.Sprintf("/apis/%s/namespaces/%s/virtualmachines/%s", GroupVersion.String(), namespace, name), + }, + } + vm.SetGroupVersionKind(schema.GroupVersionKind{Group: GroupVersion.Group, Kind: "VirtualMachine", Version: GroupVersion.Version}) + return vm +} + +// Given a VirtualMachineInstance, update all NodeSelectorTerms with anti-affinity for that VirtualMachineInstance's node. +// This is useful for the case when a migration away from a node must occur. +// This method returns the full Affinity structure updated the anti affinity terms +func UpdateAntiAffinityFromVMINode(pod *k8sv1.Pod, vmi *VirtualMachineInstance) *k8sv1.Affinity { + if pod.Spec.Affinity == nil { + pod.Spec.Affinity = &k8sv1.Affinity{} + } + + if pod.Spec.Affinity.NodeAffinity == nil { + pod.Spec.Affinity.NodeAffinity = &k8sv1.NodeAffinity{} + } + + if pod.Spec.Affinity.NodeAffinity.RequiredDuringSchedulingIgnoredDuringExecution == nil { + pod.Spec.Affinity.NodeAffinity.RequiredDuringSchedulingIgnoredDuringExecution = &k8sv1.NodeSelector{} + } + + selector := pod.Spec.Affinity.NodeAffinity.RequiredDuringSchedulingIgnoredDuringExecution + terms := selector.NodeSelectorTerms + + if len(terms) == 0 { + selector.NodeSelectorTerms = append(terms, k8sv1.NodeSelectorTerm{}) + terms = selector.NodeSelectorTerms + } + + for idx, term := range terms { + if term.MatchExpressions == nil { + term.MatchExpressions = []k8sv1.NodeSelectorRequirement{} + } + + term.MatchExpressions = append(term.MatchExpressions, PrepareVMINodeAntiAffinitySelectorRequirement(vmi)) + selector.NodeSelectorTerms[idx] = term + } + + return pod.Spec.Affinity +} + +// Given a VirtualMachineInstance, create a NodeSelectorTerm with anti-affinity for that VirtualMachineInstance's node. +// This is useful for the case when a migration away from a node must occur. +func PrepareVMINodeAntiAffinitySelectorRequirement(vmi *VirtualMachineInstance) k8sv1.NodeSelectorRequirement { + return k8sv1.NodeSelectorRequirement{ + Key: "kubernetes.io/hostname", + Operator: k8sv1.NodeSelectorOpNotIn, + Values: []string{vmi.Status.NodeName}, + } +} + +// VirtualMachineInstance is *the* VirtualMachineInstance Definition. It represents a virtual machine in the runtime environment of kubernetes. +// +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +genclient +type VirtualMachineInstanceReplicaSet struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + // VirtualMachineInstance Spec contains the VirtualMachineInstance specification. + Spec VirtualMachineInstanceReplicaSetSpec `json:"spec" valid:"required"` + // Status is the high level overview of how the VirtualMachineInstance is doing. It contains information available to controllers and users. + // +nullable + Status VirtualMachineInstanceReplicaSetStatus `json:"status,omitempty"` +} + +// VMIList is a list of VMIs +// +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +type VirtualMachineInstanceReplicaSetList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []VirtualMachineInstanceReplicaSet `json:"items"` +} + +type VirtualMachineInstanceReplicaSetSpec struct { + // Number of desired pods. This is a pointer to distinguish between explicit + // zero and not specified. Defaults to 1. + // +optional + Replicas *int32 `json:"replicas,omitempty"` + + // Label selector for pods. Existing ReplicaSets whose pods are + // selected by this will be the ones affected by this deployment. + Selector *metav1.LabelSelector `json:"selector" valid:"required"` + + // Template describes the pods that will be created. + Template *VirtualMachineInstanceTemplateSpec `json:"template" valid:"required"` + + // Indicates that the replica set is paused. + // +optional + Paused bool `json:"paused,omitempty" protobuf:"varint,7,opt,name=paused"` +} + +type VirtualMachineInstanceReplicaSetStatus struct { + // Total number of non-terminated pods targeted by this deployment (their labels match the selector). + // +optional + Replicas int32 `json:"replicas,omitempty" protobuf:"varint,2,opt,name=replicas"` + + // The number of ready replicas for this replica set. + // +optional + ReadyReplicas int32 `json:"readyReplicas,omitempty" protobuf:"varint,4,opt,name=readyReplicas"` + + Conditions []VirtualMachineInstanceReplicaSetCondition `json:"conditions,omitempty" optional:"true"` + + // Canonical form of the label selector for HPA which consumes it through the scale subresource. + LabelSelector string `json:"labelSelector,omitempty"` +} + +type VirtualMachineInstanceReplicaSetCondition struct { + Type VirtualMachineInstanceReplicaSetConditionType `json:"type"` + Status k8sv1.ConditionStatus `json:"status"` + // +nullable + LastProbeTime metav1.Time `json:"lastProbeTime,omitempty"` + // +nullable + LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"` + Reason string `json:"reason,omitempty"` + Message string `json:"message,omitempty"` +} + +type VirtualMachineInstanceReplicaSetConditionType string + +const ( + // VirtualMachineInstanceReplicaSetReplicaFailure is added in a replica set when one of its vmis + // fails to be created due to insufficient quota, limit ranges, pod security policy, node selectors, + // etc. or deleted due to kubelet being down or finalizers are failing. + VirtualMachineInstanceReplicaSetReplicaFailure VirtualMachineInstanceReplicaSetConditionType = "ReplicaFailure" + + // VirtualMachineInstanceReplicaSetReplicaPaused is added in a replica set when the replica set got paused by the controller. + // After this condition was added, it is safe to remove or add vmis by hand and adjust the replica count by hand. + VirtualMachineInstanceReplicaSetReplicaPaused VirtualMachineInstanceReplicaSetConditionType = "ReplicaPaused" +) + +type DataVolumeTemplateDummyStatus struct{} + +type DataVolumeTemplateSpec struct { + // TypeMeta only exists on DataVolumeTemplate for API backwards compatibility + // this field is not used by our controllers and is a no-op. + // +nullable + metav1.TypeMeta `json:",inline"` + // +kubebuilder:pruning:PreserveUnknownFields + // +nullable + metav1.ObjectMeta `json:"metadata,omitempty"` + // DataVolumeSpec contains the DataVolume specification. + Spec cdiv1.DataVolumeSpec `json:"spec"` + + // DataVolumeTemplateDummyStatus is here simply for backwards compatibility with + // a previous API. + // +nullable + // +optional + Status *DataVolumeTemplateDummyStatus `json:"status,omitempty"` +} + +type VirtualMachineInstanceTemplateSpec struct { + // +kubebuilder:pruning:PreserveUnknownFields + // +nullable + ObjectMeta metav1.ObjectMeta `json:"metadata,omitempty"` + // VirtualMachineInstance Spec contains the VirtualMachineInstance specification. + Spec VirtualMachineInstanceSpec `json:"spec,omitempty" valid:"required"` +} + +// VirtualMachineInstanceMigration represents the object tracking a VMI's migration +// to another host in the cluster +// +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +genclient +type VirtualMachineInstanceMigration struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + Spec VirtualMachineInstanceMigrationSpec `json:"spec" valid:"required"` + Status VirtualMachineInstanceMigrationStatus `json:"status,omitempty"` +} + +// VirtualMachineInstanceMigrationList is a list of VirtualMachineMigrations +// +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +type VirtualMachineInstanceMigrationList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []VirtualMachineInstanceMigration `json:"items"` +} + +type VirtualMachineInstanceMigrationSpec struct { + // The name of the VMI to perform the migration on. VMI must exist in the migration objects namespace + VMIName string `json:"vmiName,omitempty" valid:"required"` +} + +// VirtualMachineInstanceMigration reprents information pertaining to a VMI's migration. +type VirtualMachineInstanceMigrationStatus struct { + Phase VirtualMachineInstanceMigrationPhase `json:"phase,omitempty"` + Conditions []VirtualMachineInstanceMigrationCondition `json:"conditions,omitempty"` +} + +// VirtualMachineInstanceMigrationPhase is a label for the condition of a VirtualMachineInstanceMigration at the current time. +type VirtualMachineInstanceMigrationPhase string + +// These are the valid migration phases +const ( + MigrationPhaseUnset VirtualMachineInstanceMigrationPhase = "" + // The migration is accepted by the system + MigrationPending VirtualMachineInstanceMigrationPhase = "Pending" + // The migration's target pod is being scheduled + MigrationScheduling VirtualMachineInstanceMigrationPhase = "Scheduling" + // The migration's target pod is running + MigrationScheduled VirtualMachineInstanceMigrationPhase = "Scheduled" + // The migration's target pod is being prepared for migration + MigrationPreparingTarget VirtualMachineInstanceMigrationPhase = "PreparingTarget" + // The migration's target pod is prepared and ready for migration + MigrationTargetReady VirtualMachineInstanceMigrationPhase = "TargetReady" + // The migration is in progress + MigrationRunning VirtualMachineInstanceMigrationPhase = "Running" + // The migration passed + MigrationSucceeded VirtualMachineInstanceMigrationPhase = "Succeeded" + // The migration failed + MigrationFailed VirtualMachineInstanceMigrationPhase = "Failed" +) + +// VirtualMachineInstancePreset defines a VMI spec.domain to be applied to all VMIs that match the provided label selector +// More info: https://kubevirt.io/user-guide/virtual_machines/presets/#overrides +// +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +genclient +type VirtualMachineInstancePreset struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + // VirtualMachineInstance Spec contains the VirtualMachineInstance specification. + Spec VirtualMachineInstancePresetSpec `json:"spec,omitempty" valid:"required"` +} + +// VirtualMachineInstancePresetList is a list of VirtualMachinePresets +// +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +type VirtualMachineInstancePresetList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []VirtualMachineInstancePreset `json:"items"` +} + +type VirtualMachineInstancePresetSpec struct { + // Selector is a label query over a set of VMIs. + // Required. + Selector metav1.LabelSelector `json:"selector"` + // Domain is the same object type as contained in VirtualMachineInstanceSpec + Domain *DomainSpec `json:"domain,omitempty"` +} + +func NewVirtualMachinePreset(name string, selector metav1.LabelSelector) *VirtualMachineInstancePreset { + return &VirtualMachineInstancePreset{ + Spec: VirtualMachineInstancePresetSpec{ + Selector: selector, + Domain: &DomainSpec{}, + }, + ObjectMeta: metav1.ObjectMeta{ + Name: name, + Namespace: k8sv1.NamespaceDefault, + }, + TypeMeta: metav1.TypeMeta{ + APIVersion: GroupVersion.String(), + Kind: VirtualMachineInstancePresetGroupVersionKind.Kind, + }, + } +} + +// VirtualMachine handles the VirtualMachines that are not running +// or are in a stopped state +// The VirtualMachine contains the template to create the +// VirtualMachineInstance. It also mirrors the running state of the created +// VirtualMachineInstance in its status. +// +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +genclient +type VirtualMachine struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + // Spec contains the specification of VirtualMachineInstance created + Spec VirtualMachineSpec `json:"spec" valid:"required"` + // Status holds the current state of the controller and brief information + // about its associated VirtualMachineInstance + Status VirtualMachineStatus `json:"status,omitempty"` +} + +// Return the current runStrategy for the VirtualMachine +// if vm.spec.running is set, that will be mapped to runStrategy: +// false: RunStrategyHalted +// true: RunStrategyAlways +func (vm *VirtualMachine) RunStrategy() (VirtualMachineRunStrategy, error) { + if vm.Spec.Running != nil && vm.Spec.RunStrategy != nil { + return RunStrategyUnknown, fmt.Errorf("running and runstrategy are mutually exclusive") + } + RunStrategy := RunStrategyHalted + if vm.Spec.Running != nil { + if (*vm.Spec.Running) == true { + RunStrategy = RunStrategyAlways + } + } else if vm.Spec.RunStrategy != nil { + RunStrategy = *vm.Spec.RunStrategy + } + return RunStrategy, nil +} + +// VirtualMachineList is a list of virtualmachines +// +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +type VirtualMachineList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []VirtualMachine `json:"items"` +} + +// VirtualMachineRunStrategy is a label for the requested VirtualMachineInstance Running State at the current time. +type VirtualMachineRunStrategy string + +// These are the valid VMI run strategies +const ( + // Placeholder. Not a valid RunStrategy. + RunStrategyUnknown VirtualMachineRunStrategy = "" + // VMI should always be running. + RunStrategyAlways VirtualMachineRunStrategy = "Always" + // VMI should never be running. + RunStrategyHalted VirtualMachineRunStrategy = "Halted" + // VMI can be started/stopped using API endpoints. + RunStrategyManual VirtualMachineRunStrategy = "Manual" + // VMI will initially be running--and restarted if a failure occurs. + // It will not be restarted upon successful completion. + RunStrategyRerunOnFailure VirtualMachineRunStrategy = "RerunOnFailure" + // VMI will run once and not be restarted upon completion regardless + // if the completion is of phase Failure or Success + RunStrategyOnce VirtualMachineRunStrategy = "Once" +) + +// VirtualMachineSpec describes how the proper VirtualMachine +// should look like +type VirtualMachineSpec struct { + // Running controls whether the associatied VirtualMachineInstance is created or not + // Mutually exclusive with RunStrategy + Running *bool `json:"running,omitempty" optional:"true"` + + // Running state indicates the requested running state of the VirtualMachineInstance + // mutually exclusive with Running + RunStrategy *VirtualMachineRunStrategy `json:"runStrategy,omitempty" optional:"true"` + + // FlavorMatcher references a flavor that is used to fill fields in Template + Flavor *FlavorMatcher `json:"flavor,omitempty" optional:"true"` + + // Template is the direct specification of VirtualMachineInstance + Template *VirtualMachineInstanceTemplateSpec `json:"template"` + + // dataVolumeTemplates is a list of dataVolumes that the VirtualMachineInstance template can reference. + // DataVolumes in this list are dynamically created for the VirtualMachine and are tied to the VirtualMachine's life-cycle. + DataVolumeTemplates []DataVolumeTemplateSpec `json:"dataVolumeTemplates,omitempty"` +} + +// StateChangeRequestType represents the existing state change requests that are possible +type StateChangeRequestAction string + +// These are the currently defined state change requests +const ( + StartRequest StateChangeRequestAction = "Start" + StopRequest StateChangeRequestAction = "Stop" +) + +// VirtualMachinePrintableStatus is a human readable, high-level representation of the status of the virtual machine. +type VirtualMachinePrintableStatus string + +// A list of statuses defined for virtual machines +const ( + // VirtualMachineStatusStopped indicates that the virtual machine is currently stopped and isn't expected to start. + VirtualMachineStatusStopped VirtualMachinePrintableStatus = "Stopped" + // VirtualMachineStatusProvisioning indicates that cluster resources associated with the virtual machine + // (e.g., DataVolumes) are being provisioned and prepared. + VirtualMachineStatusProvisioning VirtualMachinePrintableStatus = "Provisioning" + // VirtualMachineStatusStarting indicates that the virtual machine is being prepared for running. + VirtualMachineStatusStarting VirtualMachinePrintableStatus = "Starting" + // VirtualMachineStatusRunning indicates that the virtual machine is running. + VirtualMachineStatusRunning VirtualMachinePrintableStatus = "Running" + // VirtualMachineStatusPaused indicates that the virtual machine is paused. + VirtualMachineStatusPaused VirtualMachinePrintableStatus = "Paused" + // VirtualMachineStatusStopping indicates that the virtual machine is in the process of being stopped. + VirtualMachineStatusStopping VirtualMachinePrintableStatus = "Stopping" + // VirtualMachineStatusTerminating indicates that the virtual machine is in the process of deletion, + // as well as its associated resources (VirtualMachineInstance, DataVolumes, …). + VirtualMachineStatusTerminating VirtualMachinePrintableStatus = "Terminating" + // VirtualMachineStatusCrashLoopBackOff indicates that the virtual machine is currently in a crash loop waiting to be retried. + VirtualMachineStatusCrashLoopBackOff VirtualMachinePrintableStatus = "CrashLoopBackOff" + // VirtualMachineStatusMigrating indicates that the virtual machine is in the process of being migrated + // to another host. + VirtualMachineStatusMigrating VirtualMachinePrintableStatus = "Migrating" + // VirtualMachineStatusUnknown indicates that the state of the virtual machine could not be obtained, + // typically due to an error in communicating with the host on which it's running. + VirtualMachineStatusUnknown VirtualMachinePrintableStatus = "Unknown" + // VirtualMachineStatusUnschedulable indicates that an error has occurred while scheduling the virtual machine, + // e.g. due to unsatisfiable resource requests or unsatisfiable scheduling constraints. + VirtualMachineStatusUnschedulable VirtualMachinePrintableStatus = "ErrorUnschedulable" + // VirtualMachineStatusErrImagePull indicates that an error has occured while pulling an image for + // a containerDisk VM volume. + VirtualMachineStatusErrImagePull VirtualMachinePrintableStatus = "ErrImagePull" + // VirtualMachineStatusImagePullBackOff indicates that an error has occured while pulling an image for + // a containerDisk VM volume, and that kubelet is backing off before retrying. + VirtualMachineStatusImagePullBackOff VirtualMachinePrintableStatus = "ImagePullBackOff" + // VirtualMachineStatusPvcNotFound indicates that the virtual machine references a PVC volume which doesn't exist. + VirtualMachineStatusPvcNotFound VirtualMachinePrintableStatus = "ErrorPvcNotFound" + // VirtualMachineStatusDataVolumeNotFound indicates that the virtual machine references a DataVolume volume which doesn't exist. + VirtualMachineStatusDataVolumeNotFound VirtualMachinePrintableStatus = "ErrorDataVolumeNotFound" + // VirtualMachineStatusDataVolumeError indicates that an error has been reported by one of the DataVolumes + // referenced by the virtual machines. + VirtualMachineStatusDataVolumeError VirtualMachinePrintableStatus = "DataVolumeError" + // VirtualMachineStatusWaitingForVolumeBinding indicates that some PersistentVolumeClaims backing + // the virtual machine volume are still not bound. + VirtualMachineStatusWaitingForVolumeBinding VirtualMachinePrintableStatus = "WaitingForVolumeBinding" +) + +// VirtualMachineStartFailure tracks VMIs which failed to transition successfully +// to running using the VM status +type VirtualMachineStartFailure struct { + ConsecutiveFailCount int `json:"consecutiveFailCount,omitempty"` + LastFailedVMIUID types.UID `json:"lastFailedVMIUID,omitempty"` + RetryAfterTimestamp *metav1.Time `json:"retryAfterTimestamp,omitempty"` +} + +// VirtualMachineStatus represents the status returned by the +// controller to describe how the VirtualMachine is doing +type VirtualMachineStatus struct { + // SnapshotInProgress is the name of the VirtualMachineSnapshot currently executing + SnapshotInProgress *string `json:"snapshotInProgress,omitempty"` + // RestoreInProgress is the name of the VirtualMachineRestore currently executing + RestoreInProgress *string `json:"restoreInProgress,omitempty"` + // Created indicates if the virtual machine is created in the cluster + Created bool `json:"created,omitempty"` + // Ready indicates if the virtual machine is running and ready + Ready bool `json:"ready,omitempty"` + // PrintableStatus is a human readable, high-level representation of the status of the virtual machine + PrintableStatus VirtualMachinePrintableStatus `json:"printableStatus,omitempty"` + // Hold the state information of the VirtualMachine and its VirtualMachineInstance + Conditions []VirtualMachineCondition `json:"conditions,omitempty" optional:"true"` + // StateChangeRequests indicates a list of actions that should be taken on a VMI + // e.g. stop a specific VMI then start a new one. + StateChangeRequests []VirtualMachineStateChangeRequest `json:"stateChangeRequests,omitempty" optional:"true"` + // VolumeRequests indicates a list of volumes add or remove from the VMI template and + // hotplug on an active running VMI. + // +listType=atomic + VolumeRequests []VirtualMachineVolumeRequest `json:"volumeRequests,omitempty" optional:"true"` + + // VolumeSnapshotStatuses indicates a list of statuses whether snapshotting is + // supported by each volume. + VolumeSnapshotStatuses []VolumeSnapshotStatus `json:"volumeSnapshotStatuses,omitempty" optional:"true"` + + // StartFailure tracks consecutive VMI startup failures for the purposes of + // crash loop backoffs + // +nullable + // +optional + StartFailure *VirtualMachineStartFailure `json:"startFailure,omitempty" optional:"true"` +} + +type VolumeSnapshotStatus struct { + // Volume name + Name string `json:"name"` + // True if the volume supports snapshotting + Enabled bool `json:"enabled"` + // Empty if snapshotting is enabled, contains reason otherwise + Reason string `json:"reason,omitempty" optional:"true"` +} + +type VirtualMachineVolumeRequest struct { + // AddVolumeOptions when set indicates a volume should be added. The details + // within this field specify how to add the volume + AddVolumeOptions *AddVolumeOptions `json:"addVolumeOptions,omitempty" optional:"true"` + // RemoveVolumeOptions when set indicates a volume should be removed. The details + // within this field specify how to add the volume + RemoveVolumeOptions *RemoveVolumeOptions `json:"removeVolumeOptions,omitempty" optional:"true"` +} + +type VirtualMachineStateChangeRequest struct { + // Indicates the type of action that is requested. e.g. Start or Stop + Action StateChangeRequestAction `json:"action"` + // Provides additional data in order to perform the Action + Data map[string]string `json:"data,omitempty" optional:"true"` + // Indicates the UUID of an existing Virtual Machine Instance that this change request applies to -- if applicable + UID *types.UID `json:"uid,omitempty" optional:"true" protobuf:"bytes,5,opt,name=uid,casttype=k8s.io/kubernetes/pkg/types.UID"` +} + +// VirtualMachineCondition represents the state of VirtualMachine +type VirtualMachineCondition struct { + Type VirtualMachineConditionType `json:"type"` + Status k8sv1.ConditionStatus `json:"status"` + // +nullable + LastProbeTime metav1.Time `json:"lastProbeTime,omitempty"` + // +nullable + LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"` + Reason string `json:"reason,omitempty"` + Message string `json:"message,omitempty"` +} + +type VirtualMachineConditionType string + +const ( + // VirtualMachineFailure is added in a virtual machine when its vmi + // fails to be created due to insufficient quota, limit ranges, pod security policy, node selectors, + // etc. or deleted due to kubelet being down or finalizers are failing. + VirtualMachineFailure VirtualMachineConditionType = "Failure" + + // VirtualMachineReady is copied to the virtual machine from its vmi + VirtualMachineReady VirtualMachineConditionType = "Ready" + + // VirtualMachinePaused is added in a virtual machine when its vmi + // signals with its own condition that it is paused. + VirtualMachinePaused VirtualMachineConditionType = "Paused" +) + +type HostDiskType string + +const ( + // if disk does not exist at the given path, + // a disk image will be created there + HostDiskExistsOrCreate HostDiskType = "DiskOrCreate" + // a disk image must exist at given disk path + HostDiskExists HostDiskType = "Disk" +) + +type NetworkInterfaceType string + +const ( + // Virtual machine instance bride interface + BridgeInterface NetworkInterfaceType = "bridge" + // Virtual machine instance slirp interface + SlirpInterface NetworkInterfaceType = "slirp" + // Virtual machine instance masquerade interface + MasqueradeInterface NetworkInterfaceType = "masquerade" +) + +type DriverCache string + +type DriverIO string + +const ( + // CacheNone - I/O from the guest is not cached on the host, but may be kept in a writeback disk cache. + CacheNone DriverCache = "none" + // CacheWriteThrough - I/O from the guest is cached on the host but written through to the physical medium. + CacheWriteThrough DriverCache = "writethrough" + // CacheWriteBack - I/O from the guest is cached on the host. + CacheWriteBack DriverCache = "writeback" + + // IOThreads - User mode based threads with a shared lock that perform I/O tasks. Can impact performance but offers + // more predictable behaviour. This method is also takes fewer CPU cycles to submit I/O requests. + IOThreads DriverIO = "threads" + // IONative - Kernel native I/O tasks (AIO) offer a better performance but can block the VM if the file is not fully + // allocated so this method recommended only when the backing file/disk/etc is fully preallocated. + IONative DriverIO = "native" + // IODefault - Fallback to the default value from the kernel. With recent Kernel versions (for example RHEL-7) the + // default is AIO. + IODefault DriverIO = "default" +) + +// Handler defines a specific action that should be taken +// TODO: pass structured data to these actions, and document that data here. +type Handler struct { + // One and only one of the following should be specified. + // Exec specifies the action to take, it will be executed on the guest through the qemu-guest-agent. + // If the guest agent is not available, this probe will fail. + // +optional + Exec *k8sv1.ExecAction `json:"exec,omitempty" protobuf:"bytes,1,opt,name=exec"` + // GuestAgentPing contacts the qemu-guest-agent for availability checks. + // +optional + GuestAgentPing *GuestAgentPing `json:"guestAgentPing,omitempty"` + // HTTPGet specifies the http request to perform. + // +optional + HTTPGet *k8sv1.HTTPGetAction `json:"httpGet,omitempty"` + // TCPSocket specifies an action involving a TCP port. + // TCP hooks not yet supported + // TODO: implement a realistic TCP lifecycle hook + // +optional + TCPSocket *k8sv1.TCPSocketAction `json:"tcpSocket,omitempty"` +} + +// Probe describes a health check to be performed against a VirtualMachineInstance to determine whether it is +// alive or ready to receive traffic. +type Probe struct { + // The action taken to determine the health of a VirtualMachineInstance + Handler `json:",inline"` + // Number of seconds after the VirtualMachineInstance has started before liveness probes are initiated. + // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + // +optional + InitialDelaySeconds int32 `json:"initialDelaySeconds,omitempty"` + // Number of seconds after which the probe times out. + // For exec probes the timeout fails the probe but does not terminate the command running on the guest. + // This means a blocking command can result in an increasing load on the guest. + // A small buffer will be added to the resulting workload exec probe to compensate for delays + // caused by the qemu guest exec mechanism. + // Defaults to 1 second. Minimum value is 1. + // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + // +optional + TimeoutSeconds int32 `json:"timeoutSeconds,omitempty"` + // How often (in seconds) to perform the probe. + // Default to 10 seconds. Minimum value is 1. + // +optional + PeriodSeconds int32 `json:"periodSeconds,omitempty"` + // Minimum consecutive successes for the probe to be considered successful after having failed. + // Defaults to 1. Must be 1 for liveness. Minimum value is 1. + // +optional + SuccessThreshold int32 `json:"successThreshold,omitempty"` + // Minimum consecutive failures for the probe to be considered failed after having succeeded. + // Defaults to 3. Minimum value is 1. + // +optional + FailureThreshold int32 `json:"failureThreshold,omitempty"` +} + +// KubeVirt represents the object deploying all KubeVirt resources +// +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +genclient +type KubeVirt struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + Spec KubeVirtSpec `json:"spec" valid:"required"` + Status KubeVirtStatus `json:"status,omitempty"` +} + +// KubeVirtList is a list of KubeVirts +// +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +type KubeVirtList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []KubeVirt `json:"items"` +} + +type KubeVirtSelfSignConfiguration struct { + // Deprecated. Use CA.Duration instead + CARotateInterval *metav1.Duration `json:"caRotateInterval,omitempty"` + // Deprecated. Use Server.Duration instead + CertRotateInterval *metav1.Duration `json:"certRotateInterval,omitempty"` + // Deprecated. Use CA.Duration and CA.RenewBefore instead + CAOverlapInterval *metav1.Duration `json:"caOverlapInterval,omitempty"` + + // CA configuration + // CA certs are kept in the CA bundle as long as they are valid + CA *CertConfig `json:"ca,omitempty"` + + // Server configuration + // Certs are rotated and discarded + Server *CertConfig `json:"server,omitempty"` +} + +// CertConfig contains the tunables for TLS certificates +type CertConfig struct { + // The requested 'duration' (i.e. lifetime) of the Certificate. + Duration *metav1.Duration `json:"duration,omitempty"` + + // The amount of time before the currently issued certificate's "notAfter" + // time that we will begin to attempt to renew the certificate. + RenewBefore *metav1.Duration `json:"renewBefore,omitempty"` +} + +type KubeVirtCertificateRotateStrategy struct { + SelfSigned *KubeVirtSelfSignConfiguration `json:"selfSigned,omitempty"` +} + +type WorkloadUpdateMethod string + +const ( + // WorkloadUpdateMethodLiveMigrate allows VMIs which are capable of being + // migrated to automatically migrate during automated workload updates. + WorkloadUpdateMethodLiveMigrate WorkloadUpdateMethod = "LiveMigrate" + // WorkloadUpdateMethodEvict results in a VMI's pod being evicted. Unless the + // pod has a pod disruption budget allocated, the eviction will usually result in + // the VMI being shutdown. + // Depending on whether a VMI is backed by a VM or not, this will either result + // in a restart of the VM by rescheduling a new VMI, or the shutdown via eviction + // of a standalone VMI object. + WorkloadUpdateMethodEvict WorkloadUpdateMethod = "Evict" +) + +// +// KubeVirtWorkloadUpdateStrategy defines options related to updating a KubeVirt install +type KubeVirtWorkloadUpdateStrategy struct { + // WorkloadUpdateMethods defines the methods that can be used to disrupt workloads + // during automated workload updates. + // When multiple methods are present, the least disruptive method takes + // precedence over more disruptive methods. For example if both LiveMigrate and Shutdown + // methods are listed, only VMs which are not live migratable will be restarted/shutdown + // + // An empty list defaults to no automated workload updating + // + // +listType=atomic + // +optional + WorkloadUpdateMethods []WorkloadUpdateMethod `json:"workloadUpdateMethods,omitempty"` + + // BatchEvictionSize Represents the number of VMIs that can be forced updated per + // the BatchShutdownInteral interval + // + // Defaults to 10 + // + // +optional + BatchEvictionSize *int `json:"batchEvictionSize,omitempty"` + + // BatchEvictionInterval Represents the interval to wait before issuing the next + // batch of shutdowns + // + // Defaults to 1 minute + // + // +optional + BatchEvictionInterval *metav1.Duration `json:"batchEvictionInterval,omitempty"` +} + +type KubeVirtSpec struct { + // The image tag to use for the continer images installed. + // Defaults to the same tag as the operator's container image. + ImageTag string `json:"imageTag,omitempty"` + // The image registry to pull the container images from + // Defaults to the same registry the operator's container image is pulled from. + ImageRegistry string `json:"imageRegistry,omitempty"` + + // The ImagePullPolicy to use. + ImagePullPolicy k8sv1.PullPolicy `json:"imagePullPolicy,omitempty" valid:"required"` + + // The namespace Prometheus is deployed in + // Defaults to openshift-monitor + MonitorNamespace string `json:"monitorNamespace,omitempty"` + + // The namespace the service monitor will be deployed + // When ServiceMonitorNamespace is set, then we'll install the service monitor object in that namespace + // otherwise we will use the monitoring namespace. + ServiceMonitorNamespace string `json:"serviceMonitorNamespace,omitempty"` + + // The name of the Prometheus service account that needs read-access to KubeVirt endpoints + // Defaults to prometheus-k8s + MonitorAccount string `json:"monitorAccount,omitempty"` + + // WorkloadUpdateStrategy defines at the cluster level how to handle + // automated workload updates + WorkloadUpdateStrategy KubeVirtWorkloadUpdateStrategy `json:"workloadUpdateStrategy,omitempty"` + + // Specifies if kubevirt can be deleted if workloads are still present. + // This is mainly a precaution to avoid accidental data loss + UninstallStrategy KubeVirtUninstallStrategy `json:"uninstallStrategy,omitempty"` + + CertificateRotationStrategy KubeVirtCertificateRotateStrategy `json:"certificateRotateStrategy,omitempty"` + + // Designate the apps.kubevirt.io/version label for KubeVirt components. + // Useful if KubeVirt is included as part of a product. + // If ProductVersion is not specified, KubeVirt's version will be used. + ProductVersion string `json:"productVersion,omitempty"` + + // Designate the apps.kubevirt.io/part-of label for KubeVirt components. + // Useful if KubeVirt is included as part of a product. + // If ProductName is not specified, the part-of label will be omitted. + ProductName string `json:"productName,omitempty"` + + // Designate the apps.kubevirt.io/component label for KubeVirt components. + // Useful if KubeVirt is included as part of a product. + // If ProductComponent is not specified, the component label default value is kubevirt. + ProductComponent string `json:"productComponent,omitempty"` + + // holds kubevirt configurations. + // same as the virt-configMap + Configuration KubeVirtConfiguration `json:"configuration,omitempty"` + + // selectors and tolerations that should apply to KubeVirt infrastructure components + // +optional + Infra *ComponentConfig `json:"infra,omitempty"` + + // selectors and tolerations that should apply to KubeVirt workloads + // +optional + Workloads *ComponentConfig `json:"workloads,omitempty"` + + CustomizeComponents CustomizeComponents `json:"customizeComponents,omitempty"` +} + +type CustomizeComponents struct { + // +listType=atomic + Patches []CustomizeComponentsPatch `json:"patches,omitempty"` + + // Configure the value used for deployment and daemonset resources + Flags *Flags `json:"flags,omitempty"` +} + +// Flags will create a patch that will replace all flags for the container's +// command field. The only flags that will be used are those define. There are no +// guarantees around forward/backward compatibility. If set incorrectly this will +// cause the resource when rolled out to error until flags are updated. +type Flags struct { + API map[string]string `json:"api,omitempty"` + Controller map[string]string `json:"controller,omitempty"` + Handler map[string]string `json:"handler,omitempty"` +} + +type CustomizeComponentsPatch struct { + // +kubebuilder:validation:MinLength=1 + ResourceName string `json:"resourceName"` + // +kubebuilder:validation:MinLength=1 + ResourceType string `json:"resourceType"` + Patch string `json:"patch"` + Type PatchType `json:"type"` +} + +type PatchType string + +const ( + JSONPatchType PatchType = "json" + MergePatchType PatchType = "merge" + StrategicMergePatchType PatchType = "strategic" +) + +type KubeVirtUninstallStrategy string + +const ( + KubeVirtUninstallStrategyRemoveWorkloads KubeVirtUninstallStrategy = "RemoveWorkloads" + KubeVirtUninstallStrategyBlockUninstallIfWorkloadsExist KubeVirtUninstallStrategy = "BlockUninstallIfWorkloadsExist" +) + +// GenerationStatus keeps track of the generation for a given resource so that decisions about forced updates can be made. +type GenerationStatus struct { + // group is the group of the thing you're tracking + Group string `json:"group"` + // resource is the resource type of the thing you're tracking + Resource string `json:"resource"` + // namespace is where the thing you're tracking is + // +optional + Namespace string `json:"namespace,omitempty" optional:"true"` + // name is the name of the thing you're tracking + Name string `json:"name"` + // lastGeneration is the last generation of the workload controller involved + LastGeneration int64 `json:"lastGeneration"` + // hash is an optional field set for resources without generation that are content sensitive like secrets and configmaps + // +optional + Hash string `json:"hash,omitempty" optional:"true"` +} + +// KubeVirtStatus represents information pertaining to a KubeVirt deployment. +type KubeVirtStatus struct { + Phase KubeVirtPhase `json:"phase,omitempty"` + Conditions []KubeVirtCondition `json:"conditions,omitempty" optional:"true"` + OperatorVersion string `json:"operatorVersion,omitempty" optional:"true"` + TargetKubeVirtRegistry string `json:"targetKubeVirtRegistry,omitempty" optional:"true"` + TargetKubeVirtVersion string `json:"targetKubeVirtVersion,omitempty" optional:"true"` + TargetDeploymentConfig string `json:"targetDeploymentConfig,omitempty" optional:"true"` + TargetDeploymentID string `json:"targetDeploymentID,omitempty" optional:"true"` + ObservedKubeVirtRegistry string `json:"observedKubeVirtRegistry,omitempty" optional:"true"` + ObservedKubeVirtVersion string `json:"observedKubeVirtVersion,omitempty" optional:"true"` + ObservedDeploymentConfig string `json:"observedDeploymentConfig,omitempty" optional:"true"` + ObservedDeploymentID string `json:"observedDeploymentID,omitempty" optional:"true"` + OutdatedVirtualMachineInstanceWorkloads *int `json:"outdatedVirtualMachineInstanceWorkloads,omitempty" optional:"true"` + ObservedGeneration *int64 `json:"observedGeneration,omitempty"` + // +listType=atomic + Generations []GenerationStatus `json:"generations,omitempty" optional:"true"` +} + +// KubeVirtPhase is a label for the phase of a KubeVirt deployment at the current time. +type KubeVirtPhase string + +// These are the valid KubeVirt deployment phases +const ( + // The deployment is processing + KubeVirtPhaseDeploying KubeVirtPhase = "Deploying" + // The deployment succeeded + KubeVirtPhaseDeployed KubeVirtPhase = "Deployed" + // The deletion is processing + KubeVirtPhaseDeleting KubeVirtPhase = "Deleting" + // The deletion succeeeded + KubeVirtPhaseDeleted KubeVirtPhase = "Deleted" +) + +// KubeVirtCondition represents a condition of a KubeVirt deployment +type KubeVirtCondition struct { + Type KubeVirtConditionType `json:"type"` + Status k8sv1.ConditionStatus `json:"status"` + // +optional + // +nullable + LastProbeTime metav1.Time `json:"lastProbeTime,omitempty"` + // +optional + // +nullable + LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"` + Reason string `json:"reason,omitempty"` + Message string `json:"message,omitempty"` +} + +type KubeVirtConditionType string + +// These are the valid KubeVirt condition types +const ( + // Whether the deployment or deletion was successful (only used if false) + KubeVirtConditionSynchronized KubeVirtConditionType = "Synchronized" + // Whether all resources were created and up-to-date + KubeVirtConditionCreated KubeVirtConditionType = "Created" + + // Conditions for HCO, see https://github.com/kubevirt/hyperconverged-cluster-operator/blob/master/docs/conditions.md + // Whether KubeVirt is functional and available in the cluster. + KubeVirtConditionAvailable KubeVirtConditionType = "Available" + // Whether the operator is actively making changes to KubeVirt + KubeVirtConditionProgressing KubeVirtConditionType = "Progressing" + // Whether KubeVirt is not functioning completely + KubeVirtConditionDegraded KubeVirtConditionType = "Degraded" +) + +const ( + EvictionStrategyNone EvictionStrategy = "None" + EvictionStrategyLiveMigrate EvictionStrategy = "LiveMigrate" + EvictionStrategyExternal EvictionStrategy = "External" +) + +// RestartOptions may be provided when deleting an API object. +type RestartOptions struct { + metav1.TypeMeta `json:",inline"` + + // The duration in seconds before the object should be force-restarted. Value must be non-negative integer. + // The value zero indicates, restart immediately. If this value is nil, the default grace period for deletion of the corresponding VMI for the + // specified type will be used to determine on how much time to give the VMI to restart. + // Defaults to a per object value if not specified. zero means restart immediately. + // Allowed Values: nil and 0 + // +optional + GracePeriodSeconds *int64 `json:"gracePeriodSeconds,omitempty" protobuf:"varint,1,opt,name=gracePeriodSeconds"` + + // When present, indicates that modifications should not be + // persisted. An invalid or unrecognized dryRun directive will + // result in an error response and no further processing of the + // request. Valid values are: + // - All: all dry run stages will be processed + // +optional + // +listType=atomic + DryRun []string `json:"dryRun,omitempty" protobuf:"bytes,2,rep,name=dryRun"` +} + +// StartOptions may be provided on start request. +type StartOptions struct { + metav1.TypeMeta `json:",inline"` + + // Indicates that VM will be started in paused state. + // +optional + Paused bool `json:"paused,omitempty" protobuf:"varint,7,opt,name=paused"` + // When present, indicates that modifications should not be + // persisted. An invalid or unrecognized dryRun directive will + // result in an error response and no further processing of the + // request. Valid values are: + // - All: all dry run stages will be processed + // +optional + // +listType=atomic + DryRun []string `json:"dryRun,omitempty" protobuf:"bytes,5,rep,name=dryRun"` +} + +// PauseOptions may be provided on pause request. +type PauseOptions struct { + metav1.TypeMeta `json:",inline"` + + // When present, indicates that modifications should not be + // persisted. An invalid or unrecognized dryRun directive will + // result in an error response and no further processing of the + // request. Valid values are: + // - All: all dry run stages will be processed + // +optional + // +listType=atomic + DryRun []string `json:"dryRun,omitempty" protobuf:"bytes,1,rep,name=dryRun"` +} + +// UnpauseOptions may be provided on unpause request. +type UnpauseOptions struct { + metav1.TypeMeta `json:",inline"` + + // When present, indicates that modifications should not be + // persisted. An invalid or unrecognized dryRun directive will + // result in an error response and no further processing of the + // request. Valid values are: + // - All: all dry run stages will be processed + // +optional + // +listType=atomic + DryRun []string `json:"dryRun,omitempty" protobuf:"bytes,1,rep,name=dryRun"` +} + +const ( + StartRequestDataPausedKey string = "paused" + StartRequestDataPausedTrue string = "true" +) + +// StopOptions may be provided when deleting an API object. +type StopOptions struct { + metav1.TypeMeta `json:",inline"` + + // this updates the VMIs terminationGracePeriodSeconds during shutdown + // +optional + GracePeriod *int64 `json:"gracePeriod,omitempty" protobuf:"varint,1,opt,name=gracePeriod"` + // When present, indicates that modifications should not be + // persisted. An invalid or unrecognized dryRun directive will + // result in an error response and no further processing of the + // request. Valid values are: + // - All: all dry run stages will be processed + // +optional + // +listType=atomic + DryRun []string `json:"dryRun,omitempty" protobuf:"bytes,2,rep,name=dryRun"` +} + +// MigrateOptions may be provided on migrate request. +type MigrateOptions struct { + metav1.TypeMeta `json:",inline"` + // When present, indicates that modifications should not be + // persisted. An invalid or unrecognized dryRun directive will + // result in an error response and no further processing of the + // request. Valid values are: + // - All: all dry run stages will be processed + // +optional + // +listType=atomic + DryRun []string `json:"dryRun,omitempty" protobuf:"bytes,1,rep,name=dryRun"` +} + +// VirtualMachineInstanceGuestAgentInfo represents information from the installed guest agent +// +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +type VirtualMachineInstanceGuestAgentInfo struct { + metav1.TypeMeta `json:",inline"` + // GAVersion is a version of currently installed guest agent + GAVersion string `json:"guestAgentVersion,omitempty"` + // Return command list the guest agent supports + // +listType=atomic + SupportedCommands []GuestAgentCommandInfo `json:"supportedCommands,omitempty"` + // Hostname represents FQDN of a guest + Hostname string `json:"hostname,omitempty"` + // OS contains the guest operating system information + OS VirtualMachineInstanceGuestOSInfo `json:"os,omitempty"` + // Timezone is guest os current timezone + Timezone string `json:"timezone,omitempty"` + // UserList is a list of active guest OS users + UserList []VirtualMachineInstanceGuestOSUser `json:"userList,omitempty"` + // FSInfo is a guest os filesystem information containing the disk mapping and disk mounts with usage + FSInfo VirtualMachineInstanceFileSystemInfo `json:"fsInfo,omitempty"` + // FSFreezeStatus is the state of the fs of the guest + // it can be either frozen or thawed + FSFreezeStatus string `json:"fsFreezeStatus,omitempty"` +} + +// List of commands that QEMU guest agent supports +type GuestAgentCommandInfo struct { + Name string `json:"name"` + Enabled bool `json:"enabled,omitempty"` +} + +// VirtualMachineInstanceGuestOSUserList comprises the list of all active users on guest machine +// +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +type VirtualMachineInstanceGuestOSUserList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []VirtualMachineInstanceGuestOSUser `json:"items"` +} + +// VirtualMachineGuestOSUser is the single user of the guest os +type VirtualMachineInstanceGuestOSUser struct { + UserName string `json:"userName"` + Domain string `json:"domain,omitempty"` + LoginTime float64 `json:"loginTime,omitempty"` +} + +// VirtualMachineInstanceFileSystemInfo represents information regarding single guest os filesystem +type VirtualMachineInstanceFileSystemInfo struct { + Filesystems []VirtualMachineInstanceFileSystem `json:"disks"` +} + +// VirtualMachineInstanceFileSystemList comprises the list of all filesystems on guest machine +// +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +type VirtualMachineInstanceFileSystemList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []VirtualMachineInstanceFileSystem `json:"items"` +} + +// VirtualMachineInstanceFileSystem represents guest os disk +type VirtualMachineInstanceFileSystem struct { + DiskName string `json:"diskName"` + MountPoint string `json:"mountPoint"` + FileSystemType string `json:"fileSystemType"` + UsedBytes int `json:"usedBytes"` + TotalBytes int `json:"totalBytes"` +} + +// FreezeUnfreezeTimeout represent the time unfreeze will be triggered if guest was not unfrozen by unfreeze command +type FreezeUnfreezeTimeout struct { + UnfreezeTimeout *metav1.Duration `json:"unfreezeTimeout"` +} + +// AddVolumeOptions is provided when dynamically hot plugging a volume and disk +type AddVolumeOptions struct { + // Name represents the name that will be used to map the + // disk to the corresponding volume. This overrides any name + // set inside the Disk struct itself. + Name string `json:"name"` + // Disk represents the hotplug disk that will be plugged into the running VMI + Disk *Disk `json:"disk"` + // VolumeSource represents the source of the volume to map to the disk. + VolumeSource *HotplugVolumeSource `json:"volumeSource"` + // When present, indicates that modifications should not be + // persisted. An invalid or unrecognized dryRun directive will + // result in an error response and no further processing of the + // request. Valid values are: + // - All: all dry run stages will be processed + // +optional + // +listType=atomic + DryRun []string `json:"dryRun,omitempty"` +} + +// RemoveVolumeOptions is provided when dynamically hot unplugging volume and disk +type RemoveVolumeOptions struct { + // Name represents the name that maps to both the disk and volume that + // should be removed + Name string `json:"name"` + // When present, indicates that modifications should not be + // persisted. An invalid or unrecognized dryRun directive will + // result in an error response and no further processing of the + // request. Valid values are: + // - All: all dry run stages will be processed + // +optional + // +listType=atomic + DryRun []string `json:"dryRun,omitempty"` +} + +type TokenBucketRateLimiter struct { + // QPS indicates the maximum QPS to the apiserver from this client. + // If it's zero, the component default will be used + QPS float32 `json:"qps"` + + // Maximum burst for throttle. + // If it's zero, the component default will be used + Burst int `json:"burst"` +} + +type RateLimiter struct { + TokenBucketRateLimiter *TokenBucketRateLimiter `json:"tokenBucketRateLimiter,omitempty"` +} + +// RESTClientConfiguration allows configuring certain aspects of the k8s rest client. +type RESTClientConfiguration struct { + //RateLimiter allows selecting and configuring different rate limiters for the k8s client. + RateLimiter *RateLimiter `json:"rateLimiter,omitempty"` +} + +// ReloadableComponentConfiguration holds all generic k8s configuration options which can +// be reloaded by components without requiring a restart. +type ReloadableComponentConfiguration struct { + //RestClient can be used to tune certain aspects of the k8s client in use. + RestClient *RESTClientConfiguration `json:"restClient,omitempty"` +} + +// KubeVirtConfiguration holds all kubevirt configurations +type KubeVirtConfiguration struct { + CPUModel string `json:"cpuModel,omitempty"` + CPURequest *resource.Quantity `json:"cpuRequest,omitempty"` + DeveloperConfiguration *DeveloperConfiguration `json:"developerConfiguration,omitempty"` + EmulatedMachines []string `json:"emulatedMachines,omitempty"` + ImagePullPolicy k8sv1.PullPolicy `json:"imagePullPolicy,omitempty"` + MigrationConfiguration *MigrationConfiguration `json:"migrations,omitempty"` + MachineType string `json:"machineType,omitempty"` + NetworkConfiguration *NetworkConfiguration `json:"network,omitempty"` + OVMFPath string `json:"ovmfPath,omitempty"` + SELinuxLauncherType string `json:"selinuxLauncherType,omitempty"` + DefaultRuntimeClass string `json:"defaultRuntimeClass,omitempty"` + SMBIOSConfig *SMBiosConfiguration `json:"smbios,omitempty"` + + // EvictionStrategy defines at the cluster level if the VirtualMachineInstance should be + // migrated instead of shut-off in case of a node drain. If the VirtualMachineInstance specific + // field is set it overrides the cluster level one. + EvictionStrategy *EvictionStrategy `json:"evictionStrategy,omitempty"` + + // deprecated + SupportedGuestAgentVersions []string `json:"supportedGuestAgentVersions,omitempty"` + MemBalloonStatsPeriod *uint32 `json:"memBalloonStatsPeriod,omitempty"` + PermittedHostDevices *PermittedHostDevices `json:"permittedHostDevices,omitempty"` + MediatedDevicesConfiguration *MediatedDevicesConfiguration `json:"mediatedDevicesConfiguration,omitempty"` + MinCPUModel string `json:"minCPUModel,omitempty"` + ObsoleteCPUModels map[string]bool `json:"obsoleteCPUModels,omitempty"` + VirtualMachineInstancesPerNode *int `json:"virtualMachineInstancesPerNode,omitempty"` + APIConfiguration *ReloadableComponentConfiguration `json:"apiConfiguration,omitempty"` + WebhookConfiguration *ReloadableComponentConfiguration `json:"webhookConfiguration,omitempty"` + ControllerConfiguration *ReloadableComponentConfiguration `json:"controllerConfiguration,omitempty"` + HandlerConfiguration *ReloadableComponentConfiguration `json:"handlerConfiguration,omitempty"` +} + +type SMBiosConfiguration struct { + Manufacturer string `json:"manufacturer,omitempty"` + Product string `json:"product,omitempty"` + Version string `json:"version,omitempty"` + Sku string `json:"sku,omitempty"` + Family string `json:"family,omitempty"` +} + +// MigrationConfiguration holds migration options +type MigrationConfiguration struct { + NodeDrainTaintKey *string `json:"nodeDrainTaintKey,omitempty"` + ParallelOutboundMigrationsPerNode *uint32 `json:"parallelOutboundMigrationsPerNode,omitempty"` + ParallelMigrationsPerCluster *uint32 `json:"parallelMigrationsPerCluster,omitempty"` + AllowAutoConverge *bool `json:"allowAutoConverge,omitempty"` + BandwidthPerMigration *resource.Quantity `json:"bandwidthPerMigration,omitempty"` + CompletionTimeoutPerGiB *int64 `json:"completionTimeoutPerGiB,omitempty"` + ProgressTimeout *int64 `json:"progressTimeout,omitempty"` + UnsafeMigrationOverride *bool `json:"unsafeMigrationOverride,omitempty"` + AllowPostCopy *bool `json:"allowPostCopy,omitempty"` + DisableTLS *bool `json:"disableTLS,omitempty"` + Network *string `json:"network,omitempty"` +} + +// DiskVerification holds container disks verification limits +type DiskVerification struct { + MemoryLimit *resource.Quantity `json:"memoryLimit"` +} + +// DeveloperConfiguration holds developer options +type DeveloperConfiguration struct { + FeatureGates []string `json:"featureGates,omitempty"` + LessPVCSpaceToleration int `json:"pvcTolerateLessSpaceUpToPercent,omitempty"` + MinimumReservePVCBytes uint64 `json:"minimumReservePVCBytes,omitempty"` + MemoryOvercommit int `json:"memoryOvercommit,omitempty"` + NodeSelectors map[string]string `json:"nodeSelectors,omitempty"` + // UseEmulation can be set to true to allow fallback to software emulation + // in case hardware-assisted emulation is not available. + UseEmulation bool `json:"useEmulation,omitempty"` + CPUAllocationRatio int `json:"cpuAllocationRatio,omitempty"` + // Allow overriding the automatically determined minimum TSC frequency of the cluster + // and fixate the minimum to this frequency. + MinimumClusterTSCFrequency *int64 `json:"minimumClusterTSCFrequency,omitempty"` + DiskVerification *DiskVerification `json:"diskVerification,omitempty"` + LogVerbosity *LogVerbosity `json:"logVerbosity,omitempty"` +} + +// LogVerbosity sets log verbosity level of various components +type LogVerbosity struct { + VirtAPI uint `json:"virtAPI,omitempty"` + VirtController uint `json:"virtController,omitempty"` + VirtHandler uint `json:"virtHandler,omitempty"` + VirtLauncher uint `json:"virtLauncher,omitempty"` + VirtOperator uint `json:"virtOperator,omitempty"` + // NodeVerbosity represents a map of nodes with a specific verbosity level + NodeVerbosity map[string]uint `json:"nodeVerbosity,omitempty"` +} + +// PermittedHostDevices holds information about devices allowed for passthrough +type PermittedHostDevices struct { + // +listType=atomic + PciHostDevices []PciHostDevice `json:"pciHostDevices,omitempty"` + // +listType=atomic + MediatedDevices []MediatedHostDevice `json:"mediatedDevices,omitempty"` +} + +// PciHostDevice represents a host PCI device allowed for passthrough +type PciHostDevice struct { + // The vendor_id:product_id tuple of the PCI device + PCIVendorSelector string `json:"pciVendorSelector"` + // The name of the resource that is representing the device. Exposed by + // a device plugin and requested by VMs. Typically of the form + // vendor.com/product_nameThe name of the resource that is representing + // the device. Exposed by a device plugin and requested by VMs. + // Typically of the form vendor.com/product_name + ResourceName string `json:"resourceName"` + // If true, KubeVirt will leave the allocation and monitoring to an + // external device plugin + ExternalResourceProvider bool `json:"externalResourceProvider,omitempty"` +} + +// MediatedHostDevice represents a host mediated device allowed for passthrough +type MediatedHostDevice struct { + MDEVNameSelector string `json:"mdevNameSelector"` + ResourceName string `json:"resourceName"` + ExternalResourceProvider bool `json:"externalResourceProvider,omitempty"` +} + +// MediatedDevicesConfiguration holds information about MDEV types to be defined, if available +type MediatedDevicesConfiguration struct { + // +listType=atomic + MediatedDevicesTypes []string `json:"mediatedDevicesTypes,omitempty"` + // +optional + // +listType=atomic + NodeMediatedDeviceTypes []NodeMediatedDeviceTypesConfig `json:"nodeMediatedDeviceTypes,omitempty"` +} + +// NodeMediatedDeviceTypesConfig holds information about MDEV types to be defined in a specifc node that matches the NodeSelector field. +// +k8s:openapi-gen=true +type NodeMediatedDeviceTypesConfig struct { + // NodeSelector is a selector which must be true for the vmi to fit on a node. + // Selector which must match a node's labels for the vmi to be scheduled on that node. + // More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ + NodeSelector map[string]string `json:"nodeSelector"` + // +listType=atomic + MediatedDevicesTypes []string `json:"mediatedDevicesTypes"` +} + +// NetworkConfiguration holds network options +type NetworkConfiguration struct { + NetworkInterface string `json:"defaultNetworkInterface,omitempty"` + PermitSlirpInterface *bool `json:"permitSlirpInterface,omitempty"` + PermitBridgeInterfaceOnPodNetwork *bool `json:"permitBridgeInterfaceOnPodNetwork,omitempty"` +} + +// GuestAgentPing configures the guest-agent based ping probe +type GuestAgentPing struct { +} + +type ProfilerResult struct { + PprofData map[string][]byte `json:"pprofData,omitempty"` +} + +type ClusterProfilerResults struct { + ComponentResults map[string]ProfilerResult `json:"componentResults"` + Continue string `json:"continue,omitempty"` +} + +type ClusterProfilerRequest struct { + LabelSelector string `json:"labelSelector,omitempty"` + Continue string `json:"continue,omitempty"` + PageSize int64 `json:"pageSize"` +} + +// FlavorMatcher references a flavor that is used to fill fields in the VMI template. +type FlavorMatcher struct { + // Name is the name of the VirtualMachineFlavor or VirtualMachineClusterFlavor + Name string `json:"name"` + + // Kind specifies which flavor resource is referenced. + // Allowed values are: "VirtualMachineFlavor" and "VirtualMachineClusterFlavor". + // If not specified, "VirtualMachineClusterFlavor" is used by default. + // + // +optional + Kind string `json:"kind,omitempty"` +} diff --git a/vendor/kubevirt.io/api/core/v1/types_swagger_generated.go b/vendor/kubevirt.io/api/core/v1/types_swagger_generated.go new file mode 100644 index 000000000000..48ea9d008cc5 --- /dev/null +++ b/vendor/kubevirt.io/api/core/v1/types_swagger_generated.go @@ -0,0 +1,743 @@ +// Code generated by swagger-doc. DO NOT EDIT. + +package v1 + +func (VirtualMachineInstance) SwaggerDoc() map[string]string { + return map[string]string{ + "": "VirtualMachineInstance is *the* VirtualMachineInstance Definition. It represents a virtual machine in the runtime environment of kubernetes.\n\n+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object\n+genclient", + "spec": "VirtualMachineInstance Spec contains the VirtualMachineInstance specification.", + "status": "Status is the high level overview of how the VirtualMachineInstance is doing. It contains information available to controllers and users.", + } +} + +func (VirtualMachineInstanceList) SwaggerDoc() map[string]string { + return map[string]string{ + "": "VirtualMachineInstanceList is a list of VirtualMachines\n\n+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object", + } +} + +func (VirtualMachineInstanceSpec) SwaggerDoc() map[string]string { + return map[string]string{ + "": "VirtualMachineInstanceSpec is a description of a VirtualMachineInstance.", + "priorityClassName": "If specified, indicates the pod's priority.\nIf not specified, the pod priority will be default or zero if there is no\ndefault.\n+optional", + "domain": "Specification of the desired behavior of the VirtualMachineInstance on the host.", + "nodeSelector": "NodeSelector is a selector which must be true for the vmi to fit on a node.\nSelector which must match a node's labels for the vmi to be scheduled on that node.\nMore info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/\n+optional", + "affinity": "If affinity is specifies, obey all the affinity rules", + "schedulerName": "If specified, the VMI will be dispatched by specified scheduler.\nIf not specified, the VMI will be dispatched by default scheduler.\n+optional", + "tolerations": "If toleration is specified, obey all the toleration rules.", + "evictionStrategy": "EvictionStrategy can be set to \"LiveMigrate\" if the VirtualMachineInstance should be\nmigrated instead of shut-off in case of a node drain.\n\n+optional", + "startStrategy": "StartStrategy can be set to \"Paused\" if Virtual Machine should be started in paused state.\n\n+optional", + "terminationGracePeriodSeconds": "Grace period observed after signalling a VirtualMachineInstance to stop after which the VirtualMachineInstance is force terminated.", + "volumes": "List of volumes that can be mounted by disks belonging to the vmi.", + "livenessProbe": "Periodic probe of VirtualMachineInstance liveness.\nVirtualmachineInstances will be stopped if the probe fails.\nCannot be updated.\nMore info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes\n+optional", + "readinessProbe": "Periodic probe of VirtualMachineInstance service readiness.\nVirtualmachineInstances will be removed from service endpoints if the probe fails.\nCannot be updated.\nMore info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes\n+optional", + "hostname": "Specifies the hostname of the vmi\nIf not specified, the hostname will be set to the name of the vmi, if dhcp or cloud-init is configured properly.\n+optional", + "subdomain": "If specified, the fully qualified vmi hostname will be \"...svc.\".\nIf not specified, the vmi will not have a domainname at all. The DNS entry will resolve to the vmi,\nno matter if the vmi itself can pick up a hostname.\n+optional", + "networks": "List of networks that can be attached to a vm's virtual interface.", + "dnsPolicy": "Set DNS policy for the pod.\nDefaults to \"ClusterFirst\".\nValid values are 'ClusterFirstWithHostNet', 'ClusterFirst', 'Default' or 'None'.\nDNS parameters given in DNSConfig will be merged with the policy selected with DNSPolicy.\nTo have DNS options set along with hostNetwork, you have to specify DNS policy\nexplicitly to 'ClusterFirstWithHostNet'.\n+optional", + "dnsConfig": "Specifies the DNS parameters of a pod.\nParameters specified here will be merged to the generated DNS\nconfiguration based on DNSPolicy.\n+optional", + "accessCredentials": "Specifies a set of public keys to inject into the vm guest\n+listType=atomic\n+optional", + } +} + +func (VirtualMachineInstancePhaseTransitionTimestamp) SwaggerDoc() map[string]string { + return map[string]string{ + "": "VirtualMachineInstancePhaseTransitionTimestamp gives a timestamp in relation to when a phase is set on a vmi", + "phase": "Phase is the status of the VirtualMachineInstance in kubernetes world. It is not the VirtualMachineInstance status, but partially correlates to it.", + "phaseTransitionTimestamp": "PhaseTransitionTimestamp is the timestamp of when the phase change occurred", + } +} + +func (TopologyHints) SwaggerDoc() map[string]string { + return map[string]string{} +} + +func (VirtualMachineInstanceStatus) SwaggerDoc() map[string]string { + return map[string]string{ + "": "VirtualMachineInstanceStatus represents information about the status of a VirtualMachineInstance. Status may trail the actual\nstate of a system.", + "nodeName": "NodeName is the name where the VirtualMachineInstance is currently running.", + "reason": "A brief CamelCase message indicating details about why the VMI is in this state. e.g. 'NodeUnresponsive'\n+optional", + "conditions": "Conditions are specific points in VirtualMachineInstance's pod runtime.", + "phase": "Phase is the status of the VirtualMachineInstance in kubernetes world. It is not the VirtualMachineInstance status, but partially correlates to it.", + "phaseTransitionTimestamps": "PhaseTransitionTimestamp is the timestamp of when the last phase change occurred\n+listType=atomic\n+optional", + "interfaces": "Interfaces represent the details of available network interfaces.", + "guestOSInfo": "Guest OS Information", + "migrationState": "Represents the status of a live migration", + "migrationMethod": "Represents the method using which the vmi can be migrated: live migration or block migration", + "migrationTransport": "This represents the migration transport", + "qosClass": "The Quality of Service (QOS) classification assigned to the virtual machine instance based on resource requirements\nSee PodQOSClass type for available QOS classes\nMore info: https://git.k8s.io/community/contributors/design-proposals/node/resource-qos.md\n+optional", + "launcherContainerImageVersion": "LauncherContainerImageVersion indicates what container image is currently active for the vmi.", + "evacuationNodeName": "EvacuationNodeName is used to track the eviction process of a VMI. It stores the name of the node that we want\nto evacuate. It is meant to be used by KubeVirt core components only and can't be set or modified by users.\n+optional", + "activePods": "ActivePods is a mapping of pod UID to node name.\nIt is possible for multiple pods to be running for a single VMI during migration.", + "volumeStatus": "VolumeStatus contains the statuses of all the volumes\n+optional\n+listType=atomic", + "fsFreezeStatus": "FSFreezeStatus is the state of the fs of the guest\nit can be either frozen or thawed\n+optional", + "topologyHints": "+optional", + "virtualMachineRevisionName": "VirtualMachineRevisionName is used to get the vm revision of the vmi when doing\nan online vm snapshot\n+optional", + "runtimeUser": "RuntimeUser is used to determine what user will be used in launcher\n+optional", + } +} + +func (PersistentVolumeClaimInfo) SwaggerDoc() map[string]string { + return map[string]string{ + "": "PersistentVolumeClaimInfo contains the relavant information virt-handler needs cached about a PVC", + "accessModes": "AccessModes contains the desired access modes the volume should have.\nMore info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1\n+listType=atomic\n+optional", + "volumeMode": "VolumeMode defines what type of volume is required by the claim.\nValue of Filesystem is implied when not included in claim spec.\n+optional", + "capacity": "Capacity represents the capacity set on the corresponding PVC status\n+optional", + "requests": "Requests represents the resources requested by the corresponding PVC spec\n+optional", + "preallocated": "Preallocated indicates if the PVC's storage is preallocated or not\n+optional", + "filesystemOverhead": "Percentage of filesystem's size to be reserved when resizing the PVC\n+optional", + } +} + +func (VolumeStatus) SwaggerDoc() map[string]string { + return map[string]string{ + "": "VolumeStatus represents information about the status of volumes attached to the VirtualMachineInstance.", + "name": "Name is the name of the volume", + "target": "Target is the target name used when adding the volume to the VM, eg: vda", + "phase": "Phase is the phase", + "reason": "Reason is a brief description of why we are in the current hotplug volume phase", + "message": "Message is a detailed message about the current hotplug volume phase", + "persistentVolumeClaimInfo": "PersistentVolumeClaimInfo is information about the PVC that handler requires during start flow", + "hotplugVolume": "If the volume is hotplug, this will contain the hotplug status.", + "size": "Represents the size of the volume", + } +} + +func (HotplugVolumeStatus) SwaggerDoc() map[string]string { + return map[string]string{ + "": "HotplugVolumeStatus represents the hotplug status of the volume", + "attachPodName": "AttachPodName is the name of the pod used to attach the volume to the node.", + "attachPodUID": "AttachPodUID is the UID of the pod used to attach the volume to the node.", + } +} + +func (VirtualMachineInstanceCondition) SwaggerDoc() map[string]string { + return map[string]string{ + "lastProbeTime": "+nullable", + "lastTransitionTime": "+nullable", + } +} + +func (VirtualMachineInstanceMigrationCondition) SwaggerDoc() map[string]string { + return map[string]string{ + "lastProbeTime": "+nullable", + "lastTransitionTime": "+nullable", + } +} + +func (VirtualMachineInstanceNetworkInterface) SwaggerDoc() map[string]string { + return map[string]string{ + "ipAddress": "IP address of a Virtual Machine interface. It is always the first item of\nIPs", + "mac": "Hardware address of a Virtual Machine interface", + "name": "Name of the interface, corresponds to name of the network assigned to the interface", + "ipAddresses": "List of all IP addresses of a Virtual Machine interface", + "interfaceName": "The interface name inside the Virtual Machine", + "infoSource": "Specifies the origin of the interface data collected. values: domain, guest-agent, or both", + } +} + +func (VirtualMachineInstanceGuestOSInfo) SwaggerDoc() map[string]string { + return map[string]string{ + "name": "Name of the Guest OS", + "kernelRelease": "Guest OS Kernel Release", + "version": "Guest OS Version", + "prettyName": "Guest OS Pretty Name", + "versionId": "Version ID of the Guest OS", + "kernelVersion": "Kernel version of the Guest OS", + "machine": "Machine type of the Guest OS", + "id": "Guest OS Id", + } +} + +func (VirtualMachineInstanceMigrationState) SwaggerDoc() map[string]string { + return map[string]string{ + "": "+k8s:openapi-gen=true", + "startTimestamp": "The time the migration action began\n+nullable", + "endTimestamp": "The time the migration action ended\n+nullable", + "targetNodeDomainDetected": "The Target Node has seen the Domain Start Event", + "targetNodeAddress": "The address of the target node to use for the migration", + "targetDirectMigrationNodePorts": "The list of ports opened for live migration on the destination node", + "targetNode": "The target node that the VMI is moving to", + "targetPod": "The target pod that the VMI is moving to", + "targetAttachmentPodUID": "The UID of the target attachment pod for hotplug volumes", + "sourceNode": "The source node that the VMI originated on", + "completed": "Indicates the migration completed", + "failed": "Indicates that the migration failed", + "abortRequested": "Indicates that the migration has been requested to abort", + "abortStatus": "Indicates the final status of the live migration abortion", + "migrationUid": "The VirtualMachineInstanceMigration object associated with this migration", + "mode": "Lets us know if the vmi is currently running pre or post copy migration", + "migrationPolicyName": "Name of the migration policy. If string is empty, no policy is matched", + "migrationConfiguration": "Migration configurations to apply", + "targetCPUSet": "If the VMI requires dedicated CPUs, this field will\nhold the dedicated CPU set on the target node\n+listType=atomic", + "targetNodeTopology": "If the VMI requires dedicated CPUs, this field will\nhold the numa topology on the target node", + } +} + +func (VMISelector) SwaggerDoc() map[string]string { + return map[string]string{ + "name": "Name of the VirtualMachineInstance to migrate", + } +} + +func (VirtualMachineInstanceReplicaSet) SwaggerDoc() map[string]string { + return map[string]string{ + "": "VirtualMachineInstance is *the* VirtualMachineInstance Definition. It represents a virtual machine in the runtime environment of kubernetes.\n\n+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object\n+genclient", + "spec": "VirtualMachineInstance Spec contains the VirtualMachineInstance specification.", + "status": "Status is the high level overview of how the VirtualMachineInstance is doing. It contains information available to controllers and users.\n+nullable", + } +} + +func (VirtualMachineInstanceReplicaSetList) SwaggerDoc() map[string]string { + return map[string]string{ + "": "VMIList is a list of VMIs\n\n+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object", + } +} + +func (VirtualMachineInstanceReplicaSetSpec) SwaggerDoc() map[string]string { + return map[string]string{ + "replicas": "Number of desired pods. This is a pointer to distinguish between explicit\nzero and not specified. Defaults to 1.\n+optional", + "selector": "Label selector for pods. Existing ReplicaSets whose pods are\nselected by this will be the ones affected by this deployment.", + "template": "Template describes the pods that will be created.", + "paused": "Indicates that the replica set is paused.\n+optional", + } +} + +func (VirtualMachineInstanceReplicaSetStatus) SwaggerDoc() map[string]string { + return map[string]string{ + "replicas": "Total number of non-terminated pods targeted by this deployment (their labels match the selector).\n+optional", + "readyReplicas": "The number of ready replicas for this replica set.\n+optional", + "labelSelector": "Canonical form of the label selector for HPA which consumes it through the scale subresource.", + } +} + +func (VirtualMachineInstanceReplicaSetCondition) SwaggerDoc() map[string]string { + return map[string]string{ + "lastProbeTime": "+nullable", + "lastTransitionTime": "+nullable", + } +} + +func (DataVolumeTemplateDummyStatus) SwaggerDoc() map[string]string { + return map[string]string{} +} + +func (DataVolumeTemplateSpec) SwaggerDoc() map[string]string { + return map[string]string{ + "spec": "DataVolumeSpec contains the DataVolume specification.", + "status": "DataVolumeTemplateDummyStatus is here simply for backwards compatibility with\na previous API.\n+nullable\n+optional", + } +} + +func (VirtualMachineInstanceTemplateSpec) SwaggerDoc() map[string]string { + return map[string]string{ + "metadata": "+kubebuilder:pruning:PreserveUnknownFields\n+nullable", + "spec": "VirtualMachineInstance Spec contains the VirtualMachineInstance specification.", + } +} + +func (VirtualMachineInstanceMigration) SwaggerDoc() map[string]string { + return map[string]string{ + "": "VirtualMachineInstanceMigration represents the object tracking a VMI's migration\nto another host in the cluster\n\n+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object\n+genclient", + } +} + +func (VirtualMachineInstanceMigrationList) SwaggerDoc() map[string]string { + return map[string]string{ + "": "VirtualMachineInstanceMigrationList is a list of VirtualMachineMigrations\n\n+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object", + } +} + +func (VirtualMachineInstanceMigrationSpec) SwaggerDoc() map[string]string { + return map[string]string{ + "vmiName": "The name of the VMI to perform the migration on. VMI must exist in the migration objects namespace", + } +} + +func (VirtualMachineInstanceMigrationStatus) SwaggerDoc() map[string]string { + return map[string]string{ + "": "VirtualMachineInstanceMigration reprents information pertaining to a VMI's migration.", + } +} + +func (VirtualMachineInstancePreset) SwaggerDoc() map[string]string { + return map[string]string{ + "": "VirtualMachineInstancePreset defines a VMI spec.domain to be applied to all VMIs that match the provided label selector\nMore info: https://kubevirt.io/user-guide/virtual_machines/presets/#overrides\n\n+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object\n+genclient", + "spec": "VirtualMachineInstance Spec contains the VirtualMachineInstance specification.", + } +} + +func (VirtualMachineInstancePresetList) SwaggerDoc() map[string]string { + return map[string]string{ + "": "VirtualMachineInstancePresetList is a list of VirtualMachinePresets\n\n+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object", + } +} + +func (VirtualMachineInstancePresetSpec) SwaggerDoc() map[string]string { + return map[string]string{ + "selector": "Selector is a label query over a set of VMIs.\nRequired.", + "domain": "Domain is the same object type as contained in VirtualMachineInstanceSpec", + } +} + +func (VirtualMachine) SwaggerDoc() map[string]string { + return map[string]string{ + "": "VirtualMachine handles the VirtualMachines that are not running\nor are in a stopped state\nThe VirtualMachine contains the template to create the\nVirtualMachineInstance. It also mirrors the running state of the created\nVirtualMachineInstance in its status.\n\n+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object\n+genclient", + "spec": "Spec contains the specification of VirtualMachineInstance created", + "status": "Status holds the current state of the controller and brief information\nabout its associated VirtualMachineInstance", + } +} + +func (VirtualMachineList) SwaggerDoc() map[string]string { + return map[string]string{ + "": "VirtualMachineList is a list of virtualmachines\n\n+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object", + } +} + +func (VirtualMachineSpec) SwaggerDoc() map[string]string { + return map[string]string{ + "": "VirtualMachineSpec describes how the proper VirtualMachine\nshould look like", + "running": "Running controls whether the associatied VirtualMachineInstance is created or not\nMutually exclusive with RunStrategy", + "runStrategy": "Running state indicates the requested running state of the VirtualMachineInstance\nmutually exclusive with Running", + "flavor": "FlavorMatcher references a flavor that is used to fill fields in Template", + "template": "Template is the direct specification of VirtualMachineInstance", + "dataVolumeTemplates": "dataVolumeTemplates is a list of dataVolumes that the VirtualMachineInstance template can reference.\nDataVolumes in this list are dynamically created for the VirtualMachine and are tied to the VirtualMachine's life-cycle.", + } +} + +func (VirtualMachineStartFailure) SwaggerDoc() map[string]string { + return map[string]string{ + "": "VirtualMachineStartFailure tracks VMIs which failed to transition successfully\nto running using the VM status", + } +} + +func (VirtualMachineStatus) SwaggerDoc() map[string]string { + return map[string]string{ + "": "VirtualMachineStatus represents the status returned by the\ncontroller to describe how the VirtualMachine is doing", + "snapshotInProgress": "SnapshotInProgress is the name of the VirtualMachineSnapshot currently executing", + "restoreInProgress": "RestoreInProgress is the name of the VirtualMachineRestore currently executing", + "created": "Created indicates if the virtual machine is created in the cluster", + "ready": "Ready indicates if the virtual machine is running and ready", + "printableStatus": "PrintableStatus is a human readable, high-level representation of the status of the virtual machine", + "conditions": "Hold the state information of the VirtualMachine and its VirtualMachineInstance", + "stateChangeRequests": "StateChangeRequests indicates a list of actions that should be taken on a VMI\ne.g. stop a specific VMI then start a new one.", + "volumeRequests": "VolumeRequests indicates a list of volumes add or remove from the VMI template and\nhotplug on an active running VMI.\n+listType=atomic", + "volumeSnapshotStatuses": "VolumeSnapshotStatuses indicates a list of statuses whether snapshotting is\nsupported by each volume.", + "startFailure": "StartFailure tracks consecutive VMI startup failures for the purposes of\ncrash loop backoffs\n+nullable\n+optional", + } +} + +func (VolumeSnapshotStatus) SwaggerDoc() map[string]string { + return map[string]string{ + "name": "Volume name", + "enabled": "True if the volume supports snapshotting", + "reason": "Empty if snapshotting is enabled, contains reason otherwise", + } +} + +func (VirtualMachineVolumeRequest) SwaggerDoc() map[string]string { + return map[string]string{ + "addVolumeOptions": "AddVolumeOptions when set indicates a volume should be added. The details\nwithin this field specify how to add the volume", + "removeVolumeOptions": "RemoveVolumeOptions when set indicates a volume should be removed. The details\nwithin this field specify how to add the volume", + } +} + +func (VirtualMachineStateChangeRequest) SwaggerDoc() map[string]string { + return map[string]string{ + "action": "Indicates the type of action that is requested. e.g. Start or Stop", + "data": "Provides additional data in order to perform the Action", + "uid": "Indicates the UUID of an existing Virtual Machine Instance that this change request applies to -- if applicable", + } +} + +func (VirtualMachineCondition) SwaggerDoc() map[string]string { + return map[string]string{ + "": "VirtualMachineCondition represents the state of VirtualMachine", + "lastProbeTime": "+nullable", + "lastTransitionTime": "+nullable", + } +} + +func (Handler) SwaggerDoc() map[string]string { + return map[string]string{ + "": "Handler defines a specific action that should be taken", + "exec": "One and only one of the following should be specified.\nExec specifies the action to take, it will be executed on the guest through the qemu-guest-agent.\nIf the guest agent is not available, this probe will fail.\n+optional", + "guestAgentPing": "GuestAgentPing contacts the qemu-guest-agent for availability checks.\n+optional", + "httpGet": "HTTPGet specifies the http request to perform.\n+optional", + "tcpSocket": "TCPSocket specifies an action involving a TCP port.\nTCP hooks not yet supported\n+optional", + } +} + +func (Probe) SwaggerDoc() map[string]string { + return map[string]string{ + "": "Probe describes a health check to be performed against a VirtualMachineInstance to determine whether it is\nalive or ready to receive traffic.", + "initialDelaySeconds": "Number of seconds after the VirtualMachineInstance has started before liveness probes are initiated.\nMore info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes\n+optional", + "timeoutSeconds": "Number of seconds after which the probe times out.\nFor exec probes the timeout fails the probe but does not terminate the command running on the guest.\nThis means a blocking command can result in an increasing load on the guest.\nA small buffer will be added to the resulting workload exec probe to compensate for delays\ncaused by the qemu guest exec mechanism.\nDefaults to 1 second. Minimum value is 1.\nMore info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes\n+optional", + "periodSeconds": "How often (in seconds) to perform the probe.\nDefault to 10 seconds. Minimum value is 1.\n+optional", + "successThreshold": "Minimum consecutive successes for the probe to be considered successful after having failed.\nDefaults to 1. Must be 1 for liveness. Minimum value is 1.\n+optional", + "failureThreshold": "Minimum consecutive failures for the probe to be considered failed after having succeeded.\nDefaults to 3. Minimum value is 1.\n+optional", + } +} + +func (KubeVirt) SwaggerDoc() map[string]string { + return map[string]string{ + "": "KubeVirt represents the object deploying all KubeVirt resources\n\n+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object\n+genclient", + } +} + +func (KubeVirtList) SwaggerDoc() map[string]string { + return map[string]string{ + "": "KubeVirtList is a list of KubeVirts\n\n+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object", + } +} + +func (KubeVirtSelfSignConfiguration) SwaggerDoc() map[string]string { + return map[string]string{ + "caRotateInterval": "Deprecated. Use CA.Duration instead", + "certRotateInterval": "Deprecated. Use Server.Duration instead", + "caOverlapInterval": "Deprecated. Use CA.Duration and CA.RenewBefore instead", + "ca": "CA configuration\nCA certs are kept in the CA bundle as long as they are valid", + "server": "Server configuration\nCerts are rotated and discarded", + } +} + +func (CertConfig) SwaggerDoc() map[string]string { + return map[string]string{ + "": "CertConfig contains the tunables for TLS certificates", + "duration": "The requested 'duration' (i.e. lifetime) of the Certificate.", + "renewBefore": "The amount of time before the currently issued certificate's \"notAfter\"\ntime that we will begin to attempt to renew the certificate.", + } +} + +func (KubeVirtCertificateRotateStrategy) SwaggerDoc() map[string]string { + return map[string]string{} +} + +func (KubeVirtWorkloadUpdateStrategy) SwaggerDoc() map[string]string { + return map[string]string{ + "": "KubeVirtWorkloadUpdateStrategy defines options related to updating a KubeVirt install", + "workloadUpdateMethods": "WorkloadUpdateMethods defines the methods that can be used to disrupt workloads\nduring automated workload updates.\nWhen multiple methods are present, the least disruptive method takes\nprecedence over more disruptive methods. For example if both LiveMigrate and Shutdown\nmethods are listed, only VMs which are not live migratable will be restarted/shutdown\n\nAn empty list defaults to no automated workload updating\n\n+listType=atomic\n+optional", + "batchEvictionSize": "BatchEvictionSize Represents the number of VMIs that can be forced updated per\nthe BatchShutdownInteral interval\n\nDefaults to 10\n\n+optional", + "batchEvictionInterval": "BatchEvictionInterval Represents the interval to wait before issuing the next\nbatch of shutdowns\n\nDefaults to 1 minute\n\n+optional", + } +} + +func (KubeVirtSpec) SwaggerDoc() map[string]string { + return map[string]string{ + "imageTag": "The image tag to use for the continer images installed.\nDefaults to the same tag as the operator's container image.", + "imageRegistry": "The image registry to pull the container images from\nDefaults to the same registry the operator's container image is pulled from.", + "imagePullPolicy": "The ImagePullPolicy to use.", + "monitorNamespace": "The namespace Prometheus is deployed in\nDefaults to openshift-monitor", + "serviceMonitorNamespace": "The namespace the service monitor will be deployed\n When ServiceMonitorNamespace is set, then we'll install the service monitor object in that namespace\notherwise we will use the monitoring namespace.", + "monitorAccount": "The name of the Prometheus service account that needs read-access to KubeVirt endpoints\nDefaults to prometheus-k8s", + "workloadUpdateStrategy": "WorkloadUpdateStrategy defines at the cluster level how to handle\nautomated workload updates", + "uninstallStrategy": "Specifies if kubevirt can be deleted if workloads are still present.\nThis is mainly a precaution to avoid accidental data loss", + "productVersion": "Designate the apps.kubevirt.io/version label for KubeVirt components.\nUseful if KubeVirt is included as part of a product.\nIf ProductVersion is not specified, KubeVirt's version will be used.", + "productName": "Designate the apps.kubevirt.io/part-of label for KubeVirt components.\nUseful if KubeVirt is included as part of a product.\nIf ProductName is not specified, the part-of label will be omitted.", + "productComponent": "Designate the apps.kubevirt.io/component label for KubeVirt components.\nUseful if KubeVirt is included as part of a product.\nIf ProductComponent is not specified, the component label default value is kubevirt.", + "configuration": "holds kubevirt configurations.\nsame as the virt-configMap", + "infra": "selectors and tolerations that should apply to KubeVirt infrastructure components\n+optional", + "workloads": "selectors and tolerations that should apply to KubeVirt workloads\n+optional", + } +} + +func (CustomizeComponents) SwaggerDoc() map[string]string { + return map[string]string{ + "patches": "+listType=atomic", + "flags": "Configure the value used for deployment and daemonset resources", + } +} + +func (Flags) SwaggerDoc() map[string]string { + return map[string]string{ + "": "Flags will create a patch that will replace all flags for the container's\ncommand field. The only flags that will be used are those define. There are no\nguarantees around forward/backward compatibility. If set incorrectly this will\ncause the resource when rolled out to error until flags are updated.", + } +} + +func (CustomizeComponentsPatch) SwaggerDoc() map[string]string { + return map[string]string{ + "resourceName": "+kubebuilder:validation:MinLength=1", + "resourceType": "+kubebuilder:validation:MinLength=1", + } +} + +func (GenerationStatus) SwaggerDoc() map[string]string { + return map[string]string{ + "": "GenerationStatus keeps track of the generation for a given resource so that decisions about forced updates can be made.", + "group": "group is the group of the thing you're tracking", + "resource": "resource is the resource type of the thing you're tracking", + "namespace": "namespace is where the thing you're tracking is\n+optional", + "name": "name is the name of the thing you're tracking", + "lastGeneration": "lastGeneration is the last generation of the workload controller involved", + "hash": "hash is an optional field set for resources without generation that are content sensitive like secrets and configmaps\n+optional", + } +} + +func (KubeVirtStatus) SwaggerDoc() map[string]string { + return map[string]string{ + "": "KubeVirtStatus represents information pertaining to a KubeVirt deployment.", + "generations": "+listType=atomic", + } +} + +func (KubeVirtCondition) SwaggerDoc() map[string]string { + return map[string]string{ + "": "KubeVirtCondition represents a condition of a KubeVirt deployment", + "lastProbeTime": "+optional\n+nullable", + "lastTransitionTime": "+optional\n+nullable", + } +} + +func (RestartOptions) SwaggerDoc() map[string]string { + return map[string]string{ + "": "RestartOptions may be provided when deleting an API object.", + "gracePeriodSeconds": "The duration in seconds before the object should be force-restarted. Value must be non-negative integer.\nThe value zero indicates, restart immediately. If this value is nil, the default grace period for deletion of the corresponding VMI for the\nspecified type will be used to determine on how much time to give the VMI to restart.\nDefaults to a per object value if not specified. zero means restart immediately.\nAllowed Values: nil and 0\n+optional", + "dryRun": "When present, indicates that modifications should not be\npersisted. An invalid or unrecognized dryRun directive will\nresult in an error response and no further processing of the\nrequest. Valid values are:\n- All: all dry run stages will be processed\n+optional\n+listType=atomic", + } +} + +func (StartOptions) SwaggerDoc() map[string]string { + return map[string]string{ + "": "StartOptions may be provided on start request.", + "paused": "Indicates that VM will be started in paused state.\n+optional", + "dryRun": "When present, indicates that modifications should not be\npersisted. An invalid or unrecognized dryRun directive will\nresult in an error response and no further processing of the\nrequest. Valid values are:\n- All: all dry run stages will be processed\n+optional\n+listType=atomic", + } +} + +func (PauseOptions) SwaggerDoc() map[string]string { + return map[string]string{ + "": "PauseOptions may be provided on pause request.", + "dryRun": "When present, indicates that modifications should not be\npersisted. An invalid or unrecognized dryRun directive will\nresult in an error response and no further processing of the\nrequest. Valid values are:\n- All: all dry run stages will be processed\n+optional\n+listType=atomic", + } +} + +func (UnpauseOptions) SwaggerDoc() map[string]string { + return map[string]string{ + "": "UnpauseOptions may be provided on unpause request.", + "dryRun": "When present, indicates that modifications should not be\npersisted. An invalid or unrecognized dryRun directive will\nresult in an error response and no further processing of the\nrequest. Valid values are:\n- All: all dry run stages will be processed\n+optional\n+listType=atomic", + } +} + +func (StopOptions) SwaggerDoc() map[string]string { + return map[string]string{ + "": "StopOptions may be provided when deleting an API object.", + "gracePeriod": "this updates the VMIs terminationGracePeriodSeconds during shutdown\n+optional", + "dryRun": "When present, indicates that modifications should not be\npersisted. An invalid or unrecognized dryRun directive will\nresult in an error response and no further processing of the\nrequest. Valid values are:\n- All: all dry run stages will be processed\n+optional\n+listType=atomic", + } +} + +func (MigrateOptions) SwaggerDoc() map[string]string { + return map[string]string{ + "": "MigrateOptions may be provided on migrate request.", + "dryRun": "When present, indicates that modifications should not be\npersisted. An invalid or unrecognized dryRun directive will\nresult in an error response and no further processing of the\nrequest. Valid values are:\n- All: all dry run stages will be processed\n+optional\n+listType=atomic", + } +} + +func (VirtualMachineInstanceGuestAgentInfo) SwaggerDoc() map[string]string { + return map[string]string{ + "": "VirtualMachineInstanceGuestAgentInfo represents information from the installed guest agent\n\n+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object", + "guestAgentVersion": "GAVersion is a version of currently installed guest agent", + "supportedCommands": "Return command list the guest agent supports\n+listType=atomic", + "hostname": "Hostname represents FQDN of a guest", + "os": "OS contains the guest operating system information", + "timezone": "Timezone is guest os current timezone", + "userList": "UserList is a list of active guest OS users", + "fsInfo": "FSInfo is a guest os filesystem information containing the disk mapping and disk mounts with usage", + "fsFreezeStatus": "FSFreezeStatus is the state of the fs of the guest\nit can be either frozen or thawed", + } +} + +func (GuestAgentCommandInfo) SwaggerDoc() map[string]string { + return map[string]string{ + "": "List of commands that QEMU guest agent supports", + } +} + +func (VirtualMachineInstanceGuestOSUserList) SwaggerDoc() map[string]string { + return map[string]string{ + "": "VirtualMachineInstanceGuestOSUserList comprises the list of all active users on guest machine\n\n+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object", + } +} + +func (VirtualMachineInstanceGuestOSUser) SwaggerDoc() map[string]string { + return map[string]string{ + "": "VirtualMachineGuestOSUser is the single user of the guest os", + } +} + +func (VirtualMachineInstanceFileSystemInfo) SwaggerDoc() map[string]string { + return map[string]string{ + "": "VirtualMachineInstanceFileSystemInfo represents information regarding single guest os filesystem", + } +} + +func (VirtualMachineInstanceFileSystemList) SwaggerDoc() map[string]string { + return map[string]string{ + "": "VirtualMachineInstanceFileSystemList comprises the list of all filesystems on guest machine\n\n+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object", + } +} + +func (VirtualMachineInstanceFileSystem) SwaggerDoc() map[string]string { + return map[string]string{ + "": "VirtualMachineInstanceFileSystem represents guest os disk", + } +} + +func (FreezeUnfreezeTimeout) SwaggerDoc() map[string]string { + return map[string]string{ + "": "FreezeUnfreezeTimeout represent the time unfreeze will be triggered if guest was not unfrozen by unfreeze command", + } +} + +func (AddVolumeOptions) SwaggerDoc() map[string]string { + return map[string]string{ + "": "AddVolumeOptions is provided when dynamically hot plugging a volume and disk", + "name": "Name represents the name that will be used to map the\ndisk to the corresponding volume. This overrides any name\nset inside the Disk struct itself.", + "disk": "Disk represents the hotplug disk that will be plugged into the running VMI", + "volumeSource": "VolumeSource represents the source of the volume to map to the disk.", + "dryRun": "When present, indicates that modifications should not be\npersisted. An invalid or unrecognized dryRun directive will\nresult in an error response and no further processing of the\nrequest. Valid values are:\n- All: all dry run stages will be processed\n+optional\n+listType=atomic", + } +} + +func (RemoveVolumeOptions) SwaggerDoc() map[string]string { + return map[string]string{ + "": "RemoveVolumeOptions is provided when dynamically hot unplugging volume and disk", + "name": "Name represents the name that maps to both the disk and volume that\nshould be removed", + "dryRun": "When present, indicates that modifications should not be\npersisted. An invalid or unrecognized dryRun directive will\nresult in an error response and no further processing of the\nrequest. Valid values are:\n- All: all dry run stages will be processed\n+optional\n+listType=atomic", + } +} + +func (TokenBucketRateLimiter) SwaggerDoc() map[string]string { + return map[string]string{ + "qps": "QPS indicates the maximum QPS to the apiserver from this client.\nIf it's zero, the component default will be used", + "burst": "Maximum burst for throttle.\nIf it's zero, the component default will be used", + } +} + +func (RateLimiter) SwaggerDoc() map[string]string { + return map[string]string{} +} + +func (RESTClientConfiguration) SwaggerDoc() map[string]string { + return map[string]string{ + "": "RESTClientConfiguration allows configuring certain aspects of the k8s rest client.", + "rateLimiter": "RateLimiter allows selecting and configuring different rate limiters for the k8s client.", + } +} + +func (ReloadableComponentConfiguration) SwaggerDoc() map[string]string { + return map[string]string{ + "": "ReloadableComponentConfiguration holds all generic k8s configuration options which can\nbe reloaded by components without requiring a restart.", + "restClient": "RestClient can be used to tune certain aspects of the k8s client in use.", + } +} + +func (KubeVirtConfiguration) SwaggerDoc() map[string]string { + return map[string]string{ + "": "KubeVirtConfiguration holds all kubevirt configurations", + "evictionStrategy": "EvictionStrategy defines at the cluster level if the VirtualMachineInstance should be\nmigrated instead of shut-off in case of a node drain. If the VirtualMachineInstance specific\nfield is set it overrides the cluster level one.", + "supportedGuestAgentVersions": "deprecated", + } +} + +func (SMBiosConfiguration) SwaggerDoc() map[string]string { + return map[string]string{} +} + +func (MigrationConfiguration) SwaggerDoc() map[string]string { + return map[string]string{ + "": "MigrationConfiguration holds migration options", + } +} + +func (DiskVerification) SwaggerDoc() map[string]string { + return map[string]string{ + "": "DiskVerification holds container disks verification limits", + } +} + +func (DeveloperConfiguration) SwaggerDoc() map[string]string { + return map[string]string{ + "": "DeveloperConfiguration holds developer options", + "useEmulation": "UseEmulation can be set to true to allow fallback to software emulation\nin case hardware-assisted emulation is not available.", + "minimumClusterTSCFrequency": "Allow overriding the automatically determined minimum TSC frequency of the cluster\nand fixate the minimum to this frequency.", + } +} + +func (LogVerbosity) SwaggerDoc() map[string]string { + return map[string]string{ + "": "LogVerbosity sets log verbosity level of various components", + "nodeVerbosity": "NodeVerbosity represents a map of nodes with a specific verbosity level", + } +} + +func (PermittedHostDevices) SwaggerDoc() map[string]string { + return map[string]string{ + "": "PermittedHostDevices holds information about devices allowed for passthrough", + "pciHostDevices": "+listType=atomic", + "mediatedDevices": "+listType=atomic", + } +} + +func (PciHostDevice) SwaggerDoc() map[string]string { + return map[string]string{ + "": "PciHostDevice represents a host PCI device allowed for passthrough", + "pciVendorSelector": "The vendor_id:product_id tuple of the PCI device", + "resourceName": "The name of the resource that is representing the device. Exposed by\na device plugin and requested by VMs. Typically of the form\nvendor.com/product_nameThe name of the resource that is representing\nthe device. Exposed by a device plugin and requested by VMs.\nTypically of the form vendor.com/product_name", + "externalResourceProvider": "If true, KubeVirt will leave the allocation and monitoring to an\nexternal device plugin", + } +} + +func (MediatedHostDevice) SwaggerDoc() map[string]string { + return map[string]string{ + "": "MediatedHostDevice represents a host mediated device allowed for passthrough", + } +} + +func (MediatedDevicesConfiguration) SwaggerDoc() map[string]string { + return map[string]string{ + "": "MediatedDevicesConfiguration holds information about MDEV types to be defined, if available", + "mediatedDevicesTypes": "+listType=atomic", + "nodeMediatedDeviceTypes": "+optional\n+listType=atomic", + } +} + +func (NodeMediatedDeviceTypesConfig) SwaggerDoc() map[string]string { + return map[string]string{ + "": "NodeMediatedDeviceTypesConfig holds information about MDEV types to be defined in a specifc node that matches the NodeSelector field.\n+k8s:openapi-gen=true", + "nodeSelector": "NodeSelector is a selector which must be true for the vmi to fit on a node.\nSelector which must match a node's labels for the vmi to be scheduled on that node.\nMore info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/", + "mediatedDevicesTypes": "+listType=atomic", + } +} + +func (NetworkConfiguration) SwaggerDoc() map[string]string { + return map[string]string{ + "": "NetworkConfiguration holds network options", + } +} + +func (GuestAgentPing) SwaggerDoc() map[string]string { + return map[string]string{ + "": "GuestAgentPing configures the guest-agent based ping probe", + } +} + +func (ProfilerResult) SwaggerDoc() map[string]string { + return map[string]string{} +} + +func (ClusterProfilerResults) SwaggerDoc() map[string]string { + return map[string]string{} +} + +func (ClusterProfilerRequest) SwaggerDoc() map[string]string { + return map[string]string{} +} + +func (FlavorMatcher) SwaggerDoc() map[string]string { + return map[string]string{ + "": "FlavorMatcher references a flavor that is used to fill fields in the VMI template.", + "name": "Name is the name of the VirtualMachineFlavor or VirtualMachineClusterFlavor", + "kind": "Kind specifies which flavor resource is referenced.\nAllowed values are: \"VirtualMachineFlavor\" and \"VirtualMachineClusterFlavor\".\nIf not specified, \"VirtualMachineClusterFlavor\" is used by default.\n\n+optional", + } +} diff --git a/vendor/kubevirt.io/api/core/v1/zz_generated.defaults.go b/vendor/kubevirt.io/api/core/v1/zz_generated.defaults.go new file mode 100644 index 000000000000..b3f65406b17b --- /dev/null +++ b/vendor/kubevirt.io/api/core/v1/zz_generated.defaults.go @@ -0,0 +1,566 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by defaulter-gen. DO NOT EDIT. + +package v1 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// RegisterDefaults adds defaulters functions to the given scheme. +// Public to allow building arbitrary schemes. +// All generated defaulters are covering - they call all nested defaulters. +func RegisterDefaults(scheme *runtime.Scheme) error { + scheme.AddTypeDefaultingFunc(&VirtualMachine{}, func(obj interface{}) { SetObjectDefaults_VirtualMachine(obj.(*VirtualMachine)) }) + scheme.AddTypeDefaultingFunc(&VirtualMachineInstance{}, func(obj interface{}) { SetObjectDefaults_VirtualMachineInstance(obj.(*VirtualMachineInstance)) }) + scheme.AddTypeDefaultingFunc(&VirtualMachineInstanceList{}, func(obj interface{}) { SetObjectDefaults_VirtualMachineInstanceList(obj.(*VirtualMachineInstanceList)) }) + scheme.AddTypeDefaultingFunc(&VirtualMachineInstancePreset{}, func(obj interface{}) { + SetObjectDefaults_VirtualMachineInstancePreset(obj.(*VirtualMachineInstancePreset)) + }) + scheme.AddTypeDefaultingFunc(&VirtualMachineInstancePresetList{}, func(obj interface{}) { + SetObjectDefaults_VirtualMachineInstancePresetList(obj.(*VirtualMachineInstancePresetList)) + }) + scheme.AddTypeDefaultingFunc(&VirtualMachineInstanceReplicaSet{}, func(obj interface{}) { + SetObjectDefaults_VirtualMachineInstanceReplicaSet(obj.(*VirtualMachineInstanceReplicaSet)) + }) + scheme.AddTypeDefaultingFunc(&VirtualMachineInstanceReplicaSetList{}, func(obj interface{}) { + SetObjectDefaults_VirtualMachineInstanceReplicaSetList(obj.(*VirtualMachineInstanceReplicaSetList)) + }) + scheme.AddTypeDefaultingFunc(&VirtualMachineList{}, func(obj interface{}) { SetObjectDefaults_VirtualMachineList(obj.(*VirtualMachineList)) }) + return nil +} + +func SetObjectDefaults_VirtualMachine(in *VirtualMachine) { + if in.Spec.Template != nil { + if in.Spec.Template.Spec.Domain.Firmware != nil { + SetDefaults_Firmware(in.Spec.Template.Spec.Domain.Firmware) + } + if in.Spec.Template.Spec.Domain.Clock != nil { + if in.Spec.Template.Spec.Domain.Clock.Timer != nil { + if in.Spec.Template.Spec.Domain.Clock.Timer.HPET != nil { + SetDefaults_HPETTimer(in.Spec.Template.Spec.Domain.Clock.Timer.HPET) + } + if in.Spec.Template.Spec.Domain.Clock.Timer.KVM != nil { + SetDefaults_KVMTimer(in.Spec.Template.Spec.Domain.Clock.Timer.KVM) + } + if in.Spec.Template.Spec.Domain.Clock.Timer.PIT != nil { + SetDefaults_PITTimer(in.Spec.Template.Spec.Domain.Clock.Timer.PIT) + } + if in.Spec.Template.Spec.Domain.Clock.Timer.RTC != nil { + SetDefaults_RTCTimer(in.Spec.Template.Spec.Domain.Clock.Timer.RTC) + } + if in.Spec.Template.Spec.Domain.Clock.Timer.Hyperv != nil { + SetDefaults_HypervTimer(in.Spec.Template.Spec.Domain.Clock.Timer.Hyperv) + } + } + } + if in.Spec.Template.Spec.Domain.Features != nil { + SetDefaults_FeatureState(&in.Spec.Template.Spec.Domain.Features.ACPI) + if in.Spec.Template.Spec.Domain.Features.APIC != nil { + SetDefaults_FeatureAPIC(in.Spec.Template.Spec.Domain.Features.APIC) + } + if in.Spec.Template.Spec.Domain.Features.Hyperv != nil { + if in.Spec.Template.Spec.Domain.Features.Hyperv.Relaxed != nil { + SetDefaults_FeatureState(in.Spec.Template.Spec.Domain.Features.Hyperv.Relaxed) + } + if in.Spec.Template.Spec.Domain.Features.Hyperv.VAPIC != nil { + SetDefaults_FeatureState(in.Spec.Template.Spec.Domain.Features.Hyperv.VAPIC) + } + if in.Spec.Template.Spec.Domain.Features.Hyperv.Spinlocks != nil { + SetDefaults_FeatureSpinlocks(in.Spec.Template.Spec.Domain.Features.Hyperv.Spinlocks) + } + if in.Spec.Template.Spec.Domain.Features.Hyperv.VPIndex != nil { + SetDefaults_FeatureState(in.Spec.Template.Spec.Domain.Features.Hyperv.VPIndex) + } + if in.Spec.Template.Spec.Domain.Features.Hyperv.Runtime != nil { + SetDefaults_FeatureState(in.Spec.Template.Spec.Domain.Features.Hyperv.Runtime) + } + if in.Spec.Template.Spec.Domain.Features.Hyperv.SyNIC != nil { + SetDefaults_FeatureState(in.Spec.Template.Spec.Domain.Features.Hyperv.SyNIC) + } + if in.Spec.Template.Spec.Domain.Features.Hyperv.SyNICTimer != nil { + SetDefaults_SyNICTimer(in.Spec.Template.Spec.Domain.Features.Hyperv.SyNICTimer) + if in.Spec.Template.Spec.Domain.Features.Hyperv.SyNICTimer.Direct != nil { + SetDefaults_FeatureState(in.Spec.Template.Spec.Domain.Features.Hyperv.SyNICTimer.Direct) + } + } + if in.Spec.Template.Spec.Domain.Features.Hyperv.Reset != nil { + SetDefaults_FeatureState(in.Spec.Template.Spec.Domain.Features.Hyperv.Reset) + } + if in.Spec.Template.Spec.Domain.Features.Hyperv.VendorID != nil { + SetDefaults_FeatureVendorID(in.Spec.Template.Spec.Domain.Features.Hyperv.VendorID) + } + if in.Spec.Template.Spec.Domain.Features.Hyperv.Frequencies != nil { + SetDefaults_FeatureState(in.Spec.Template.Spec.Domain.Features.Hyperv.Frequencies) + } + if in.Spec.Template.Spec.Domain.Features.Hyperv.Reenlightenment != nil { + SetDefaults_FeatureState(in.Spec.Template.Spec.Domain.Features.Hyperv.Reenlightenment) + } + if in.Spec.Template.Spec.Domain.Features.Hyperv.TLBFlush != nil { + SetDefaults_FeatureState(in.Spec.Template.Spec.Domain.Features.Hyperv.TLBFlush) + } + if in.Spec.Template.Spec.Domain.Features.Hyperv.IPI != nil { + SetDefaults_FeatureState(in.Spec.Template.Spec.Domain.Features.Hyperv.IPI) + } + if in.Spec.Template.Spec.Domain.Features.Hyperv.EVMCS != nil { + SetDefaults_FeatureState(in.Spec.Template.Spec.Domain.Features.Hyperv.EVMCS) + } + } + if in.Spec.Template.Spec.Domain.Features.SMM != nil { + SetDefaults_FeatureState(in.Spec.Template.Spec.Domain.Features.SMM) + } + if in.Spec.Template.Spec.Domain.Features.Pvspinlock != nil { + SetDefaults_FeatureState(in.Spec.Template.Spec.Domain.Features.Pvspinlock) + } + } + for i := range in.Spec.Template.Spec.Domain.Devices.Disks { + a := &in.Spec.Template.Spec.Domain.Devices.Disks[i] + SetDefaults_DiskDevice(&a.DiskDevice) + if a.DiskDevice.CDRom != nil { + SetDefaults_CDRomTarget(a.DiskDevice.CDRom) + } + if a.BlockSize != nil { + if a.BlockSize.MatchVolume != nil { + SetDefaults_FeatureState(a.BlockSize.MatchVolume) + } + } + } + if in.Spec.Template.Spec.Domain.Devices.Watchdog != nil { + SetDefaults_Watchdog(in.Spec.Template.Spec.Domain.Devices.Watchdog) + if in.Spec.Template.Spec.Domain.Devices.Watchdog.WatchdogDevice.I6300ESB != nil { + SetDefaults_I6300ESBWatchdog(in.Spec.Template.Spec.Domain.Devices.Watchdog.WatchdogDevice.I6300ESB) + } + } + for i := range in.Spec.Template.Spec.Domain.Devices.GPUs { + a := &in.Spec.Template.Spec.Domain.Devices.GPUs[i] + if a.VirtualGPUOptions != nil { + if a.VirtualGPUOptions.Display != nil { + if a.VirtualGPUOptions.Display.RamFB != nil { + SetDefaults_FeatureState(a.VirtualGPUOptions.Display.RamFB) + } + } + } + } + if in.Spec.Template.Spec.LivenessProbe != nil { + SetDefaults_Probe(in.Spec.Template.Spec.LivenessProbe) + } + if in.Spec.Template.Spec.ReadinessProbe != nil { + SetDefaults_Probe(in.Spec.Template.Spec.ReadinessProbe) + } + } + for i := range in.Status.VolumeRequests { + a := &in.Status.VolumeRequests[i] + if a.AddVolumeOptions != nil { + if a.AddVolumeOptions.Disk != nil { + SetDefaults_DiskDevice(&a.AddVolumeOptions.Disk.DiskDevice) + if a.AddVolumeOptions.Disk.DiskDevice.CDRom != nil { + SetDefaults_CDRomTarget(a.AddVolumeOptions.Disk.DiskDevice.CDRom) + } + if a.AddVolumeOptions.Disk.BlockSize != nil { + if a.AddVolumeOptions.Disk.BlockSize.MatchVolume != nil { + SetDefaults_FeatureState(a.AddVolumeOptions.Disk.BlockSize.MatchVolume) + } + } + } + } + } +} + +func SetObjectDefaults_VirtualMachineInstance(in *VirtualMachineInstance) { + SetDefaults_VirtualMachineInstance(in) + if in.Spec.Domain.Firmware != nil { + SetDefaults_Firmware(in.Spec.Domain.Firmware) + } + if in.Spec.Domain.Clock != nil { + if in.Spec.Domain.Clock.Timer != nil { + if in.Spec.Domain.Clock.Timer.HPET != nil { + SetDefaults_HPETTimer(in.Spec.Domain.Clock.Timer.HPET) + } + if in.Spec.Domain.Clock.Timer.KVM != nil { + SetDefaults_KVMTimer(in.Spec.Domain.Clock.Timer.KVM) + } + if in.Spec.Domain.Clock.Timer.PIT != nil { + SetDefaults_PITTimer(in.Spec.Domain.Clock.Timer.PIT) + } + if in.Spec.Domain.Clock.Timer.RTC != nil { + SetDefaults_RTCTimer(in.Spec.Domain.Clock.Timer.RTC) + } + if in.Spec.Domain.Clock.Timer.Hyperv != nil { + SetDefaults_HypervTimer(in.Spec.Domain.Clock.Timer.Hyperv) + } + } + } + if in.Spec.Domain.Features != nil { + SetDefaults_FeatureState(&in.Spec.Domain.Features.ACPI) + if in.Spec.Domain.Features.APIC != nil { + SetDefaults_FeatureAPIC(in.Spec.Domain.Features.APIC) + } + if in.Spec.Domain.Features.Hyperv != nil { + if in.Spec.Domain.Features.Hyperv.Relaxed != nil { + SetDefaults_FeatureState(in.Spec.Domain.Features.Hyperv.Relaxed) + } + if in.Spec.Domain.Features.Hyperv.VAPIC != nil { + SetDefaults_FeatureState(in.Spec.Domain.Features.Hyperv.VAPIC) + } + if in.Spec.Domain.Features.Hyperv.Spinlocks != nil { + SetDefaults_FeatureSpinlocks(in.Spec.Domain.Features.Hyperv.Spinlocks) + } + if in.Spec.Domain.Features.Hyperv.VPIndex != nil { + SetDefaults_FeatureState(in.Spec.Domain.Features.Hyperv.VPIndex) + } + if in.Spec.Domain.Features.Hyperv.Runtime != nil { + SetDefaults_FeatureState(in.Spec.Domain.Features.Hyperv.Runtime) + } + if in.Spec.Domain.Features.Hyperv.SyNIC != nil { + SetDefaults_FeatureState(in.Spec.Domain.Features.Hyperv.SyNIC) + } + if in.Spec.Domain.Features.Hyperv.SyNICTimer != nil { + SetDefaults_SyNICTimer(in.Spec.Domain.Features.Hyperv.SyNICTimer) + if in.Spec.Domain.Features.Hyperv.SyNICTimer.Direct != nil { + SetDefaults_FeatureState(in.Spec.Domain.Features.Hyperv.SyNICTimer.Direct) + } + } + if in.Spec.Domain.Features.Hyperv.Reset != nil { + SetDefaults_FeatureState(in.Spec.Domain.Features.Hyperv.Reset) + } + if in.Spec.Domain.Features.Hyperv.VendorID != nil { + SetDefaults_FeatureVendorID(in.Spec.Domain.Features.Hyperv.VendorID) + } + if in.Spec.Domain.Features.Hyperv.Frequencies != nil { + SetDefaults_FeatureState(in.Spec.Domain.Features.Hyperv.Frequencies) + } + if in.Spec.Domain.Features.Hyperv.Reenlightenment != nil { + SetDefaults_FeatureState(in.Spec.Domain.Features.Hyperv.Reenlightenment) + } + if in.Spec.Domain.Features.Hyperv.TLBFlush != nil { + SetDefaults_FeatureState(in.Spec.Domain.Features.Hyperv.TLBFlush) + } + if in.Spec.Domain.Features.Hyperv.IPI != nil { + SetDefaults_FeatureState(in.Spec.Domain.Features.Hyperv.IPI) + } + if in.Spec.Domain.Features.Hyperv.EVMCS != nil { + SetDefaults_FeatureState(in.Spec.Domain.Features.Hyperv.EVMCS) + } + } + if in.Spec.Domain.Features.SMM != nil { + SetDefaults_FeatureState(in.Spec.Domain.Features.SMM) + } + if in.Spec.Domain.Features.Pvspinlock != nil { + SetDefaults_FeatureState(in.Spec.Domain.Features.Pvspinlock) + } + } + for i := range in.Spec.Domain.Devices.Disks { + a := &in.Spec.Domain.Devices.Disks[i] + SetDefaults_DiskDevice(&a.DiskDevice) + if a.DiskDevice.CDRom != nil { + SetDefaults_CDRomTarget(a.DiskDevice.CDRom) + } + if a.BlockSize != nil { + if a.BlockSize.MatchVolume != nil { + SetDefaults_FeatureState(a.BlockSize.MatchVolume) + } + } + } + if in.Spec.Domain.Devices.Watchdog != nil { + SetDefaults_Watchdog(in.Spec.Domain.Devices.Watchdog) + if in.Spec.Domain.Devices.Watchdog.WatchdogDevice.I6300ESB != nil { + SetDefaults_I6300ESBWatchdog(in.Spec.Domain.Devices.Watchdog.WatchdogDevice.I6300ESB) + } + } + for i := range in.Spec.Domain.Devices.GPUs { + a := &in.Spec.Domain.Devices.GPUs[i] + if a.VirtualGPUOptions != nil { + if a.VirtualGPUOptions.Display != nil { + if a.VirtualGPUOptions.Display.RamFB != nil { + SetDefaults_FeatureState(a.VirtualGPUOptions.Display.RamFB) + } + } + } + } + if in.Spec.LivenessProbe != nil { + SetDefaults_Probe(in.Spec.LivenessProbe) + } + if in.Spec.ReadinessProbe != nil { + SetDefaults_Probe(in.Spec.ReadinessProbe) + } +} + +func SetObjectDefaults_VirtualMachineInstanceList(in *VirtualMachineInstanceList) { + for i := range in.Items { + a := &in.Items[i] + SetObjectDefaults_VirtualMachineInstance(a) + } +} + +func SetObjectDefaults_VirtualMachineInstancePreset(in *VirtualMachineInstancePreset) { + if in.Spec.Domain != nil { + if in.Spec.Domain.Firmware != nil { + SetDefaults_Firmware(in.Spec.Domain.Firmware) + } + if in.Spec.Domain.Clock != nil { + if in.Spec.Domain.Clock.Timer != nil { + if in.Spec.Domain.Clock.Timer.HPET != nil { + SetDefaults_HPETTimer(in.Spec.Domain.Clock.Timer.HPET) + } + if in.Spec.Domain.Clock.Timer.KVM != nil { + SetDefaults_KVMTimer(in.Spec.Domain.Clock.Timer.KVM) + } + if in.Spec.Domain.Clock.Timer.PIT != nil { + SetDefaults_PITTimer(in.Spec.Domain.Clock.Timer.PIT) + } + if in.Spec.Domain.Clock.Timer.RTC != nil { + SetDefaults_RTCTimer(in.Spec.Domain.Clock.Timer.RTC) + } + if in.Spec.Domain.Clock.Timer.Hyperv != nil { + SetDefaults_HypervTimer(in.Spec.Domain.Clock.Timer.Hyperv) + } + } + } + if in.Spec.Domain.Features != nil { + SetDefaults_FeatureState(&in.Spec.Domain.Features.ACPI) + if in.Spec.Domain.Features.APIC != nil { + SetDefaults_FeatureAPIC(in.Spec.Domain.Features.APIC) + } + if in.Spec.Domain.Features.Hyperv != nil { + if in.Spec.Domain.Features.Hyperv.Relaxed != nil { + SetDefaults_FeatureState(in.Spec.Domain.Features.Hyperv.Relaxed) + } + if in.Spec.Domain.Features.Hyperv.VAPIC != nil { + SetDefaults_FeatureState(in.Spec.Domain.Features.Hyperv.VAPIC) + } + if in.Spec.Domain.Features.Hyperv.Spinlocks != nil { + SetDefaults_FeatureSpinlocks(in.Spec.Domain.Features.Hyperv.Spinlocks) + } + if in.Spec.Domain.Features.Hyperv.VPIndex != nil { + SetDefaults_FeatureState(in.Spec.Domain.Features.Hyperv.VPIndex) + } + if in.Spec.Domain.Features.Hyperv.Runtime != nil { + SetDefaults_FeatureState(in.Spec.Domain.Features.Hyperv.Runtime) + } + if in.Spec.Domain.Features.Hyperv.SyNIC != nil { + SetDefaults_FeatureState(in.Spec.Domain.Features.Hyperv.SyNIC) + } + if in.Spec.Domain.Features.Hyperv.SyNICTimer != nil { + SetDefaults_SyNICTimer(in.Spec.Domain.Features.Hyperv.SyNICTimer) + if in.Spec.Domain.Features.Hyperv.SyNICTimer.Direct != nil { + SetDefaults_FeatureState(in.Spec.Domain.Features.Hyperv.SyNICTimer.Direct) + } + } + if in.Spec.Domain.Features.Hyperv.Reset != nil { + SetDefaults_FeatureState(in.Spec.Domain.Features.Hyperv.Reset) + } + if in.Spec.Domain.Features.Hyperv.VendorID != nil { + SetDefaults_FeatureVendorID(in.Spec.Domain.Features.Hyperv.VendorID) + } + if in.Spec.Domain.Features.Hyperv.Frequencies != nil { + SetDefaults_FeatureState(in.Spec.Domain.Features.Hyperv.Frequencies) + } + if in.Spec.Domain.Features.Hyperv.Reenlightenment != nil { + SetDefaults_FeatureState(in.Spec.Domain.Features.Hyperv.Reenlightenment) + } + if in.Spec.Domain.Features.Hyperv.TLBFlush != nil { + SetDefaults_FeatureState(in.Spec.Domain.Features.Hyperv.TLBFlush) + } + if in.Spec.Domain.Features.Hyperv.IPI != nil { + SetDefaults_FeatureState(in.Spec.Domain.Features.Hyperv.IPI) + } + if in.Spec.Domain.Features.Hyperv.EVMCS != nil { + SetDefaults_FeatureState(in.Spec.Domain.Features.Hyperv.EVMCS) + } + } + if in.Spec.Domain.Features.SMM != nil { + SetDefaults_FeatureState(in.Spec.Domain.Features.SMM) + } + if in.Spec.Domain.Features.Pvspinlock != nil { + SetDefaults_FeatureState(in.Spec.Domain.Features.Pvspinlock) + } + } + for i := range in.Spec.Domain.Devices.Disks { + a := &in.Spec.Domain.Devices.Disks[i] + SetDefaults_DiskDevice(&a.DiskDevice) + if a.DiskDevice.CDRom != nil { + SetDefaults_CDRomTarget(a.DiskDevice.CDRom) + } + if a.BlockSize != nil { + if a.BlockSize.MatchVolume != nil { + SetDefaults_FeatureState(a.BlockSize.MatchVolume) + } + } + } + if in.Spec.Domain.Devices.Watchdog != nil { + SetDefaults_Watchdog(in.Spec.Domain.Devices.Watchdog) + if in.Spec.Domain.Devices.Watchdog.WatchdogDevice.I6300ESB != nil { + SetDefaults_I6300ESBWatchdog(in.Spec.Domain.Devices.Watchdog.WatchdogDevice.I6300ESB) + } + } + for i := range in.Spec.Domain.Devices.GPUs { + a := &in.Spec.Domain.Devices.GPUs[i] + if a.VirtualGPUOptions != nil { + if a.VirtualGPUOptions.Display != nil { + if a.VirtualGPUOptions.Display.RamFB != nil { + SetDefaults_FeatureState(a.VirtualGPUOptions.Display.RamFB) + } + } + } + } + } +} + +func SetObjectDefaults_VirtualMachineInstancePresetList(in *VirtualMachineInstancePresetList) { + for i := range in.Items { + a := &in.Items[i] + SetObjectDefaults_VirtualMachineInstancePreset(a) + } +} + +func SetObjectDefaults_VirtualMachineInstanceReplicaSet(in *VirtualMachineInstanceReplicaSet) { + if in.Spec.Template != nil { + if in.Spec.Template.Spec.Domain.Firmware != nil { + SetDefaults_Firmware(in.Spec.Template.Spec.Domain.Firmware) + } + if in.Spec.Template.Spec.Domain.Clock != nil { + if in.Spec.Template.Spec.Domain.Clock.Timer != nil { + if in.Spec.Template.Spec.Domain.Clock.Timer.HPET != nil { + SetDefaults_HPETTimer(in.Spec.Template.Spec.Domain.Clock.Timer.HPET) + } + if in.Spec.Template.Spec.Domain.Clock.Timer.KVM != nil { + SetDefaults_KVMTimer(in.Spec.Template.Spec.Domain.Clock.Timer.KVM) + } + if in.Spec.Template.Spec.Domain.Clock.Timer.PIT != nil { + SetDefaults_PITTimer(in.Spec.Template.Spec.Domain.Clock.Timer.PIT) + } + if in.Spec.Template.Spec.Domain.Clock.Timer.RTC != nil { + SetDefaults_RTCTimer(in.Spec.Template.Spec.Domain.Clock.Timer.RTC) + } + if in.Spec.Template.Spec.Domain.Clock.Timer.Hyperv != nil { + SetDefaults_HypervTimer(in.Spec.Template.Spec.Domain.Clock.Timer.Hyperv) + } + } + } + if in.Spec.Template.Spec.Domain.Features != nil { + SetDefaults_FeatureState(&in.Spec.Template.Spec.Domain.Features.ACPI) + if in.Spec.Template.Spec.Domain.Features.APIC != nil { + SetDefaults_FeatureAPIC(in.Spec.Template.Spec.Domain.Features.APIC) + } + if in.Spec.Template.Spec.Domain.Features.Hyperv != nil { + if in.Spec.Template.Spec.Domain.Features.Hyperv.Relaxed != nil { + SetDefaults_FeatureState(in.Spec.Template.Spec.Domain.Features.Hyperv.Relaxed) + } + if in.Spec.Template.Spec.Domain.Features.Hyperv.VAPIC != nil { + SetDefaults_FeatureState(in.Spec.Template.Spec.Domain.Features.Hyperv.VAPIC) + } + if in.Spec.Template.Spec.Domain.Features.Hyperv.Spinlocks != nil { + SetDefaults_FeatureSpinlocks(in.Spec.Template.Spec.Domain.Features.Hyperv.Spinlocks) + } + if in.Spec.Template.Spec.Domain.Features.Hyperv.VPIndex != nil { + SetDefaults_FeatureState(in.Spec.Template.Spec.Domain.Features.Hyperv.VPIndex) + } + if in.Spec.Template.Spec.Domain.Features.Hyperv.Runtime != nil { + SetDefaults_FeatureState(in.Spec.Template.Spec.Domain.Features.Hyperv.Runtime) + } + if in.Spec.Template.Spec.Domain.Features.Hyperv.SyNIC != nil { + SetDefaults_FeatureState(in.Spec.Template.Spec.Domain.Features.Hyperv.SyNIC) + } + if in.Spec.Template.Spec.Domain.Features.Hyperv.SyNICTimer != nil { + SetDefaults_SyNICTimer(in.Spec.Template.Spec.Domain.Features.Hyperv.SyNICTimer) + if in.Spec.Template.Spec.Domain.Features.Hyperv.SyNICTimer.Direct != nil { + SetDefaults_FeatureState(in.Spec.Template.Spec.Domain.Features.Hyperv.SyNICTimer.Direct) + } + } + if in.Spec.Template.Spec.Domain.Features.Hyperv.Reset != nil { + SetDefaults_FeatureState(in.Spec.Template.Spec.Domain.Features.Hyperv.Reset) + } + if in.Spec.Template.Spec.Domain.Features.Hyperv.VendorID != nil { + SetDefaults_FeatureVendorID(in.Spec.Template.Spec.Domain.Features.Hyperv.VendorID) + } + if in.Spec.Template.Spec.Domain.Features.Hyperv.Frequencies != nil { + SetDefaults_FeatureState(in.Spec.Template.Spec.Domain.Features.Hyperv.Frequencies) + } + if in.Spec.Template.Spec.Domain.Features.Hyperv.Reenlightenment != nil { + SetDefaults_FeatureState(in.Spec.Template.Spec.Domain.Features.Hyperv.Reenlightenment) + } + if in.Spec.Template.Spec.Domain.Features.Hyperv.TLBFlush != nil { + SetDefaults_FeatureState(in.Spec.Template.Spec.Domain.Features.Hyperv.TLBFlush) + } + if in.Spec.Template.Spec.Domain.Features.Hyperv.IPI != nil { + SetDefaults_FeatureState(in.Spec.Template.Spec.Domain.Features.Hyperv.IPI) + } + if in.Spec.Template.Spec.Domain.Features.Hyperv.EVMCS != nil { + SetDefaults_FeatureState(in.Spec.Template.Spec.Domain.Features.Hyperv.EVMCS) + } + } + if in.Spec.Template.Spec.Domain.Features.SMM != nil { + SetDefaults_FeatureState(in.Spec.Template.Spec.Domain.Features.SMM) + } + if in.Spec.Template.Spec.Domain.Features.Pvspinlock != nil { + SetDefaults_FeatureState(in.Spec.Template.Spec.Domain.Features.Pvspinlock) + } + } + for i := range in.Spec.Template.Spec.Domain.Devices.Disks { + a := &in.Spec.Template.Spec.Domain.Devices.Disks[i] + SetDefaults_DiskDevice(&a.DiskDevice) + if a.DiskDevice.CDRom != nil { + SetDefaults_CDRomTarget(a.DiskDevice.CDRom) + } + if a.BlockSize != nil { + if a.BlockSize.MatchVolume != nil { + SetDefaults_FeatureState(a.BlockSize.MatchVolume) + } + } + } + if in.Spec.Template.Spec.Domain.Devices.Watchdog != nil { + SetDefaults_Watchdog(in.Spec.Template.Spec.Domain.Devices.Watchdog) + if in.Spec.Template.Spec.Domain.Devices.Watchdog.WatchdogDevice.I6300ESB != nil { + SetDefaults_I6300ESBWatchdog(in.Spec.Template.Spec.Domain.Devices.Watchdog.WatchdogDevice.I6300ESB) + } + } + for i := range in.Spec.Template.Spec.Domain.Devices.GPUs { + a := &in.Spec.Template.Spec.Domain.Devices.GPUs[i] + if a.VirtualGPUOptions != nil { + if a.VirtualGPUOptions.Display != nil { + if a.VirtualGPUOptions.Display.RamFB != nil { + SetDefaults_FeatureState(a.VirtualGPUOptions.Display.RamFB) + } + } + } + } + if in.Spec.Template.Spec.LivenessProbe != nil { + SetDefaults_Probe(in.Spec.Template.Spec.LivenessProbe) + } + if in.Spec.Template.Spec.ReadinessProbe != nil { + SetDefaults_Probe(in.Spec.Template.Spec.ReadinessProbe) + } + } +} + +func SetObjectDefaults_VirtualMachineInstanceReplicaSetList(in *VirtualMachineInstanceReplicaSetList) { + for i := range in.Items { + a := &in.Items[i] + SetObjectDefaults_VirtualMachineInstanceReplicaSet(a) + } +} + +func SetObjectDefaults_VirtualMachineList(in *VirtualMachineList) { + for i := range in.Items { + a := &in.Items[i] + SetObjectDefaults_VirtualMachine(a) + } +} diff --git a/vendor/k8s.io/utils/integer/BUILD.bazel b/vendor/kubevirt.io/api/flavor/BUILD.bazel similarity index 51% rename from vendor/k8s.io/utils/integer/BUILD.bazel rename to vendor/kubevirt.io/api/flavor/BUILD.bazel index b0ddf2cd322a..c8fc6a1bdcf0 100644 --- a/vendor/k8s.io/utils/integer/BUILD.bazel +++ b/vendor/kubevirt.io/api/flavor/BUILD.bazel @@ -2,8 +2,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library") go_library( name = "go_default_library", - srcs = ["integer.go"], - importmap = "kubevirt.io/kubevirt/vendor/k8s.io/utils/integer", - importpath = "k8s.io/utils/integer", + srcs = ["register.go"], + importpath = "kubevirt.io/api/flavor", visibility = ["//visibility:public"], ) diff --git a/vendor/kubevirt.io/api/flavor/register.go b/vendor/kubevirt.io/api/flavor/register.go new file mode 100644 index 000000000000..573517d08251 --- /dev/null +++ b/vendor/kubevirt.io/api/flavor/register.go @@ -0,0 +1,31 @@ +/* + * This file is part of the KubeVirt project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Copyright 2021 Red Hat, Inc. + * + */ + +package flavor + +// GroupName is the group name used in this package +const ( + GroupName = "flavor.kubevirt.io" + + SingularResourceName = "virtualmachineflavor" + PluralResourceName = SingularResourceName + "s" + + ClusterSingularResourceName = "virtualmachineclusterflavor" + ClusterPluralResourceName = ClusterSingularResourceName + "s" +) diff --git a/vendor/k8s.io/client-go/pkg/apis/clientauthentication/BUILD.bazel b/vendor/kubevirt.io/api/flavor/v1alpha1/BUILD.bazel similarity index 64% rename from vendor/k8s.io/client-go/pkg/apis/clientauthentication/BUILD.bazel rename to vendor/kubevirt.io/api/flavor/v1alpha1/BUILD.bazel index 802fff46477b..c26e289c7b24 100644 --- a/vendor/k8s.io/client-go/pkg/apis/clientauthentication/BUILD.bazel +++ b/vendor/kubevirt.io/api/flavor/v1alpha1/BUILD.bazel @@ -3,15 +3,17 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library") go_library( name = "go_default_library", srcs = [ + "deepcopy_generated.go", "doc.go", "register.go", "types.go", - "zz_generated.deepcopy.go", + "types_swagger_generated.go", ], - importmap = "kubevirt.io/kubevirt/vendor/k8s.io/client-go/pkg/apis/clientauthentication", - importpath = "k8s.io/client-go/pkg/apis/clientauthentication", + importpath = "kubevirt.io/api/flavor/v1alpha1", visibility = ["//visibility:public"], deps = [ + "//staging/src/kubevirt.io/api/core/v1:go_default_library", + "//staging/src/kubevirt.io/api/flavor:go_default_library", "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", diff --git a/vendor/kubevirt.io/api/flavor/v1alpha1/deepcopy_generated.go b/vendor/kubevirt.io/api/flavor/v1alpha1/deepcopy_generated.go new file mode 100644 index 000000000000..128bf14a5894 --- /dev/null +++ b/vendor/kubevirt.io/api/flavor/v1alpha1/deepcopy_generated.go @@ -0,0 +1,169 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by deepcopy-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" + + v1 "kubevirt.io/api/core/v1" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualMachineClusterFlavor) DeepCopyInto(out *VirtualMachineClusterFlavor) { + *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 VirtualMachineClusterFlavor. +func (in *VirtualMachineClusterFlavor) DeepCopy() *VirtualMachineClusterFlavor { + if in == nil { + return nil + } + out := new(VirtualMachineClusterFlavor) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *VirtualMachineClusterFlavor) 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 *VirtualMachineClusterFlavorList) DeepCopyInto(out *VirtualMachineClusterFlavorList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]VirtualMachineClusterFlavor, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineClusterFlavorList. +func (in *VirtualMachineClusterFlavorList) DeepCopy() *VirtualMachineClusterFlavorList { + if in == nil { + return nil + } + out := new(VirtualMachineClusterFlavorList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *VirtualMachineClusterFlavorList) 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 *VirtualMachineFlavor) DeepCopyInto(out *VirtualMachineFlavor) { + *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 VirtualMachineFlavor. +func (in *VirtualMachineFlavor) DeepCopy() *VirtualMachineFlavor { + if in == nil { + return nil + } + out := new(VirtualMachineFlavor) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *VirtualMachineFlavor) 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 *VirtualMachineFlavorList) DeepCopyInto(out *VirtualMachineFlavorList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]VirtualMachineFlavor, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineFlavorList. +func (in *VirtualMachineFlavorList) DeepCopy() *VirtualMachineFlavorList { + if in == nil { + return nil + } + out := new(VirtualMachineFlavorList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *VirtualMachineFlavorList) 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 *VirtualMachineFlavorSpec) DeepCopyInto(out *VirtualMachineFlavorSpec) { + *out = *in + if in.CPU != nil { + in, out := &in.CPU, &out.CPU + *out = new(v1.CPU) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineFlavorSpec. +func (in *VirtualMachineFlavorSpec) DeepCopy() *VirtualMachineFlavorSpec { + if in == nil { + return nil + } + out := new(VirtualMachineFlavorSpec) + in.DeepCopyInto(out) + return out +} diff --git a/vendor/kubevirt.io/api/flavor/v1alpha1/doc.go b/vendor/kubevirt.io/api/flavor/v1alpha1/doc.go new file mode 100644 index 000000000000..97a77dc5bec5 --- /dev/null +++ b/vendor/kubevirt.io/api/flavor/v1alpha1/doc.go @@ -0,0 +1,24 @@ +/* + * This file is part of the KubeVirt project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Copyright 2021 Red Hat, Inc. + * + */ + +// +k8s:deepcopy-gen=package +// +groupName=flavor.kubevirt.io +// +k8s:openapi-gen=true + +package v1alpha1 diff --git a/vendor/kubevirt.io/api/flavor/v1alpha1/register.go b/vendor/kubevirt.io/api/flavor/v1alpha1/register.go new file mode 100644 index 000000000000..492aa653798d --- /dev/null +++ b/vendor/kubevirt.io/api/flavor/v1alpha1/register.go @@ -0,0 +1,60 @@ +/* + * This file is part of the KubeVirt project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Copyright 2021 Red Hat, Inc. + * + */ + +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + + "kubevirt.io/api/flavor" +) + +// SchemeGroupVersion is group version used to register these objects +var SchemeGroupVersion = schema.GroupVersion{Group: flavor.GroupName, Version: "v1alpha1"} + +// Kind takes an unqualified kind and returns back a Group qualified GroupKind +func Kind(kind string) schema.GroupKind { + return SchemeGroupVersion.WithKind(kind).GroupKind() +} + +// Resource takes an unqualified resource and returns a Group qualified GroupResource +func Resource(resource string) schema.GroupResource { + return SchemeGroupVersion.WithResource(resource).GroupResource() +} + +var ( + // SchemeBuilder initializes a scheme builder + SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) + // AddToScheme is a global function that registers this API group & version to a scheme + AddToScheme = SchemeBuilder.AddToScheme +) + +// Adds the list of known types to Scheme. +func addKnownTypes(scheme *runtime.Scheme) error { + scheme.AddKnownTypes(SchemeGroupVersion, + &VirtualMachineFlavor{}, + &VirtualMachineFlavorList{}, + &VirtualMachineClusterFlavor{}, + &VirtualMachineClusterFlavorList{}, + ) + metav1.AddToGroupVersion(scheme, SchemeGroupVersion) + return nil +} diff --git a/vendor/kubevirt.io/api/flavor/v1alpha1/types.go b/vendor/kubevirt.io/api/flavor/v1alpha1/types.go new file mode 100644 index 000000000000..d00fc1bf7003 --- /dev/null +++ b/vendor/kubevirt.io/api/flavor/v1alpha1/types.go @@ -0,0 +1,83 @@ +/* + * This file is part of the KubeVirt project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Copyright 2021 Red Hat, Inc. + * + */ + +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + v1 "kubevirt.io/api/core/v1" +) + +// VirtualMachineFlavor resource contains common VirtualMachine configuration +// that can be used by multiple VirtualMachine resources. +// +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:openapi-gen=true +// +genclient +type VirtualMachineFlavor struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + // VirtualMachineFlavorSpec for the flavor + Spec VirtualMachineFlavorSpec `json:"spec"` +} + +// VirtualMachineFlavorList is a list of VirtualMachineFlavor resources. +// +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:openapi-gen=true +type VirtualMachineFlavorList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []VirtualMachineFlavor `json:"items"` +} + +// VirtualMachineClusterFlavor is a cluster scoped version of VirtualMachineFlavor resource. +// +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:openapi-gen=true +// +genclient +// +genclient:nonNamespaced +type VirtualMachineClusterFlavor struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + // VirtualMachineFlavorSpec for the flavor + Spec VirtualMachineFlavorSpec `json:"spec"` +} + +// VirtualMachineClusterFlavorList is a list of VirtualMachineClusterFlavor resources. +// +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:openapi-gen=true +type VirtualMachineClusterFlavorList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []VirtualMachineClusterFlavor `json:"items"` +} + +// VirtualMachineFlavorSpec +// +// +k8s:openapi-gen=true +type VirtualMachineFlavorSpec struct { + + // +optional + CPU *v1.CPU `json:"cpu,omitempty"` +} diff --git a/vendor/kubevirt.io/api/flavor/v1alpha1/types_swagger_generated.go b/vendor/kubevirt.io/api/flavor/v1alpha1/types_swagger_generated.go new file mode 100644 index 000000000000..fe08a6dd28c5 --- /dev/null +++ b/vendor/kubevirt.io/api/flavor/v1alpha1/types_swagger_generated.go @@ -0,0 +1,36 @@ +// Code generated by swagger-doc. DO NOT EDIT. + +package v1alpha1 + +func (VirtualMachineFlavor) SwaggerDoc() map[string]string { + return map[string]string{ + "": "VirtualMachineFlavor resource contains common VirtualMachine configuration\nthat can be used by multiple VirtualMachine resources.\n\n+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object\n+k8s:openapi-gen=true\n+genclient", + "spec": "VirtualMachineFlavorSpec for the flavor", + } +} + +func (VirtualMachineFlavorList) SwaggerDoc() map[string]string { + return map[string]string{ + "": "VirtualMachineFlavorList is a list of VirtualMachineFlavor resources.\n\n+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object\n+k8s:openapi-gen=true", + } +} + +func (VirtualMachineClusterFlavor) SwaggerDoc() map[string]string { + return map[string]string{ + "": "VirtualMachineClusterFlavor is a cluster scoped version of VirtualMachineFlavor resource.\n\n+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object\n+k8s:openapi-gen=true\n+genclient\n+genclient:nonNamespaced", + "spec": "VirtualMachineFlavorSpec for the flavor", + } +} + +func (VirtualMachineClusterFlavorList) SwaggerDoc() map[string]string { + return map[string]string{ + "": "VirtualMachineClusterFlavorList is a list of VirtualMachineClusterFlavor resources.\n\n+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object\n+k8s:openapi-gen=true", + } +} + +func (VirtualMachineFlavorSpec) SwaggerDoc() map[string]string { + return map[string]string{ + "": "VirtualMachineFlavorSpec\n\n+k8s:openapi-gen=true", + "cpu": "+optional", + } +} diff --git a/vendor/k8s.io/utils/pointer/BUILD.bazel b/vendor/kubevirt.io/api/migrations/BUILD.bazel similarity index 51% rename from vendor/k8s.io/utils/pointer/BUILD.bazel rename to vendor/kubevirt.io/api/migrations/BUILD.bazel index b41d145f273b..8dfcbd151d01 100644 --- a/vendor/k8s.io/utils/pointer/BUILD.bazel +++ b/vendor/kubevirt.io/api/migrations/BUILD.bazel @@ -2,8 +2,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library") go_library( name = "go_default_library", - srcs = ["pointer.go"], - importmap = "kubevirt.io/kubevirt/vendor/k8s.io/utils/pointer", - importpath = "k8s.io/utils/pointer", + srcs = ["register.go"], + importpath = "kubevirt.io/api/migrations", visibility = ["//visibility:public"], ) diff --git a/vendor/kubevirt.io/api/migrations/register.go b/vendor/kubevirt.io/api/migrations/register.go new file mode 100644 index 000000000000..dbb6d3c41154 --- /dev/null +++ b/vendor/kubevirt.io/api/migrations/register.go @@ -0,0 +1,28 @@ +/* + * This file is part of the KubeVirt project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Copyright 2020 Red Hat, Inc. + * + */ + +package migrations + +// GroupName is the group name used in this package +const ( + GroupName = "migrations.kubevirt.io" + Version = "v1alpha1" + + ResourceMigrationPolicies = "migrationpolicies" +) diff --git a/vendor/k8s.io/api/autoscaling/v2/BUILD.bazel b/vendor/kubevirt.io/api/migrations/v1alpha1/BUILD.bazel similarity index 66% rename from vendor/k8s.io/api/autoscaling/v2/BUILD.bazel rename to vendor/kubevirt.io/api/migrations/v1alpha1/BUILD.bazel index b3912ac49b60..d7dc1143b80e 100644 --- a/vendor/k8s.io/api/autoscaling/v2/BUILD.bazel +++ b/vendor/kubevirt.io/api/migrations/v1alpha1/BUILD.bazel @@ -3,18 +3,18 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library") go_library( name = "go_default_library", srcs = [ + "deepcopy_generated.go", "doc.go", - "generated.pb.go", "register.go", "types.go", - "types_swagger_doc_generated.go", - "zz_generated.deepcopy.go", + "types_swagger_generated.go", + "zz_generated.defaults.go", ], - importmap = "kubevirt.io/kubevirt/vendor/k8s.io/api/autoscaling/v2", - importpath = "k8s.io/api/autoscaling/v2", + importpath = "kubevirt.io/api/migrations/v1alpha1", visibility = ["//visibility:public"], deps = [ - "//vendor/github.com/gogo/protobuf/proto:go_default_library", + "//staging/src/kubevirt.io/api/core/v1:go_default_library", + "//staging/src/kubevirt.io/api/migrations:go_default_library", "//vendor/k8s.io/api/core/v1:go_default_library", "//vendor/k8s.io/apimachinery/pkg/api/resource:go_default_library", "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", diff --git a/vendor/kubevirt.io/api/migrations/v1alpha1/deepcopy_generated.go b/vendor/kubevirt.io/api/migrations/v1alpha1/deepcopy_generated.go new file mode 100644 index 000000000000..0ec43895eaef --- /dev/null +++ b/vendor/kubevirt.io/api/migrations/v1alpha1/deepcopy_generated.go @@ -0,0 +1,171 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by deepcopy-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + 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 *MigrationPolicy) DeepCopyInto(out *MigrationPolicy) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + out.Status = in.Status + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MigrationPolicy. +func (in *MigrationPolicy) DeepCopy() *MigrationPolicy { + if in == nil { + return nil + } + out := new(MigrationPolicy) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *MigrationPolicy) 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 *MigrationPolicyList) DeepCopyInto(out *MigrationPolicyList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]MigrationPolicy, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MigrationPolicyList. +func (in *MigrationPolicyList) DeepCopy() *MigrationPolicyList { + if in == nil { + return nil + } + out := new(MigrationPolicyList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *MigrationPolicyList) 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 *MigrationPolicySpec) DeepCopyInto(out *MigrationPolicySpec) { + *out = *in + if in.Selectors != nil { + in, out := &in.Selectors, &out.Selectors + *out = new(Selectors) + (*in).DeepCopyInto(*out) + } + if in.AllowAutoConverge != nil { + in, out := &in.AllowAutoConverge, &out.AllowAutoConverge + *out = new(bool) + **out = **in + } + if in.BandwidthPerMigration != nil { + in, out := &in.BandwidthPerMigration, &out.BandwidthPerMigration + x := (*in).DeepCopy() + *out = &x + } + if in.CompletionTimeoutPerGiB != nil { + in, out := &in.CompletionTimeoutPerGiB, &out.CompletionTimeoutPerGiB + *out = new(int64) + **out = **in + } + if in.AllowPostCopy != nil { + in, out := &in.AllowPostCopy, &out.AllowPostCopy + *out = new(bool) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MigrationPolicySpec. +func (in *MigrationPolicySpec) DeepCopy() *MigrationPolicySpec { + if in == nil { + return nil + } + out := new(MigrationPolicySpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MigrationPolicyStatus) DeepCopyInto(out *MigrationPolicyStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MigrationPolicyStatus. +func (in *MigrationPolicyStatus) DeepCopy() *MigrationPolicyStatus { + if in == nil { + return nil + } + out := new(MigrationPolicyStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Selectors) DeepCopyInto(out *Selectors) { + *out = *in + if in.NamespaceSelector != nil { + in, out := &in.NamespaceSelector, &out.NamespaceSelector + *out = new(v1.LabelSelector) + (*in).DeepCopyInto(*out) + } + if in.VirtualMachineInstanceSelector != nil { + in, out := &in.VirtualMachineInstanceSelector, &out.VirtualMachineInstanceSelector + *out = new(v1.LabelSelector) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Selectors. +func (in *Selectors) DeepCopy() *Selectors { + if in == nil { + return nil + } + out := new(Selectors) + in.DeepCopyInto(out) + return out +} diff --git a/vendor/kubevirt.io/api/migrations/v1alpha1/doc.go b/vendor/kubevirt.io/api/migrations/v1alpha1/doc.go new file mode 100644 index 000000000000..8c48f0d0f7b3 --- /dev/null +++ b/vendor/kubevirt.io/api/migrations/v1alpha1/doc.go @@ -0,0 +1,24 @@ +/* + * This file is part of the KubeVirt project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Copyright 2020 Red Hat, Inc. + * + */ + +// +k8s:deepcopy-gen=package +// +groupName=migrations.kubevirt.io +// +k8s:openapi-gen=true + +package v1alpha1 diff --git a/vendor/kubevirt.io/api/migrations/v1alpha1/register.go b/vendor/kubevirt.io/api/migrations/v1alpha1/register.go new file mode 100644 index 000000000000..948bc3017529 --- /dev/null +++ b/vendor/kubevirt.io/api/migrations/v1alpha1/register.go @@ -0,0 +1,67 @@ +/* + * This file is part of the KubeVirt project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Copyright 2020 Red Hat, Inc. + * + */ + +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + + "kubevirt.io/api/migrations" +) + +var ( + // SchemeGroupVersion is group version used to register these objects + SchemeGroupVersion = schema.GroupVersion{Group: migrations.GroupName, Version: migrations.Version} + + // Group Version + GroupVersion = schema.GroupVersion{Group: migrations.GroupName, Version: migrations.Version} + + // GroupVersionKind + MigrationPolicyKind = schema.GroupVersionKind{Group: migrations.GroupName, Version: migrations.Version, Kind: "MigrationPolicy"} + MigrationPolicyListKind = schema.GroupVersionKind{Group: migrations.GroupName, Version: migrations.Version, Kind: "MigrationPolicyList"} +) + +// Kind takes an unqualified kind and returns back a Group qualified GroupKind +func Kind(kind string) schema.GroupKind { + return SchemeGroupVersion.WithKind(kind).GroupKind() +} + +// Resource takes an unqualified resource and returns a Group qualified GroupResource +func Resource(resource string) schema.GroupResource { + return SchemeGroupVersion.WithResource(resource).GroupResource() +} + +var ( + // SchemeBuilder initializes a scheme builder + SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) + // AddToScheme is a global function that registers this API group & version to a scheme + AddToScheme = SchemeBuilder.AddToScheme +) + +// Adds the list of known types to Scheme. +func addKnownTypes(scheme *runtime.Scheme) error { + scheme.AddKnownTypes(SchemeGroupVersion, + &MigrationPolicy{}, + &MigrationPolicyList{}) + + metav1.AddToGroupVersion(scheme, SchemeGroupVersion) + return nil +} diff --git a/vendor/kubevirt.io/api/migrations/v1alpha1/types.go b/vendor/kubevirt.io/api/migrations/v1alpha1/types.go new file mode 100644 index 000000000000..714529e01423 --- /dev/null +++ b/vendor/kubevirt.io/api/migrations/v1alpha1/types.go @@ -0,0 +1,218 @@ +/* + * This file is part of the KubeVirt project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Copyright 2020 Red Hat, Inc. + * + */ + +package v1alpha1 + +import ( + k8sv1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/api/resource" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + k6tv1 "kubevirt.io/api/core/v1" +) + +// MigrationPolicy holds migration policy (i.e. configurations) to apply to a VM or group of VMs +// +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:openapi-gen=true +// +genclient +// +genclient:nonNamespaced +type MigrationPolicy struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + Spec MigrationPolicySpec `json:"spec" valid:"required"` + // +nullable + Status MigrationPolicyStatus `json:"status,omitempty"` +} + +type MigrationPolicySpec struct { + Selectors *Selectors `json:"selectors"` + + //+optional + AllowAutoConverge *bool `json:"allowAutoConverge,omitempty"` + //+optional + BandwidthPerMigration *resource.Quantity `json:"bandwidthPerMigration,omitempty"` + //+optional + CompletionTimeoutPerGiB *int64 `json:"completionTimeoutPerGiB,omitempty"` + //+optional + AllowPostCopy *bool `json:"allowPostCopy,omitempty"` +} + +type Selectors struct { + //+optional + NamespaceSelector *metav1.LabelSelector `json:"namespaceSelector,omitempty"` + //+optional + VirtualMachineInstanceSelector *metav1.LabelSelector `json:"virtualMachineInstanceSelector,omitempty"` +} + +type MigrationPolicyStatus struct { +} + +// MigrationPolicyList is a list of MigrationPolicy +// +// +k8s:openapi-gen=true +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +type MigrationPolicyList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + // +listType=atomic + Items []MigrationPolicy `json:"items"` +} + +// GetMigrationConfByPolicy returns a new migration configuration. The new configuration attributes will be overridden +// by the migration policy if the specified attributes were defined for this policy. Otherwise they wouldn't change. +// The boolean returned value indicates if any changes were made to the configurations. +func (m *MigrationPolicy) GetMigrationConfByPolicy(clusterMigrationConfigurations *k6tv1.MigrationConfiguration) (changed bool, err error) { + policySpec := m.Spec + changed = false + + if policySpec.AllowAutoConverge != nil { + changed = true + *clusterMigrationConfigurations.AllowAutoConverge = *policySpec.AllowAutoConverge + } + if policySpec.BandwidthPerMigration != nil { + changed = true + *clusterMigrationConfigurations.BandwidthPerMigration = *policySpec.BandwidthPerMigration + } + if policySpec.CompletionTimeoutPerGiB != nil { + changed = true + *clusterMigrationConfigurations.CompletionTimeoutPerGiB = *policySpec.CompletionTimeoutPerGiB + } + if policySpec.AllowPostCopy != nil { + changed = true + *clusterMigrationConfigurations.AllowPostCopy = *policySpec.AllowPostCopy + } + + return changed, nil +} + +// +k8s:openapi-gen=false +type migrationPolicyMatchScore struct { + matchingVMILabels int + matchingNSLabels int +} + +func (score migrationPolicyMatchScore) equals(otherScore migrationPolicyMatchScore) bool { + return score.matchingVMILabels == otherScore.matchingVMILabels && + score.matchingNSLabels == otherScore.matchingNSLabels +} + +func (score migrationPolicyMatchScore) greaterThan(otherScore migrationPolicyMatchScore) bool { + thisTotalScore := score.matchingNSLabels + score.matchingVMILabels + otherTotalScore := otherScore.matchingNSLabels + otherScore.matchingVMILabels + + if thisTotalScore == otherTotalScore { + return score.matchingVMILabels > otherScore.matchingVMILabels + } + + return thisTotalScore > otherTotalScore +} + +func (score migrationPolicyMatchScore) lessThan(otherScore migrationPolicyMatchScore) bool { + return !score.equals(otherScore) && !score.greaterThan(otherScore) +} + +// MatchPolicy returns the policy that is matched to the vmi, or nil of no policy is matched. +// +// Since every policy can specify VMI and Namespace labels to match to, matching is done by returning the most +// detailed policy, meaning the policy that matches the VMI and specifies the most labels that matched either +// the VMI or its namespace labels. +// +// If two policies are matched and have the same level of details (i.e. same number of matching labels) the matched +// policy is chosen by policies' names ordered by lexicographic order. The reason is to create a rather arbitrary yet +// deterministic way of matching policies. +func (list *MigrationPolicyList) MatchPolicy(vmi *k6tv1.VirtualMachineInstance, vmiNamespace *k8sv1.Namespace) *MigrationPolicy { + var mathingPolicies []MigrationPolicy + bestScore := migrationPolicyMatchScore{} + + for _, policy := range list.Items { + doesMatch, curScore := countMatchingLabels(&policy, vmi.Labels, vmiNamespace.Labels) + + if !doesMatch || curScore.lessThan(bestScore) { + continue + } else if curScore.greaterThan(bestScore) { + bestScore = curScore + mathingPolicies = []MigrationPolicy{policy} + } else { + mathingPolicies = append(mathingPolicies, policy) + } + } + + if len(mathingPolicies) == 0 { + return nil + } else if len(mathingPolicies) == 1 { + return &mathingPolicies[0] + } + + // If more than one policy is matched with the same number of matching labels it will be chosen by policies names' + // lexicographic order + firstPolicyNameLexicographicOrder := mathingPolicies[0].Name + var firstPolicyNameLexicographicOrderIdx int + + for idx, matchingPolicy := range mathingPolicies { + if matchingPolicy.Name < firstPolicyNameLexicographicOrder { + firstPolicyNameLexicographicOrder = matchingPolicy.Name + firstPolicyNameLexicographicOrderIdx = idx + } + } + + return &mathingPolicies[firstPolicyNameLexicographicOrderIdx] +} + +// countMatchingLabels checks if a policy matches to a VMI and the number of matching labels. +// In the case that doesMatch is false, matchingLabels needs to be dismissed and not counted on. +func countMatchingLabels(policy *MigrationPolicy, vmiLabels, namespaceLabels map[string]string) (doesMatch bool, score migrationPolicyMatchScore) { + var matchingVMILabels, matchingNSLabels int + doesMatch = true + + if policy.Spec.Selectors == nil { + return false, score + } + + countLabelsHelper := func(policyLabels, labelsToMatch map[string]string) (matchingLabels int) { + for policyKey, policyValue := range policyLabels { + value, exists := labelsToMatch[policyKey] + if exists && value == policyValue { + matchingLabels++ + } else { + doesMatch = false + return + } + } + return matchingLabels + } + + areSelectorsAndLabelsNotNil := func(selector *metav1.LabelSelector, labels map[string]string) bool { + return selector != nil && selector.MatchLabels != nil && labels != nil + } + + if areSelectorsAndLabelsNotNil(policy.Spec.Selectors.VirtualMachineInstanceSelector, vmiLabels) { + matchingVMILabels = countLabelsHelper(policy.Spec.Selectors.VirtualMachineInstanceSelector.MatchLabels, vmiLabels) + } + + if doesMatch && areSelectorsAndLabelsNotNil(policy.Spec.Selectors.NamespaceSelector, vmiLabels) { + matchingNSLabels = countLabelsHelper(policy.Spec.Selectors.NamespaceSelector.MatchLabels, namespaceLabels) + } + + if doesMatch { + score = migrationPolicyMatchScore{matchingVMILabels: matchingVMILabels, matchingNSLabels: matchingNSLabels} + } + + return doesMatch, score +} diff --git a/vendor/kubevirt.io/api/migrations/v1alpha1/types_swagger_generated.go b/vendor/kubevirt.io/api/migrations/v1alpha1/types_swagger_generated.go new file mode 100644 index 000000000000..9bfb5aa720d6 --- /dev/null +++ b/vendor/kubevirt.io/api/migrations/v1alpha1/types_swagger_generated.go @@ -0,0 +1,43 @@ +// Code generated by swagger-doc. DO NOT EDIT. + +package v1alpha1 + +func (MigrationPolicy) SwaggerDoc() map[string]string { + return map[string]string{ + "": "MigrationPolicy holds migration policy (i.e. configurations) to apply to a VM or group of VMs\n\n+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object\n+k8s:openapi-gen=true\n+genclient\n+genclient:nonNamespaced", + "status": "+nullable", + } +} + +func (MigrationPolicySpec) SwaggerDoc() map[string]string { + return map[string]string{ + "allowAutoConverge": "+optional", + "bandwidthPerMigration": "+optional", + "completionTimeoutPerGiB": "+optional", + "allowPostCopy": "+optional", + } +} + +func (Selectors) SwaggerDoc() map[string]string { + return map[string]string{ + "namespaceSelector": "+optional", + "virtualMachineInstanceSelector": "+optional", + } +} + +func (MigrationPolicyStatus) SwaggerDoc() map[string]string { + return map[string]string{} +} + +func (MigrationPolicyList) SwaggerDoc() map[string]string { + return map[string]string{ + "": "MigrationPolicyList is a list of MigrationPolicy\n\n+k8s:openapi-gen=true\n+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object", + "items": "+listType=atomic", + } +} + +func (migrationPolicyMatchScore) SwaggerDoc() map[string]string { + return map[string]string{ + "": "+k8s:openapi-gen=false", + } +} diff --git a/vendor/kubevirt.io/api/migrations/v1alpha1/zz_generated.defaults.go b/vendor/kubevirt.io/api/migrations/v1alpha1/zz_generated.defaults.go new file mode 100644 index 000000000000..d6f821a337d5 --- /dev/null +++ b/vendor/kubevirt.io/api/migrations/v1alpha1/zz_generated.defaults.go @@ -0,0 +1,33 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +/* +Copyright 2021 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by defaulter-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// RegisterDefaults adds defaulters functions to the given scheme. +// Public to allow building arbitrary schemes. +// All generated defaulters are covering - they call all nested defaulters. +func RegisterDefaults(scheme *runtime.Scheme) error { + return nil +} diff --git a/vendor/kubevirt.io/api/pool/BUILD.bazel b/vendor/kubevirt.io/api/pool/BUILD.bazel new file mode 100644 index 000000000000..cd49bc95c69a --- /dev/null +++ b/vendor/kubevirt.io/api/pool/BUILD.bazel @@ -0,0 +1,8 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = ["register.go"], + importpath = "kubevirt.io/api/pool", + visibility = ["//visibility:public"], +) diff --git a/vendor/kubevirt.io/api/pool/register.go b/vendor/kubevirt.io/api/pool/register.go new file mode 100644 index 000000000000..08b9d8c62041 --- /dev/null +++ b/vendor/kubevirt.io/api/pool/register.go @@ -0,0 +1,25 @@ +/* + * This file is part of the KubeVirt project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Copyright 2021 Red Hat, Inc. + * + */ + +package pool + +// GroupName is the group name used in this package +const ( + GroupName = "pool.kubevirt.io" +) diff --git a/vendor/k8s.io/api/events/v1/BUILD.bazel b/vendor/kubevirt.io/api/pool/v1alpha1/BUILD.bazel similarity index 64% rename from vendor/k8s.io/api/events/v1/BUILD.bazel rename to vendor/kubevirt.io/api/pool/v1alpha1/BUILD.bazel index 0e6f6d3758e1..dccba4967300 100644 --- a/vendor/k8s.io/api/events/v1/BUILD.bazel +++ b/vendor/kubevirt.io/api/pool/v1alpha1/BUILD.bazel @@ -3,18 +3,17 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library") go_library( name = "go_default_library", srcs = [ + "deepcopy_generated.go", "doc.go", - "generated.pb.go", "register.go", "types.go", - "types_swagger_doc_generated.go", - "zz_generated.deepcopy.go", + "types_swagger_generated.go", ], - importmap = "kubevirt.io/kubevirt/vendor/k8s.io/api/events/v1", - importpath = "k8s.io/api/events/v1", + importpath = "kubevirt.io/api/pool/v1alpha1", visibility = ["//visibility:public"], deps = [ - "//vendor/github.com/gogo/protobuf/proto:go_default_library", + "//staging/src/kubevirt.io/api/core/v1:go_default_library", + "//staging/src/kubevirt.io/api/pool:go_default_library", "//vendor/k8s.io/api/core/v1:go_default_library", "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", diff --git a/vendor/kubevirt.io/api/pool/v1alpha1/deepcopy_generated.go b/vendor/kubevirt.io/api/pool/v1alpha1/deepcopy_generated.go new file mode 100644 index 000000000000..a9a29615bcfc --- /dev/null +++ b/vendor/kubevirt.io/api/pool/v1alpha1/deepcopy_generated.go @@ -0,0 +1,178 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by deepcopy-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + 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 *VirtualMachinePool) DeepCopyInto(out *VirtualMachinePool) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachinePool. +func (in *VirtualMachinePool) DeepCopy() *VirtualMachinePool { + if in == nil { + return nil + } + out := new(VirtualMachinePool) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *VirtualMachinePool) 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 *VirtualMachinePoolCondition) DeepCopyInto(out *VirtualMachinePoolCondition) { + *out = *in + in.LastProbeTime.DeepCopyInto(&out.LastProbeTime) + in.LastTransitionTime.DeepCopyInto(&out.LastTransitionTime) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachinePoolCondition. +func (in *VirtualMachinePoolCondition) DeepCopy() *VirtualMachinePoolCondition { + if in == nil { + return nil + } + out := new(VirtualMachinePoolCondition) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualMachinePoolList) DeepCopyInto(out *VirtualMachinePoolList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]VirtualMachinePool, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachinePoolList. +func (in *VirtualMachinePoolList) DeepCopy() *VirtualMachinePoolList { + if in == nil { + return nil + } + out := new(VirtualMachinePoolList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *VirtualMachinePoolList) 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 *VirtualMachinePoolSpec) DeepCopyInto(out *VirtualMachinePoolSpec) { + *out = *in + if in.Replicas != nil { + in, out := &in.Replicas, &out.Replicas + *out = new(int32) + **out = **in + } + if in.Selector != nil { + in, out := &in.Selector, &out.Selector + *out = new(v1.LabelSelector) + (*in).DeepCopyInto(*out) + } + if in.VirtualMachineTemplate != nil { + in, out := &in.VirtualMachineTemplate, &out.VirtualMachineTemplate + *out = new(VirtualMachineTemplateSpec) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachinePoolSpec. +func (in *VirtualMachinePoolSpec) DeepCopy() *VirtualMachinePoolSpec { + if in == nil { + return nil + } + out := new(VirtualMachinePoolSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualMachinePoolStatus) DeepCopyInto(out *VirtualMachinePoolStatus) { + *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]VirtualMachinePoolCondition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachinePoolStatus. +func (in *VirtualMachinePoolStatus) DeepCopy() *VirtualMachinePoolStatus { + if in == nil { + return nil + } + out := new(VirtualMachinePoolStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualMachineTemplateSpec) DeepCopyInto(out *VirtualMachineTemplateSpec) { + *out = *in + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineTemplateSpec. +func (in *VirtualMachineTemplateSpec) DeepCopy() *VirtualMachineTemplateSpec { + if in == nil { + return nil + } + out := new(VirtualMachineTemplateSpec) + in.DeepCopyInto(out) + return out +} diff --git a/vendor/kubevirt.io/api/pool/v1alpha1/doc.go b/vendor/kubevirt.io/api/pool/v1alpha1/doc.go new file mode 100644 index 000000000000..a984bd2220cc --- /dev/null +++ b/vendor/kubevirt.io/api/pool/v1alpha1/doc.go @@ -0,0 +1,24 @@ +/* + * This file is part of the KubeVirt project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Copyright 2021 Red Hat, Inc. + * + */ + +// +k8s:deepcopy-gen=package +// +groupName=pool.kubevirt.io +// +k8s:openapi-gen=true + +package v1alpha1 diff --git a/vendor/kubevirt.io/api/pool/v1alpha1/register.go b/vendor/kubevirt.io/api/pool/v1alpha1/register.go new file mode 100644 index 000000000000..827c139456e7 --- /dev/null +++ b/vendor/kubevirt.io/api/pool/v1alpha1/register.go @@ -0,0 +1,58 @@ +/* + * This file is part of the KubeVirt project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Copyright 2021 Red Hat, Inc. + * + */ + +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + + "kubevirt.io/api/pool" +) + +// SchemeGroupVersion is group version used to register these objects +var SchemeGroupVersion = schema.GroupVersion{Group: pool.GroupName, Version: "v1alpha1"} + +// Kind takes an unqualified kind and returns back a Group qualified GroupKind +func Kind(kind string) schema.GroupKind { + return SchemeGroupVersion.WithKind(kind).GroupKind() +} + +// Resource takes an unqualified resource and returns a Group qualified GroupResource +func Resource(resource string) schema.GroupResource { + return SchemeGroupVersion.WithResource(resource).GroupResource() +} + +var ( + // SchemeBuilder initializes a scheme builder + SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) + // AddToScheme is a global function that registers this API group & version to a scheme + AddToScheme = SchemeBuilder.AddToScheme +) + +// Adds the list of known types to Scheme. +func addKnownTypes(scheme *runtime.Scheme) error { + scheme.AddKnownTypes(SchemeGroupVersion, + &VirtualMachinePool{}, + &VirtualMachinePoolList{}, + ) + metav1.AddToGroupVersion(scheme, SchemeGroupVersion) + return nil +} diff --git a/vendor/kubevirt.io/api/pool/v1alpha1/types.go b/vendor/kubevirt.io/api/pool/v1alpha1/types.go new file mode 100644 index 000000000000..89ec4025eecd --- /dev/null +++ b/vendor/kubevirt.io/api/pool/v1alpha1/types.go @@ -0,0 +1,124 @@ +/* + * This file is part of the KubeVirt project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Copyright 2021 Red Hat, Inc. + * + */ + +package v1alpha1 + +import ( + k8sv1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + virtv1 "kubevirt.io/api/core/v1" +) + +const ( + VirtualMachinePoolKind = "VirtualMachinePool" +) + +// VirtualMachinePool resource contains a VirtualMachine configuration +// that can be used to replicate multiple VirtualMachine resources. +// +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:openapi-gen=true +// +genclient +type VirtualMachinePool struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec VirtualMachinePoolSpec `json:"spec" valid:"required"` + Status VirtualMachinePoolStatus `json:"status,omitempty"` +} + +// +// +k8s:openapi-gen=true +type VirtualMachineTemplateSpec struct { + // +kubebuilder:pruning:PreserveUnknownFields + // +nullable + ObjectMeta metav1.ObjectMeta `json:"metadata,omitempty"` + // VirtualMachineSpec contains the VirtualMachine specification. + Spec virtv1.VirtualMachineSpec `json:"spec,omitempty" valid:"required"` +} + +// +// +k8s:openapi-gen=true +type VirtualMachinePoolConditionType string + +const ( + // VirtualMachinePoolReplicaFailure is added in a pool when one of its vms + // fails to be created. + VirtualMachinePoolReplicaFailure VirtualMachinePoolConditionType = "ReplicaFailure" + + // VirtualMachinePoolReplicaPaused is added in a pool when the pool got paused by the controller. + // After this condition was added, it is safe to remove or add vms by hand and adjust the replica count manually + VirtualMachinePoolReplicaPaused VirtualMachinePoolConditionType = "ReplicaPaused" +) + +// +// +k8s:openapi-gen=true +type VirtualMachinePoolCondition struct { + Type VirtualMachinePoolConditionType `json:"type"` + Status k8sv1.ConditionStatus `json:"status"` + // +nullable + LastProbeTime metav1.Time `json:"lastProbeTime,omitempty"` + // +nullable + LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"` + Reason string `json:"reason,omitempty"` + Message string `json:"message,omitempty"` +} + +// +// +k8s:openapi-gen=true +type VirtualMachinePoolStatus struct { + Replicas int32 `json:"replicas,omitempty" optional:"true"` + + // +listType=atomic + Conditions []VirtualMachinePoolCondition `json:"conditions,omitempty" optional:"true"` + + // Canonical form of the label selector for HPA which consumes it through the scale subresource. + LabelSelector string `json:"labelSelector,omitempty"` +} + +// +// +k8s:openapi-gen=true +type VirtualMachinePoolSpec struct { + // Number of desired pods. This is a pointer to distinguish between explicit + // zero and not specified. Defaults to 1. + // +optional + Replicas *int32 `json:"replicas,omitempty"` + + // Label selector for pods. Existing Poolss whose pods are + // selected by this will be the ones affected by this deployment. + Selector *metav1.LabelSelector `json:"selector" valid:"required"` + + // Template describes the VM that will be created. + VirtualMachineTemplate *VirtualMachineTemplateSpec `json:"virtualMachineTemplate" valid:"required"` + + // Indicates that the pool is paused. + // +optional + Paused bool `json:"paused,omitempty" protobuf:"varint,7,opt,name=paused"` +} + +// VirtualMachinePoolList is a list of VirtualMachinePool resources. +// +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:openapi-gen=true +type VirtualMachinePoolList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []VirtualMachinePool `json:"items"` +} diff --git a/vendor/kubevirt.io/api/pool/v1alpha1/types_swagger_generated.go b/vendor/kubevirt.io/api/pool/v1alpha1/types_swagger_generated.go new file mode 100644 index 000000000000..a8f7668cfd8e --- /dev/null +++ b/vendor/kubevirt.io/api/pool/v1alpha1/types_swagger_generated.go @@ -0,0 +1,49 @@ +// Code generated by swagger-doc. DO NOT EDIT. + +package v1alpha1 + +func (VirtualMachinePool) SwaggerDoc() map[string]string { + return map[string]string{ + "": "VirtualMachinePool resource contains a VirtualMachine configuration\nthat can be used to replicate multiple VirtualMachine resources.\n\n+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object\n+k8s:openapi-gen=true\n+genclient", + } +} + +func (VirtualMachineTemplateSpec) SwaggerDoc() map[string]string { + return map[string]string{ + "": "+k8s:openapi-gen=true", + "metadata": "+kubebuilder:pruning:PreserveUnknownFields\n+nullable", + "spec": "VirtualMachineSpec contains the VirtualMachine specification.", + } +} + +func (VirtualMachinePoolCondition) SwaggerDoc() map[string]string { + return map[string]string{ + "": "+k8s:openapi-gen=true", + "lastProbeTime": "+nullable", + "lastTransitionTime": "+nullable", + } +} + +func (VirtualMachinePoolStatus) SwaggerDoc() map[string]string { + return map[string]string{ + "": "+k8s:openapi-gen=true", + "conditions": "+listType=atomic", + "labelSelector": "Canonical form of the label selector for HPA which consumes it through the scale subresource.", + } +} + +func (VirtualMachinePoolSpec) SwaggerDoc() map[string]string { + return map[string]string{ + "": "+k8s:openapi-gen=true", + "replicas": "Number of desired pods. This is a pointer to distinguish between explicit\nzero and not specified. Defaults to 1.\n+optional", + "selector": "Label selector for pods. Existing Poolss whose pods are\nselected by this will be the ones affected by this deployment.", + "virtualMachineTemplate": "Template describes the VM that will be created.", + "paused": "Indicates that the pool is paused.\n+optional", + } +} + +func (VirtualMachinePoolList) SwaggerDoc() map[string]string { + return map[string]string{ + "": "VirtualMachinePoolList is a list of VirtualMachinePool resources.\n\n+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object\n+k8s:openapi-gen=true", + } +} diff --git a/vendor/kubevirt.io/api/snapshot/BUILD.bazel b/vendor/kubevirt.io/api/snapshot/BUILD.bazel new file mode 100644 index 000000000000..c47ec7e03488 --- /dev/null +++ b/vendor/kubevirt.io/api/snapshot/BUILD.bazel @@ -0,0 +1,8 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = ["register.go"], + importpath = "kubevirt.io/api/snapshot", + visibility = ["//visibility:public"], +) diff --git a/vendor/kubevirt.io/api/snapshot/register.go b/vendor/kubevirt.io/api/snapshot/register.go new file mode 100644 index 000000000000..880a592927e6 --- /dev/null +++ b/vendor/kubevirt.io/api/snapshot/register.go @@ -0,0 +1,25 @@ +/* + * This file is part of the KubeVirt project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Copyright 2020 Red Hat, Inc. + * + */ + +package snapshot + +// GroupName is the group name used in this package +const ( + GroupName = "snapshot.kubevirt.io" +) diff --git a/vendor/k8s.io/api/batch/v1/BUILD.bazel b/vendor/kubevirt.io/api/snapshot/v1alpha1/BUILD.bazel similarity index 67% rename from vendor/k8s.io/api/batch/v1/BUILD.bazel rename to vendor/kubevirt.io/api/snapshot/v1alpha1/BUILD.bazel index f323ea701a57..a166ab619e93 100644 --- a/vendor/k8s.io/api/batch/v1/BUILD.bazel +++ b/vendor/kubevirt.io/api/snapshot/v1alpha1/BUILD.bazel @@ -3,18 +3,17 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library") go_library( name = "go_default_library", srcs = [ + "deepcopy_generated.go", "doc.go", - "generated.pb.go", "register.go", "types.go", - "types_swagger_doc_generated.go", - "zz_generated.deepcopy.go", + "types_swagger_generated.go", ], - importmap = "kubevirt.io/kubevirt/vendor/k8s.io/api/batch/v1", - importpath = "k8s.io/api/batch/v1", + importpath = "kubevirt.io/api/snapshot/v1alpha1", visibility = ["//visibility:public"], deps = [ - "//vendor/github.com/gogo/protobuf/proto:go_default_library", + "//staging/src/kubevirt.io/api/core/v1:go_default_library", + "//staging/src/kubevirt.io/api/snapshot:go_default_library", "//vendor/k8s.io/api/core/v1:go_default_library", "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", diff --git a/vendor/kubevirt.io/api/snapshot/v1alpha1/deepcopy_generated.go b/vendor/kubevirt.io/api/snapshot/v1alpha1/deepcopy_generated.go new file mode 100644 index 000000000000..beb22e629ae1 --- /dev/null +++ b/vendor/kubevirt.io/api/snapshot/v1alpha1/deepcopy_generated.go @@ -0,0 +1,608 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by deepcopy-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + types "k8s.io/apimachinery/pkg/types" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Condition) DeepCopyInto(out *Condition) { + *out = *in + in.LastProbeTime.DeepCopyInto(&out.LastProbeTime) + in.LastTransitionTime.DeepCopyInto(&out.LastTransitionTime) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Condition. +func (in *Condition) DeepCopy() *Condition { + if in == nil { + return nil + } + out := new(Condition) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Error) DeepCopyInto(out *Error) { + *out = *in + if in.Time != nil { + in, out := &in.Time, &out.Time + *out = (*in).DeepCopy() + } + if in.Message != nil { + in, out := &in.Message, &out.Message + *out = new(string) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Error. +func (in *Error) DeepCopy() *Error { + if in == nil { + return nil + } + out := new(Error) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PersistentVolumeClaim) DeepCopyInto(out *PersistentVolumeClaim) { + *out = *in + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PersistentVolumeClaim. +func (in *PersistentVolumeClaim) DeepCopy() *PersistentVolumeClaim { + if in == nil { + return nil + } + out := new(PersistentVolumeClaim) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SourceSpec) DeepCopyInto(out *SourceSpec) { + *out = *in + if in.VirtualMachine != nil { + in, out := &in.VirtualMachine, &out.VirtualMachine + *out = new(VirtualMachine) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SourceSpec. +func (in *SourceSpec) DeepCopy() *SourceSpec { + if in == nil { + return nil + } + out := new(SourceSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualMachine) DeepCopyInto(out *VirtualMachine) { + *out = *in + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachine. +func (in *VirtualMachine) DeepCopy() *VirtualMachine { + if in == nil { + return nil + } + out := new(VirtualMachine) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualMachineRestore) DeepCopyInto(out *VirtualMachineRestore) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + if in.Status != nil { + in, out := &in.Status, &out.Status + *out = new(VirtualMachineRestoreStatus) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineRestore. +func (in *VirtualMachineRestore) DeepCopy() *VirtualMachineRestore { + if in == nil { + return nil + } + out := new(VirtualMachineRestore) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *VirtualMachineRestore) 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 *VirtualMachineRestoreList) DeepCopyInto(out *VirtualMachineRestoreList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]VirtualMachineRestore, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineRestoreList. +func (in *VirtualMachineRestoreList) DeepCopy() *VirtualMachineRestoreList { + if in == nil { + return nil + } + out := new(VirtualMachineRestoreList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *VirtualMachineRestoreList) 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 *VirtualMachineRestoreSpec) DeepCopyInto(out *VirtualMachineRestoreSpec) { + *out = *in + in.Target.DeepCopyInto(&out.Target) + if in.Patches != nil { + in, out := &in.Patches, &out.Patches + *out = make([]string, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineRestoreSpec. +func (in *VirtualMachineRestoreSpec) DeepCopy() *VirtualMachineRestoreSpec { + if in == nil { + return nil + } + out := new(VirtualMachineRestoreSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualMachineRestoreStatus) DeepCopyInto(out *VirtualMachineRestoreStatus) { + *out = *in + if in.Restores != nil { + in, out := &in.Restores, &out.Restores + *out = make([]VolumeRestore, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.RestoreTime != nil { + in, out := &in.RestoreTime, &out.RestoreTime + *out = (*in).DeepCopy() + } + if in.DeletedDataVolumes != nil { + in, out := &in.DeletedDataVolumes, &out.DeletedDataVolumes + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Complete != nil { + in, out := &in.Complete, &out.Complete + *out = new(bool) + **out = **in + } + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineRestoreStatus. +func (in *VirtualMachineRestoreStatus) DeepCopy() *VirtualMachineRestoreStatus { + if in == nil { + return nil + } + out := new(VirtualMachineRestoreStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualMachineSnapshot) DeepCopyInto(out *VirtualMachineSnapshot) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + if in.Status != nil { + in, out := &in.Status, &out.Status + *out = new(VirtualMachineSnapshotStatus) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineSnapshot. +func (in *VirtualMachineSnapshot) DeepCopy() *VirtualMachineSnapshot { + if in == nil { + return nil + } + out := new(VirtualMachineSnapshot) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *VirtualMachineSnapshot) 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 *VirtualMachineSnapshotContent) DeepCopyInto(out *VirtualMachineSnapshotContent) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + if in.Status != nil { + in, out := &in.Status, &out.Status + *out = new(VirtualMachineSnapshotContentStatus) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineSnapshotContent. +func (in *VirtualMachineSnapshotContent) DeepCopy() *VirtualMachineSnapshotContent { + if in == nil { + return nil + } + out := new(VirtualMachineSnapshotContent) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *VirtualMachineSnapshotContent) 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 *VirtualMachineSnapshotContentList) DeepCopyInto(out *VirtualMachineSnapshotContentList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]VirtualMachineSnapshotContent, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineSnapshotContentList. +func (in *VirtualMachineSnapshotContentList) DeepCopy() *VirtualMachineSnapshotContentList { + if in == nil { + return nil + } + out := new(VirtualMachineSnapshotContentList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *VirtualMachineSnapshotContentList) 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 *VirtualMachineSnapshotContentSpec) DeepCopyInto(out *VirtualMachineSnapshotContentSpec) { + *out = *in + if in.VirtualMachineSnapshotName != nil { + in, out := &in.VirtualMachineSnapshotName, &out.VirtualMachineSnapshotName + *out = new(string) + **out = **in + } + in.Source.DeepCopyInto(&out.Source) + if in.VolumeBackups != nil { + in, out := &in.VolumeBackups, &out.VolumeBackups + *out = make([]VolumeBackup, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineSnapshotContentSpec. +func (in *VirtualMachineSnapshotContentSpec) DeepCopy() *VirtualMachineSnapshotContentSpec { + if in == nil { + return nil + } + out := new(VirtualMachineSnapshotContentSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualMachineSnapshotContentStatus) DeepCopyInto(out *VirtualMachineSnapshotContentStatus) { + *out = *in + if in.CreationTime != nil { + in, out := &in.CreationTime, &out.CreationTime + *out = (*in).DeepCopy() + } + if in.ReadyToUse != nil { + in, out := &in.ReadyToUse, &out.ReadyToUse + *out = new(bool) + **out = **in + } + if in.Error != nil { + in, out := &in.Error, &out.Error + *out = new(Error) + (*in).DeepCopyInto(*out) + } + if in.VolumeSnapshotStatus != nil { + in, out := &in.VolumeSnapshotStatus, &out.VolumeSnapshotStatus + *out = make([]VolumeSnapshotStatus, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineSnapshotContentStatus. +func (in *VirtualMachineSnapshotContentStatus) DeepCopy() *VirtualMachineSnapshotContentStatus { + if in == nil { + return nil + } + out := new(VirtualMachineSnapshotContentStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualMachineSnapshotList) DeepCopyInto(out *VirtualMachineSnapshotList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]VirtualMachineSnapshot, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineSnapshotList. +func (in *VirtualMachineSnapshotList) DeepCopy() *VirtualMachineSnapshotList { + if in == nil { + return nil + } + out := new(VirtualMachineSnapshotList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *VirtualMachineSnapshotList) 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 *VirtualMachineSnapshotSpec) DeepCopyInto(out *VirtualMachineSnapshotSpec) { + *out = *in + in.Source.DeepCopyInto(&out.Source) + if in.DeletionPolicy != nil { + in, out := &in.DeletionPolicy, &out.DeletionPolicy + *out = new(DeletionPolicy) + **out = **in + } + if in.FailureDeadline != nil { + in, out := &in.FailureDeadline, &out.FailureDeadline + *out = new(v1.Duration) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineSnapshotSpec. +func (in *VirtualMachineSnapshotSpec) DeepCopy() *VirtualMachineSnapshotSpec { + if in == nil { + return nil + } + out := new(VirtualMachineSnapshotSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualMachineSnapshotStatus) DeepCopyInto(out *VirtualMachineSnapshotStatus) { + *out = *in + if in.SourceUID != nil { + in, out := &in.SourceUID, &out.SourceUID + *out = new(types.UID) + **out = **in + } + if in.VirtualMachineSnapshotContentName != nil { + in, out := &in.VirtualMachineSnapshotContentName, &out.VirtualMachineSnapshotContentName + *out = new(string) + **out = **in + } + if in.CreationTime != nil { + in, out := &in.CreationTime, &out.CreationTime + *out = (*in).DeepCopy() + } + if in.ReadyToUse != nil { + in, out := &in.ReadyToUse, &out.ReadyToUse + *out = new(bool) + **out = **in + } + if in.Error != nil { + in, out := &in.Error, &out.Error + *out = new(Error) + (*in).DeepCopyInto(*out) + } + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Indications != nil { + in, out := &in.Indications, &out.Indications + *out = make([]Indication, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineSnapshotStatus. +func (in *VirtualMachineSnapshotStatus) DeepCopy() *VirtualMachineSnapshotStatus { + if in == nil { + return nil + } + out := new(VirtualMachineSnapshotStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VolumeBackup) DeepCopyInto(out *VolumeBackup) { + *out = *in + in.PersistentVolumeClaim.DeepCopyInto(&out.PersistentVolumeClaim) + if in.VolumeSnapshotName != nil { + in, out := &in.VolumeSnapshotName, &out.VolumeSnapshotName + *out = new(string) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeBackup. +func (in *VolumeBackup) DeepCopy() *VolumeBackup { + if in == nil { + return nil + } + out := new(VolumeBackup) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VolumeRestore) DeepCopyInto(out *VolumeRestore) { + *out = *in + if in.DataVolumeName != nil { + in, out := &in.DataVolumeName, &out.DataVolumeName + *out = new(string) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeRestore. +func (in *VolumeRestore) DeepCopy() *VolumeRestore { + if in == nil { + return nil + } + out := new(VolumeRestore) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VolumeSnapshotStatus) DeepCopyInto(out *VolumeSnapshotStatus) { + *out = *in + if in.CreationTime != nil { + in, out := &in.CreationTime, &out.CreationTime + *out = (*in).DeepCopy() + } + if in.ReadyToUse != nil { + in, out := &in.ReadyToUse, &out.ReadyToUse + *out = new(bool) + **out = **in + } + if in.Error != nil { + in, out := &in.Error, &out.Error + *out = new(Error) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeSnapshotStatus. +func (in *VolumeSnapshotStatus) DeepCopy() *VolumeSnapshotStatus { + if in == nil { + return nil + } + out := new(VolumeSnapshotStatus) + in.DeepCopyInto(out) + return out +} diff --git a/vendor/kubevirt.io/api/snapshot/v1alpha1/doc.go b/vendor/kubevirt.io/api/snapshot/v1alpha1/doc.go new file mode 100644 index 000000000000..6d79f71b4970 --- /dev/null +++ b/vendor/kubevirt.io/api/snapshot/v1alpha1/doc.go @@ -0,0 +1,24 @@ +/* + * This file is part of the KubeVirt project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Copyright 2020 Red Hat, Inc. + * + */ + +// +k8s:deepcopy-gen=package +// +groupName=snapshot.kubevirt.io +// +k8s:openapi-gen=true + +package v1alpha1 diff --git a/vendor/kubevirt.io/api/snapshot/v1alpha1/register.go b/vendor/kubevirt.io/api/snapshot/v1alpha1/register.go new file mode 100644 index 000000000000..76b1be65bcfe --- /dev/null +++ b/vendor/kubevirt.io/api/snapshot/v1alpha1/register.go @@ -0,0 +1,62 @@ +/* + * This file is part of the KubeVirt project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Copyright 2020 Red Hat, Inc. + * + */ + +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + + "kubevirt.io/api/snapshot" +) + +// SchemeGroupVersion is group version used to register these objects +var SchemeGroupVersion = schema.GroupVersion{Group: snapshot.GroupName, Version: "v1alpha1"} + +// Kind takes an unqualified kind and returns back a Group qualified GroupKind +func Kind(kind string) schema.GroupKind { + return SchemeGroupVersion.WithKind(kind).GroupKind() +} + +// Resource takes an unqualified resource and returns a Group qualified GroupResource +func Resource(resource string) schema.GroupResource { + return SchemeGroupVersion.WithResource(resource).GroupResource() +} + +var ( + // SchemeBuilder initializes a scheme builder + SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) + // AddToScheme is a global function that registers this API group & version to a scheme + AddToScheme = SchemeBuilder.AddToScheme +) + +// Adds the list of known types to Scheme. +func addKnownTypes(scheme *runtime.Scheme) error { + scheme.AddKnownTypes(SchemeGroupVersion, + &VirtualMachineSnapshot{}, + &VirtualMachineSnapshotList{}, + &VirtualMachineSnapshotContent{}, + &VirtualMachineSnapshotContentList{}, + &VirtualMachineRestore{}, + &VirtualMachineRestoreList{}, + ) + metav1.AddToGroupVersion(scheme, SchemeGroupVersion) + return nil +} diff --git a/vendor/kubevirt.io/api/snapshot/v1alpha1/types.go b/vendor/kubevirt.io/api/snapshot/v1alpha1/types.go new file mode 100644 index 000000000000..694bb5804d73 --- /dev/null +++ b/vendor/kubevirt.io/api/snapshot/v1alpha1/types.go @@ -0,0 +1,348 @@ +/* + * This file is part of the KubeVirt project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Copyright 2020 Red Hat, Inc. + * + */ + +package v1alpha1 + +import ( + "time" + + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/types" + + v1 "kubevirt.io/api/core/v1" +) + +const DefaultFailureDeadline = 5 * time.Minute + +// VirtualMachineSnapshot defines the operation of snapshotting a VM +// +genclient +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +type VirtualMachineSnapshot struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec VirtualMachineSnapshotSpec `json:"spec"` + + // +optional + Status *VirtualMachineSnapshotStatus `json:"status,omitempty"` +} + +// DeletionPolicy defines that to do with VirtualMachineSnapshot +// when VirtualMachineSnapshot is deleted +type DeletionPolicy string + +const ( + // VirtualMachineSnapshotContentDelete causes the + // VirtualMachineSnapshotContent to be deleted + VirtualMachineSnapshotContentDelete DeletionPolicy = "Delete" + + // VirtualMachineSnapshotContentRetain causes the + // VirtualMachineSnapshotContent to stay around + VirtualMachineSnapshotContentRetain DeletionPolicy = "Retain" +) + +// VirtualMachineSnapshotSpec is the spec for a VirtualMachineSnapshot resource +type VirtualMachineSnapshotSpec struct { + Source corev1.TypedLocalObjectReference `json:"source"` + + // +optional + DeletionPolicy *DeletionPolicy `json:"deletionPolicy,omitempty"` + + // This time represents the number of seconds we permit the vm snapshot + // to take. In case we pass this deadline we mark this snapshot + // as failed. + // Defaults to DefaultFailureDeadline - 5min + // +optional + FailureDeadline *metav1.Duration `json:"failureDeadline,omitempty"` +} + +// Indication is a way to indicate the state of the vm when taking the snapshot +type Indication string + +const ( + VMSnapshotOnlineSnapshotIndication Indication = "Online" + VMSnapshotNoGuestAgentIndication Indication = "NoGuestAgent" + VMSnapshotGuestAgentIndication Indication = "GuestAgent" +) + +// VirtualMachineSnapshotPhase is the current phase of the VirtualMachineSnapshot +type VirtualMachineSnapshotPhase string + +const ( + PhaseUnset VirtualMachineSnapshotPhase = "" + InProgress VirtualMachineSnapshotPhase = "InProgress" + Succeeded VirtualMachineSnapshotPhase = "Succeeded" + Failed VirtualMachineSnapshotPhase = "Failed" + Unknown VirtualMachineSnapshotPhase = "Unknown" +) + +// VirtualMachineSnapshotStatus is the status for a VirtualMachineSnapshot resource +type VirtualMachineSnapshotStatus struct { + // +optional + SourceUID *types.UID `json:"sourceUID,omitempty"` + + // +optional + VirtualMachineSnapshotContentName *string `json:"virtualMachineSnapshotContentName,omitempty"` + + // +optional + // +nullable + CreationTime *metav1.Time `json:"creationTime,omitempty"` + + // +optional + Phase VirtualMachineSnapshotPhase `json:"phase,omitempty"` + + // +optional + ReadyToUse *bool `json:"readyToUse,omitempty"` + + // +optional + Error *Error `json:"error,omitempty"` + + // +optional + Conditions []Condition `json:"conditions,omitempty"` + + // +optional + // +listType=set + Indications []Indication `json:"indications,omitempty"` +} + +// Error is the last error encountered during the snapshot/restore +type Error struct { + // +optional + Time *metav1.Time `json:"time,omitempty"` + + // +optional + Message *string `json:"message,omitempty"` +} + +// ConditionType is the const type for Conditions +type ConditionType string + +const ( + // ConditionReady is the "ready" condition type + ConditionReady ConditionType = "Ready" + + // ConditionProgressing is the "progressing" condition type + ConditionProgressing ConditionType = "Progressing" + + // ConditionFailure is the "failure" condition type + ConditionFailure ConditionType = "Failure" +) + +// Condition defines conditions +type Condition struct { + Type ConditionType `json:"type"` + + Status corev1.ConditionStatus `json:"status"` + + // +optional + // +nullable + LastProbeTime metav1.Time `json:"lastProbeTime,omitempty"` + + // +optional + // +nullable + LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"` + + // +optional + Reason string `json:"reason,omitempty"` + + // +optional + Message string `json:"message,omitempty"` +} + +// VirtualMachineSnapshotList is a list of VirtualMachineSnapshot resources +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +type VirtualMachineSnapshotList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata"` + + Items []VirtualMachineSnapshot `json:"items"` +} + +// VirtualMachineSnapshotContent contains the snapshot data +// +genclient +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +type VirtualMachineSnapshotContent struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec VirtualMachineSnapshotContentSpec `json:"spec"` + + // +optional + Status *VirtualMachineSnapshotContentStatus `json:"status,omitempty"` +} + +// VirtualMachineSnapshotContentSpec is the spec for a VirtualMachineSnapshotContent resource +type VirtualMachineSnapshotContentSpec struct { + VirtualMachineSnapshotName *string `json:"virtualMachineSnapshotName,omitempty"` + + Source SourceSpec `json:"source"` + + // +optional + VolumeBackups []VolumeBackup `json:"volumeBackups,omitempty"` +} + +type VirtualMachine struct { + // +kubebuilder:pruning:PreserveUnknownFields + // +nullable + metav1.ObjectMeta `json:"metadata,omitempty"` + // VirtualMachineSpec contains the VirtualMachine specification. + Spec v1.VirtualMachineSpec `json:"spec,omitempty" valid:"required"` + // Status holds the current state of the controller and brief information + // about its associated VirtualMachineInstance + Status v1.VirtualMachineStatus `json:"status,omitempty"` +} + +// SourceSpec contains the appropriate spec for the resource being snapshotted +type SourceSpec struct { + // +optional + VirtualMachine *VirtualMachine `json:"virtualMachine,omitempty"` +} + +type PersistentVolumeClaim struct { + // Standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + // +kubebuilder:pruning:PreserveUnknownFields + // +optional + metav1.ObjectMeta `json:"metadata,omitempty"` + + // Spec defines the desired characteristics of a volume requested by a pod author. + // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims + // +optional + Spec corev1.PersistentVolumeClaimSpec `json:"spec,omitempty"` +} + +// VolumeBackup contains the data neeed to restore a PVC +type VolumeBackup struct { + VolumeName string `json:"volumeName"` + + PersistentVolumeClaim PersistentVolumeClaim `json:"persistentVolumeClaim"` + + // +optional + VolumeSnapshotName *string `json:"volumeSnapshotName,omitempty"` +} + +// VirtualMachineSnapshotContentStatus is the status for a VirtualMachineSnapshotStatus resource +type VirtualMachineSnapshotContentStatus struct { + // +optional + // +nullable + CreationTime *metav1.Time `json:"creationTime,omitempty"` + + // +optional + ReadyToUse *bool `json:"readyToUse,omitempty"` + + // +optional + Error *Error `json:"error,omitempty"` + + // +optional + VolumeSnapshotStatus []VolumeSnapshotStatus `json:"volumeSnapshotStatus,omitempty"` +} + +// VirtualMachineSnapshotContentList is a list of VirtualMachineSnapshot resources +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +type VirtualMachineSnapshotContentList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata"` + + Items []VirtualMachineSnapshotContent `json:"items"` +} + +// VolumeSnapshotStatus is the status of a VolumeSnapshot +type VolumeSnapshotStatus struct { + VolumeSnapshotName string `json:"volumeSnapshotName"` + + // +optional + // +nullable + CreationTime *metav1.Time `json:"creationTime,omitempty"` + + // +optional + ReadyToUse *bool `json:"readyToUse,omitempty"` + + // +optional + Error *Error `json:"error,omitempty"` +} + +// VirtualMachineRestore defines the operation of restoring a VM +// +genclient +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +type VirtualMachineRestore struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec VirtualMachineRestoreSpec `json:"spec"` + + // +optional + Status *VirtualMachineRestoreStatus `json:"status,omitempty"` +} + +// VirtualMachineRestoreSpec is the spec for a VirtualMachineRestoreresource +type VirtualMachineRestoreSpec struct { + // initially only VirtualMachine type supported + Target corev1.TypedLocalObjectReference `json:"target"` + + VirtualMachineSnapshotName string `json:"virtualMachineSnapshotName"` + + // If the target for the restore does not exist, it will be created. Patches holds JSON patches that would be + // applied to the target manifest before it's created. Patches should fit the target's Kind. + // + // Example for a patch: {"op": "replace", "path": "/metadata/name", "value": "new-vm-name"} + // + // +optional + // +listType=atomic + Patches []string `json:"patches,omitempty"` +} + +// VirtualMachineRestoreStatus is the spec for a VirtualMachineRestoreresource +type VirtualMachineRestoreStatus struct { + // +optional + Restores []VolumeRestore `json:"restores,omitempty"` + + // +optional + RestoreTime *metav1.Time `json:"restoreTime,omitempty"` + + // +optional + DeletedDataVolumes []string `json:"deletedDataVolumes,omitempty"` + + // +optional + Complete *bool `json:"complete,omitempty"` + + // +optional + Conditions []Condition `json:"conditions,omitempty"` +} + +// VolumeRestore contains the data neeed to restore a PVC +type VolumeRestore struct { + VolumeName string `json:"volumeName"` + + PersistentVolumeClaimName string `json:"persistentVolumeClaim"` + + VolumeSnapshotName string `json:"volumeSnapshotName"` + + // +optional + DataVolumeName *string `json:"dataVolumeName,omitempty"` +} + +// VirtualMachineRestoreList is a list of VirtualMachineRestore resources +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +type VirtualMachineRestoreList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata"` + + Items []VirtualMachineRestore `json:"items"` +} diff --git a/vendor/kubevirt.io/api/snapshot/v1alpha1/types_swagger_generated.go b/vendor/kubevirt.io/api/snapshot/v1alpha1/types_swagger_generated.go new file mode 100644 index 000000000000..f0ddf70679de --- /dev/null +++ b/vendor/kubevirt.io/api/snapshot/v1alpha1/types_swagger_generated.go @@ -0,0 +1,161 @@ +// Code generated by swagger-doc. DO NOT EDIT. + +package v1alpha1 + +func (VirtualMachineSnapshot) SwaggerDoc() map[string]string { + return map[string]string{ + "": "VirtualMachineSnapshot defines the operation of snapshotting a VM\n+genclient\n+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object", + "status": "+optional", + } +} + +func (VirtualMachineSnapshotSpec) SwaggerDoc() map[string]string { + return map[string]string{ + "": "VirtualMachineSnapshotSpec is the spec for a VirtualMachineSnapshot resource", + "deletionPolicy": "+optional", + "failureDeadline": "This time represents the number of seconds we permit the vm snapshot\nto take. In case we pass this deadline we mark this snapshot\nas failed.\nDefaults to DefaultFailureDeadline - 5min\n+optional", + } +} + +func (VirtualMachineSnapshotStatus) SwaggerDoc() map[string]string { + return map[string]string{ + "": "VirtualMachineSnapshotStatus is the status for a VirtualMachineSnapshot resource", + "sourceUID": "+optional", + "virtualMachineSnapshotContentName": "+optional", + "creationTime": "+optional\n+nullable", + "phase": "+optional", + "readyToUse": "+optional", + "error": "+optional", + "conditions": "+optional", + "indications": "+optional\n+listType=set", + } +} + +func (Error) SwaggerDoc() map[string]string { + return map[string]string{ + "": "Error is the last error encountered during the snapshot/restore", + "time": "+optional", + "message": "+optional", + } +} + +func (Condition) SwaggerDoc() map[string]string { + return map[string]string{ + "": "Condition defines conditions", + "lastProbeTime": "+optional\n+nullable", + "lastTransitionTime": "+optional\n+nullable", + "reason": "+optional", + "message": "+optional", + } +} + +func (VirtualMachineSnapshotList) SwaggerDoc() map[string]string { + return map[string]string{ + "": "VirtualMachineSnapshotList is a list of VirtualMachineSnapshot resources\n+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object", + } +} + +func (VirtualMachineSnapshotContent) SwaggerDoc() map[string]string { + return map[string]string{ + "": "VirtualMachineSnapshotContent contains the snapshot data\n+genclient\n+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object", + "status": "+optional", + } +} + +func (VirtualMachineSnapshotContentSpec) SwaggerDoc() map[string]string { + return map[string]string{ + "": "VirtualMachineSnapshotContentSpec is the spec for a VirtualMachineSnapshotContent resource", + "volumeBackups": "+optional", + } +} + +func (VirtualMachine) SwaggerDoc() map[string]string { + return map[string]string{ + "spec": "VirtualMachineSpec contains the VirtualMachine specification.", + "status": "Status holds the current state of the controller and brief information\nabout its associated VirtualMachineInstance", + } +} + +func (SourceSpec) SwaggerDoc() map[string]string { + return map[string]string{ + "": "SourceSpec contains the appropriate spec for the resource being snapshotted", + "virtualMachine": "+optional", + } +} + +func (PersistentVolumeClaim) SwaggerDoc() map[string]string { + return map[string]string{ + "spec": "Spec defines the desired characteristics of a volume requested by a pod author.\nMore info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims\n+optional", + } +} + +func (VolumeBackup) SwaggerDoc() map[string]string { + return map[string]string{ + "": "VolumeBackup contains the data neeed to restore a PVC", + "volumeSnapshotName": "+optional", + } +} + +func (VirtualMachineSnapshotContentStatus) SwaggerDoc() map[string]string { + return map[string]string{ + "": "VirtualMachineSnapshotContentStatus is the status for a VirtualMachineSnapshotStatus resource", + "creationTime": "+optional\n+nullable", + "readyToUse": "+optional", + "error": "+optional", + "volumeSnapshotStatus": "+optional", + } +} + +func (VirtualMachineSnapshotContentList) SwaggerDoc() map[string]string { + return map[string]string{ + "": "VirtualMachineSnapshotContentList is a list of VirtualMachineSnapshot resources\n+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object", + } +} + +func (VolumeSnapshotStatus) SwaggerDoc() map[string]string { + return map[string]string{ + "": "VolumeSnapshotStatus is the status of a VolumeSnapshot", + "creationTime": "+optional\n+nullable", + "readyToUse": "+optional", + "error": "+optional", + } +} + +func (VirtualMachineRestore) SwaggerDoc() map[string]string { + return map[string]string{ + "": "VirtualMachineRestore defines the operation of restoring a VM\n+genclient\n+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object", + "status": "+optional", + } +} + +func (VirtualMachineRestoreSpec) SwaggerDoc() map[string]string { + return map[string]string{ + "": "VirtualMachineRestoreSpec is the spec for a VirtualMachineRestoreresource", + "target": "initially only VirtualMachine type supported", + "patches": "If the target for the restore does not exist, it will be created. Patches holds JSON patches that would be\napplied to the target manifest before it's created. Patches should fit the target's Kind.\n\nExample for a patch: {\"op\": \"replace\", \"path\": \"/metadata/name\", \"value\": \"new-vm-name\"}\n\n+optional\n+listType=atomic", + } +} + +func (VirtualMachineRestoreStatus) SwaggerDoc() map[string]string { + return map[string]string{ + "": "VirtualMachineRestoreStatus is the spec for a VirtualMachineRestoreresource", + "restores": "+optional", + "restoreTime": "+optional", + "deletedDataVolumes": "+optional", + "complete": "+optional", + "conditions": "+optional", + } +} + +func (VolumeRestore) SwaggerDoc() map[string]string { + return map[string]string{ + "": "VolumeRestore contains the data neeed to restore a PVC", + "dataVolumeName": "+optional", + } +} + +func (VirtualMachineRestoreList) SwaggerDoc() map[string]string { + return map[string]string{ + "": "VirtualMachineRestoreList is a list of VirtualMachineRestore resources\n+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object", + } +} diff --git a/vendor/kubevirt.io/client-go b/vendor/kubevirt.io/client-go deleted file mode 120000 index 80cc33d57a94..000000000000 --- a/vendor/kubevirt.io/client-go +++ /dev/null @@ -1 +0,0 @@ -../../staging/src/kubevirt.io/client-go/ \ No newline at end of file diff --git a/vendor/kubevirt.io/client-go/api/BUILD.bazel b/vendor/kubevirt.io/client-go/api/BUILD.bazel new file mode 100644 index 000000000000..994ddee6d637 --- /dev/null +++ b/vendor/kubevirt.io/client-go/api/BUILD.bazel @@ -0,0 +1,43 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") + +go_library( + name = "go_default_library", + srcs = [ + "openapi_generated.go", + "utils.go", + ], + importpath = "kubevirt.io/client-go/api", + visibility = ["//visibility:public"], + deps = [ + "//staging/src/kubevirt.io/api/core/v1:go_default_library", + "//vendor/github.com/go-openapi/spec:go_default_library", + "//vendor/k8s.io/api/core/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/api/resource:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/util/intstr:go_default_library", + "//vendor/k8s.io/kube-openapi/pkg/common:go_default_library", + ], +) + +go_test( + name = "go_default_test", + srcs = [ + "deepcopy_test.go", + "defaults_test.go", + "schema_test.go", + "types_test.go", + "v1_suite_test.go", + ], + embed = [":go_default_library"], + deps = [ + "//staging/src/kubevirt.io/api/core/v1:go_default_library", + "//staging/src/kubevirt.io/client-go/testutils:go_default_library", + "//vendor/github.com/google/gofuzz:go_default_library", + "//vendor/github.com/onsi/ginkgo/v2:go_default_library", + "//vendor/github.com/onsi/gomega:go_default_library", + "//vendor/k8s.io/api/core/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/api/resource:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/utils/pointer:go_default_library", + ], +) diff --git a/vendor/kubevirt.io/client-go/api/openapi_generated.go b/vendor/kubevirt.io/client-go/api/openapi_generated.go new file mode 100644 index 000000000000..6c7750907400 --- /dev/null +++ b/vendor/kubevirt.io/client-go/api/openapi_generated.go @@ -0,0 +1,25953 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by openapi-gen. DO NOT EDIT. + +// This file was autogenerated by openapi-gen. Do not edit it manually! + +package api + +import ( + spec "github.com/go-openapi/spec" + resource "k8s.io/apimachinery/pkg/api/resource" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + intstr "k8s.io/apimachinery/pkg/util/intstr" + common "k8s.io/kube-openapi/pkg/common" +) + +func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenAPIDefinition { + return map[string]common.OpenAPIDefinition{ + "k8s.io/api/core/v1.AWSElasticBlockStoreVolumeSource": schema_k8sio_api_core_v1_AWSElasticBlockStoreVolumeSource(ref), + "k8s.io/api/core/v1.Affinity": schema_k8sio_api_core_v1_Affinity(ref), + "k8s.io/api/core/v1.AttachedVolume": schema_k8sio_api_core_v1_AttachedVolume(ref), + "k8s.io/api/core/v1.AvoidPods": schema_k8sio_api_core_v1_AvoidPods(ref), + "k8s.io/api/core/v1.AzureDiskVolumeSource": schema_k8sio_api_core_v1_AzureDiskVolumeSource(ref), + "k8s.io/api/core/v1.AzureFilePersistentVolumeSource": schema_k8sio_api_core_v1_AzureFilePersistentVolumeSource(ref), + "k8s.io/api/core/v1.AzureFileVolumeSource": schema_k8sio_api_core_v1_AzureFileVolumeSource(ref), + "k8s.io/api/core/v1.Binding": schema_k8sio_api_core_v1_Binding(ref), + "k8s.io/api/core/v1.CSIPersistentVolumeSource": schema_k8sio_api_core_v1_CSIPersistentVolumeSource(ref), + "k8s.io/api/core/v1.CSIVolumeSource": schema_k8sio_api_core_v1_CSIVolumeSource(ref), + "k8s.io/api/core/v1.Capabilities": schema_k8sio_api_core_v1_Capabilities(ref), + "k8s.io/api/core/v1.CephFSPersistentVolumeSource": schema_k8sio_api_core_v1_CephFSPersistentVolumeSource(ref), + "k8s.io/api/core/v1.CephFSVolumeSource": schema_k8sio_api_core_v1_CephFSVolumeSource(ref), + "k8s.io/api/core/v1.CinderPersistentVolumeSource": schema_k8sio_api_core_v1_CinderPersistentVolumeSource(ref), + "k8s.io/api/core/v1.CinderVolumeSource": schema_k8sio_api_core_v1_CinderVolumeSource(ref), + "k8s.io/api/core/v1.ClientIPConfig": schema_k8sio_api_core_v1_ClientIPConfig(ref), + "k8s.io/api/core/v1.ComponentCondition": schema_k8sio_api_core_v1_ComponentCondition(ref), + "k8s.io/api/core/v1.ComponentStatus": schema_k8sio_api_core_v1_ComponentStatus(ref), + "k8s.io/api/core/v1.ComponentStatusList": schema_k8sio_api_core_v1_ComponentStatusList(ref), + "k8s.io/api/core/v1.ConfigMap": schema_k8sio_api_core_v1_ConfigMap(ref), + "k8s.io/api/core/v1.ConfigMapEnvSource": schema_k8sio_api_core_v1_ConfigMapEnvSource(ref), + "k8s.io/api/core/v1.ConfigMapKeySelector": schema_k8sio_api_core_v1_ConfigMapKeySelector(ref), + "k8s.io/api/core/v1.ConfigMapList": schema_k8sio_api_core_v1_ConfigMapList(ref), + "k8s.io/api/core/v1.ConfigMapNodeConfigSource": schema_k8sio_api_core_v1_ConfigMapNodeConfigSource(ref), + "k8s.io/api/core/v1.ConfigMapProjection": schema_k8sio_api_core_v1_ConfigMapProjection(ref), + "k8s.io/api/core/v1.ConfigMapVolumeSource": schema_k8sio_api_core_v1_ConfigMapVolumeSource(ref), + "k8s.io/api/core/v1.Container": schema_k8sio_api_core_v1_Container(ref), + "k8s.io/api/core/v1.ContainerImage": schema_k8sio_api_core_v1_ContainerImage(ref), + "k8s.io/api/core/v1.ContainerPort": schema_k8sio_api_core_v1_ContainerPort(ref), + "k8s.io/api/core/v1.ContainerState": schema_k8sio_api_core_v1_ContainerState(ref), + "k8s.io/api/core/v1.ContainerStateRunning": schema_k8sio_api_core_v1_ContainerStateRunning(ref), + "k8s.io/api/core/v1.ContainerStateTerminated": schema_k8sio_api_core_v1_ContainerStateTerminated(ref), + "k8s.io/api/core/v1.ContainerStateWaiting": schema_k8sio_api_core_v1_ContainerStateWaiting(ref), + "k8s.io/api/core/v1.ContainerStatus": schema_k8sio_api_core_v1_ContainerStatus(ref), + "k8s.io/api/core/v1.DaemonEndpoint": schema_k8sio_api_core_v1_DaemonEndpoint(ref), + "k8s.io/api/core/v1.DownwardAPIProjection": schema_k8sio_api_core_v1_DownwardAPIProjection(ref), + "k8s.io/api/core/v1.DownwardAPIVolumeFile": schema_k8sio_api_core_v1_DownwardAPIVolumeFile(ref), + "k8s.io/api/core/v1.DownwardAPIVolumeSource": schema_k8sio_api_core_v1_DownwardAPIVolumeSource(ref), + "k8s.io/api/core/v1.EmptyDirVolumeSource": schema_k8sio_api_core_v1_EmptyDirVolumeSource(ref), + "k8s.io/api/core/v1.EndpointAddress": schema_k8sio_api_core_v1_EndpointAddress(ref), + "k8s.io/api/core/v1.EndpointPort": schema_k8sio_api_core_v1_EndpointPort(ref), + "k8s.io/api/core/v1.EndpointSubset": schema_k8sio_api_core_v1_EndpointSubset(ref), + "k8s.io/api/core/v1.Endpoints": schema_k8sio_api_core_v1_Endpoints(ref), + "k8s.io/api/core/v1.EndpointsList": schema_k8sio_api_core_v1_EndpointsList(ref), + "k8s.io/api/core/v1.EnvFromSource": schema_k8sio_api_core_v1_EnvFromSource(ref), + "k8s.io/api/core/v1.EnvVar": schema_k8sio_api_core_v1_EnvVar(ref), + "k8s.io/api/core/v1.EnvVarSource": schema_k8sio_api_core_v1_EnvVarSource(ref), + "k8s.io/api/core/v1.EphemeralContainer": schema_k8sio_api_core_v1_EphemeralContainer(ref), + "k8s.io/api/core/v1.EphemeralContainerCommon": schema_k8sio_api_core_v1_EphemeralContainerCommon(ref), + "k8s.io/api/core/v1.EphemeralVolumeSource": schema_k8sio_api_core_v1_EphemeralVolumeSource(ref), + "k8s.io/api/core/v1.Event": schema_k8sio_api_core_v1_Event(ref), + "k8s.io/api/core/v1.EventList": schema_k8sio_api_core_v1_EventList(ref), + "k8s.io/api/core/v1.EventSeries": schema_k8sio_api_core_v1_EventSeries(ref), + "k8s.io/api/core/v1.EventSource": schema_k8sio_api_core_v1_EventSource(ref), + "k8s.io/api/core/v1.ExecAction": schema_k8sio_api_core_v1_ExecAction(ref), + "k8s.io/api/core/v1.FCVolumeSource": schema_k8sio_api_core_v1_FCVolumeSource(ref), + "k8s.io/api/core/v1.FlexPersistentVolumeSource": schema_k8sio_api_core_v1_FlexPersistentVolumeSource(ref), + "k8s.io/api/core/v1.FlexVolumeSource": schema_k8sio_api_core_v1_FlexVolumeSource(ref), + "k8s.io/api/core/v1.FlockerVolumeSource": schema_k8sio_api_core_v1_FlockerVolumeSource(ref), + "k8s.io/api/core/v1.GCEPersistentDiskVolumeSource": schema_k8sio_api_core_v1_GCEPersistentDiskVolumeSource(ref), + "k8s.io/api/core/v1.GRPCAction": schema_k8sio_api_core_v1_GRPCAction(ref), + "k8s.io/api/core/v1.GitRepoVolumeSource": schema_k8sio_api_core_v1_GitRepoVolumeSource(ref), + "k8s.io/api/core/v1.GlusterfsPersistentVolumeSource": schema_k8sio_api_core_v1_GlusterfsPersistentVolumeSource(ref), + "k8s.io/api/core/v1.GlusterfsVolumeSource": schema_k8sio_api_core_v1_GlusterfsVolumeSource(ref), + "k8s.io/api/core/v1.HTTPGetAction": schema_k8sio_api_core_v1_HTTPGetAction(ref), + "k8s.io/api/core/v1.HTTPHeader": schema_k8sio_api_core_v1_HTTPHeader(ref), + "k8s.io/api/core/v1.HostAlias": schema_k8sio_api_core_v1_HostAlias(ref), + "k8s.io/api/core/v1.HostPathVolumeSource": schema_k8sio_api_core_v1_HostPathVolumeSource(ref), + "k8s.io/api/core/v1.ISCSIPersistentVolumeSource": schema_k8sio_api_core_v1_ISCSIPersistentVolumeSource(ref), + "k8s.io/api/core/v1.ISCSIVolumeSource": schema_k8sio_api_core_v1_ISCSIVolumeSource(ref), + "k8s.io/api/core/v1.KeyToPath": schema_k8sio_api_core_v1_KeyToPath(ref), + "k8s.io/api/core/v1.Lifecycle": schema_k8sio_api_core_v1_Lifecycle(ref), + "k8s.io/api/core/v1.LifecycleHandler": schema_k8sio_api_core_v1_LifecycleHandler(ref), + "k8s.io/api/core/v1.LimitRange": schema_k8sio_api_core_v1_LimitRange(ref), + "k8s.io/api/core/v1.LimitRangeItem": schema_k8sio_api_core_v1_LimitRangeItem(ref), + "k8s.io/api/core/v1.LimitRangeList": schema_k8sio_api_core_v1_LimitRangeList(ref), + "k8s.io/api/core/v1.LimitRangeSpec": schema_k8sio_api_core_v1_LimitRangeSpec(ref), + "k8s.io/api/core/v1.List": schema_k8sio_api_core_v1_List(ref), + "k8s.io/api/core/v1.LoadBalancerIngress": schema_k8sio_api_core_v1_LoadBalancerIngress(ref), + "k8s.io/api/core/v1.LoadBalancerStatus": schema_k8sio_api_core_v1_LoadBalancerStatus(ref), + "k8s.io/api/core/v1.LocalObjectReference": schema_k8sio_api_core_v1_LocalObjectReference(ref), + "k8s.io/api/core/v1.LocalVolumeSource": schema_k8sio_api_core_v1_LocalVolumeSource(ref), + "k8s.io/api/core/v1.NFSVolumeSource": schema_k8sio_api_core_v1_NFSVolumeSource(ref), + "k8s.io/api/core/v1.Namespace": schema_k8sio_api_core_v1_Namespace(ref), + "k8s.io/api/core/v1.NamespaceCondition": schema_k8sio_api_core_v1_NamespaceCondition(ref), + "k8s.io/api/core/v1.NamespaceList": schema_k8sio_api_core_v1_NamespaceList(ref), + "k8s.io/api/core/v1.NamespaceSpec": schema_k8sio_api_core_v1_NamespaceSpec(ref), + "k8s.io/api/core/v1.NamespaceStatus": schema_k8sio_api_core_v1_NamespaceStatus(ref), + "k8s.io/api/core/v1.Node": schema_k8sio_api_core_v1_Node(ref), + "k8s.io/api/core/v1.NodeAddress": schema_k8sio_api_core_v1_NodeAddress(ref), + "k8s.io/api/core/v1.NodeAffinity": schema_k8sio_api_core_v1_NodeAffinity(ref), + "k8s.io/api/core/v1.NodeCondition": schema_k8sio_api_core_v1_NodeCondition(ref), + "k8s.io/api/core/v1.NodeConfigSource": schema_k8sio_api_core_v1_NodeConfigSource(ref), + "k8s.io/api/core/v1.NodeConfigStatus": schema_k8sio_api_core_v1_NodeConfigStatus(ref), + "k8s.io/api/core/v1.NodeDaemonEndpoints": schema_k8sio_api_core_v1_NodeDaemonEndpoints(ref), + "k8s.io/api/core/v1.NodeList": schema_k8sio_api_core_v1_NodeList(ref), + "k8s.io/api/core/v1.NodeProxyOptions": schema_k8sio_api_core_v1_NodeProxyOptions(ref), + "k8s.io/api/core/v1.NodeResources": schema_k8sio_api_core_v1_NodeResources(ref), + "k8s.io/api/core/v1.NodeSelector": schema_k8sio_api_core_v1_NodeSelector(ref), + "k8s.io/api/core/v1.NodeSelectorRequirement": schema_k8sio_api_core_v1_NodeSelectorRequirement(ref), + "k8s.io/api/core/v1.NodeSelectorTerm": schema_k8sio_api_core_v1_NodeSelectorTerm(ref), + "k8s.io/api/core/v1.NodeSpec": schema_k8sio_api_core_v1_NodeSpec(ref), + "k8s.io/api/core/v1.NodeStatus": schema_k8sio_api_core_v1_NodeStatus(ref), + "k8s.io/api/core/v1.NodeSystemInfo": schema_k8sio_api_core_v1_NodeSystemInfo(ref), + "k8s.io/api/core/v1.ObjectFieldSelector": schema_k8sio_api_core_v1_ObjectFieldSelector(ref), + "k8s.io/api/core/v1.ObjectReference": schema_k8sio_api_core_v1_ObjectReference(ref), + "k8s.io/api/core/v1.PersistentVolume": schema_k8sio_api_core_v1_PersistentVolume(ref), + "k8s.io/api/core/v1.PersistentVolumeClaim": schema_k8sio_api_core_v1_PersistentVolumeClaim(ref), + "k8s.io/api/core/v1.PersistentVolumeClaimCondition": schema_k8sio_api_core_v1_PersistentVolumeClaimCondition(ref), + "k8s.io/api/core/v1.PersistentVolumeClaimList": schema_k8sio_api_core_v1_PersistentVolumeClaimList(ref), + "k8s.io/api/core/v1.PersistentVolumeClaimSpec": schema_k8sio_api_core_v1_PersistentVolumeClaimSpec(ref), + "k8s.io/api/core/v1.PersistentVolumeClaimStatus": schema_k8sio_api_core_v1_PersistentVolumeClaimStatus(ref), + "k8s.io/api/core/v1.PersistentVolumeClaimTemplate": schema_k8sio_api_core_v1_PersistentVolumeClaimTemplate(ref), + "k8s.io/api/core/v1.PersistentVolumeClaimVolumeSource": schema_k8sio_api_core_v1_PersistentVolumeClaimVolumeSource(ref), + "k8s.io/api/core/v1.PersistentVolumeList": schema_k8sio_api_core_v1_PersistentVolumeList(ref), + "k8s.io/api/core/v1.PersistentVolumeSource": schema_k8sio_api_core_v1_PersistentVolumeSource(ref), + "k8s.io/api/core/v1.PersistentVolumeSpec": schema_k8sio_api_core_v1_PersistentVolumeSpec(ref), + "k8s.io/api/core/v1.PersistentVolumeStatus": schema_k8sio_api_core_v1_PersistentVolumeStatus(ref), + "k8s.io/api/core/v1.PhotonPersistentDiskVolumeSource": schema_k8sio_api_core_v1_PhotonPersistentDiskVolumeSource(ref), + "k8s.io/api/core/v1.Pod": schema_k8sio_api_core_v1_Pod(ref), + "k8s.io/api/core/v1.PodAffinity": schema_k8sio_api_core_v1_PodAffinity(ref), + "k8s.io/api/core/v1.PodAffinityTerm": schema_k8sio_api_core_v1_PodAffinityTerm(ref), + "k8s.io/api/core/v1.PodAntiAffinity": schema_k8sio_api_core_v1_PodAntiAffinity(ref), + "k8s.io/api/core/v1.PodAttachOptions": schema_k8sio_api_core_v1_PodAttachOptions(ref), + "k8s.io/api/core/v1.PodCondition": schema_k8sio_api_core_v1_PodCondition(ref), + "k8s.io/api/core/v1.PodDNSConfig": schema_k8sio_api_core_v1_PodDNSConfig(ref), + "k8s.io/api/core/v1.PodDNSConfigOption": schema_k8sio_api_core_v1_PodDNSConfigOption(ref), + "k8s.io/api/core/v1.PodExecOptions": schema_k8sio_api_core_v1_PodExecOptions(ref), + "k8s.io/api/core/v1.PodIP": schema_k8sio_api_core_v1_PodIP(ref), + "k8s.io/api/core/v1.PodList": schema_k8sio_api_core_v1_PodList(ref), + "k8s.io/api/core/v1.PodLogOptions": schema_k8sio_api_core_v1_PodLogOptions(ref), + "k8s.io/api/core/v1.PodOS": schema_k8sio_api_core_v1_PodOS(ref), + "k8s.io/api/core/v1.PodPortForwardOptions": schema_k8sio_api_core_v1_PodPortForwardOptions(ref), + "k8s.io/api/core/v1.PodProxyOptions": schema_k8sio_api_core_v1_PodProxyOptions(ref), + "k8s.io/api/core/v1.PodReadinessGate": schema_k8sio_api_core_v1_PodReadinessGate(ref), + "k8s.io/api/core/v1.PodSecurityContext": schema_k8sio_api_core_v1_PodSecurityContext(ref), + "k8s.io/api/core/v1.PodSignature": schema_k8sio_api_core_v1_PodSignature(ref), + "k8s.io/api/core/v1.PodSpec": schema_k8sio_api_core_v1_PodSpec(ref), + "k8s.io/api/core/v1.PodStatus": schema_k8sio_api_core_v1_PodStatus(ref), + "k8s.io/api/core/v1.PodStatusResult": schema_k8sio_api_core_v1_PodStatusResult(ref), + "k8s.io/api/core/v1.PodTemplate": schema_k8sio_api_core_v1_PodTemplate(ref), + "k8s.io/api/core/v1.PodTemplateList": schema_k8sio_api_core_v1_PodTemplateList(ref), + "k8s.io/api/core/v1.PodTemplateSpec": schema_k8sio_api_core_v1_PodTemplateSpec(ref), + "k8s.io/api/core/v1.PortStatus": schema_k8sio_api_core_v1_PortStatus(ref), + "k8s.io/api/core/v1.PortworxVolumeSource": schema_k8sio_api_core_v1_PortworxVolumeSource(ref), + "k8s.io/api/core/v1.PreferAvoidPodsEntry": schema_k8sio_api_core_v1_PreferAvoidPodsEntry(ref), + "k8s.io/api/core/v1.PreferredSchedulingTerm": schema_k8sio_api_core_v1_PreferredSchedulingTerm(ref), + "k8s.io/api/core/v1.Probe": schema_k8sio_api_core_v1_Probe(ref), + "k8s.io/api/core/v1.ProbeHandler": schema_k8sio_api_core_v1_ProbeHandler(ref), + "k8s.io/api/core/v1.ProjectedVolumeSource": schema_k8sio_api_core_v1_ProjectedVolumeSource(ref), + "k8s.io/api/core/v1.QuobyteVolumeSource": schema_k8sio_api_core_v1_QuobyteVolumeSource(ref), + "k8s.io/api/core/v1.RBDPersistentVolumeSource": schema_k8sio_api_core_v1_RBDPersistentVolumeSource(ref), + "k8s.io/api/core/v1.RBDVolumeSource": schema_k8sio_api_core_v1_RBDVolumeSource(ref), + "k8s.io/api/core/v1.RangeAllocation": schema_k8sio_api_core_v1_RangeAllocation(ref), + "k8s.io/api/core/v1.ReplicationController": schema_k8sio_api_core_v1_ReplicationController(ref), + "k8s.io/api/core/v1.ReplicationControllerCondition": schema_k8sio_api_core_v1_ReplicationControllerCondition(ref), + "k8s.io/api/core/v1.ReplicationControllerList": schema_k8sio_api_core_v1_ReplicationControllerList(ref), + "k8s.io/api/core/v1.ReplicationControllerSpec": schema_k8sio_api_core_v1_ReplicationControllerSpec(ref), + "k8s.io/api/core/v1.ReplicationControllerStatus": schema_k8sio_api_core_v1_ReplicationControllerStatus(ref), + "k8s.io/api/core/v1.ResourceFieldSelector": schema_k8sio_api_core_v1_ResourceFieldSelector(ref), + "k8s.io/api/core/v1.ResourceQuota": schema_k8sio_api_core_v1_ResourceQuota(ref), + "k8s.io/api/core/v1.ResourceQuotaList": schema_k8sio_api_core_v1_ResourceQuotaList(ref), + "k8s.io/api/core/v1.ResourceQuotaSpec": schema_k8sio_api_core_v1_ResourceQuotaSpec(ref), + "k8s.io/api/core/v1.ResourceQuotaStatus": schema_k8sio_api_core_v1_ResourceQuotaStatus(ref), + "k8s.io/api/core/v1.ResourceRequirements": schema_k8sio_api_core_v1_ResourceRequirements(ref), + "k8s.io/api/core/v1.SELinuxOptions": schema_k8sio_api_core_v1_SELinuxOptions(ref), + "k8s.io/api/core/v1.ScaleIOPersistentVolumeSource": schema_k8sio_api_core_v1_ScaleIOPersistentVolumeSource(ref), + "k8s.io/api/core/v1.ScaleIOVolumeSource": schema_k8sio_api_core_v1_ScaleIOVolumeSource(ref), + "k8s.io/api/core/v1.ScopeSelector": schema_k8sio_api_core_v1_ScopeSelector(ref), + "k8s.io/api/core/v1.ScopedResourceSelectorRequirement": schema_k8sio_api_core_v1_ScopedResourceSelectorRequirement(ref), + "k8s.io/api/core/v1.SeccompProfile": schema_k8sio_api_core_v1_SeccompProfile(ref), + "k8s.io/api/core/v1.Secret": schema_k8sio_api_core_v1_Secret(ref), + "k8s.io/api/core/v1.SecretEnvSource": schema_k8sio_api_core_v1_SecretEnvSource(ref), + "k8s.io/api/core/v1.SecretKeySelector": schema_k8sio_api_core_v1_SecretKeySelector(ref), + "k8s.io/api/core/v1.SecretList": schema_k8sio_api_core_v1_SecretList(ref), + "k8s.io/api/core/v1.SecretProjection": schema_k8sio_api_core_v1_SecretProjection(ref), + "k8s.io/api/core/v1.SecretReference": schema_k8sio_api_core_v1_SecretReference(ref), + "k8s.io/api/core/v1.SecretVolumeSource": schema_k8sio_api_core_v1_SecretVolumeSource(ref), + "k8s.io/api/core/v1.SecurityContext": schema_k8sio_api_core_v1_SecurityContext(ref), + "k8s.io/api/core/v1.SerializedReference": schema_k8sio_api_core_v1_SerializedReference(ref), + "k8s.io/api/core/v1.Service": schema_k8sio_api_core_v1_Service(ref), + "k8s.io/api/core/v1.ServiceAccount": schema_k8sio_api_core_v1_ServiceAccount(ref), + "k8s.io/api/core/v1.ServiceAccountList": schema_k8sio_api_core_v1_ServiceAccountList(ref), + "k8s.io/api/core/v1.ServiceAccountTokenProjection": schema_k8sio_api_core_v1_ServiceAccountTokenProjection(ref), + "k8s.io/api/core/v1.ServiceList": schema_k8sio_api_core_v1_ServiceList(ref), + "k8s.io/api/core/v1.ServicePort": schema_k8sio_api_core_v1_ServicePort(ref), + "k8s.io/api/core/v1.ServiceProxyOptions": schema_k8sio_api_core_v1_ServiceProxyOptions(ref), + "k8s.io/api/core/v1.ServiceSpec": schema_k8sio_api_core_v1_ServiceSpec(ref), + "k8s.io/api/core/v1.ServiceStatus": schema_k8sio_api_core_v1_ServiceStatus(ref), + "k8s.io/api/core/v1.SessionAffinityConfig": schema_k8sio_api_core_v1_SessionAffinityConfig(ref), + "k8s.io/api/core/v1.StorageOSPersistentVolumeSource": schema_k8sio_api_core_v1_StorageOSPersistentVolumeSource(ref), + "k8s.io/api/core/v1.StorageOSVolumeSource": schema_k8sio_api_core_v1_StorageOSVolumeSource(ref), + "k8s.io/api/core/v1.Sysctl": schema_k8sio_api_core_v1_Sysctl(ref), + "k8s.io/api/core/v1.TCPSocketAction": schema_k8sio_api_core_v1_TCPSocketAction(ref), + "k8s.io/api/core/v1.Taint": schema_k8sio_api_core_v1_Taint(ref), + "k8s.io/api/core/v1.Toleration": schema_k8sio_api_core_v1_Toleration(ref), + "k8s.io/api/core/v1.TopologySelectorLabelRequirement": schema_k8sio_api_core_v1_TopologySelectorLabelRequirement(ref), + "k8s.io/api/core/v1.TopologySelectorTerm": schema_k8sio_api_core_v1_TopologySelectorTerm(ref), + "k8s.io/api/core/v1.TopologySpreadConstraint": schema_k8sio_api_core_v1_TopologySpreadConstraint(ref), + "k8s.io/api/core/v1.TypedLocalObjectReference": schema_k8sio_api_core_v1_TypedLocalObjectReference(ref), + "k8s.io/api/core/v1.Volume": schema_k8sio_api_core_v1_Volume(ref), + "k8s.io/api/core/v1.VolumeDevice": schema_k8sio_api_core_v1_VolumeDevice(ref), + "k8s.io/api/core/v1.VolumeMount": schema_k8sio_api_core_v1_VolumeMount(ref), + "k8s.io/api/core/v1.VolumeNodeAffinity": schema_k8sio_api_core_v1_VolumeNodeAffinity(ref), + "k8s.io/api/core/v1.VolumeProjection": schema_k8sio_api_core_v1_VolumeProjection(ref), + "k8s.io/api/core/v1.VolumeSource": schema_k8sio_api_core_v1_VolumeSource(ref), + "k8s.io/api/core/v1.VsphereVirtualDiskVolumeSource": schema_k8sio_api_core_v1_VsphereVirtualDiskVolumeSource(ref), + "k8s.io/api/core/v1.WeightedPodAffinityTerm": schema_k8sio_api_core_v1_WeightedPodAffinityTerm(ref), + "k8s.io/api/core/v1.WindowsSecurityContextOptions": schema_k8sio_api_core_v1_WindowsSecurityContextOptions(ref), + "k8s.io/apimachinery/pkg/api/resource.Quantity": schema_apimachinery_pkg_api_resource_Quantity(ref), + "k8s.io/apimachinery/pkg/api/resource.int64Amount": schema_apimachinery_pkg_api_resource_int64Amount(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.APIGroup": schema_pkg_apis_meta_v1_APIGroup(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.APIGroupList": schema_pkg_apis_meta_v1_APIGroupList(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.APIResource": schema_pkg_apis_meta_v1_APIResource(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.APIResourceList": schema_pkg_apis_meta_v1_APIResourceList(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.APIVersions": schema_pkg_apis_meta_v1_APIVersions(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.ApplyOptions": schema_pkg_apis_meta_v1_ApplyOptions(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.Condition": schema_pkg_apis_meta_v1_Condition(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.CreateOptions": schema_pkg_apis_meta_v1_CreateOptions(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.DeleteOptions": schema_pkg_apis_meta_v1_DeleteOptions(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.Duration": schema_pkg_apis_meta_v1_Duration(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.FieldsV1": schema_pkg_apis_meta_v1_FieldsV1(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.GetOptions": schema_pkg_apis_meta_v1_GetOptions(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.GroupKind": schema_pkg_apis_meta_v1_GroupKind(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.GroupResource": schema_pkg_apis_meta_v1_GroupResource(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersion": schema_pkg_apis_meta_v1_GroupVersion(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionForDiscovery": schema_pkg_apis_meta_v1_GroupVersionForDiscovery(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionKind": schema_pkg_apis_meta_v1_GroupVersionKind(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionResource": schema_pkg_apis_meta_v1_GroupVersionResource(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.InternalEvent": schema_pkg_apis_meta_v1_InternalEvent(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector": schema_pkg_apis_meta_v1_LabelSelector(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelectorRequirement": schema_pkg_apis_meta_v1_LabelSelectorRequirement(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.List": schema_pkg_apis_meta_v1_List(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta": schema_pkg_apis_meta_v1_ListMeta(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.ListOptions": schema_pkg_apis_meta_v1_ListOptions(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.ManagedFieldsEntry": schema_pkg_apis_meta_v1_ManagedFieldsEntry(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime": schema_pkg_apis_meta_v1_MicroTime(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta": schema_pkg_apis_meta_v1_ObjectMeta(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.OwnerReference": schema_pkg_apis_meta_v1_OwnerReference(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.PartialObjectMetadata": schema_pkg_apis_meta_v1_PartialObjectMetadata(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.PartialObjectMetadataList": schema_pkg_apis_meta_v1_PartialObjectMetadataList(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.Patch": schema_pkg_apis_meta_v1_Patch(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.PatchOptions": schema_pkg_apis_meta_v1_PatchOptions(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.Preconditions": schema_pkg_apis_meta_v1_Preconditions(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.RootPaths": schema_pkg_apis_meta_v1_RootPaths(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.ServerAddressByClientCIDR": schema_pkg_apis_meta_v1_ServerAddressByClientCIDR(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.Status": schema_pkg_apis_meta_v1_Status(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.StatusCause": schema_pkg_apis_meta_v1_StatusCause(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.StatusDetails": schema_pkg_apis_meta_v1_StatusDetails(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.Table": schema_pkg_apis_meta_v1_Table(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.TableColumnDefinition": schema_pkg_apis_meta_v1_TableColumnDefinition(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.TableOptions": schema_pkg_apis_meta_v1_TableOptions(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.TableRow": schema_pkg_apis_meta_v1_TableRow(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.TableRowCondition": schema_pkg_apis_meta_v1_TableRowCondition(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.Time": schema_pkg_apis_meta_v1_Time(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.Timestamp": schema_pkg_apis_meta_v1_Timestamp(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.TypeMeta": schema_pkg_apis_meta_v1_TypeMeta(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.UpdateOptions": schema_pkg_apis_meta_v1_UpdateOptions(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.WatchEvent": schema_pkg_apis_meta_v1_WatchEvent(ref), + "k8s.io/apimachinery/pkg/runtime.RawExtension": schema_k8sio_apimachinery_pkg_runtime_RawExtension(ref), + "k8s.io/apimachinery/pkg/runtime.TypeMeta": schema_k8sio_apimachinery_pkg_runtime_TypeMeta(ref), + "k8s.io/apimachinery/pkg/runtime.Unknown": schema_k8sio_apimachinery_pkg_runtime_Unknown(ref), + "k8s.io/apimachinery/pkg/util/intstr.IntOrString": schema_apimachinery_pkg_util_intstr_IntOrString(ref), + "kubevirt.io/api/core/v1.AccessCredential": schema_kubevirtio_api_core_v1_AccessCredential(ref), + "kubevirt.io/api/core/v1.AccessCredentialSecretSource": schema_kubevirtio_api_core_v1_AccessCredentialSecretSource(ref), + "kubevirt.io/api/core/v1.AddVolumeOptions": schema_kubevirtio_api_core_v1_AddVolumeOptions(ref), + "kubevirt.io/api/core/v1.AuthorizedKeysFile": schema_kubevirtio_api_core_v1_AuthorizedKeysFile(ref), + "kubevirt.io/api/core/v1.BIOS": schema_kubevirtio_api_core_v1_BIOS(ref), + "kubevirt.io/api/core/v1.BlockSize": schema_kubevirtio_api_core_v1_BlockSize(ref), + "kubevirt.io/api/core/v1.Bootloader": schema_kubevirtio_api_core_v1_Bootloader(ref), + "kubevirt.io/api/core/v1.CDRomTarget": schema_kubevirtio_api_core_v1_CDRomTarget(ref), + "kubevirt.io/api/core/v1.CPU": schema_kubevirtio_api_core_v1_CPU(ref), + "kubevirt.io/api/core/v1.CPUFeature": schema_kubevirtio_api_core_v1_CPUFeature(ref), + "kubevirt.io/api/core/v1.CertConfig": schema_kubevirtio_api_core_v1_CertConfig(ref), + "kubevirt.io/api/core/v1.Chassis": schema_kubevirtio_api_core_v1_Chassis(ref), + "kubevirt.io/api/core/v1.ClientPassthroughDevices": schema_kubevirtio_api_core_v1_ClientPassthroughDevices(ref), + "kubevirt.io/api/core/v1.Clock": schema_kubevirtio_api_core_v1_Clock(ref), + "kubevirt.io/api/core/v1.ClockOffset": schema_kubevirtio_api_core_v1_ClockOffset(ref), + "kubevirt.io/api/core/v1.ClockOffsetUTC": schema_kubevirtio_api_core_v1_ClockOffsetUTC(ref), + "kubevirt.io/api/core/v1.CloudInitConfigDriveSource": schema_kubevirtio_api_core_v1_CloudInitConfigDriveSource(ref), + "kubevirt.io/api/core/v1.CloudInitNoCloudSource": schema_kubevirtio_api_core_v1_CloudInitNoCloudSource(ref), + "kubevirt.io/api/core/v1.ClusterProfilerRequest": schema_kubevirtio_api_core_v1_ClusterProfilerRequest(ref), + "kubevirt.io/api/core/v1.ClusterProfilerResults": schema_kubevirtio_api_core_v1_ClusterProfilerResults(ref), + "kubevirt.io/api/core/v1.ComponentConfig": schema_kubevirtio_api_core_v1_ComponentConfig(ref), + "kubevirt.io/api/core/v1.ConfigDriveSSHPublicKeyAccessCredentialPropagation": schema_kubevirtio_api_core_v1_ConfigDriveSSHPublicKeyAccessCredentialPropagation(ref), + "kubevirt.io/api/core/v1.ConfigMapVolumeSource": schema_kubevirtio_api_core_v1_ConfigMapVolumeSource(ref), + "kubevirt.io/api/core/v1.ContainerDiskSource": schema_kubevirtio_api_core_v1_ContainerDiskSource(ref), + "kubevirt.io/api/core/v1.CustomBlockSize": schema_kubevirtio_api_core_v1_CustomBlockSize(ref), + "kubevirt.io/api/core/v1.CustomizeComponents": schema_kubevirtio_api_core_v1_CustomizeComponents(ref), + "kubevirt.io/api/core/v1.CustomizeComponentsPatch": schema_kubevirtio_api_core_v1_CustomizeComponentsPatch(ref), + "kubevirt.io/api/core/v1.DHCPOptions": schema_kubevirtio_api_core_v1_DHCPOptions(ref), + "kubevirt.io/api/core/v1.DHCPPrivateOptions": schema_kubevirtio_api_core_v1_DHCPPrivateOptions(ref), + "kubevirt.io/api/core/v1.DataVolumeSource": schema_kubevirtio_api_core_v1_DataVolumeSource(ref), + "kubevirt.io/api/core/v1.DataVolumeTemplateDummyStatus": schema_kubevirtio_api_core_v1_DataVolumeTemplateDummyStatus(ref), + "kubevirt.io/api/core/v1.DataVolumeTemplateSpec": schema_kubevirtio_api_core_v1_DataVolumeTemplateSpec(ref), + "kubevirt.io/api/core/v1.DeveloperConfiguration": schema_kubevirtio_api_core_v1_DeveloperConfiguration(ref), + "kubevirt.io/api/core/v1.Devices": schema_kubevirtio_api_core_v1_Devices(ref), + "kubevirt.io/api/core/v1.Disk": schema_kubevirtio_api_core_v1_Disk(ref), + "kubevirt.io/api/core/v1.DiskDevice": schema_kubevirtio_api_core_v1_DiskDevice(ref), + "kubevirt.io/api/core/v1.DiskTarget": schema_kubevirtio_api_core_v1_DiskTarget(ref), + "kubevirt.io/api/core/v1.DiskVerification": schema_kubevirtio_api_core_v1_DiskVerification(ref), + "kubevirt.io/api/core/v1.DomainSpec": schema_kubevirtio_api_core_v1_DomainSpec(ref), + "kubevirt.io/api/core/v1.DownwardAPIVolumeSource": schema_kubevirtio_api_core_v1_DownwardAPIVolumeSource(ref), + "kubevirt.io/api/core/v1.DownwardMetricsVolumeSource": schema_kubevirtio_api_core_v1_DownwardMetricsVolumeSource(ref), + "kubevirt.io/api/core/v1.EFI": schema_kubevirtio_api_core_v1_EFI(ref), + "kubevirt.io/api/core/v1.EmptyDiskSource": schema_kubevirtio_api_core_v1_EmptyDiskSource(ref), + "kubevirt.io/api/core/v1.EphemeralVolumeSource": schema_kubevirtio_api_core_v1_EphemeralVolumeSource(ref), + "kubevirt.io/api/core/v1.FeatureAPIC": schema_kubevirtio_api_core_v1_FeatureAPIC(ref), + "kubevirt.io/api/core/v1.FeatureHyperv": schema_kubevirtio_api_core_v1_FeatureHyperv(ref), + "kubevirt.io/api/core/v1.FeatureKVM": schema_kubevirtio_api_core_v1_FeatureKVM(ref), + "kubevirt.io/api/core/v1.FeatureSpinlocks": schema_kubevirtio_api_core_v1_FeatureSpinlocks(ref), + "kubevirt.io/api/core/v1.FeatureState": schema_kubevirtio_api_core_v1_FeatureState(ref), + "kubevirt.io/api/core/v1.FeatureVendorID": schema_kubevirtio_api_core_v1_FeatureVendorID(ref), + "kubevirt.io/api/core/v1.Features": schema_kubevirtio_api_core_v1_Features(ref), + "kubevirt.io/api/core/v1.Filesystem": schema_kubevirtio_api_core_v1_Filesystem(ref), + "kubevirt.io/api/core/v1.FilesystemVirtiofs": schema_kubevirtio_api_core_v1_FilesystemVirtiofs(ref), + "kubevirt.io/api/core/v1.Firmware": schema_kubevirtio_api_core_v1_Firmware(ref), + "kubevirt.io/api/core/v1.Flags": schema_kubevirtio_api_core_v1_Flags(ref), + "kubevirt.io/api/core/v1.FlavorMatcher": schema_kubevirtio_api_core_v1_FlavorMatcher(ref), + "kubevirt.io/api/core/v1.FreezeUnfreezeTimeout": schema_kubevirtio_api_core_v1_FreezeUnfreezeTimeout(ref), + "kubevirt.io/api/core/v1.GPU": schema_kubevirtio_api_core_v1_GPU(ref), + "kubevirt.io/api/core/v1.GenerationStatus": schema_kubevirtio_api_core_v1_GenerationStatus(ref), + "kubevirt.io/api/core/v1.GuestAgentCommandInfo": schema_kubevirtio_api_core_v1_GuestAgentCommandInfo(ref), + "kubevirt.io/api/core/v1.GuestAgentPing": schema_kubevirtio_api_core_v1_GuestAgentPing(ref), + "kubevirt.io/api/core/v1.HPETTimer": schema_kubevirtio_api_core_v1_HPETTimer(ref), + "kubevirt.io/api/core/v1.Handler": schema_kubevirtio_api_core_v1_Handler(ref), + "kubevirt.io/api/core/v1.HostDevice": schema_kubevirtio_api_core_v1_HostDevice(ref), + "kubevirt.io/api/core/v1.HostDisk": schema_kubevirtio_api_core_v1_HostDisk(ref), + "kubevirt.io/api/core/v1.HotplugVolumeSource": schema_kubevirtio_api_core_v1_HotplugVolumeSource(ref), + "kubevirt.io/api/core/v1.HotplugVolumeStatus": schema_kubevirtio_api_core_v1_HotplugVolumeStatus(ref), + "kubevirt.io/api/core/v1.Hugepages": schema_kubevirtio_api_core_v1_Hugepages(ref), + "kubevirt.io/api/core/v1.HypervTimer": schema_kubevirtio_api_core_v1_HypervTimer(ref), + "kubevirt.io/api/core/v1.I6300ESBWatchdog": schema_kubevirtio_api_core_v1_I6300ESBWatchdog(ref), + "kubevirt.io/api/core/v1.Input": schema_kubevirtio_api_core_v1_Input(ref), + "kubevirt.io/api/core/v1.Interface": schema_kubevirtio_api_core_v1_Interface(ref), + "kubevirt.io/api/core/v1.InterfaceBindingMethod": schema_kubevirtio_api_core_v1_InterfaceBindingMethod(ref), + "kubevirt.io/api/core/v1.InterfaceBridge": schema_kubevirtio_api_core_v1_InterfaceBridge(ref), + "kubevirt.io/api/core/v1.InterfaceMacvtap": schema_kubevirtio_api_core_v1_InterfaceMacvtap(ref), + "kubevirt.io/api/core/v1.InterfaceMasquerade": schema_kubevirtio_api_core_v1_InterfaceMasquerade(ref), + "kubevirt.io/api/core/v1.InterfaceSRIOV": schema_kubevirtio_api_core_v1_InterfaceSRIOV(ref), + "kubevirt.io/api/core/v1.InterfaceSlirp": schema_kubevirtio_api_core_v1_InterfaceSlirp(ref), + "kubevirt.io/api/core/v1.KVMTimer": schema_kubevirtio_api_core_v1_KVMTimer(ref), + "kubevirt.io/api/core/v1.KernelBoot": schema_kubevirtio_api_core_v1_KernelBoot(ref), + "kubevirt.io/api/core/v1.KernelBootContainer": schema_kubevirtio_api_core_v1_KernelBootContainer(ref), + "kubevirt.io/api/core/v1.KubeVirt": schema_kubevirtio_api_core_v1_KubeVirt(ref), + "kubevirt.io/api/core/v1.KubeVirtCertificateRotateStrategy": schema_kubevirtio_api_core_v1_KubeVirtCertificateRotateStrategy(ref), + "kubevirt.io/api/core/v1.KubeVirtCondition": schema_kubevirtio_api_core_v1_KubeVirtCondition(ref), + "kubevirt.io/api/core/v1.KubeVirtConfiguration": schema_kubevirtio_api_core_v1_KubeVirtConfiguration(ref), + "kubevirt.io/api/core/v1.KubeVirtList": schema_kubevirtio_api_core_v1_KubeVirtList(ref), + "kubevirt.io/api/core/v1.KubeVirtSelfSignConfiguration": schema_kubevirtio_api_core_v1_KubeVirtSelfSignConfiguration(ref), + "kubevirt.io/api/core/v1.KubeVirtSpec": schema_kubevirtio_api_core_v1_KubeVirtSpec(ref), + "kubevirt.io/api/core/v1.KubeVirtStatus": schema_kubevirtio_api_core_v1_KubeVirtStatus(ref), + "kubevirt.io/api/core/v1.KubeVirtWorkloadUpdateStrategy": schema_kubevirtio_api_core_v1_KubeVirtWorkloadUpdateStrategy(ref), + "kubevirt.io/api/core/v1.LaunchSecurity": schema_kubevirtio_api_core_v1_LaunchSecurity(ref), + "kubevirt.io/api/core/v1.LogVerbosity": schema_kubevirtio_api_core_v1_LogVerbosity(ref), + "kubevirt.io/api/core/v1.LunTarget": schema_kubevirtio_api_core_v1_LunTarget(ref), + "kubevirt.io/api/core/v1.Machine": schema_kubevirtio_api_core_v1_Machine(ref), + "kubevirt.io/api/core/v1.MediatedDevicesConfiguration": schema_kubevirtio_api_core_v1_MediatedDevicesConfiguration(ref), + "kubevirt.io/api/core/v1.MediatedHostDevice": schema_kubevirtio_api_core_v1_MediatedHostDevice(ref), + "kubevirt.io/api/core/v1.Memory": schema_kubevirtio_api_core_v1_Memory(ref), + "kubevirt.io/api/core/v1.MigrateOptions": schema_kubevirtio_api_core_v1_MigrateOptions(ref), + "kubevirt.io/api/core/v1.MigrationConfiguration": schema_kubevirtio_api_core_v1_MigrationConfiguration(ref), + "kubevirt.io/api/core/v1.MultusNetwork": schema_kubevirtio_api_core_v1_MultusNetwork(ref), + "kubevirt.io/api/core/v1.NUMA": schema_kubevirtio_api_core_v1_NUMA(ref), + "kubevirt.io/api/core/v1.NUMAGuestMappingPassthrough": schema_kubevirtio_api_core_v1_NUMAGuestMappingPassthrough(ref), + "kubevirt.io/api/core/v1.Network": schema_kubevirtio_api_core_v1_Network(ref), + "kubevirt.io/api/core/v1.NetworkConfiguration": schema_kubevirtio_api_core_v1_NetworkConfiguration(ref), + "kubevirt.io/api/core/v1.NetworkSource": schema_kubevirtio_api_core_v1_NetworkSource(ref), + "kubevirt.io/api/core/v1.NodeMediatedDeviceTypesConfig": schema_kubevirtio_api_core_v1_NodeMediatedDeviceTypesConfig(ref), + "kubevirt.io/api/core/v1.NodePlacement": schema_kubevirtio_api_core_v1_NodePlacement(ref), + "kubevirt.io/api/core/v1.PITTimer": schema_kubevirtio_api_core_v1_PITTimer(ref), + "kubevirt.io/api/core/v1.PauseOptions": schema_kubevirtio_api_core_v1_PauseOptions(ref), + "kubevirt.io/api/core/v1.PciHostDevice": schema_kubevirtio_api_core_v1_PciHostDevice(ref), + "kubevirt.io/api/core/v1.PermittedHostDevices": schema_kubevirtio_api_core_v1_PermittedHostDevices(ref), + "kubevirt.io/api/core/v1.PersistentVolumeClaimInfo": schema_kubevirtio_api_core_v1_PersistentVolumeClaimInfo(ref), + "kubevirt.io/api/core/v1.PersistentVolumeClaimVolumeSource": schema_kubevirtio_api_core_v1_PersistentVolumeClaimVolumeSource(ref), + "kubevirt.io/api/core/v1.PodNetwork": schema_kubevirtio_api_core_v1_PodNetwork(ref), + "kubevirt.io/api/core/v1.Port": schema_kubevirtio_api_core_v1_Port(ref), + "kubevirt.io/api/core/v1.Probe": schema_kubevirtio_api_core_v1_Probe(ref), + "kubevirt.io/api/core/v1.ProfilerResult": schema_kubevirtio_api_core_v1_ProfilerResult(ref), + "kubevirt.io/api/core/v1.QemuGuestAgentSSHPublicKeyAccessCredentialPropagation": schema_kubevirtio_api_core_v1_QemuGuestAgentSSHPublicKeyAccessCredentialPropagation(ref), + "kubevirt.io/api/core/v1.QemuGuestAgentUserPasswordAccessCredentialPropagation": schema_kubevirtio_api_core_v1_QemuGuestAgentUserPasswordAccessCredentialPropagation(ref), + "kubevirt.io/api/core/v1.RESTClientConfiguration": schema_kubevirtio_api_core_v1_RESTClientConfiguration(ref), + "kubevirt.io/api/core/v1.RTCTimer": schema_kubevirtio_api_core_v1_RTCTimer(ref), + "kubevirt.io/api/core/v1.RateLimiter": schema_kubevirtio_api_core_v1_RateLimiter(ref), + "kubevirt.io/api/core/v1.Realtime": schema_kubevirtio_api_core_v1_Realtime(ref), + "kubevirt.io/api/core/v1.ReloadableComponentConfiguration": schema_kubevirtio_api_core_v1_ReloadableComponentConfiguration(ref), + "kubevirt.io/api/core/v1.RemoveVolumeOptions": schema_kubevirtio_api_core_v1_RemoveVolumeOptions(ref), + "kubevirt.io/api/core/v1.ResourceRequirements": schema_kubevirtio_api_core_v1_ResourceRequirements(ref), + "kubevirt.io/api/core/v1.RestartOptions": schema_kubevirtio_api_core_v1_RestartOptions(ref), + "kubevirt.io/api/core/v1.Rng": schema_kubevirtio_api_core_v1_Rng(ref), + "kubevirt.io/api/core/v1.SEV": schema_kubevirtio_api_core_v1_SEV(ref), + "kubevirt.io/api/core/v1.SMBiosConfiguration": schema_kubevirtio_api_core_v1_SMBiosConfiguration(ref), + "kubevirt.io/api/core/v1.SSHPublicKeyAccessCredential": schema_kubevirtio_api_core_v1_SSHPublicKeyAccessCredential(ref), + "kubevirt.io/api/core/v1.SSHPublicKeyAccessCredentialPropagationMethod": schema_kubevirtio_api_core_v1_SSHPublicKeyAccessCredentialPropagationMethod(ref), + "kubevirt.io/api/core/v1.SSHPublicKeyAccessCredentialSource": schema_kubevirtio_api_core_v1_SSHPublicKeyAccessCredentialSource(ref), + "kubevirt.io/api/core/v1.SecretVolumeSource": schema_kubevirtio_api_core_v1_SecretVolumeSource(ref), + "kubevirt.io/api/core/v1.ServiceAccountVolumeSource": schema_kubevirtio_api_core_v1_ServiceAccountVolumeSource(ref), + "kubevirt.io/api/core/v1.SoundDevice": schema_kubevirtio_api_core_v1_SoundDevice(ref), + "kubevirt.io/api/core/v1.StartOptions": schema_kubevirtio_api_core_v1_StartOptions(ref), + "kubevirt.io/api/core/v1.StopOptions": schema_kubevirtio_api_core_v1_StopOptions(ref), + "kubevirt.io/api/core/v1.SyNICTimer": schema_kubevirtio_api_core_v1_SyNICTimer(ref), + "kubevirt.io/api/core/v1.SysprepSource": schema_kubevirtio_api_core_v1_SysprepSource(ref), + "kubevirt.io/api/core/v1.TPMDevice": schema_kubevirtio_api_core_v1_TPMDevice(ref), + "kubevirt.io/api/core/v1.Timer": schema_kubevirtio_api_core_v1_Timer(ref), + "kubevirt.io/api/core/v1.TokenBucketRateLimiter": schema_kubevirtio_api_core_v1_TokenBucketRateLimiter(ref), + "kubevirt.io/api/core/v1.TopologyHints": schema_kubevirtio_api_core_v1_TopologyHints(ref), + "kubevirt.io/api/core/v1.UnpauseOptions": schema_kubevirtio_api_core_v1_UnpauseOptions(ref), + "kubevirt.io/api/core/v1.UserPasswordAccessCredential": schema_kubevirtio_api_core_v1_UserPasswordAccessCredential(ref), + "kubevirt.io/api/core/v1.UserPasswordAccessCredentialPropagationMethod": schema_kubevirtio_api_core_v1_UserPasswordAccessCredentialPropagationMethod(ref), + "kubevirt.io/api/core/v1.UserPasswordAccessCredentialSource": schema_kubevirtio_api_core_v1_UserPasswordAccessCredentialSource(ref), + "kubevirt.io/api/core/v1.VGPUDisplayOptions": schema_kubevirtio_api_core_v1_VGPUDisplayOptions(ref), + "kubevirt.io/api/core/v1.VGPUOptions": schema_kubevirtio_api_core_v1_VGPUOptions(ref), + "kubevirt.io/api/core/v1.VMISelector": schema_kubevirtio_api_core_v1_VMISelector(ref), + "kubevirt.io/api/core/v1.VirtualMachine": schema_kubevirtio_api_core_v1_VirtualMachine(ref), + "kubevirt.io/api/core/v1.VirtualMachineCondition": schema_kubevirtio_api_core_v1_VirtualMachineCondition(ref), + "kubevirt.io/api/core/v1.VirtualMachineInstance": schema_kubevirtio_api_core_v1_VirtualMachineInstance(ref), + "kubevirt.io/api/core/v1.VirtualMachineInstanceCondition": schema_kubevirtio_api_core_v1_VirtualMachineInstanceCondition(ref), + "kubevirt.io/api/core/v1.VirtualMachineInstanceFileSystem": schema_kubevirtio_api_core_v1_VirtualMachineInstanceFileSystem(ref), + "kubevirt.io/api/core/v1.VirtualMachineInstanceFileSystemInfo": schema_kubevirtio_api_core_v1_VirtualMachineInstanceFileSystemInfo(ref), + "kubevirt.io/api/core/v1.VirtualMachineInstanceFileSystemList": schema_kubevirtio_api_core_v1_VirtualMachineInstanceFileSystemList(ref), + "kubevirt.io/api/core/v1.VirtualMachineInstanceGuestAgentInfo": schema_kubevirtio_api_core_v1_VirtualMachineInstanceGuestAgentInfo(ref), + "kubevirt.io/api/core/v1.VirtualMachineInstanceGuestOSInfo": schema_kubevirtio_api_core_v1_VirtualMachineInstanceGuestOSInfo(ref), + "kubevirt.io/api/core/v1.VirtualMachineInstanceGuestOSUser": schema_kubevirtio_api_core_v1_VirtualMachineInstanceGuestOSUser(ref), + "kubevirt.io/api/core/v1.VirtualMachineInstanceGuestOSUserList": schema_kubevirtio_api_core_v1_VirtualMachineInstanceGuestOSUserList(ref), + "kubevirt.io/api/core/v1.VirtualMachineInstanceList": schema_kubevirtio_api_core_v1_VirtualMachineInstanceList(ref), + "kubevirt.io/api/core/v1.VirtualMachineInstanceMigration": schema_kubevirtio_api_core_v1_VirtualMachineInstanceMigration(ref), + "kubevirt.io/api/core/v1.VirtualMachineInstanceMigrationCondition": schema_kubevirtio_api_core_v1_VirtualMachineInstanceMigrationCondition(ref), + "kubevirt.io/api/core/v1.VirtualMachineInstanceMigrationList": schema_kubevirtio_api_core_v1_VirtualMachineInstanceMigrationList(ref), + "kubevirt.io/api/core/v1.VirtualMachineInstanceMigrationSpec": schema_kubevirtio_api_core_v1_VirtualMachineInstanceMigrationSpec(ref), + "kubevirt.io/api/core/v1.VirtualMachineInstanceMigrationState": schema_kubevirtio_api_core_v1_VirtualMachineInstanceMigrationState(ref), + "kubevirt.io/api/core/v1.VirtualMachineInstanceMigrationStatus": schema_kubevirtio_api_core_v1_VirtualMachineInstanceMigrationStatus(ref), + "kubevirt.io/api/core/v1.VirtualMachineInstanceNetworkInterface": schema_kubevirtio_api_core_v1_VirtualMachineInstanceNetworkInterface(ref), + "kubevirt.io/api/core/v1.VirtualMachineInstancePhaseTransitionTimestamp": schema_kubevirtio_api_core_v1_VirtualMachineInstancePhaseTransitionTimestamp(ref), + "kubevirt.io/api/core/v1.VirtualMachineInstancePreset": schema_kubevirtio_api_core_v1_VirtualMachineInstancePreset(ref), + "kubevirt.io/api/core/v1.VirtualMachineInstancePresetList": schema_kubevirtio_api_core_v1_VirtualMachineInstancePresetList(ref), + "kubevirt.io/api/core/v1.VirtualMachineInstancePresetSpec": schema_kubevirtio_api_core_v1_VirtualMachineInstancePresetSpec(ref), + "kubevirt.io/api/core/v1.VirtualMachineInstanceReplicaSet": schema_kubevirtio_api_core_v1_VirtualMachineInstanceReplicaSet(ref), + "kubevirt.io/api/core/v1.VirtualMachineInstanceReplicaSetCondition": schema_kubevirtio_api_core_v1_VirtualMachineInstanceReplicaSetCondition(ref), + "kubevirt.io/api/core/v1.VirtualMachineInstanceReplicaSetList": schema_kubevirtio_api_core_v1_VirtualMachineInstanceReplicaSetList(ref), + "kubevirt.io/api/core/v1.VirtualMachineInstanceReplicaSetSpec": schema_kubevirtio_api_core_v1_VirtualMachineInstanceReplicaSetSpec(ref), + "kubevirt.io/api/core/v1.VirtualMachineInstanceReplicaSetStatus": schema_kubevirtio_api_core_v1_VirtualMachineInstanceReplicaSetStatus(ref), + "kubevirt.io/api/core/v1.VirtualMachineInstanceSpec": schema_kubevirtio_api_core_v1_VirtualMachineInstanceSpec(ref), + "kubevirt.io/api/core/v1.VirtualMachineInstanceStatus": schema_kubevirtio_api_core_v1_VirtualMachineInstanceStatus(ref), + "kubevirt.io/api/core/v1.VirtualMachineInstanceTemplateSpec": schema_kubevirtio_api_core_v1_VirtualMachineInstanceTemplateSpec(ref), + "kubevirt.io/api/core/v1.VirtualMachineList": schema_kubevirtio_api_core_v1_VirtualMachineList(ref), + "kubevirt.io/api/core/v1.VirtualMachineSpec": schema_kubevirtio_api_core_v1_VirtualMachineSpec(ref), + "kubevirt.io/api/core/v1.VirtualMachineStartFailure": schema_kubevirtio_api_core_v1_VirtualMachineStartFailure(ref), + "kubevirt.io/api/core/v1.VirtualMachineStateChangeRequest": schema_kubevirtio_api_core_v1_VirtualMachineStateChangeRequest(ref), + "kubevirt.io/api/core/v1.VirtualMachineStatus": schema_kubevirtio_api_core_v1_VirtualMachineStatus(ref), + "kubevirt.io/api/core/v1.VirtualMachineVolumeRequest": schema_kubevirtio_api_core_v1_VirtualMachineVolumeRequest(ref), + "kubevirt.io/api/core/v1.Volume": schema_kubevirtio_api_core_v1_Volume(ref), + "kubevirt.io/api/core/v1.VolumeSnapshotStatus": schema_kubevirtio_api_core_v1_VolumeSnapshotStatus(ref), + "kubevirt.io/api/core/v1.VolumeSource": schema_kubevirtio_api_core_v1_VolumeSource(ref), + "kubevirt.io/api/core/v1.VolumeStatus": schema_kubevirtio_api_core_v1_VolumeStatus(ref), + "kubevirt.io/api/core/v1.Watchdog": schema_kubevirtio_api_core_v1_Watchdog(ref), + "kubevirt.io/api/core/v1.WatchdogDevice": schema_kubevirtio_api_core_v1_WatchdogDevice(ref), + "kubevirt.io/api/flavor/v1alpha1.VirtualMachineClusterFlavor": schema_kubevirtio_api_flavor_v1alpha1_VirtualMachineClusterFlavor(ref), + "kubevirt.io/api/flavor/v1alpha1.VirtualMachineClusterFlavorList": schema_kubevirtio_api_flavor_v1alpha1_VirtualMachineClusterFlavorList(ref), + "kubevirt.io/api/flavor/v1alpha1.VirtualMachineFlavor": schema_kubevirtio_api_flavor_v1alpha1_VirtualMachineFlavor(ref), + "kubevirt.io/api/flavor/v1alpha1.VirtualMachineFlavorList": schema_kubevirtio_api_flavor_v1alpha1_VirtualMachineFlavorList(ref), + "kubevirt.io/api/flavor/v1alpha1.VirtualMachineFlavorSpec": schema_kubevirtio_api_flavor_v1alpha1_VirtualMachineFlavorSpec(ref), + "kubevirt.io/api/migrations/v1alpha1.MigrationPolicy": schema_kubevirtio_api_migrations_v1alpha1_MigrationPolicy(ref), + "kubevirt.io/api/migrations/v1alpha1.MigrationPolicyList": schema_kubevirtio_api_migrations_v1alpha1_MigrationPolicyList(ref), + "kubevirt.io/api/migrations/v1alpha1.MigrationPolicySpec": schema_kubevirtio_api_migrations_v1alpha1_MigrationPolicySpec(ref), + "kubevirt.io/api/migrations/v1alpha1.MigrationPolicyStatus": schema_kubevirtio_api_migrations_v1alpha1_MigrationPolicyStatus(ref), + "kubevirt.io/api/migrations/v1alpha1.Selectors": schema_kubevirtio_api_migrations_v1alpha1_Selectors(ref), + "kubevirt.io/api/pool/v1alpha1.VirtualMachinePool": schema_kubevirtio_api_pool_v1alpha1_VirtualMachinePool(ref), + "kubevirt.io/api/pool/v1alpha1.VirtualMachinePoolCondition": schema_kubevirtio_api_pool_v1alpha1_VirtualMachinePoolCondition(ref), + "kubevirt.io/api/pool/v1alpha1.VirtualMachinePoolList": schema_kubevirtio_api_pool_v1alpha1_VirtualMachinePoolList(ref), + "kubevirt.io/api/pool/v1alpha1.VirtualMachinePoolSpec": schema_kubevirtio_api_pool_v1alpha1_VirtualMachinePoolSpec(ref), + "kubevirt.io/api/pool/v1alpha1.VirtualMachinePoolStatus": schema_kubevirtio_api_pool_v1alpha1_VirtualMachinePoolStatus(ref), + "kubevirt.io/api/pool/v1alpha1.VirtualMachineTemplateSpec": schema_kubevirtio_api_pool_v1alpha1_VirtualMachineTemplateSpec(ref), + "kubevirt.io/api/snapshot/v1alpha1.Condition": schema_kubevirtio_api_snapshot_v1alpha1_Condition(ref), + "kubevirt.io/api/snapshot/v1alpha1.Error": schema_kubevirtio_api_snapshot_v1alpha1_Error(ref), + "kubevirt.io/api/snapshot/v1alpha1.PersistentVolumeClaim": schema_kubevirtio_api_snapshot_v1alpha1_PersistentVolumeClaim(ref), + "kubevirt.io/api/snapshot/v1alpha1.SourceSpec": schema_kubevirtio_api_snapshot_v1alpha1_SourceSpec(ref), + "kubevirt.io/api/snapshot/v1alpha1.VirtualMachine": schema_kubevirtio_api_snapshot_v1alpha1_VirtualMachine(ref), + "kubevirt.io/api/snapshot/v1alpha1.VirtualMachineRestore": schema_kubevirtio_api_snapshot_v1alpha1_VirtualMachineRestore(ref), + "kubevirt.io/api/snapshot/v1alpha1.VirtualMachineRestoreList": schema_kubevirtio_api_snapshot_v1alpha1_VirtualMachineRestoreList(ref), + "kubevirt.io/api/snapshot/v1alpha1.VirtualMachineRestoreSpec": schema_kubevirtio_api_snapshot_v1alpha1_VirtualMachineRestoreSpec(ref), + "kubevirt.io/api/snapshot/v1alpha1.VirtualMachineRestoreStatus": schema_kubevirtio_api_snapshot_v1alpha1_VirtualMachineRestoreStatus(ref), + "kubevirt.io/api/snapshot/v1alpha1.VirtualMachineSnapshot": schema_kubevirtio_api_snapshot_v1alpha1_VirtualMachineSnapshot(ref), + "kubevirt.io/api/snapshot/v1alpha1.VirtualMachineSnapshotContent": schema_kubevirtio_api_snapshot_v1alpha1_VirtualMachineSnapshotContent(ref), + "kubevirt.io/api/snapshot/v1alpha1.VirtualMachineSnapshotContentList": schema_kubevirtio_api_snapshot_v1alpha1_VirtualMachineSnapshotContentList(ref), + "kubevirt.io/api/snapshot/v1alpha1.VirtualMachineSnapshotContentSpec": schema_kubevirtio_api_snapshot_v1alpha1_VirtualMachineSnapshotContentSpec(ref), + "kubevirt.io/api/snapshot/v1alpha1.VirtualMachineSnapshotContentStatus": schema_kubevirtio_api_snapshot_v1alpha1_VirtualMachineSnapshotContentStatus(ref), + "kubevirt.io/api/snapshot/v1alpha1.VirtualMachineSnapshotList": schema_kubevirtio_api_snapshot_v1alpha1_VirtualMachineSnapshotList(ref), + "kubevirt.io/api/snapshot/v1alpha1.VirtualMachineSnapshotSpec": schema_kubevirtio_api_snapshot_v1alpha1_VirtualMachineSnapshotSpec(ref), + "kubevirt.io/api/snapshot/v1alpha1.VirtualMachineSnapshotStatus": schema_kubevirtio_api_snapshot_v1alpha1_VirtualMachineSnapshotStatus(ref), + "kubevirt.io/api/snapshot/v1alpha1.VolumeBackup": schema_kubevirtio_api_snapshot_v1alpha1_VolumeBackup(ref), + "kubevirt.io/api/snapshot/v1alpha1.VolumeRestore": schema_kubevirtio_api_snapshot_v1alpha1_VolumeRestore(ref), + "kubevirt.io/api/snapshot/v1alpha1.VolumeSnapshotStatus": schema_kubevirtio_api_snapshot_v1alpha1_VolumeSnapshotStatus(ref), + "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.CDI": schema_pkg_apis_core_v1beta1_CDI(ref), + "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.CDICertConfig": schema_pkg_apis_core_v1beta1_CDICertConfig(ref), + "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.CDIConfig": schema_pkg_apis_core_v1beta1_CDIConfig(ref), + "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.CDIConfigList": schema_pkg_apis_core_v1beta1_CDIConfigList(ref), + "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.CDIConfigSpec": schema_pkg_apis_core_v1beta1_CDIConfigSpec(ref), + "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.CDIConfigStatus": schema_pkg_apis_core_v1beta1_CDIConfigStatus(ref), + "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.CDIList": schema_pkg_apis_core_v1beta1_CDIList(ref), + "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.CDISpec": schema_pkg_apis_core_v1beta1_CDISpec(ref), + "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.CDIStatus": schema_pkg_apis_core_v1beta1_CDIStatus(ref), + "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.CertConfig": schema_pkg_apis_core_v1beta1_CertConfig(ref), + "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.ClaimPropertySet": schema_pkg_apis_core_v1beta1_ClaimPropertySet(ref), + "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.ConditionState": schema_pkg_apis_core_v1beta1_ConditionState(ref), + "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.DataImportCron": schema_pkg_apis_core_v1beta1_DataImportCron(ref), + "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.DataImportCronCondition": schema_pkg_apis_core_v1beta1_DataImportCronCondition(ref), + "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.DataImportCronList": schema_pkg_apis_core_v1beta1_DataImportCronList(ref), + "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.DataImportCronSpec": schema_pkg_apis_core_v1beta1_DataImportCronSpec(ref), + "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.DataImportCronStatus": schema_pkg_apis_core_v1beta1_DataImportCronStatus(ref), + "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.DataSource": schema_pkg_apis_core_v1beta1_DataSource(ref), + "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.DataSourceCondition": schema_pkg_apis_core_v1beta1_DataSourceCondition(ref), + "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.DataSourceList": schema_pkg_apis_core_v1beta1_DataSourceList(ref), + "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.DataSourceSource": schema_pkg_apis_core_v1beta1_DataSourceSource(ref), + "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.DataSourceSpec": schema_pkg_apis_core_v1beta1_DataSourceSpec(ref), + "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.DataSourceStatus": schema_pkg_apis_core_v1beta1_DataSourceStatus(ref), + "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.DataVolume": schema_pkg_apis_core_v1beta1_DataVolume(ref), + "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.DataVolumeBlankImage": schema_pkg_apis_core_v1beta1_DataVolumeBlankImage(ref), + "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.DataVolumeCheckpoint": schema_pkg_apis_core_v1beta1_DataVolumeCheckpoint(ref), + "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.DataVolumeCondition": schema_pkg_apis_core_v1beta1_DataVolumeCondition(ref), + "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.DataVolumeList": schema_pkg_apis_core_v1beta1_DataVolumeList(ref), + "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.DataVolumeSource": schema_pkg_apis_core_v1beta1_DataVolumeSource(ref), + "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.DataVolumeSourceHTTP": schema_pkg_apis_core_v1beta1_DataVolumeSourceHTTP(ref), + "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.DataVolumeSourceImageIO": schema_pkg_apis_core_v1beta1_DataVolumeSourceImageIO(ref), + "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.DataVolumeSourcePVC": schema_pkg_apis_core_v1beta1_DataVolumeSourcePVC(ref), + "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.DataVolumeSourceRef": schema_pkg_apis_core_v1beta1_DataVolumeSourceRef(ref), + "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.DataVolumeSourceRegistry": schema_pkg_apis_core_v1beta1_DataVolumeSourceRegistry(ref), + "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.DataVolumeSourceS3": schema_pkg_apis_core_v1beta1_DataVolumeSourceS3(ref), + "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.DataVolumeSourceUpload": schema_pkg_apis_core_v1beta1_DataVolumeSourceUpload(ref), + "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.DataVolumeSourceVDDK": schema_pkg_apis_core_v1beta1_DataVolumeSourceVDDK(ref), + "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.DataVolumeSpec": schema_pkg_apis_core_v1beta1_DataVolumeSpec(ref), + "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.DataVolumeStatus": schema_pkg_apis_core_v1beta1_DataVolumeStatus(ref), + "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.FilesystemOverhead": schema_pkg_apis_core_v1beta1_FilesystemOverhead(ref), + "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.ImportProxy": schema_pkg_apis_core_v1beta1_ImportProxy(ref), + "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.ImportStatus": schema_pkg_apis_core_v1beta1_ImportStatus(ref), + "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.ObjectTransfer": schema_pkg_apis_core_v1beta1_ObjectTransfer(ref), + "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.ObjectTransferCondition": schema_pkg_apis_core_v1beta1_ObjectTransferCondition(ref), + "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.ObjectTransferList": schema_pkg_apis_core_v1beta1_ObjectTransferList(ref), + "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.ObjectTransferSpec": schema_pkg_apis_core_v1beta1_ObjectTransferSpec(ref), + "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.ObjectTransferStatus": schema_pkg_apis_core_v1beta1_ObjectTransferStatus(ref), + "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.StorageProfile": schema_pkg_apis_core_v1beta1_StorageProfile(ref), + "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.StorageProfileList": schema_pkg_apis_core_v1beta1_StorageProfileList(ref), + "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.StorageProfileSpec": schema_pkg_apis_core_v1beta1_StorageProfileSpec(ref), + "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.StorageProfileStatus": schema_pkg_apis_core_v1beta1_StorageProfileStatus(ref), + "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.StorageSpec": schema_pkg_apis_core_v1beta1_StorageSpec(ref), + "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.TransferSource": schema_pkg_apis_core_v1beta1_TransferSource(ref), + "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.TransferTarget": schema_pkg_apis_core_v1beta1_TransferTarget(ref), + } +} + +func schema_k8sio_api_core_v1_AWSElasticBlockStoreVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Represents a Persistent Disk resource in AWS.\n\nAn AWS EBS disk must exist before mounting to a container. The disk must also be in the same AWS zone as the kubelet. An AWS EBS disk can only be mounted as read/write once. AWS EBS volumes support ownership management and SELinux relabeling.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "volumeID": { + SchemaProps: spec.SchemaProps{ + Description: "Unique ID of the persistent disk resource in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore", + Type: []string{"string"}, + Format: "", + }, + }, + "fsType": { + SchemaProps: spec.SchemaProps{ + Description: "Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore", + Type: []string{"string"}, + Format: "", + }, + }, + "partition": { + SchemaProps: spec.SchemaProps{ + Description: "The partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as \"1\". Similarly, the volume partition for /dev/sda is \"0\" (or you can leave the property empty).", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "readOnly": { + SchemaProps: spec.SchemaProps{ + Description: "Specify \"true\" to force and set the ReadOnly property in VolumeMounts to \"true\". If omitted, the default is \"false\". More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + Required: []string{"volumeID"}, + }, + }, + } +} + +func schema_k8sio_api_core_v1_Affinity(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Affinity is a group of affinity scheduling rules.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "nodeAffinity": { + SchemaProps: spec.SchemaProps{ + Description: "Describes node affinity scheduling rules for the pod.", + Ref: ref("k8s.io/api/core/v1.NodeAffinity"), + }, + }, + "podAffinity": { + SchemaProps: spec.SchemaProps{ + Description: "Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)).", + Ref: ref("k8s.io/api/core/v1.PodAffinity"), + }, + }, + "podAntiAffinity": { + SchemaProps: spec.SchemaProps{ + Description: "Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)).", + Ref: ref("k8s.io/api/core/v1.PodAntiAffinity"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.NodeAffinity", "k8s.io/api/core/v1.PodAffinity", "k8s.io/api/core/v1.PodAntiAffinity"}, + } +} + +func schema_k8sio_api_core_v1_AttachedVolume(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "AttachedVolume describes a volume attached to a node", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name of the attached volume", + Type: []string{"string"}, + Format: "", + }, + }, + "devicePath": { + SchemaProps: spec.SchemaProps{ + Description: "DevicePath represents the device path where the volume should be available", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"name", "devicePath"}, + }, + }, + } +} + +func schema_k8sio_api_core_v1_AvoidPods(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "AvoidPods describes pods that should avoid this node. This is the value for a Node annotation with key scheduler.alpha.kubernetes.io/preferAvoidPods and will eventually become a field of NodeStatus.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "preferAvoidPods": { + SchemaProps: spec.SchemaProps{ + Description: "Bounded-sized list of signatures of pods that should avoid this node, sorted in timestamp order from oldest to newest. Size of the slice is unspecified.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.PreferAvoidPodsEntry"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.PreferAvoidPodsEntry"}, + } +} + +func schema_k8sio_api_core_v1_AzureDiskVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "diskName": { + SchemaProps: spec.SchemaProps{ + Description: "The Name of the data disk in the blob storage", + Type: []string{"string"}, + Format: "", + }, + }, + "diskURI": { + SchemaProps: spec.SchemaProps{ + Description: "The URI the data disk in the blob storage", + Type: []string{"string"}, + Format: "", + }, + }, + "cachingMode": { + SchemaProps: spec.SchemaProps{ + Description: "Host Caching mode: None, Read Only, Read Write.", + Type: []string{"string"}, + Format: "", + }, + }, + "fsType": { + SchemaProps: spec.SchemaProps{ + Description: "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.", + Type: []string{"string"}, + Format: "", + }, + }, + "readOnly": { + SchemaProps: spec.SchemaProps{ + Description: "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Expected values Shared: multiple blob disks per storage account Dedicated: single blob disk per storage account Managed: azure managed data disk (only in managed availability set). defaults to shared", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"diskName", "diskURI"}, + }, + }, + } +} + +func schema_k8sio_api_core_v1_AzureFilePersistentVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "AzureFile represents an Azure File Service mount on the host and bind mount to the pod.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "secretName": { + SchemaProps: spec.SchemaProps{ + Description: "the name of secret that contains Azure Storage Account Name and Key", + Type: []string{"string"}, + Format: "", + }, + }, + "shareName": { + SchemaProps: spec.SchemaProps{ + Description: "Share Name", + Type: []string{"string"}, + Format: "", + }, + }, + "readOnly": { + SchemaProps: spec.SchemaProps{ + Description: "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "secretNamespace": { + SchemaProps: spec.SchemaProps{ + Description: "the namespace of the secret that contains Azure Storage Account Name and Key default is the same as the Pod", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"secretName", "shareName"}, + }, + }, + } +} + +func schema_k8sio_api_core_v1_AzureFileVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "AzureFile represents an Azure File Service mount on the host and bind mount to the pod.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "secretName": { + SchemaProps: spec.SchemaProps{ + Description: "the name of secret that contains Azure Storage Account Name and Key", + Type: []string{"string"}, + Format: "", + }, + }, + "shareName": { + SchemaProps: spec.SchemaProps{ + Description: "Share Name", + Type: []string{"string"}, + Format: "", + }, + }, + "readOnly": { + SchemaProps: spec.SchemaProps{ + Description: "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + Required: []string{"secretName", "shareName"}, + }, + }, + } +} + +func schema_k8sio_api_core_v1_Binding(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Binding ties one object to another; for example, a pod is bound to a node by a scheduler. Deprecated in 1.7, please use the bindings subresource of pods instead.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "target": { + SchemaProps: spec.SchemaProps{ + Description: "The target object that you want to bind to the standard object.", + Ref: ref("k8s.io/api/core/v1.ObjectReference"), + }, + }, + }, + Required: []string{"target"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.ObjectReference", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_core_v1_CSIPersistentVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Represents storage that is managed by an external CSI volume driver (Beta feature)", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "driver": { + SchemaProps: spec.SchemaProps{ + Description: "Driver is the name of the driver to use for this volume. Required.", + Type: []string{"string"}, + Format: "", + }, + }, + "volumeHandle": { + SchemaProps: spec.SchemaProps{ + Description: "VolumeHandle is the unique volume name returned by the CSI volume plugin’s CreateVolume to refer to the volume on all subsequent calls. Required.", + Type: []string{"string"}, + Format: "", + }, + }, + "readOnly": { + SchemaProps: spec.SchemaProps{ + Description: "Optional: The value to pass to ControllerPublishVolumeRequest. Defaults to false (read/write).", + Type: []string{"boolean"}, + Format: "", + }, + }, + "fsType": { + SchemaProps: spec.SchemaProps{ + Description: "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\".", + Type: []string{"string"}, + Format: "", + }, + }, + "volumeAttributes": { + SchemaProps: spec.SchemaProps{ + Description: "Attributes of the volume to publish.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "controllerPublishSecretRef": { + SchemaProps: spec.SchemaProps{ + Description: "ControllerPublishSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI ControllerPublishVolume and ControllerUnpublishVolume calls. This field is optional, and may be empty if no secret is required. If the secret object contains more than one secret, all secrets are passed.", + Ref: ref("k8s.io/api/core/v1.SecretReference"), + }, + }, + "nodeStageSecretRef": { + SchemaProps: spec.SchemaProps{ + Description: "NodeStageSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodeStageVolume and NodeStageVolume and NodeUnstageVolume calls. This field is optional, and may be empty if no secret is required. If the secret object contains more than one secret, all secrets are passed.", + Ref: ref("k8s.io/api/core/v1.SecretReference"), + }, + }, + "nodePublishSecretRef": { + SchemaProps: spec.SchemaProps{ + Description: "NodePublishSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodePublishVolume and NodeUnpublishVolume calls. This field is optional, and may be empty if no secret is required. If the secret object contains more than one secret, all secrets are passed.", + Ref: ref("k8s.io/api/core/v1.SecretReference"), + }, + }, + "controllerExpandSecretRef": { + SchemaProps: spec.SchemaProps{ + Description: "ControllerExpandSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI ControllerExpandVolume call. This is an alpha field and requires enabling ExpandCSIVolumes feature gate. This field is optional, and may be empty if no secret is required. If the secret object contains more than one secret, all secrets are passed.", + Ref: ref("k8s.io/api/core/v1.SecretReference"), + }, + }, + }, + Required: []string{"driver", "volumeHandle"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.SecretReference"}, + } +} + +func schema_k8sio_api_core_v1_CSIVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Represents a source location of a volume to mount, managed by an external CSI driver", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "driver": { + SchemaProps: spec.SchemaProps{ + Description: "Driver is the name of the CSI driver that handles this volume. Consult with your admin for the correct name as registered in the cluster.", + Type: []string{"string"}, + Format: "", + }, + }, + "readOnly": { + SchemaProps: spec.SchemaProps{ + Description: "Specifies a read-only configuration for the volume. Defaults to false (read/write).", + Type: []string{"boolean"}, + Format: "", + }, + }, + "fsType": { + SchemaProps: spec.SchemaProps{ + Description: "Filesystem type to mount. Ex. \"ext4\", \"xfs\", \"ntfs\". If not provided, the empty value is passed to the associated CSI driver which will determine the default filesystem to apply.", + Type: []string{"string"}, + Format: "", + }, + }, + "volumeAttributes": { + SchemaProps: spec.SchemaProps{ + Description: "VolumeAttributes stores driver-specific properties that are passed to the CSI driver. Consult your driver's documentation for supported values.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "nodePublishSecretRef": { + SchemaProps: spec.SchemaProps{ + Description: "NodePublishSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodePublishVolume and NodeUnpublishVolume calls. This field is optional, and may be empty if no secret is required. If the secret object contains more than one secret, all secret references are passed.", + Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), + }, + }, + }, + Required: []string{"driver"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.LocalObjectReference"}, + } +} + +func schema_k8sio_api_core_v1_Capabilities(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Adds and removes POSIX capabilities from running containers.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "add": { + SchemaProps: spec.SchemaProps{ + Description: "Added capabilities", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "drop": { + SchemaProps: spec.SchemaProps{ + Description: "Removed capabilities", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + }, + }, + } +} + +func schema_k8sio_api_core_v1_CephFSPersistentVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Represents a Ceph Filesystem mount that lasts the lifetime of a pod Cephfs volumes do not support ownership management or SELinux relabeling.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "monitors": { + SchemaProps: spec.SchemaProps{ + Description: "Required: Monitors is a collection of Ceph monitors More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "path": { + SchemaProps: spec.SchemaProps{ + Description: "Optional: Used as the mounted root, rather than the full Ceph tree, default is /", + Type: []string{"string"}, + Format: "", + }, + }, + "user": { + SchemaProps: spec.SchemaProps{ + Description: "Optional: User is the rados user name, default is admin More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it", + Type: []string{"string"}, + Format: "", + }, + }, + "secretFile": { + SchemaProps: spec.SchemaProps{ + Description: "Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it", + Type: []string{"string"}, + Format: "", + }, + }, + "secretRef": { + SchemaProps: spec.SchemaProps{ + Description: "Optional: SecretRef is reference to the authentication secret for User, default is empty. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it", + Ref: ref("k8s.io/api/core/v1.SecretReference"), + }, + }, + "readOnly": { + SchemaProps: spec.SchemaProps{ + Description: "Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + Required: []string{"monitors"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.SecretReference"}, + } +} + +func schema_k8sio_api_core_v1_CephFSVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Represents a Ceph Filesystem mount that lasts the lifetime of a pod Cephfs volumes do not support ownership management or SELinux relabeling.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "monitors": { + SchemaProps: spec.SchemaProps{ + Description: "Required: Monitors is a collection of Ceph monitors More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "path": { + SchemaProps: spec.SchemaProps{ + Description: "Optional: Used as the mounted root, rather than the full Ceph tree, default is /", + Type: []string{"string"}, + Format: "", + }, + }, + "user": { + SchemaProps: spec.SchemaProps{ + Description: "Optional: User is the rados user name, default is admin More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it", + Type: []string{"string"}, + Format: "", + }, + }, + "secretFile": { + SchemaProps: spec.SchemaProps{ + Description: "Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it", + Type: []string{"string"}, + Format: "", + }, + }, + "secretRef": { + SchemaProps: spec.SchemaProps{ + Description: "Optional: SecretRef is reference to the authentication secret for User, default is empty. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it", + Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), + }, + }, + "readOnly": { + SchemaProps: spec.SchemaProps{ + Description: "Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + Required: []string{"monitors"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.LocalObjectReference"}, + } +} + +func schema_k8sio_api_core_v1_CinderPersistentVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Represents a cinder volume resource in Openstack. A Cinder volume must exist before mounting to a container. The volume must also be in the same region as the kubelet. Cinder volumes support ownership management and SELinux relabeling.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "volumeID": { + SchemaProps: spec.SchemaProps{ + Description: "volume id used to identify the volume in cinder. More info: https://examples.k8s.io/mysql-cinder-pd/README.md", + Type: []string{"string"}, + Format: "", + }, + }, + "fsType": { + SchemaProps: spec.SchemaProps{ + Description: "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://examples.k8s.io/mysql-cinder-pd/README.md", + Type: []string{"string"}, + Format: "", + }, + }, + "readOnly": { + SchemaProps: spec.SchemaProps{ + Description: "Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://examples.k8s.io/mysql-cinder-pd/README.md", + Type: []string{"boolean"}, + Format: "", + }, + }, + "secretRef": { + SchemaProps: spec.SchemaProps{ + Description: "Optional: points to a secret object containing parameters used to connect to OpenStack.", + Ref: ref("k8s.io/api/core/v1.SecretReference"), + }, + }, + }, + Required: []string{"volumeID"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.SecretReference"}, + } +} + +func schema_k8sio_api_core_v1_CinderVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Represents a cinder volume resource in Openstack. A Cinder volume must exist before mounting to a container. The volume must also be in the same region as the kubelet. Cinder volumes support ownership management and SELinux relabeling.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "volumeID": { + SchemaProps: spec.SchemaProps{ + Description: "volume id used to identify the volume in cinder. More info: https://examples.k8s.io/mysql-cinder-pd/README.md", + Type: []string{"string"}, + Format: "", + }, + }, + "fsType": { + SchemaProps: spec.SchemaProps{ + Description: "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://examples.k8s.io/mysql-cinder-pd/README.md", + Type: []string{"string"}, + Format: "", + }, + }, + "readOnly": { + SchemaProps: spec.SchemaProps{ + Description: "Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://examples.k8s.io/mysql-cinder-pd/README.md", + Type: []string{"boolean"}, + Format: "", + }, + }, + "secretRef": { + SchemaProps: spec.SchemaProps{ + Description: "Optional: points to a secret object containing parameters used to connect to OpenStack.", + Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), + }, + }, + }, + Required: []string{"volumeID"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.LocalObjectReference"}, + } +} + +func schema_k8sio_api_core_v1_ClientIPConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ClientIPConfig represents the configurations of Client IP based session affinity.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "timeoutSeconds": { + SchemaProps: spec.SchemaProps{ + Description: "timeoutSeconds specifies the seconds of ClientIP type session sticky time. The value must be >0 && <=86400(for 1 day) if ServiceAffinity == \"ClientIP\". Default value is 10800(for 3 hours).", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + }, + }, + } +} + +func schema_k8sio_api_core_v1_ComponentCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Information about the condition of a component.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "type": { + SchemaProps: spec.SchemaProps{ + Description: "Type of condition for a component. Valid value: \"Healthy\"", + Type: []string{"string"}, + Format: "", + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Status of the condition for a component. Valid values for \"Healthy\": \"True\", \"False\", or \"Unknown\".", + Type: []string{"string"}, + Format: "", + }, + }, + "message": { + SchemaProps: spec.SchemaProps{ + Description: "Message about the condition for a component. For example, information about a health check.", + Type: []string{"string"}, + Format: "", + }, + }, + "error": { + SchemaProps: spec.SchemaProps{ + Description: "Condition error code for a component. For example, a health check error code.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"type", "status"}, + }, + }, + } +} + +func schema_k8sio_api_core_v1_ComponentStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ComponentStatus (and ComponentStatusList) holds the cluster validation info. Deprecated: This API is deprecated in v1.19+", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "conditions": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-patch-merge-key": "type", + "x-kubernetes-patch-strategy": "merge", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "List of component conditions observed", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.ComponentCondition"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.ComponentCondition", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_core_v1_ComponentStatusList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Status of all the conditions for the component as a list of ComponentStatus objects. Deprecated: This API is deprecated in v1.19+", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "List of ComponentStatus objects.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.ComponentStatus"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.ComponentStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_core_v1_ConfigMap(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ConfigMap holds configuration data for pods to consume.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "immutable": { + SchemaProps: spec.SchemaProps{ + Description: "Immutable, if set to true, ensures that data stored in the ConfigMap cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "data": { + SchemaProps: spec.SchemaProps{ + Description: "Data contains the configuration data. Each key must consist of alphanumeric characters, '-', '_' or '.'. Values with non-UTF-8 byte sequences must use the BinaryData field. The keys stored in Data must not overlap with the keys in the BinaryData field, this is enforced during validation process.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "binaryData": { + SchemaProps: spec.SchemaProps{ + Description: "BinaryData contains the binary data. Each key must consist of alphanumeric characters, '-', '_' or '.'. BinaryData can contain byte sequences that are not in the UTF-8 range. The keys stored in BinaryData must not overlap with the ones in the Data field, this is enforced during validation process. Using this field will require 1.10+ apiserver and kubelet.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "byte", + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_core_v1_ConfigMapEnvSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ConfigMapEnvSource selects a ConfigMap to populate the environment variables with.\n\nThe contents of the target ConfigMap's Data field will represent the key-value pairs as environment variables.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", + Type: []string{"string"}, + Format: "", + }, + }, + "optional": { + SchemaProps: spec.SchemaProps{ + Description: "Specify whether the ConfigMap must be defined", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_k8sio_api_core_v1_ConfigMapKeySelector(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Selects a key from a ConfigMap.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", + Type: []string{"string"}, + Format: "", + }, + }, + "key": { + SchemaProps: spec.SchemaProps{ + Description: "The key to select.", + Type: []string{"string"}, + Format: "", + }, + }, + "optional": { + SchemaProps: spec.SchemaProps{ + Description: "Specify whether the ConfigMap or its key must be defined", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + Required: []string{"key"}, + }, + }, + } +} + +func schema_k8sio_api_core_v1_ConfigMapList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ConfigMapList is a resource containing a list of ConfigMap objects.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Description: "More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "Items is the list of ConfigMaps.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.ConfigMap"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.ConfigMap", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_core_v1_ConfigMapNodeConfigSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ConfigMapNodeConfigSource contains the information to reference a ConfigMap as a config source for the Node. This API is deprecated since 1.22: https://git.k8s.io/enhancements/keps/sig-node/281-dynamic-kubelet-configuration", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "namespace": { + SchemaProps: spec.SchemaProps{ + Description: "Namespace is the metadata.namespace of the referenced ConfigMap. This field is required in all cases.", + Type: []string{"string"}, + Format: "", + }, + }, + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name is the metadata.name of the referenced ConfigMap. This field is required in all cases.", + Type: []string{"string"}, + Format: "", + }, + }, + "uid": { + SchemaProps: spec.SchemaProps{ + Description: "UID is the metadata.UID of the referenced ConfigMap. This field is forbidden in Node.Spec, and required in Node.Status.", + Type: []string{"string"}, + Format: "", + }, + }, + "resourceVersion": { + SchemaProps: spec.SchemaProps{ + Description: "ResourceVersion is the metadata.ResourceVersion of the referenced ConfigMap. This field is forbidden in Node.Spec, and required in Node.Status.", + Type: []string{"string"}, + Format: "", + }, + }, + "kubeletConfigKey": { + SchemaProps: spec.SchemaProps{ + Description: "KubeletConfigKey declares which key of the referenced ConfigMap corresponds to the KubeletConfiguration structure This field is required in all cases.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"namespace", "name", "kubeletConfigKey"}, + }, + }, + } +} + +func schema_k8sio_api_core_v1_ConfigMapProjection(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Adapts a ConfigMap into a projected volume.\n\nThe contents of the target ConfigMap's Data field will be presented in a projected volume as files using the keys in the Data field as the file names, unless the items element is populated with specific mappings of keys to paths. Note that this is identical to a configmap volume source without the default mode.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", + Type: []string{"string"}, + Format: "", + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.KeyToPath"), + }, + }, + }, + }, + }, + "optional": { + SchemaProps: spec.SchemaProps{ + Description: "Specify whether the ConfigMap or its keys must be defined", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.KeyToPath"}, + } +} + +func schema_k8sio_api_core_v1_ConfigMapVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Adapts a ConfigMap into a volume.\n\nThe contents of the target ConfigMap's Data field will be presented in a volume as files using the keys in the Data field as the file names, unless the items element is populated with specific mappings of keys to paths. ConfigMap volumes support ownership management and SELinux relabeling.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", + Type: []string{"string"}, + Format: "", + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.KeyToPath"), + }, + }, + }, + }, + }, + "defaultMode": { + SchemaProps: spec.SchemaProps{ + Description: "Optional: mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "optional": { + SchemaProps: spec.SchemaProps{ + Description: "Specify whether the ConfigMap or its keys must be defined", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.KeyToPath"}, + } +} + +func schema_k8sio_api_core_v1_Container(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "A single application container that you want to run within a pod.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name of the container specified as a DNS_LABEL. Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated.", + Type: []string{"string"}, + Format: "", + }, + }, + "image": { + SchemaProps: spec.SchemaProps{ + Description: "Docker image name. More info: https://kubernetes.io/docs/concepts/containers/images This field is optional to allow higher level config management to default or override container images in workload controllers like Deployments and StatefulSets.", + Type: []string{"string"}, + Format: "", + }, + }, + "command": { + SchemaProps: spec.SchemaProps{ + Description: "Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. \"$$(VAR_NAME)\" will produce the string literal \"$(VAR_NAME)\". Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "args": { + SchemaProps: spec.SchemaProps{ + Description: "Arguments to the entrypoint. The docker image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. \"$$(VAR_NAME)\" will produce the string literal \"$(VAR_NAME)\". Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "workingDir": { + SchemaProps: spec.SchemaProps{ + Description: "Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated.", + Type: []string{"string"}, + Format: "", + }, + }, + "ports": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-map-keys": []interface{}{ + "containerPort", + "protocol", + }, + "x-kubernetes-list-type": "map", + "x-kubernetes-patch-merge-key": "containerPort", + "x-kubernetes-patch-strategy": "merge", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "List of ports to expose from the container. Exposing a port here gives the system additional information about the network connections a container uses, but is primarily informational. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default \"0.0.0.0\" address inside a container will be accessible from the network. Cannot be updated.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.ContainerPort"), + }, + }, + }, + }, + }, + "envFrom": { + SchemaProps: spec.SchemaProps{ + Description: "List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.EnvFromSource"), + }, + }, + }, + }, + }, + "env": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-patch-merge-key": "name", + "x-kubernetes-patch-strategy": "merge", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "List of environment variables to set in the container. Cannot be updated.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.EnvVar"), + }, + }, + }, + }, + }, + "resources": { + SchemaProps: spec.SchemaProps{ + Description: "Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/", + Ref: ref("k8s.io/api/core/v1.ResourceRequirements"), + }, + }, + "volumeMounts": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-patch-merge-key": "mountPath", + "x-kubernetes-patch-strategy": "merge", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "Pod volumes to mount into the container's filesystem. Cannot be updated.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.VolumeMount"), + }, + }, + }, + }, + }, + "volumeDevices": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-patch-merge-key": "devicePath", + "x-kubernetes-patch-strategy": "merge", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "volumeDevices is the list of block devices to be used by the container.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.VolumeDevice"), + }, + }, + }, + }, + }, + "livenessProbe": { + SchemaProps: spec.SchemaProps{ + Description: "Periodic probe of container liveness. Container will be restarted if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes", + Ref: ref("k8s.io/api/core/v1.Probe"), + }, + }, + "readinessProbe": { + SchemaProps: spec.SchemaProps{ + Description: "Periodic probe of container service readiness. Container will be removed from service endpoints if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes", + Ref: ref("k8s.io/api/core/v1.Probe"), + }, + }, + "startupProbe": { + SchemaProps: spec.SchemaProps{ + Description: "StartupProbe indicates that the Pod has successfully initialized. If specified, no other probes are executed until this completes successfully. If this probe fails, the Pod will be restarted, just as if the livenessProbe failed. This can be used to provide different probe parameters at the beginning of a Pod's lifecycle, when it might take a long time to load data or warm a cache, than during steady-state operation. This cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes", + Ref: ref("k8s.io/api/core/v1.Probe"), + }, + }, + "lifecycle": { + SchemaProps: spec.SchemaProps{ + Description: "Actions that the management system should take in response to container lifecycle events. Cannot be updated.", + Ref: ref("k8s.io/api/core/v1.Lifecycle"), + }, + }, + "terminationMessagePath": { + SchemaProps: spec.SchemaProps{ + Description: "Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Will be truncated by the node if greater than 4096 bytes. The total message length across all containers will be limited to 12kb. Defaults to /dev/termination-log. Cannot be updated.", + Type: []string{"string"}, + Format: "", + }, + }, + "terminationMessagePolicy": { + SchemaProps: spec.SchemaProps{ + Description: "Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated.", + Type: []string{"string"}, + Format: "", + }, + }, + "imagePullPolicy": { + SchemaProps: spec.SchemaProps{ + Description: "Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images", + Type: []string{"string"}, + Format: "", + }, + }, + "securityContext": { + SchemaProps: spec.SchemaProps{ + Description: "SecurityContext defines the security options the container should be run with. If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext. More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/", + Ref: ref("k8s.io/api/core/v1.SecurityContext"), + }, + }, + "stdin": { + SchemaProps: spec.SchemaProps{ + Description: "Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF. Default is false.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "stdinOnce": { + SchemaProps: spec.SchemaProps{ + Description: "Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across multiple attach sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the first client attaches to stdin, and then remains open and accepts data until the client disconnects, at which time stdin is closed and remains closed until the container is restarted. If this flag is false, a container processes that reads from stdin will never receive an EOF. Default is false", + Type: []string{"boolean"}, + Format: "", + }, + }, + "tty": { + SchemaProps: spec.SchemaProps{ + Description: "Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. Default is false.", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + Required: []string{"name"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.ContainerPort", "k8s.io/api/core/v1.EnvFromSource", "k8s.io/api/core/v1.EnvVar", "k8s.io/api/core/v1.Lifecycle", "k8s.io/api/core/v1.Probe", "k8s.io/api/core/v1.ResourceRequirements", "k8s.io/api/core/v1.SecurityContext", "k8s.io/api/core/v1.VolumeDevice", "k8s.io/api/core/v1.VolumeMount"}, + } +} + +func schema_k8sio_api_core_v1_ContainerImage(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Describe a container image", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "names": { + SchemaProps: spec.SchemaProps{ + Description: "Names by which this image is known. e.g. [\"k8s.gcr.io/hyperkube:v1.0.7\", \"dockerhub.io/google_containers/hyperkube:v1.0.7\"]", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "sizeBytes": { + SchemaProps: spec.SchemaProps{ + Description: "The size of the image in bytes.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + }, + }, + }, + } +} + +func schema_k8sio_api_core_v1_ContainerPort(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ContainerPort represents a network port in a single container.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "If specified, this must be an IANA_SVC_NAME and unique within the pod. Each named port in a pod must have a unique name. Name for the port that can be referred to by services.", + Type: []string{"string"}, + Format: "", + }, + }, + "hostPort": { + SchemaProps: spec.SchemaProps{ + Description: "Number of port to expose on the host. If specified, this must be a valid port number, 0 < x < 65536. If HostNetwork is specified, this must match ContainerPort. Most containers do not need this.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "containerPort": { + SchemaProps: spec.SchemaProps{ + Description: "Number of port to expose on the pod's IP address. This must be a valid port number, 0 < x < 65536.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "protocol": { + SchemaProps: spec.SchemaProps{ + Description: "Protocol for port. Must be UDP, TCP, or SCTP. Defaults to \"TCP\".", + Type: []string{"string"}, + Format: "", + }, + }, + "hostIP": { + SchemaProps: spec.SchemaProps{ + Description: "What host IP to bind the external port to.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"containerPort"}, + }, + }, + } +} + +func schema_k8sio_api_core_v1_ContainerState(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ContainerState holds a possible state of container. Only one of its members may be specified. If none of them is specified, the default one is ContainerStateWaiting.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "waiting": { + SchemaProps: spec.SchemaProps{ + Description: "Details about a waiting container", + Ref: ref("k8s.io/api/core/v1.ContainerStateWaiting"), + }, + }, + "running": { + SchemaProps: spec.SchemaProps{ + Description: "Details about a running container", + Ref: ref("k8s.io/api/core/v1.ContainerStateRunning"), + }, + }, + "terminated": { + SchemaProps: spec.SchemaProps{ + Description: "Details about a terminated container", + Ref: ref("k8s.io/api/core/v1.ContainerStateTerminated"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.ContainerStateRunning", "k8s.io/api/core/v1.ContainerStateTerminated", "k8s.io/api/core/v1.ContainerStateWaiting"}, + } +} + +func schema_k8sio_api_core_v1_ContainerStateRunning(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ContainerStateRunning is a running state of a container.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "startedAt": { + SchemaProps: spec.SchemaProps{ + Description: "Time at which the container was last (re-)started", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_k8sio_api_core_v1_ContainerStateTerminated(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ContainerStateTerminated is a terminated state of a container.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "exitCode": { + SchemaProps: spec.SchemaProps{ + Description: "Exit status from the last termination of the container", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "signal": { + SchemaProps: spec.SchemaProps{ + Description: "Signal from the last termination of the container", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "reason": { + SchemaProps: spec.SchemaProps{ + Description: "(brief) reason from the last termination of the container", + Type: []string{"string"}, + Format: "", + }, + }, + "message": { + SchemaProps: spec.SchemaProps{ + Description: "Message regarding the last termination of the container", + Type: []string{"string"}, + Format: "", + }, + }, + "startedAt": { + SchemaProps: spec.SchemaProps{ + Description: "Time at which previous execution of the container started", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "finishedAt": { + SchemaProps: spec.SchemaProps{ + Description: "Time at which the container last terminated", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "containerID": { + SchemaProps: spec.SchemaProps{ + Description: "Container's ID in the format 'docker://'", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"exitCode"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_k8sio_api_core_v1_ContainerStateWaiting(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ContainerStateWaiting is a waiting state of a container.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "reason": { + SchemaProps: spec.SchemaProps{ + Description: "(brief) reason the container is not yet running.", + Type: []string{"string"}, + Format: "", + }, + }, + "message": { + SchemaProps: spec.SchemaProps{ + Description: "Message regarding why the container is not yet running.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_k8sio_api_core_v1_ContainerStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ContainerStatus contains details for the current status of this container.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "This must be a DNS_LABEL. Each container in a pod must have a unique name. Cannot be updated.", + Type: []string{"string"}, + Format: "", + }, + }, + "state": { + SchemaProps: spec.SchemaProps{ + Description: "Details about the container's current condition.", + Ref: ref("k8s.io/api/core/v1.ContainerState"), + }, + }, + "lastState": { + SchemaProps: spec.SchemaProps{ + Description: "Details about the container's last termination condition.", + Ref: ref("k8s.io/api/core/v1.ContainerState"), + }, + }, + "ready": { + SchemaProps: spec.SchemaProps{ + Description: "Specifies whether the container has passed its readiness probe.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "restartCount": { + SchemaProps: spec.SchemaProps{ + Description: "The number of times the container has been restarted.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "image": { + SchemaProps: spec.SchemaProps{ + Description: "The image the container is running. More info: https://kubernetes.io/docs/concepts/containers/images.", + Type: []string{"string"}, + Format: "", + }, + }, + "imageID": { + SchemaProps: spec.SchemaProps{ + Description: "ImageID of the container's image.", + Type: []string{"string"}, + Format: "", + }, + }, + "containerID": { + SchemaProps: spec.SchemaProps{ + Description: "Container's ID in the format 'docker://'.", + Type: []string{"string"}, + Format: "", + }, + }, + "started": { + SchemaProps: spec.SchemaProps{ + Description: "Specifies whether the container has passed its startup probe. Initialized as false, becomes true after startupProbe is considered successful. Resets to false when the container is restarted, or if kubelet loses state temporarily. Is always true when no startupProbe is defined.", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + Required: []string{"name", "ready", "restartCount", "image", "imageID"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.ContainerState"}, + } +} + +func schema_k8sio_api_core_v1_DaemonEndpoint(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DaemonEndpoint contains information about a single Daemon endpoint.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "Port": { + SchemaProps: spec.SchemaProps{ + Description: "Port number of the given endpoint.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + Required: []string{"Port"}, + }, + }, + } +} + +func schema_k8sio_api_core_v1_DownwardAPIProjection(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Represents downward API info for projecting into a projected volume. Note that this is identical to a downwardAPI volume source without the default mode.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "items": { + SchemaProps: spec.SchemaProps{ + Description: "Items is a list of DownwardAPIVolume file", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.DownwardAPIVolumeFile"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.DownwardAPIVolumeFile"}, + } +} + +func schema_k8sio_api_core_v1_DownwardAPIVolumeFile(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DownwardAPIVolumeFile represents information to create the file containing the pod field", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "path": { + SchemaProps: spec.SchemaProps{ + Description: "Required: Path is the relative path name of the file to be created. Must not be absolute or contain the '..' path. Must be utf-8 encoded. The first item of the relative path must not start with '..'", + Type: []string{"string"}, + Format: "", + }, + }, + "fieldRef": { + SchemaProps: spec.SchemaProps{ + Description: "Required: Selects a field of the pod: only annotations, labels, name and namespace are supported.", + Ref: ref("k8s.io/api/core/v1.ObjectFieldSelector"), + }, + }, + "resourceFieldRef": { + SchemaProps: spec.SchemaProps{ + Description: "Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.", + Ref: ref("k8s.io/api/core/v1.ResourceFieldSelector"), + }, + }, + "mode": { + SchemaProps: spec.SchemaProps{ + Description: "Optional: mode bits used to set permissions on this file, must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + Required: []string{"path"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.ObjectFieldSelector", "k8s.io/api/core/v1.ResourceFieldSelector"}, + } +} + +func schema_k8sio_api_core_v1_DownwardAPIVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DownwardAPIVolumeSource represents a volume containing downward API info. Downward API volumes support ownership management and SELinux relabeling.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "items": { + SchemaProps: spec.SchemaProps{ + Description: "Items is a list of downward API volume file", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.DownwardAPIVolumeFile"), + }, + }, + }, + }, + }, + "defaultMode": { + SchemaProps: spec.SchemaProps{ + Description: "Optional: mode bits to use on created files by default. Must be a Optional: mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.DownwardAPIVolumeFile"}, + } +} + +func schema_k8sio_api_core_v1_EmptyDirVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Represents an empty directory for a pod. Empty directory volumes support ownership management and SELinux relabeling.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "medium": { + SchemaProps: spec.SchemaProps{ + Description: "What type of storage medium should back this directory. The default is \"\" which means to use the node's default medium. Must be an empty string (default) or Memory. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir", + Type: []string{"string"}, + Format: "", + }, + }, + "sizeLimit": { + SchemaProps: spec.SchemaProps{ + Description: "Total amount of local storage required for this EmptyDir volume. The size limit is also applicable for memory medium. The maximum usage on memory medium EmptyDir would be the minimum value between the SizeLimit specified here and the sum of memory limits of all containers in a pod. The default is nil which means that the limit is undefined. More info: http://kubernetes.io/docs/user-guide/volumes#emptydir", + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + } +} + +func schema_k8sio_api_core_v1_EndpointAddress(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "EndpointAddress is a tuple that describes single IP address.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "ip": { + SchemaProps: spec.SchemaProps{ + Description: "The IP of this endpoint. May not be loopback (127.0.0.0/8), link-local (169.254.0.0/16), or link-local multicast ((224.0.0.0/24). IPv6 is also accepted but not fully supported on all platforms. Also, certain kubernetes components, like kube-proxy, are not IPv6 ready.", + Type: []string{"string"}, + Format: "", + }, + }, + "hostname": { + SchemaProps: spec.SchemaProps{ + Description: "The Hostname of this endpoint", + Type: []string{"string"}, + Format: "", + }, + }, + "nodeName": { + SchemaProps: spec.SchemaProps{ + Description: "Optional: Node hosting this endpoint. This can be used to determine endpoints local to a node.", + Type: []string{"string"}, + Format: "", + }, + }, + "targetRef": { + SchemaProps: spec.SchemaProps{ + Description: "Reference to object providing the endpoint.", + Ref: ref("k8s.io/api/core/v1.ObjectReference"), + }, + }, + }, + Required: []string{"ip"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.ObjectReference"}, + } +} + +func schema_k8sio_api_core_v1_EndpointPort(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "EndpointPort is a tuple that describes a single port.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "The name of this port. This must match the 'name' field in the corresponding ServicePort. Must be a DNS_LABEL. Optional only if one port is defined.", + Type: []string{"string"}, + Format: "", + }, + }, + "port": { + SchemaProps: spec.SchemaProps{ + Description: "The port number of the endpoint.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "protocol": { + SchemaProps: spec.SchemaProps{ + Description: "The IP protocol for this port. Must be UDP, TCP, or SCTP. Default is TCP.", + Type: []string{"string"}, + Format: "", + }, + }, + "appProtocol": { + SchemaProps: spec.SchemaProps{ + Description: "The application protocol for this port. This field follows standard Kubernetes label syntax. Un-prefixed names are reserved for IANA standard service names (as per RFC-6335 and http://www.iana.org/assignments/service-names). Non-standard protocols should use prefixed names such as mycompany.com/my-custom-protocol.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"port"}, + }, + }, + } +} + +func schema_k8sio_api_core_v1_EndpointSubset(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "EndpointSubset is a group of addresses with a common set of ports. The expanded set of endpoints is the Cartesian product of Addresses x Ports. For example, given:\n {\n Addresses: [{\"ip\": \"10.10.1.1\"}, {\"ip\": \"10.10.2.2\"}],\n Ports: [{\"name\": \"a\", \"port\": 8675}, {\"name\": \"b\", \"port\": 309}]\n }\nThe resulting set of endpoints can be viewed as:\n a: [ 10.10.1.1:8675, 10.10.2.2:8675 ],\n b: [ 10.10.1.1:309, 10.10.2.2:309 ]", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "addresses": { + SchemaProps: spec.SchemaProps{ + Description: "IP addresses which offer the related ports that are marked as ready. These endpoints should be considered safe for load balancers and clients to utilize.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.EndpointAddress"), + }, + }, + }, + }, + }, + "notReadyAddresses": { + SchemaProps: spec.SchemaProps{ + Description: "IP addresses which offer the related ports but are not currently marked as ready because they have not yet finished starting, have recently failed a readiness check, or have recently failed a liveness check.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.EndpointAddress"), + }, + }, + }, + }, + }, + "ports": { + SchemaProps: spec.SchemaProps{ + Description: "Port numbers available on the related IP addresses.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.EndpointPort"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.EndpointAddress", "k8s.io/api/core/v1.EndpointPort"}, + } +} + +func schema_k8sio_api_core_v1_Endpoints(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Endpoints is a collection of endpoints that implement the actual service. Example:\n Name: \"mysvc\",\n Subsets: [\n {\n Addresses: [{\"ip\": \"10.10.1.1\"}, {\"ip\": \"10.10.2.2\"}],\n Ports: [{\"name\": \"a\", \"port\": 8675}, {\"name\": \"b\", \"port\": 309}]\n },\n {\n Addresses: [{\"ip\": \"10.10.3.3\"}],\n Ports: [{\"name\": \"a\", \"port\": 93}, {\"name\": \"b\", \"port\": 76}]\n },\n ]", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "subsets": { + SchemaProps: spec.SchemaProps{ + Description: "The set of all endpoints is the union of all subsets. Addresses are placed into subsets according to the IPs they share. A single address with multiple ports, some of which are ready and some of which are not (because they come from different containers) will result in the address being displayed in different subsets for the different ports. No address will appear in both Addresses and NotReadyAddresses in the same subset. Sets of addresses and ports that comprise a service.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.EndpointSubset"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.EndpointSubset", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_core_v1_EndpointsList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "EndpointsList is a list of endpoints.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "List of endpoints.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.Endpoints"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.Endpoints", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_core_v1_EnvFromSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "EnvFromSource represents the source of a set of ConfigMaps", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "prefix": { + SchemaProps: spec.SchemaProps{ + Description: "An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER.", + Type: []string{"string"}, + Format: "", + }, + }, + "configMapRef": { + SchemaProps: spec.SchemaProps{ + Description: "The ConfigMap to select from", + Ref: ref("k8s.io/api/core/v1.ConfigMapEnvSource"), + }, + }, + "secretRef": { + SchemaProps: spec.SchemaProps{ + Description: "The Secret to select from", + Ref: ref("k8s.io/api/core/v1.SecretEnvSource"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.ConfigMapEnvSource", "k8s.io/api/core/v1.SecretEnvSource"}, + } +} + +func schema_k8sio_api_core_v1_EnvVar(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "EnvVar represents an environment variable present in a Container.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name of the environment variable. Must be a C_IDENTIFIER.", + Type: []string{"string"}, + Format: "", + }, + }, + "value": { + SchemaProps: spec.SchemaProps{ + Description: "Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. \"$$(VAR_NAME)\" will produce the string literal \"$(VAR_NAME)\". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to \"\".", + Type: []string{"string"}, + Format: "", + }, + }, + "valueFrom": { + SchemaProps: spec.SchemaProps{ + Description: "Source for the environment variable's value. Cannot be used if value is not empty.", + Ref: ref("k8s.io/api/core/v1.EnvVarSource"), + }, + }, + }, + Required: []string{"name"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.EnvVarSource"}, + } +} + +func schema_k8sio_api_core_v1_EnvVarSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "EnvVarSource represents a source for the value of an EnvVar.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "fieldRef": { + SchemaProps: spec.SchemaProps{ + Description: "Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.", + Ref: ref("k8s.io/api/core/v1.ObjectFieldSelector"), + }, + }, + "resourceFieldRef": { + SchemaProps: spec.SchemaProps{ + Description: "Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.", + Ref: ref("k8s.io/api/core/v1.ResourceFieldSelector"), + }, + }, + "configMapKeyRef": { + SchemaProps: spec.SchemaProps{ + Description: "Selects a key of a ConfigMap.", + Ref: ref("k8s.io/api/core/v1.ConfigMapKeySelector"), + }, + }, + "secretKeyRef": { + SchemaProps: spec.SchemaProps{ + Description: "Selects a key of a secret in the pod's namespace", + Ref: ref("k8s.io/api/core/v1.SecretKeySelector"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.ConfigMapKeySelector", "k8s.io/api/core/v1.ObjectFieldSelector", "k8s.io/api/core/v1.ResourceFieldSelector", "k8s.io/api/core/v1.SecretKeySelector"}, + } +} + +func schema_k8sio_api_core_v1_EphemeralContainer(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "An EphemeralContainer is a temporary container that you may add to an existing Pod for user-initiated activities such as debugging. Ephemeral containers have no resource or scheduling guarantees, and they will not be restarted when they exit or when a Pod is removed or restarted. The kubelet may evict a Pod if an ephemeral container causes the Pod to exceed its resource allocation.\n\nTo add an ephemeral container, use the ephemeralcontainers subresource of an existing Pod. Ephemeral containers may not be removed or restarted.\n\nThis is a beta feature available on clusters that haven't disabled the EphemeralContainers feature gate.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name of the ephemeral container specified as a DNS_LABEL. This name must be unique among all containers, init containers and ephemeral containers.", + Type: []string{"string"}, + Format: "", + }, + }, + "image": { + SchemaProps: spec.SchemaProps{ + Description: "Docker image name. More info: https://kubernetes.io/docs/concepts/containers/images", + Type: []string{"string"}, + Format: "", + }, + }, + "command": { + SchemaProps: spec.SchemaProps{ + Description: "Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. \"$$(VAR_NAME)\" will produce the string literal \"$(VAR_NAME)\". Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "args": { + SchemaProps: spec.SchemaProps{ + Description: "Arguments to the entrypoint. The docker image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. \"$$(VAR_NAME)\" will produce the string literal \"$(VAR_NAME)\". Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "workingDir": { + SchemaProps: spec.SchemaProps{ + Description: "Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated.", + Type: []string{"string"}, + Format: "", + }, + }, + "ports": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-map-keys": []interface{}{ + "containerPort", + "protocol", + }, + "x-kubernetes-list-type": "map", + "x-kubernetes-patch-merge-key": "containerPort", + "x-kubernetes-patch-strategy": "merge", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "Ports are not allowed for ephemeral containers.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.ContainerPort"), + }, + }, + }, + }, + }, + "envFrom": { + SchemaProps: spec.SchemaProps{ + Description: "List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.EnvFromSource"), + }, + }, + }, + }, + }, + "env": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-patch-merge-key": "name", + "x-kubernetes-patch-strategy": "merge", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "List of environment variables to set in the container. Cannot be updated.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.EnvVar"), + }, + }, + }, + }, + }, + "resources": { + SchemaProps: spec.SchemaProps{ + Description: "Resources are not allowed for ephemeral containers. Ephemeral containers use spare resources already allocated to the pod.", + Ref: ref("k8s.io/api/core/v1.ResourceRequirements"), + }, + }, + "volumeMounts": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-patch-merge-key": "mountPath", + "x-kubernetes-patch-strategy": "merge", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "Pod volumes to mount into the container's filesystem. Subpath mounts are not allowed for ephemeral containers. Cannot be updated.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.VolumeMount"), + }, + }, + }, + }, + }, + "volumeDevices": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-patch-merge-key": "devicePath", + "x-kubernetes-patch-strategy": "merge", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "volumeDevices is the list of block devices to be used by the container.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.VolumeDevice"), + }, + }, + }, + }, + }, + "livenessProbe": { + SchemaProps: spec.SchemaProps{ + Description: "Probes are not allowed for ephemeral containers.", + Ref: ref("k8s.io/api/core/v1.Probe"), + }, + }, + "readinessProbe": { + SchemaProps: spec.SchemaProps{ + Description: "Probes are not allowed for ephemeral containers.", + Ref: ref("k8s.io/api/core/v1.Probe"), + }, + }, + "startupProbe": { + SchemaProps: spec.SchemaProps{ + Description: "Probes are not allowed for ephemeral containers.", + Ref: ref("k8s.io/api/core/v1.Probe"), + }, + }, + "lifecycle": { + SchemaProps: spec.SchemaProps{ + Description: "Lifecycle is not allowed for ephemeral containers.", + Ref: ref("k8s.io/api/core/v1.Lifecycle"), + }, + }, + "terminationMessagePath": { + SchemaProps: spec.SchemaProps{ + Description: "Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Will be truncated by the node if greater than 4096 bytes. The total message length across all containers will be limited to 12kb. Defaults to /dev/termination-log. Cannot be updated.", + Type: []string{"string"}, + Format: "", + }, + }, + "terminationMessagePolicy": { + SchemaProps: spec.SchemaProps{ + Description: "Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated.", + Type: []string{"string"}, + Format: "", + }, + }, + "imagePullPolicy": { + SchemaProps: spec.SchemaProps{ + Description: "Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images", + Type: []string{"string"}, + Format: "", + }, + }, + "securityContext": { + SchemaProps: spec.SchemaProps{ + Description: "Optional: SecurityContext defines the security options the ephemeral container should be run with. If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext.", + Ref: ref("k8s.io/api/core/v1.SecurityContext"), + }, + }, + "stdin": { + SchemaProps: spec.SchemaProps{ + Description: "Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF. Default is false.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "stdinOnce": { + SchemaProps: spec.SchemaProps{ + Description: "Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across multiple attach sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the first client attaches to stdin, and then remains open and accepts data until the client disconnects, at which time stdin is closed and remains closed until the container is restarted. If this flag is false, a container processes that reads from stdin will never receive an EOF. Default is false", + Type: []string{"boolean"}, + Format: "", + }, + }, + "tty": { + SchemaProps: spec.SchemaProps{ + Description: "Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. Default is false.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "targetContainerName": { + SchemaProps: spec.SchemaProps{ + Description: "If set, the name of the container from PodSpec that this ephemeral container targets. The ephemeral container will be run in the namespaces (IPC, PID, etc) of this container. If not set then the ephemeral container uses the namespaces configured in the Pod spec.\n\nThe container runtime must implement support for this feature. If the runtime does not support namespace targeting then the result of setting this field is undefined.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"name"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.ContainerPort", "k8s.io/api/core/v1.EnvFromSource", "k8s.io/api/core/v1.EnvVar", "k8s.io/api/core/v1.Lifecycle", "k8s.io/api/core/v1.Probe", "k8s.io/api/core/v1.ResourceRequirements", "k8s.io/api/core/v1.SecurityContext", "k8s.io/api/core/v1.VolumeDevice", "k8s.io/api/core/v1.VolumeMount"}, + } +} + +func schema_k8sio_api_core_v1_EphemeralContainerCommon(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "EphemeralContainerCommon is a copy of all fields in Container to be inlined in EphemeralContainer. This separate type allows easy conversion from EphemeralContainer to Container and allows separate documentation for the fields of EphemeralContainer. When a new field is added to Container it must be added here as well.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name of the ephemeral container specified as a DNS_LABEL. This name must be unique among all containers, init containers and ephemeral containers.", + Type: []string{"string"}, + Format: "", + }, + }, + "image": { + SchemaProps: spec.SchemaProps{ + Description: "Docker image name. More info: https://kubernetes.io/docs/concepts/containers/images", + Type: []string{"string"}, + Format: "", + }, + }, + "command": { + SchemaProps: spec.SchemaProps{ + Description: "Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. \"$$(VAR_NAME)\" will produce the string literal \"$(VAR_NAME)\". Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "args": { + SchemaProps: spec.SchemaProps{ + Description: "Arguments to the entrypoint. The docker image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. \"$$(VAR_NAME)\" will produce the string literal \"$(VAR_NAME)\". Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "workingDir": { + SchemaProps: spec.SchemaProps{ + Description: "Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated.", + Type: []string{"string"}, + Format: "", + }, + }, + "ports": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-map-keys": []interface{}{ + "containerPort", + "protocol", + }, + "x-kubernetes-list-type": "map", + "x-kubernetes-patch-merge-key": "containerPort", + "x-kubernetes-patch-strategy": "merge", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "Ports are not allowed for ephemeral containers.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.ContainerPort"), + }, + }, + }, + }, + }, + "envFrom": { + SchemaProps: spec.SchemaProps{ + Description: "List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.EnvFromSource"), + }, + }, + }, + }, + }, + "env": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-patch-merge-key": "name", + "x-kubernetes-patch-strategy": "merge", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "List of environment variables to set in the container. Cannot be updated.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.EnvVar"), + }, + }, + }, + }, + }, + "resources": { + SchemaProps: spec.SchemaProps{ + Description: "Resources are not allowed for ephemeral containers. Ephemeral containers use spare resources already allocated to the pod.", + Ref: ref("k8s.io/api/core/v1.ResourceRequirements"), + }, + }, + "volumeMounts": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-patch-merge-key": "mountPath", + "x-kubernetes-patch-strategy": "merge", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "Pod volumes to mount into the container's filesystem. Subpath mounts are not allowed for ephemeral containers. Cannot be updated.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.VolumeMount"), + }, + }, + }, + }, + }, + "volumeDevices": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-patch-merge-key": "devicePath", + "x-kubernetes-patch-strategy": "merge", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "volumeDevices is the list of block devices to be used by the container.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.VolumeDevice"), + }, + }, + }, + }, + }, + "livenessProbe": { + SchemaProps: spec.SchemaProps{ + Description: "Probes are not allowed for ephemeral containers.", + Ref: ref("k8s.io/api/core/v1.Probe"), + }, + }, + "readinessProbe": { + SchemaProps: spec.SchemaProps{ + Description: "Probes are not allowed for ephemeral containers.", + Ref: ref("k8s.io/api/core/v1.Probe"), + }, + }, + "startupProbe": { + SchemaProps: spec.SchemaProps{ + Description: "Probes are not allowed for ephemeral containers.", + Ref: ref("k8s.io/api/core/v1.Probe"), + }, + }, + "lifecycle": { + SchemaProps: spec.SchemaProps{ + Description: "Lifecycle is not allowed for ephemeral containers.", + Ref: ref("k8s.io/api/core/v1.Lifecycle"), + }, + }, + "terminationMessagePath": { + SchemaProps: spec.SchemaProps{ + Description: "Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Will be truncated by the node if greater than 4096 bytes. The total message length across all containers will be limited to 12kb. Defaults to /dev/termination-log. Cannot be updated.", + Type: []string{"string"}, + Format: "", + }, + }, + "terminationMessagePolicy": { + SchemaProps: spec.SchemaProps{ + Description: "Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated.", + Type: []string{"string"}, + Format: "", + }, + }, + "imagePullPolicy": { + SchemaProps: spec.SchemaProps{ + Description: "Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images", + Type: []string{"string"}, + Format: "", + }, + }, + "securityContext": { + SchemaProps: spec.SchemaProps{ + Description: "Optional: SecurityContext defines the security options the ephemeral container should be run with. If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext.", + Ref: ref("k8s.io/api/core/v1.SecurityContext"), + }, + }, + "stdin": { + SchemaProps: spec.SchemaProps{ + Description: "Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF. Default is false.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "stdinOnce": { + SchemaProps: spec.SchemaProps{ + Description: "Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across multiple attach sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the first client attaches to stdin, and then remains open and accepts data until the client disconnects, at which time stdin is closed and remains closed until the container is restarted. If this flag is false, a container processes that reads from stdin will never receive an EOF. Default is false", + Type: []string{"boolean"}, + Format: "", + }, + }, + "tty": { + SchemaProps: spec.SchemaProps{ + Description: "Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. Default is false.", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + Required: []string{"name"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.ContainerPort", "k8s.io/api/core/v1.EnvFromSource", "k8s.io/api/core/v1.EnvVar", "k8s.io/api/core/v1.Lifecycle", "k8s.io/api/core/v1.Probe", "k8s.io/api/core/v1.ResourceRequirements", "k8s.io/api/core/v1.SecurityContext", "k8s.io/api/core/v1.VolumeDevice", "k8s.io/api/core/v1.VolumeMount"}, + } +} + +func schema_k8sio_api_core_v1_EphemeralVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Represents an ephemeral volume that is handled by a normal storage driver.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "volumeClaimTemplate": { + SchemaProps: spec.SchemaProps{ + Description: "Will be used to create a stand-alone PVC to provision the volume. The pod in which this EphemeralVolumeSource is embedded will be the owner of the PVC, i.e. the PVC will be deleted together with the pod. The name of the PVC will be `-` where `` is the name from the `PodSpec.Volumes` array entry. Pod validation will reject the pod if the concatenated name is not valid for a PVC (for example, too long).\n\nAn existing PVC with that name that is not owned by the pod will *not* be used for the pod to avoid using an unrelated volume by mistake. Starting the pod is then blocked until the unrelated PVC is removed. If such a pre-created PVC is meant to be used by the pod, the PVC has to updated with an owner reference to the pod once the pod exists. Normally this should not be necessary, but it may be useful when manually reconstructing a broken cluster.\n\nThis field is read-only and no changes will be made by Kubernetes to the PVC after it has been created.\n\nRequired, must not be nil.", + Ref: ref("k8s.io/api/core/v1.PersistentVolumeClaimTemplate"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.PersistentVolumeClaimTemplate"}, + } +} + +func schema_k8sio_api_core_v1_Event(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Event is a report of an event somewhere in the cluster. Events have a limited retention time and triggers and messages may evolve with time. Event consumers should not rely on the timing of an event with a given Reason reflecting a consistent underlying trigger, or the continued existence of events with that Reason. Events should be treated as informative, best-effort, supplemental data.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "involvedObject": { + SchemaProps: spec.SchemaProps{ + Description: "The object that this event is about.", + Ref: ref("k8s.io/api/core/v1.ObjectReference"), + }, + }, + "reason": { + SchemaProps: spec.SchemaProps{ + Description: "This should be a short, machine understandable string that gives the reason for the transition into the object's current status.", + Type: []string{"string"}, + Format: "", + }, + }, + "message": { + SchemaProps: spec.SchemaProps{ + Description: "A human-readable description of the status of this operation.", + Type: []string{"string"}, + Format: "", + }, + }, + "source": { + SchemaProps: spec.SchemaProps{ + Description: "The component reporting this event. Should be a short machine understandable string.", + Ref: ref("k8s.io/api/core/v1.EventSource"), + }, + }, + "firstTimestamp": { + SchemaProps: spec.SchemaProps{ + Description: "The time at which the event was first recorded. (Time of server receipt is in TypeMeta.)", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "lastTimestamp": { + SchemaProps: spec.SchemaProps{ + Description: "The time at which the most recent occurrence of this event was recorded.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "count": { + SchemaProps: spec.SchemaProps{ + Description: "The number of times this event has occurred.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "type": { + SchemaProps: spec.SchemaProps{ + Description: "Type of this event (Normal, Warning), new types could be added in the future", + Type: []string{"string"}, + Format: "", + }, + }, + "eventTime": { + SchemaProps: spec.SchemaProps{ + Description: "Time when this Event was first observed.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime"), + }, + }, + "series": { + SchemaProps: spec.SchemaProps{ + Description: "Data about the Event series this event represents or nil if it's a singleton Event.", + Ref: ref("k8s.io/api/core/v1.EventSeries"), + }, + }, + "action": { + SchemaProps: spec.SchemaProps{ + Description: "What action was taken/failed regarding to the Regarding object.", + Type: []string{"string"}, + Format: "", + }, + }, + "related": { + SchemaProps: spec.SchemaProps{ + Description: "Optional secondary object for more complex actions.", + Ref: ref("k8s.io/api/core/v1.ObjectReference"), + }, + }, + "reportingComponent": { + SchemaProps: spec.SchemaProps{ + Description: "Name of the controller that emitted this Event, e.g. `kubernetes.io/kubelet`.", + Type: []string{"string"}, + Format: "", + }, + }, + "reportingInstance": { + SchemaProps: spec.SchemaProps{ + Description: "ID of the controller instance, e.g. `kubelet-xyzf`.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"metadata", "involvedObject"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.EventSeries", "k8s.io/api/core/v1.EventSource", "k8s.io/api/core/v1.ObjectReference", "k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_k8sio_api_core_v1_EventList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "EventList is a list of events.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "List of events", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.Event"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.Event", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_core_v1_EventSeries(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "EventSeries contain information on series of events, i.e. thing that was/is happening continuously for some time.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "count": { + SchemaProps: spec.SchemaProps{ + Description: "Number of occurrences in this series up to the last heartbeat time", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "lastObservedTime": { + SchemaProps: spec.SchemaProps{ + Description: "Time of the last occurrence observed", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime"}, + } +} + +func schema_k8sio_api_core_v1_EventSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "EventSource contains information for an event.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "component": { + SchemaProps: spec.SchemaProps{ + Description: "Component from which the event is generated.", + Type: []string{"string"}, + Format: "", + }, + }, + "host": { + SchemaProps: spec.SchemaProps{ + Description: "Node name on which the event is generated.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_k8sio_api_core_v1_ExecAction(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ExecAction describes a \"run in container\" action.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "command": { + SchemaProps: spec.SchemaProps{ + Description: "Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + }, + }, + } +} + +func schema_k8sio_api_core_v1_FCVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Represents a Fibre Channel volume. Fibre Channel volumes can only be mounted as read/write once. Fibre Channel volumes support ownership management and SELinux relabeling.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "targetWWNs": { + SchemaProps: spec.SchemaProps{ + Description: "Optional: FC target worldwide names (WWNs)", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "lun": { + SchemaProps: spec.SchemaProps{ + Description: "Optional: FC target lun number", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "fsType": { + SchemaProps: spec.SchemaProps{ + Description: "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.", + Type: []string{"string"}, + Format: "", + }, + }, + "readOnly": { + SchemaProps: spec.SchemaProps{ + Description: "Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "wwids": { + SchemaProps: spec.SchemaProps{ + Description: "Optional: FC volume world wide identifiers (wwids) Either wwids or combination of targetWWNs and lun must be set, but not both simultaneously.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + }, + }, + } +} + +func schema_k8sio_api_core_v1_FlexPersistentVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "FlexPersistentVolumeSource represents a generic persistent volume resource that is provisioned/attached using an exec based plugin.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "driver": { + SchemaProps: spec.SchemaProps{ + Description: "Driver is the name of the driver to use for this volume.", + Type: []string{"string"}, + Format: "", + }, + }, + "fsType": { + SchemaProps: spec.SchemaProps{ + Description: "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". The default filesystem depends on FlexVolume script.", + Type: []string{"string"}, + Format: "", + }, + }, + "secretRef": { + SchemaProps: spec.SchemaProps{ + Description: "Optional: SecretRef is reference to the secret object containing sensitive information to pass to the plugin scripts. This may be empty if no secret object is specified. If the secret object contains more than one secret, all secrets are passed to the plugin scripts.", + Ref: ref("k8s.io/api/core/v1.SecretReference"), + }, + }, + "readOnly": { + SchemaProps: spec.SchemaProps{ + Description: "Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "options": { + SchemaProps: spec.SchemaProps{ + Description: "Optional: Extra command options if any.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + Required: []string{"driver"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.SecretReference"}, + } +} + +func schema_k8sio_api_core_v1_FlexVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "driver": { + SchemaProps: spec.SchemaProps{ + Description: "Driver is the name of the driver to use for this volume.", + Type: []string{"string"}, + Format: "", + }, + }, + "fsType": { + SchemaProps: spec.SchemaProps{ + Description: "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". The default filesystem depends on FlexVolume script.", + Type: []string{"string"}, + Format: "", + }, + }, + "secretRef": { + SchemaProps: spec.SchemaProps{ + Description: "Optional: SecretRef is reference to the secret object containing sensitive information to pass to the plugin scripts. This may be empty if no secret object is specified. If the secret object contains more than one secret, all secrets are passed to the plugin scripts.", + Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), + }, + }, + "readOnly": { + SchemaProps: spec.SchemaProps{ + Description: "Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "options": { + SchemaProps: spec.SchemaProps{ + Description: "Optional: Extra command options if any.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + Required: []string{"driver"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.LocalObjectReference"}, + } +} + +func schema_k8sio_api_core_v1_FlockerVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Represents a Flocker volume mounted by the Flocker agent. One and only one of datasetName and datasetUUID should be set. Flocker volumes do not support ownership management or SELinux relabeling.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "datasetName": { + SchemaProps: spec.SchemaProps{ + Description: "Name of the dataset stored as metadata -> name on the dataset for Flocker should be considered as deprecated", + Type: []string{"string"}, + Format: "", + }, + }, + "datasetUUID": { + SchemaProps: spec.SchemaProps{ + Description: "UUID of the dataset. This is unique identifier of a Flocker dataset", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_k8sio_api_core_v1_GCEPersistentDiskVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Represents a Persistent Disk resource in Google Compute Engine.\n\nA GCE PD must exist before mounting to a container. The disk must also be in the same GCE project and zone as the kubelet. A GCE PD can only be mounted as read/write once or read-only many times. GCE PDs support ownership management and SELinux relabeling.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "pdName": { + SchemaProps: spec.SchemaProps{ + Description: "Unique name of the PD resource in GCE. Used to identify the disk in GCE. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk", + Type: []string{"string"}, + Format: "", + }, + }, + "fsType": { + SchemaProps: spec.SchemaProps{ + Description: "Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk", + Type: []string{"string"}, + Format: "", + }, + }, + "partition": { + SchemaProps: spec.SchemaProps{ + Description: "The partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as \"1\". Similarly, the volume partition for /dev/sda is \"0\" (or you can leave the property empty). More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "readOnly": { + SchemaProps: spec.SchemaProps{ + Description: "ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + Required: []string{"pdName"}, + }, + }, + } +} + +func schema_k8sio_api_core_v1_GRPCAction(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "port": { + SchemaProps: spec.SchemaProps{ + Description: "Port number of the gRPC service. Number must be in the range 1 to 65535.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "service": { + SchemaProps: spec.SchemaProps{ + Description: "Service is the name of the service to place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md).\n\nIf this is not specified, the default behavior is defined by gRPC.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"port"}, + }, + }, + } +} + +func schema_k8sio_api_core_v1_GitRepoVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Represents a volume that is populated with the contents of a git repository. Git repo volumes do not support ownership management. Git repo volumes support SELinux relabeling.\n\nDEPRECATED: GitRepo is deprecated. To provision a container with a git repo, mount an EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir into the Pod's container.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "repository": { + SchemaProps: spec.SchemaProps{ + Description: "Repository URL", + Type: []string{"string"}, + Format: "", + }, + }, + "revision": { + SchemaProps: spec.SchemaProps{ + Description: "Commit hash for the specified revision.", + Type: []string{"string"}, + Format: "", + }, + }, + "directory": { + SchemaProps: spec.SchemaProps{ + Description: "Target directory name. Must not contain or start with '..'. If '.' is supplied, the volume directory will be the git repository. Otherwise, if specified, the volume will contain the git repository in the subdirectory with the given name.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"repository"}, + }, + }, + } +} + +func schema_k8sio_api_core_v1_GlusterfsPersistentVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Represents a Glusterfs mount that lasts the lifetime of a pod. Glusterfs volumes do not support ownership management or SELinux relabeling.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "endpoints": { + SchemaProps: spec.SchemaProps{ + Description: "EndpointsName is the endpoint name that details Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod", + Type: []string{"string"}, + Format: "", + }, + }, + "path": { + SchemaProps: spec.SchemaProps{ + Description: "Path is the Glusterfs volume path. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod", + Type: []string{"string"}, + Format: "", + }, + }, + "readOnly": { + SchemaProps: spec.SchemaProps{ + Description: "ReadOnly here will force the Glusterfs volume to be mounted with read-only permissions. Defaults to false. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod", + Type: []string{"boolean"}, + Format: "", + }, + }, + "endpointsNamespace": { + SchemaProps: spec.SchemaProps{ + Description: "EndpointsNamespace is the namespace that contains Glusterfs endpoint. If this field is empty, the EndpointNamespace defaults to the same namespace as the bound PVC. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"endpoints", "path"}, + }, + }, + } +} + +func schema_k8sio_api_core_v1_GlusterfsVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Represents a Glusterfs mount that lasts the lifetime of a pod. Glusterfs volumes do not support ownership management or SELinux relabeling.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "endpoints": { + SchemaProps: spec.SchemaProps{ + Description: "EndpointsName is the endpoint name that details Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod", + Type: []string{"string"}, + Format: "", + }, + }, + "path": { + SchemaProps: spec.SchemaProps{ + Description: "Path is the Glusterfs volume path. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod", + Type: []string{"string"}, + Format: "", + }, + }, + "readOnly": { + SchemaProps: spec.SchemaProps{ + Description: "ReadOnly here will force the Glusterfs volume to be mounted with read-only permissions. Defaults to false. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + Required: []string{"endpoints", "path"}, + }, + }, + } +} + +func schema_k8sio_api_core_v1_HTTPGetAction(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "HTTPGetAction describes an action based on HTTP Get requests.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "path": { + SchemaProps: spec.SchemaProps{ + Description: "Path to access on the HTTP server.", + Type: []string{"string"}, + Format: "", + }, + }, + "port": { + SchemaProps: spec.SchemaProps{ + Description: "Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME.", + Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), + }, + }, + "host": { + SchemaProps: spec.SchemaProps{ + Description: "Host name to connect to, defaults to the pod IP. You probably want to set \"Host\" in httpHeaders instead.", + Type: []string{"string"}, + Format: "", + }, + }, + "scheme": { + SchemaProps: spec.SchemaProps{ + Description: "Scheme to use for connecting to the host. Defaults to HTTP.", + Type: []string{"string"}, + Format: "", + }, + }, + "httpHeaders": { + SchemaProps: spec.SchemaProps{ + Description: "Custom headers to set in the request. HTTP allows repeated headers.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.HTTPHeader"), + }, + }, + }, + }, + }, + }, + Required: []string{"port"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.HTTPHeader", "k8s.io/apimachinery/pkg/util/intstr.IntOrString"}, + } +} + +func schema_k8sio_api_core_v1_HTTPHeader(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "HTTPHeader describes a custom header to be used in HTTP probes", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "The header field name", + Type: []string{"string"}, + Format: "", + }, + }, + "value": { + SchemaProps: spec.SchemaProps{ + Description: "The header field value", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"name", "value"}, + }, + }, + } +} + +func schema_k8sio_api_core_v1_HostAlias(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod's hosts file.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "ip": { + SchemaProps: spec.SchemaProps{ + Description: "IP address of the host file entry.", + Type: []string{"string"}, + Format: "", + }, + }, + "hostnames": { + SchemaProps: spec.SchemaProps{ + Description: "Hostnames for the above IP address.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + }, + }, + } +} + +func schema_k8sio_api_core_v1_HostPathVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Represents a host path mapped into a pod. Host path volumes do not support ownership management or SELinux relabeling.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "path": { + SchemaProps: spec.SchemaProps{ + Description: "Path of the directory on the host. If the path is a symlink, it will follow the link to the real path. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath", + Type: []string{"string"}, + Format: "", + }, + }, + "type": { + SchemaProps: spec.SchemaProps{ + Description: "Type for HostPath Volume Defaults to \"\" More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"path"}, + }, + }, + } +} + +func schema_k8sio_api_core_v1_ISCSIPersistentVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ISCSIPersistentVolumeSource represents an ISCSI disk. ISCSI volumes can only be mounted as read/write once. ISCSI volumes support ownership management and SELinux relabeling.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "targetPortal": { + SchemaProps: spec.SchemaProps{ + Description: "iSCSI Target Portal. The Portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260).", + Type: []string{"string"}, + Format: "", + }, + }, + "iqn": { + SchemaProps: spec.SchemaProps{ + Description: "Target iSCSI Qualified Name.", + Type: []string{"string"}, + Format: "", + }, + }, + "lun": { + SchemaProps: spec.SchemaProps{ + Description: "iSCSI Target Lun number.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "iscsiInterface": { + SchemaProps: spec.SchemaProps{ + Description: "iSCSI Interface Name that uses an iSCSI transport. Defaults to 'default' (tcp).", + Type: []string{"string"}, + Format: "", + }, + }, + "fsType": { + SchemaProps: spec.SchemaProps{ + Description: "Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi", + Type: []string{"string"}, + Format: "", + }, + }, + "readOnly": { + SchemaProps: spec.SchemaProps{ + Description: "ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "portals": { + SchemaProps: spec.SchemaProps{ + Description: "iSCSI Target Portal List. The Portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260).", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "chapAuthDiscovery": { + SchemaProps: spec.SchemaProps{ + Description: "whether support iSCSI Discovery CHAP authentication", + Type: []string{"boolean"}, + Format: "", + }, + }, + "chapAuthSession": { + SchemaProps: spec.SchemaProps{ + Description: "whether support iSCSI Session CHAP authentication", + Type: []string{"boolean"}, + Format: "", + }, + }, + "secretRef": { + SchemaProps: spec.SchemaProps{ + Description: "CHAP Secret for iSCSI target and initiator authentication", + Ref: ref("k8s.io/api/core/v1.SecretReference"), + }, + }, + "initiatorName": { + SchemaProps: spec.SchemaProps{ + Description: "Custom iSCSI Initiator Name. If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface : will be created for the connection.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"targetPortal", "iqn", "lun"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.SecretReference"}, + } +} + +func schema_k8sio_api_core_v1_ISCSIVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Represents an ISCSI disk. ISCSI volumes can only be mounted as read/write once. ISCSI volumes support ownership management and SELinux relabeling.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "targetPortal": { + SchemaProps: spec.SchemaProps{ + Description: "iSCSI Target Portal. The Portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260).", + Type: []string{"string"}, + Format: "", + }, + }, + "iqn": { + SchemaProps: spec.SchemaProps{ + Description: "Target iSCSI Qualified Name.", + Type: []string{"string"}, + Format: "", + }, + }, + "lun": { + SchemaProps: spec.SchemaProps{ + Description: "iSCSI Target Lun number.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "iscsiInterface": { + SchemaProps: spec.SchemaProps{ + Description: "iSCSI Interface Name that uses an iSCSI transport. Defaults to 'default' (tcp).", + Type: []string{"string"}, + Format: "", + }, + }, + "fsType": { + SchemaProps: spec.SchemaProps{ + Description: "Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi", + Type: []string{"string"}, + Format: "", + }, + }, + "readOnly": { + SchemaProps: spec.SchemaProps{ + Description: "ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "portals": { + SchemaProps: spec.SchemaProps{ + Description: "iSCSI Target Portal List. The portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260).", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "chapAuthDiscovery": { + SchemaProps: spec.SchemaProps{ + Description: "whether support iSCSI Discovery CHAP authentication", + Type: []string{"boolean"}, + Format: "", + }, + }, + "chapAuthSession": { + SchemaProps: spec.SchemaProps{ + Description: "whether support iSCSI Session CHAP authentication", + Type: []string{"boolean"}, + Format: "", + }, + }, + "secretRef": { + SchemaProps: spec.SchemaProps{ + Description: "CHAP Secret for iSCSI target and initiator authentication", + Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), + }, + }, + "initiatorName": { + SchemaProps: spec.SchemaProps{ + Description: "Custom iSCSI Initiator Name. If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface : will be created for the connection.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"targetPortal", "iqn", "lun"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.LocalObjectReference"}, + } +} + +func schema_k8sio_api_core_v1_KeyToPath(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Maps a string key to a path within a volume.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "key": { + SchemaProps: spec.SchemaProps{ + Description: "The key to project.", + Type: []string{"string"}, + Format: "", + }, + }, + "path": { + SchemaProps: spec.SchemaProps{ + Description: "The relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'.", + Type: []string{"string"}, + Format: "", + }, + }, + "mode": { + SchemaProps: spec.SchemaProps{ + Description: "Optional: mode bits used to set permissions on this file. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + Required: []string{"key", "path"}, + }, + }, + } +} + +func schema_k8sio_api_core_v1_Lifecycle(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Lifecycle describes actions that the management system should take in response to container lifecycle events. For the PostStart and PreStop lifecycle handlers, management of the container blocks until the action is complete, unless the container process fails, in which case the handler is aborted.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "postStart": { + SchemaProps: spec.SchemaProps{ + Description: "PostStart is called immediately after a container is created. If the handler fails, the container is terminated and restarted according to its restart policy. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks", + Ref: ref("k8s.io/api/core/v1.LifecycleHandler"), + }, + }, + "preStop": { + SchemaProps: spec.SchemaProps{ + Description: "PreStop is called immediately before a container is terminated due to an API request or management event such as liveness/startup probe failure, preemption, resource contention, etc. The handler is not called if the container crashes or exits. The Pod's termination grace period countdown begins before the PreStop hook is executed. Regardless of the outcome of the handler, the container will eventually terminate within the Pod's termination grace period (unless delayed by finalizers). Other management of the container blocks until the hook completes or until the termination grace period is reached. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks", + Ref: ref("k8s.io/api/core/v1.LifecycleHandler"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.LifecycleHandler"}, + } +} + +func schema_k8sio_api_core_v1_LifecycleHandler(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "LifecycleHandler defines a specific action that should be taken in a lifecycle hook. One and only one of the fields, except TCPSocket must be specified.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "exec": { + SchemaProps: spec.SchemaProps{ + Description: "Exec specifies the action to take.", + Ref: ref("k8s.io/api/core/v1.ExecAction"), + }, + }, + "httpGet": { + SchemaProps: spec.SchemaProps{ + Description: "HTTPGet specifies the http request to perform.", + Ref: ref("k8s.io/api/core/v1.HTTPGetAction"), + }, + }, + "tcpSocket": { + SchemaProps: spec.SchemaProps{ + Description: "Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept for the backward compatibility. There are no validation of this field and lifecycle hooks will fail in runtime when tcp handler is specified.", + Ref: ref("k8s.io/api/core/v1.TCPSocketAction"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.ExecAction", "k8s.io/api/core/v1.HTTPGetAction", "k8s.io/api/core/v1.TCPSocketAction"}, + } +} + +func schema_k8sio_api_core_v1_LimitRange(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "LimitRange sets resource usage limits for each kind of resource in a Namespace.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "Spec defines the limits enforced. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Ref: ref("k8s.io/api/core/v1.LimitRangeSpec"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.LimitRangeSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_core_v1_LimitRangeItem(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "LimitRangeItem defines a min/max usage limit for any resource that matches on kind.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "type": { + SchemaProps: spec.SchemaProps{ + Description: "Type of resource that this limit applies to.", + Type: []string{"string"}, + Format: "", + }, + }, + "max": { + SchemaProps: spec.SchemaProps{ + Description: "Max usage constraints on this kind by resource name.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + }, + }, + }, + }, + }, + "min": { + SchemaProps: spec.SchemaProps{ + Description: "Min usage constraints on this kind by resource name.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + }, + }, + }, + }, + }, + "default": { + SchemaProps: spec.SchemaProps{ + Description: "Default resource requirement limit value by resource name if resource limit is omitted.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + }, + }, + }, + }, + }, + "defaultRequest": { + SchemaProps: spec.SchemaProps{ + Description: "DefaultRequest is the default resource requirement request value by resource name if resource request is omitted.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + }, + }, + }, + }, + }, + "maxLimitRequestRatio": { + SchemaProps: spec.SchemaProps{ + Description: "MaxLimitRequestRatio if specified, the named resource must have a request and limit that are both non-zero where limit divided by request is less than or equal to the enumerated value; this represents the max burst for the named resource.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + }, + }, + }, + }, + }, + }, + Required: []string{"type"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + } +} + +func schema_k8sio_api_core_v1_LimitRangeList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "LimitRangeList is a list of LimitRange items.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "Items is a list of LimitRange objects. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.LimitRange"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.LimitRange", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_core_v1_LimitRangeSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "LimitRangeSpec defines a min/max usage limit for resources that match on kind.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "limits": { + SchemaProps: spec.SchemaProps{ + Description: "Limits is the list of LimitRangeItem objects that are enforced.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.LimitRangeItem"), + }, + }, + }, + }, + }, + }, + Required: []string{"limits"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.LimitRangeItem"}, + } +} + +func schema_k8sio_api_core_v1_List(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "List holds a list of objects, which may not be known by the server.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "List of objects", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/apimachinery/pkg/runtime.RawExtension"}, + } +} + +func schema_k8sio_api_core_v1_LoadBalancerIngress(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "LoadBalancerIngress represents the status of a load-balancer ingress point: traffic intended for the service should be sent to an ingress point.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "ip": { + SchemaProps: spec.SchemaProps{ + Description: "IP is set for load-balancer ingress points that are IP based (typically GCE or OpenStack load-balancers)", + Type: []string{"string"}, + Format: "", + }, + }, + "hostname": { + SchemaProps: spec.SchemaProps{ + Description: "Hostname is set for load-balancer ingress points that are DNS based (typically AWS load-balancers)", + Type: []string{"string"}, + Format: "", + }, + }, + "ports": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "Ports is a list of records of service ports If used, every port defined in the service should have an entry in it", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.PortStatus"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.PortStatus"}, + } +} + +func schema_k8sio_api_core_v1_LoadBalancerStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "LoadBalancerStatus represents the status of a load-balancer.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "ingress": { + SchemaProps: spec.SchemaProps{ + Description: "Ingress is a list containing ingress points for the load-balancer. Traffic intended for the service should be sent to these ingress points.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.LoadBalancerIngress"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.LoadBalancerIngress"}, + } +} + +func schema_k8sio_api_core_v1_LocalObjectReference(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_k8sio_api_core_v1_LocalVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Local represents directly-attached storage with node affinity (Beta feature)", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "path": { + SchemaProps: spec.SchemaProps{ + Description: "The full path to the volume on the node. It can be either a directory or block device (disk, partition, ...).", + Type: []string{"string"}, + Format: "", + }, + }, + "fsType": { + SchemaProps: spec.SchemaProps{ + Description: "Filesystem type to mount. It applies only when the Path is a block device. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". The default value is to auto-select a filesystem if unspecified.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"path"}, + }, + }, + } +} + +func schema_k8sio_api_core_v1_NFSVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Represents an NFS mount that lasts the lifetime of a pod. NFS volumes do not support ownership management or SELinux relabeling.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "server": { + SchemaProps: spec.SchemaProps{ + Description: "Server is the hostname or IP address of the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs", + Type: []string{"string"}, + Format: "", + }, + }, + "path": { + SchemaProps: spec.SchemaProps{ + Description: "Path that is exported by the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs", + Type: []string{"string"}, + Format: "", + }, + }, + "readOnly": { + SchemaProps: spec.SchemaProps{ + Description: "ReadOnly here will force the NFS export to be mounted with read-only permissions. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + Required: []string{"server", "path"}, + }, + }, + } +} + +func schema_k8sio_api_core_v1_Namespace(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Namespace provides a scope for Names. Use of multiple namespaces is optional.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "Spec defines the behavior of the Namespace. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Ref: ref("k8s.io/api/core/v1.NamespaceSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Status describes the current status of a Namespace. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Ref: ref("k8s.io/api/core/v1.NamespaceStatus"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.NamespaceSpec", "k8s.io/api/core/v1.NamespaceStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_core_v1_NamespaceCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "NamespaceCondition contains details about state of namespace.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "type": { + SchemaProps: spec.SchemaProps{ + Description: "Type of namespace controller condition.", + Type: []string{"string"}, + Format: "", + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Status of the condition, one of True, False, Unknown.", + Type: []string{"string"}, + Format: "", + }, + }, + "lastTransitionTime": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "reason": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "message": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"type", "status"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_k8sio_api_core_v1_NamespaceList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "NamespaceList is a list of Namespaces.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "Items is the list of Namespace objects in the list. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.Namespace"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.Namespace", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_core_v1_NamespaceSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "NamespaceSpec describes the attributes on a Namespace.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "finalizers": { + SchemaProps: spec.SchemaProps{ + Description: "Finalizers is an opaque list of values that must be empty to permanently remove object from storage. More info: https://kubernetes.io/docs/tasks/administer-cluster/namespaces/", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + }, + }, + } +} + +func schema_k8sio_api_core_v1_NamespaceStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "NamespaceStatus is information about the current status of a Namespace.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "phase": { + SchemaProps: spec.SchemaProps{ + Description: "Phase is the current lifecycle phase of the namespace. More info: https://kubernetes.io/docs/tasks/administer-cluster/namespaces/", + Type: []string{"string"}, + Format: "", + }, + }, + "conditions": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-patch-merge-key": "type", + "x-kubernetes-patch-strategy": "merge", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "Represents the latest available observations of a namespace's current state.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.NamespaceCondition"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.NamespaceCondition"}, + } +} + +func schema_k8sio_api_core_v1_Node(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Node is a worker node in Kubernetes. Each node will have a unique identifier in the cache (i.e. in etcd).", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "Spec defines the behavior of a node. https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Ref: ref("k8s.io/api/core/v1.NodeSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Most recently observed status of the node. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Ref: ref("k8s.io/api/core/v1.NodeStatus"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.NodeSpec", "k8s.io/api/core/v1.NodeStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_core_v1_NodeAddress(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "NodeAddress contains information for the node's address.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "type": { + SchemaProps: spec.SchemaProps{ + Description: "Node address type, one of Hostname, ExternalIP or InternalIP.", + Type: []string{"string"}, + Format: "", + }, + }, + "address": { + SchemaProps: spec.SchemaProps{ + Description: "The node address.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"type", "address"}, + }, + }, + } +} + +func schema_k8sio_api_core_v1_NodeAffinity(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Node affinity is a group of node affinity scheduling rules.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "requiredDuringSchedulingIgnoredDuringExecution": { + SchemaProps: spec.SchemaProps{ + Description: "If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node.", + Ref: ref("k8s.io/api/core/v1.NodeSelector"), + }, + }, + "preferredDuringSchedulingIgnoredDuringExecution": { + SchemaProps: spec.SchemaProps{ + Description: "The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding \"weight\" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.PreferredSchedulingTerm"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.NodeSelector", "k8s.io/api/core/v1.PreferredSchedulingTerm"}, + } +} + +func schema_k8sio_api_core_v1_NodeCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "NodeCondition contains condition information for a node.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "type": { + SchemaProps: spec.SchemaProps{ + Description: "Type of node condition.", + Type: []string{"string"}, + Format: "", + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Status of the condition, one of True, False, Unknown.", + Type: []string{"string"}, + Format: "", + }, + }, + "lastHeartbeatTime": { + SchemaProps: spec.SchemaProps{ + Description: "Last time we got an update on a given condition.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "lastTransitionTime": { + SchemaProps: spec.SchemaProps{ + Description: "Last time the condition transit from one status to another.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "reason": { + SchemaProps: spec.SchemaProps{ + Description: "(brief) reason for the condition's last transition.", + Type: []string{"string"}, + Format: "", + }, + }, + "message": { + SchemaProps: spec.SchemaProps{ + Description: "Human readable message indicating details about last transition.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"type", "status"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_k8sio_api_core_v1_NodeConfigSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "NodeConfigSource specifies a source of node configuration. Exactly one subfield (excluding metadata) must be non-nil. This API is deprecated since 1.22", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "configMap": { + SchemaProps: spec.SchemaProps{ + Description: "ConfigMap is a reference to a Node's ConfigMap", + Ref: ref("k8s.io/api/core/v1.ConfigMapNodeConfigSource"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.ConfigMapNodeConfigSource"}, + } +} + +func schema_k8sio_api_core_v1_NodeConfigStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "NodeConfigStatus describes the status of the config assigned by Node.Spec.ConfigSource.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "assigned": { + SchemaProps: spec.SchemaProps{ + Description: "Assigned reports the checkpointed config the node will try to use. When Node.Spec.ConfigSource is updated, the node checkpoints the associated config payload to local disk, along with a record indicating intended config. The node refers to this record to choose its config checkpoint, and reports this record in Assigned. Assigned only updates in the status after the record has been checkpointed to disk. When the Kubelet is restarted, it tries to make the Assigned config the Active config by loading and validating the checkpointed payload identified by Assigned.", + Ref: ref("k8s.io/api/core/v1.NodeConfigSource"), + }, + }, + "active": { + SchemaProps: spec.SchemaProps{ + Description: "Active reports the checkpointed config the node is actively using. Active will represent either the current version of the Assigned config, or the current LastKnownGood config, depending on whether attempting to use the Assigned config results in an error.", + Ref: ref("k8s.io/api/core/v1.NodeConfigSource"), + }, + }, + "lastKnownGood": { + SchemaProps: spec.SchemaProps{ + Description: "LastKnownGood reports the checkpointed config the node will fall back to when it encounters an error attempting to use the Assigned config. The Assigned config becomes the LastKnownGood config when the node determines that the Assigned config is stable and correct. This is currently implemented as a 10-minute soak period starting when the local record of Assigned config is updated. If the Assigned config is Active at the end of this period, it becomes the LastKnownGood. Note that if Spec.ConfigSource is reset to nil (use local defaults), the LastKnownGood is also immediately reset to nil, because the local default config is always assumed good. You should not make assumptions about the node's method of determining config stability and correctness, as this may change or become configurable in the future.", + Ref: ref("k8s.io/api/core/v1.NodeConfigSource"), + }, + }, + "error": { + SchemaProps: spec.SchemaProps{ + Description: "Error describes any problems reconciling the Spec.ConfigSource to the Active config. Errors may occur, for example, attempting to checkpoint Spec.ConfigSource to the local Assigned record, attempting to checkpoint the payload associated with Spec.ConfigSource, attempting to load or validate the Assigned config, etc. Errors may occur at different points while syncing config. Earlier errors (e.g. download or checkpointing errors) will not result in a rollback to LastKnownGood, and may resolve across Kubelet retries. Later errors (e.g. loading or validating a checkpointed config) will result in a rollback to LastKnownGood. In the latter case, it is usually possible to resolve the error by fixing the config assigned in Spec.ConfigSource. You can find additional information for debugging by searching the error message in the Kubelet log. Error is a human-readable description of the error state; machines can check whether or not Error is empty, but should not rely on the stability of the Error text across Kubelet versions.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.NodeConfigSource"}, + } +} + +func schema_k8sio_api_core_v1_NodeDaemonEndpoints(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "NodeDaemonEndpoints lists ports opened by daemons running on the Node.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kubeletEndpoint": { + SchemaProps: spec.SchemaProps{ + Description: "Endpoint on which Kubelet is listening.", + Ref: ref("k8s.io/api/core/v1.DaemonEndpoint"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.DaemonEndpoint"}, + } +} + +func schema_k8sio_api_core_v1_NodeList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "NodeList is the whole list of all Nodes which have been registered with master.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "List of nodes", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.Node"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.Node", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_core_v1_NodeProxyOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "NodeProxyOptions is the query options to a Node's proxy call.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "path": { + SchemaProps: spec.SchemaProps{ + Description: "Path is the URL path to use for the current proxy request to node.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_k8sio_api_core_v1_NodeResources(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "NodeResources is an object for conveying resource information about a node. see https://kubernetes.io/docs/concepts/architecture/nodes/#capacity for more details.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "Capacity": { + SchemaProps: spec.SchemaProps{ + Description: "Capacity represents the available resources of a node", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + }, + }, + }, + }, + }, + }, + Required: []string{"Capacity"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + } +} + +func schema_k8sio_api_core_v1_NodeSelector(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "A node selector represents the union of the results of one or more label queries over a set of nodes; that is, it represents the OR of the selectors represented by the node selector terms.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "nodeSelectorTerms": { + SchemaProps: spec.SchemaProps{ + Description: "Required. A list of node selector terms. The terms are ORed.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.NodeSelectorTerm"), + }, + }, + }, + }, + }, + }, + Required: []string{"nodeSelectorTerms"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.NodeSelectorTerm"}, + } +} + +func schema_k8sio_api_core_v1_NodeSelectorRequirement(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "key": { + SchemaProps: spec.SchemaProps{ + Description: "The label key that the selector applies to.", + Type: []string{"string"}, + Format: "", + }, + }, + "operator": { + SchemaProps: spec.SchemaProps{ + Description: "Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.", + Type: []string{"string"}, + Format: "", + }, + }, + "values": { + SchemaProps: spec.SchemaProps{ + Description: "An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + Required: []string{"key", "operator"}, + }, + }, + } +} + +func schema_k8sio_api_core_v1_NodeSelectorTerm(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "A null or empty node selector term matches no objects. The requirements of them are ANDed. The TopologySelectorTerm type implements a subset of the NodeSelectorTerm.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "matchExpressions": { + SchemaProps: spec.SchemaProps{ + Description: "A list of node selector requirements by node's labels.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.NodeSelectorRequirement"), + }, + }, + }, + }, + }, + "matchFields": { + SchemaProps: spec.SchemaProps{ + Description: "A list of node selector requirements by node's fields.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.NodeSelectorRequirement"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.NodeSelectorRequirement"}, + } +} + +func schema_k8sio_api_core_v1_NodeSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "NodeSpec describes the attributes that a node is created with.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "podCIDR": { + SchemaProps: spec.SchemaProps{ + Description: "PodCIDR represents the pod IP range assigned to the node.", + Type: []string{"string"}, + Format: "", + }, + }, + "podCIDRs": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-patch-strategy": "merge", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "podCIDRs represents the IP ranges assigned to the node for usage by Pods on that node. If this field is specified, the 0th entry must match the podCIDR field. It may contain at most 1 value for each of IPv4 and IPv6.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "providerID": { + SchemaProps: spec.SchemaProps{ + Description: "ID of the node assigned by the cloud provider in the format: ://", + Type: []string{"string"}, + Format: "", + }, + }, + "unschedulable": { + SchemaProps: spec.SchemaProps{ + Description: "Unschedulable controls node schedulability of new pods. By default, node is schedulable. More info: https://kubernetes.io/docs/concepts/nodes/node/#manual-node-administration", + Type: []string{"boolean"}, + Format: "", + }, + }, + "taints": { + SchemaProps: spec.SchemaProps{ + Description: "If specified, the node's taints.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.Taint"), + }, + }, + }, + }, + }, + "configSource": { + SchemaProps: spec.SchemaProps{ + Description: "Deprecated. If specified, the source of the node's configuration. The DynamicKubeletConfig feature gate must be enabled for the Kubelet to use this field. This field is deprecated as of 1.22: https://git.k8s.io/enhancements/keps/sig-node/281-dynamic-kubelet-configuration", + Ref: ref("k8s.io/api/core/v1.NodeConfigSource"), + }, + }, + "externalID": { + SchemaProps: spec.SchemaProps{ + Description: "Deprecated. Not all kubelets will set this field. Remove field after 1.13. see: https://issues.k8s.io/61966", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.NodeConfigSource", "k8s.io/api/core/v1.Taint"}, + } +} + +func schema_k8sio_api_core_v1_NodeStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "NodeStatus is information about the current status of a node.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "capacity": { + SchemaProps: spec.SchemaProps{ + Description: "Capacity represents the total resources of a node. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#capacity", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + }, + }, + }, + }, + }, + "allocatable": { + SchemaProps: spec.SchemaProps{ + Description: "Allocatable represents the resources of a node that are available for scheduling. Defaults to Capacity.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + }, + }, + }, + }, + }, + "phase": { + SchemaProps: spec.SchemaProps{ + Description: "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.", + Type: []string{"string"}, + Format: "", + }, + }, + "conditions": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-patch-merge-key": "type", + "x-kubernetes-patch-strategy": "merge", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "Conditions is an array of current observed node conditions. More info: https://kubernetes.io/docs/concepts/nodes/node/#condition", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.NodeCondition"), + }, + }, + }, + }, + }, + "addresses": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-patch-merge-key": "type", + "x-kubernetes-patch-strategy": "merge", + }, + }, + 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 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{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.NodeAddress"), + }, + }, + }, + }, + }, + "daemonEndpoints": { + SchemaProps: spec.SchemaProps{ + Description: "Endpoints of daemons running on the Node.", + Ref: ref("k8s.io/api/core/v1.NodeDaemonEndpoints"), + }, + }, + "nodeInfo": { + SchemaProps: spec.SchemaProps{ + Description: "Set of ids/uuids to uniquely identify the node. More info: https://kubernetes.io/docs/concepts/nodes/node/#info", + Ref: ref("k8s.io/api/core/v1.NodeSystemInfo"), + }, + }, + "images": { + SchemaProps: spec.SchemaProps{ + Description: "List of container images on this node", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.ContainerImage"), + }, + }, + }, + }, + }, + "volumesInUse": { + SchemaProps: spec.SchemaProps{ + Description: "List of attachable volumes in use (mounted) by the node.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "volumesAttached": { + SchemaProps: spec.SchemaProps{ + Description: "List of volumes that are attached to the node.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.AttachedVolume"), + }, + }, + }, + }, + }, + "config": { + SchemaProps: spec.SchemaProps{ + Description: "Status of the config assigned to the node via the dynamic Kubelet config feature.", + Ref: ref("k8s.io/api/core/v1.NodeConfigStatus"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.AttachedVolume", "k8s.io/api/core/v1.ContainerImage", "k8s.io/api/core/v1.NodeAddress", "k8s.io/api/core/v1.NodeCondition", "k8s.io/api/core/v1.NodeConfigStatus", "k8s.io/api/core/v1.NodeDaemonEndpoints", "k8s.io/api/core/v1.NodeSystemInfo", "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + } +} + +func schema_k8sio_api_core_v1_NodeSystemInfo(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "NodeSystemInfo is a set of ids/uuids to uniquely identify the node.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "machineID": { + SchemaProps: spec.SchemaProps{ + Description: "MachineID reported by the node. For unique machine identification in the cluster this field is preferred. Learn more from man(5) machine-id: http://man7.org/linux/man-pages/man5/machine-id.5.html", + Type: []string{"string"}, + Format: "", + }, + }, + "systemUUID": { + SchemaProps: spec.SchemaProps{ + Description: "SystemUUID reported by the node. For unique machine identification MachineID is preferred. This field is specific to Red Hat hosts https://access.redhat.com/documentation/en-us/red_hat_subscription_management/1/html/rhsm/uuid", + Type: []string{"string"}, + Format: "", + }, + }, + "bootID": { + SchemaProps: spec.SchemaProps{ + Description: "Boot ID reported by the node.", + Type: []string{"string"}, + Format: "", + }, + }, + "kernelVersion": { + SchemaProps: spec.SchemaProps{ + Description: "Kernel Version reported by the node from 'uname -r' (e.g. 3.16.0-0.bpo.4-amd64).", + Type: []string{"string"}, + Format: "", + }, + }, + "osImage": { + SchemaProps: spec.SchemaProps{ + Description: "OS Image reported by the node from /etc/os-release (e.g. Debian GNU/Linux 7 (wheezy)).", + Type: []string{"string"}, + Format: "", + }, + }, + "containerRuntimeVersion": { + SchemaProps: spec.SchemaProps{ + Description: "ContainerRuntime Version reported by the node through runtime remote API (e.g. docker://1.5.0).", + Type: []string{"string"}, + Format: "", + }, + }, + "kubeletVersion": { + SchemaProps: spec.SchemaProps{ + Description: "Kubelet Version reported by the node.", + Type: []string{"string"}, + Format: "", + }, + }, + "kubeProxyVersion": { + SchemaProps: spec.SchemaProps{ + Description: "KubeProxy Version reported by the node.", + Type: []string{"string"}, + Format: "", + }, + }, + "operatingSystem": { + SchemaProps: spec.SchemaProps{ + Description: "The Operating System reported by the node", + Type: []string{"string"}, + Format: "", + }, + }, + "architecture": { + SchemaProps: spec.SchemaProps{ + Description: "The Architecture reported by the node", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"machineID", "systemUUID", "bootID", "kernelVersion", "osImage", "containerRuntimeVersion", "kubeletVersion", "kubeProxyVersion", "operatingSystem", "architecture"}, + }, + }, + } +} + +func schema_k8sio_api_core_v1_ObjectFieldSelector(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ObjectFieldSelector selects an APIVersioned field of an object.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "Version of the schema the FieldPath is written in terms of, defaults to \"v1\".", + Type: []string{"string"}, + Format: "", + }, + }, + "fieldPath": { + SchemaProps: spec.SchemaProps{ + Description: "Path of the field to select in the specified API version.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"fieldPath"}, + }, + }, + } +} + +func schema_k8sio_api_core_v1_ObjectReference(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ObjectReference contains enough information to let you inspect or modify the referred object.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "namespace": { + SchemaProps: spec.SchemaProps{ + Description: "Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/", + Type: []string{"string"}, + Format: "", + }, + }, + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", + Type: []string{"string"}, + Format: "", + }, + }, + "uid": { + SchemaProps: spec.SchemaProps{ + Description: "UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "API version of the referent.", + Type: []string{"string"}, + Format: "", + }, + }, + "resourceVersion": { + SchemaProps: spec.SchemaProps{ + Description: "Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency", + Type: []string{"string"}, + Format: "", + }, + }, + "fieldPath": { + SchemaProps: spec.SchemaProps{ + Description: "If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: \"spec.containers{name}\" (where \"name\" refers to the name of the container that triggered the event) or if no container name is specified \"spec.containers[2]\" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_k8sio_api_core_v1_PersistentVolume(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PersistentVolume (PV) is a storage resource provisioned by an administrator. It is analogous to a node. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "Spec defines a specification of a persistent volume owned by the cluster. Provisioned by an administrator. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistent-volumes", + Ref: ref("k8s.io/api/core/v1.PersistentVolumeSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Status represents the current information/status for the persistent volume. Populated by the system. Read-only. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistent-volumes", + Ref: ref("k8s.io/api/core/v1.PersistentVolumeStatus"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.PersistentVolumeSpec", "k8s.io/api/core/v1.PersistentVolumeStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_core_v1_PersistentVolumeClaim(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PersistentVolumeClaim is a user's request for and claim to a persistent volume", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "Spec defines the desired characteristics of a volume requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims", + Ref: ref("k8s.io/api/core/v1.PersistentVolumeClaimSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Status represents the current information/status of a persistent volume claim. Read-only. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims", + Ref: ref("k8s.io/api/core/v1.PersistentVolumeClaimStatus"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.PersistentVolumeClaimSpec", "k8s.io/api/core/v1.PersistentVolumeClaimStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_core_v1_PersistentVolumeClaimCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PersistentVolumeClaimCondition contails details about state of pvc", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "type": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "lastProbeTime": { + SchemaProps: spec.SchemaProps{ + Description: "Last time we probed the condition.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "lastTransitionTime": { + SchemaProps: spec.SchemaProps{ + Description: "Last time the condition transitioned from one status to another.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "reason": { + SchemaProps: spec.SchemaProps{ + Description: "Unique, this should be a short, machine understandable string that gives the reason for condition's last transition. If it reports \"ResizeStarted\" that means the underlying persistent volume is being resized.", + Type: []string{"string"}, + Format: "", + }, + }, + "message": { + SchemaProps: spec.SchemaProps{ + Description: "Human-readable message indicating details about last transition.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"type", "status"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_k8sio_api_core_v1_PersistentVolumeClaimList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PersistentVolumeClaimList is a list of PersistentVolumeClaim items.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "A list of persistent volume claims. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.PersistentVolumeClaim"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.PersistentVolumeClaim", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_core_v1_PersistentVolumeClaimSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PersistentVolumeClaimSpec describes the common attributes of storage devices and allows a Source for provider-specific attributes", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "accessModes": { + SchemaProps: spec.SchemaProps{ + Description: "AccessModes contains the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "selector": { + SchemaProps: spec.SchemaProps{ + Description: "A label query over volumes to consider for binding.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + }, + }, + "resources": { + SchemaProps: spec.SchemaProps{ + Description: "Resources represents the minimum resources the volume should have. If RecoverVolumeExpansionFailure feature is enabled users are allowed to specify resource requirements that are lower than previous value but must still be higher than capacity recorded in the status field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources", + Ref: ref("k8s.io/api/core/v1.ResourceRequirements"), + }, + }, + "volumeName": { + SchemaProps: spec.SchemaProps{ + Description: "VolumeName is the binding reference to the PersistentVolume backing this claim.", + Type: []string{"string"}, + Format: "", + }, + }, + "storageClassName": { + SchemaProps: spec.SchemaProps{ + Description: "Name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1", + Type: []string{"string"}, + Format: "", + }, + }, + "volumeMode": { + SchemaProps: spec.SchemaProps{ + Description: "volumeMode defines what type of volume is required by the claim. Value of Filesystem is implied when not included in claim spec.", + Type: []string{"string"}, + Format: "", + }, + }, + "dataSource": { + SchemaProps: spec.SchemaProps{ + Description: "This field can be used to specify either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) * An existing PVC (PersistentVolumeClaim) If the provisioner or an external controller can support the specified data source, it will create a new volume based on the contents of the specified data source. If the AnyVolumeDataSource feature gate is enabled, this field will always have the same contents as the DataSourceRef field.", + Ref: ref("k8s.io/api/core/v1.TypedLocalObjectReference"), + }, + }, + "dataSourceRef": { + SchemaProps: spec.SchemaProps{ + Description: "Specifies the object from which to populate the volume with data, if a non-empty volume is desired. This may be any local object from a non-empty API group (non core object) or a PersistentVolumeClaim object. When this field is specified, volume binding will only succeed if the type of the specified object matches some installed volume populator or dynamic provisioner. This field will replace the functionality of the DataSource field and as such if both fields are non-empty, they must have the same value. For backwards compatibility, both fields (DataSource and DataSourceRef) will be set to the same value automatically if one of them is empty and the other is non-empty. There are two important differences between DataSource and DataSourceRef: * While DataSource only allows two specific types of objects, DataSourceRef\n allows any non-core object, as well as PersistentVolumeClaim objects.\n* While DataSource ignores disallowed values (dropping them), DataSourceRef\n preserves all values, and generates an error if a disallowed value is\n specified.\n(Alpha) Using this field requires the AnyVolumeDataSource feature gate to be enabled.", + Ref: ref("k8s.io/api/core/v1.TypedLocalObjectReference"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.ResourceRequirements", "k8s.io/api/core/v1.TypedLocalObjectReference", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + } +} + +func schema_k8sio_api_core_v1_PersistentVolumeClaimStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PersistentVolumeClaimStatus is the current status of a persistent volume claim.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "phase": { + SchemaProps: spec.SchemaProps{ + Description: "Phase represents the current phase of PersistentVolumeClaim.", + Type: []string{"string"}, + Format: "", + }, + }, + "accessModes": { + SchemaProps: spec.SchemaProps{ + Description: "AccessModes contains the actual access modes the volume backing the PVC has. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "capacity": { + SchemaProps: spec.SchemaProps{ + Description: "Represents the actual resources of the underlying volume.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + }, + }, + }, + }, + }, + "conditions": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-patch-merge-key": "type", + "x-kubernetes-patch-strategy": "merge", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "Current Condition of persistent volume claim. If underlying persistent volume is being resized then the Condition will be set to 'ResizeStarted'.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.PersistentVolumeClaimCondition"), + }, + }, + }, + }, + }, + "allocatedResources": { + SchemaProps: spec.SchemaProps{ + Description: "The storage resource within AllocatedResources tracks the capacity allocated to a PVC. It may be larger than the actual capacity when a volume expansion operation is requested. For storage quota, the larger value from allocatedResources and PVC.spec.resources is used. If allocatedResources is not set, PVC.spec.resources alone is used for quota calculation. If a volume expansion capacity request is lowered, allocatedResources is only lowered if there are no expansion operations in progress and if the actual volume capacity is equal or lower than the requested capacity. This is an alpha field and requires enabling RecoverVolumeExpansionFailure feature.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + }, + }, + }, + }, + }, + "resizeStatus": { + SchemaProps: spec.SchemaProps{ + Description: "ResizeStatus stores status of resize operation. ResizeStatus is not set by default but when expansion is complete resizeStatus is set to empty string by resize controller or kubelet. This is an alpha field and requires enabling RecoverVolumeExpansionFailure feature.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.PersistentVolumeClaimCondition", "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + } +} + +func schema_k8sio_api_core_v1_PersistentVolumeClaimTemplate(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PersistentVolumeClaimTemplate is used to produce PersistentVolumeClaim objects as part of an EphemeralVolumeSource.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "metadata": { + SchemaProps: spec.SchemaProps{ + Description: "May contain labels and annotations that will be copied into the PVC when creating it. No other fields are allowed and will be rejected during validation.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "The specification for the PersistentVolumeClaim. The entire content is copied unchanged into the PVC that gets created from this template. The same fields as in a PersistentVolumeClaim are also valid here.", + Ref: ref("k8s.io/api/core/v1.PersistentVolumeClaimSpec"), + }, + }, + }, + Required: []string{"spec"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.PersistentVolumeClaimSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_core_v1_PersistentVolumeClaimVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PersistentVolumeClaimVolumeSource references the user's PVC in the same namespace. This volume finds the bound PV and mounts that volume for the pod. A PersistentVolumeClaimVolumeSource is, essentially, a wrapper around another type of volume that is owned by someone else (the system).", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "claimName": { + SchemaProps: spec.SchemaProps{ + Description: "ClaimName is the name of a PersistentVolumeClaim in the same namespace as the pod using this volume. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims", + Type: []string{"string"}, + Format: "", + }, + }, + "readOnly": { + SchemaProps: spec.SchemaProps{ + Description: "Will force the ReadOnly setting in VolumeMounts. Default false.", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + Required: []string{"claimName"}, + }, + }, + } +} + +func schema_k8sio_api_core_v1_PersistentVolumeList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PersistentVolumeList is a list of PersistentVolume items.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "List of persistent volumes. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.PersistentVolume"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.PersistentVolume", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_core_v1_PersistentVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PersistentVolumeSource is similar to VolumeSource but meant for the administrator who creates PVs. Exactly one of its members must be set.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "gcePersistentDisk": { + SchemaProps: spec.SchemaProps{ + Description: "GCEPersistentDisk represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk", + Ref: ref("k8s.io/api/core/v1.GCEPersistentDiskVolumeSource"), + }, + }, + "awsElasticBlockStore": { + SchemaProps: spec.SchemaProps{ + Description: "AWSElasticBlockStore represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore", + Ref: ref("k8s.io/api/core/v1.AWSElasticBlockStoreVolumeSource"), + }, + }, + "hostPath": { + SchemaProps: spec.SchemaProps{ + Description: "HostPath represents a directory on the host. Provisioned by a developer or tester. This is useful for single-node development and testing only! On-host storage is not supported in any way and WILL NOT WORK in a multi-node cluster. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath", + Ref: ref("k8s.io/api/core/v1.HostPathVolumeSource"), + }, + }, + "glusterfs": { + SchemaProps: spec.SchemaProps{ + Description: "Glusterfs represents a Glusterfs volume that is attached to a host and exposed to the pod. Provisioned by an admin. More info: https://examples.k8s.io/volumes/glusterfs/README.md", + Ref: ref("k8s.io/api/core/v1.GlusterfsPersistentVolumeSource"), + }, + }, + "nfs": { + SchemaProps: spec.SchemaProps{ + Description: "NFS represents an NFS mount on the host. Provisioned by an admin. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs", + Ref: ref("k8s.io/api/core/v1.NFSVolumeSource"), + }, + }, + "rbd": { + SchemaProps: spec.SchemaProps{ + Description: "RBD represents a Rados Block Device mount on the host that shares a pod's lifetime. More info: https://examples.k8s.io/volumes/rbd/README.md", + Ref: ref("k8s.io/api/core/v1.RBDPersistentVolumeSource"), + }, + }, + "iscsi": { + SchemaProps: spec.SchemaProps{ + Description: "ISCSI represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin.", + Ref: ref("k8s.io/api/core/v1.ISCSIPersistentVolumeSource"), + }, + }, + "cinder": { + SchemaProps: spec.SchemaProps{ + Description: "Cinder represents a cinder volume attached and mounted on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md", + Ref: ref("k8s.io/api/core/v1.CinderPersistentVolumeSource"), + }, + }, + "cephfs": { + SchemaProps: spec.SchemaProps{ + Description: "CephFS represents a Ceph FS mount on the host that shares a pod's lifetime", + Ref: ref("k8s.io/api/core/v1.CephFSPersistentVolumeSource"), + }, + }, + "fc": { + SchemaProps: spec.SchemaProps{ + Description: "FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod.", + Ref: ref("k8s.io/api/core/v1.FCVolumeSource"), + }, + }, + "flocker": { + SchemaProps: spec.SchemaProps{ + Description: "Flocker represents a Flocker volume attached to a kubelet's host machine and exposed to the pod for its usage. This depends on the Flocker control service being running", + Ref: ref("k8s.io/api/core/v1.FlockerVolumeSource"), + }, + }, + "flexVolume": { + SchemaProps: spec.SchemaProps{ + Description: "FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin.", + Ref: ref("k8s.io/api/core/v1.FlexPersistentVolumeSource"), + }, + }, + "azureFile": { + SchemaProps: spec.SchemaProps{ + Description: "AzureFile represents an Azure File Service mount on the host and bind mount to the pod.", + Ref: ref("k8s.io/api/core/v1.AzureFilePersistentVolumeSource"), + }, + }, + "vsphereVolume": { + SchemaProps: spec.SchemaProps{ + Description: "VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine", + Ref: ref("k8s.io/api/core/v1.VsphereVirtualDiskVolumeSource"), + }, + }, + "quobyte": { + SchemaProps: spec.SchemaProps{ + Description: "Quobyte represents a Quobyte mount on the host that shares a pod's lifetime", + Ref: ref("k8s.io/api/core/v1.QuobyteVolumeSource"), + }, + }, + "azureDisk": { + SchemaProps: spec.SchemaProps{ + Description: "AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.", + Ref: ref("k8s.io/api/core/v1.AzureDiskVolumeSource"), + }, + }, + "photonPersistentDisk": { + SchemaProps: spec.SchemaProps{ + Description: "PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine", + Ref: ref("k8s.io/api/core/v1.PhotonPersistentDiskVolumeSource"), + }, + }, + "portworxVolume": { + SchemaProps: spec.SchemaProps{ + Description: "PortworxVolume represents a portworx volume attached and mounted on kubelets host machine", + Ref: ref("k8s.io/api/core/v1.PortworxVolumeSource"), + }, + }, + "scaleIO": { + SchemaProps: spec.SchemaProps{ + Description: "ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes.", + Ref: ref("k8s.io/api/core/v1.ScaleIOPersistentVolumeSource"), + }, + }, + "local": { + SchemaProps: spec.SchemaProps{ + Description: "Local represents directly-attached storage with node affinity", + Ref: ref("k8s.io/api/core/v1.LocalVolumeSource"), + }, + }, + "storageos": { + SchemaProps: spec.SchemaProps{ + Description: "StorageOS represents a StorageOS volume that is attached to the kubelet's host machine and mounted into the pod More info: https://examples.k8s.io/volumes/storageos/README.md", + Ref: ref("k8s.io/api/core/v1.StorageOSPersistentVolumeSource"), + }, + }, + "csi": { + SchemaProps: spec.SchemaProps{ + Description: "CSI represents storage that is handled by an external CSI driver (Beta feature).", + Ref: ref("k8s.io/api/core/v1.CSIPersistentVolumeSource"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.AWSElasticBlockStoreVolumeSource", "k8s.io/api/core/v1.AzureDiskVolumeSource", "k8s.io/api/core/v1.AzureFilePersistentVolumeSource", "k8s.io/api/core/v1.CSIPersistentVolumeSource", "k8s.io/api/core/v1.CephFSPersistentVolumeSource", "k8s.io/api/core/v1.CinderPersistentVolumeSource", "k8s.io/api/core/v1.FCVolumeSource", "k8s.io/api/core/v1.FlexPersistentVolumeSource", "k8s.io/api/core/v1.FlockerVolumeSource", "k8s.io/api/core/v1.GCEPersistentDiskVolumeSource", "k8s.io/api/core/v1.GlusterfsPersistentVolumeSource", "k8s.io/api/core/v1.HostPathVolumeSource", "k8s.io/api/core/v1.ISCSIPersistentVolumeSource", "k8s.io/api/core/v1.LocalVolumeSource", "k8s.io/api/core/v1.NFSVolumeSource", "k8s.io/api/core/v1.PhotonPersistentDiskVolumeSource", "k8s.io/api/core/v1.PortworxVolumeSource", "k8s.io/api/core/v1.QuobyteVolumeSource", "k8s.io/api/core/v1.RBDPersistentVolumeSource", "k8s.io/api/core/v1.ScaleIOPersistentVolumeSource", "k8s.io/api/core/v1.StorageOSPersistentVolumeSource", "k8s.io/api/core/v1.VsphereVirtualDiskVolumeSource"}, + } +} + +func schema_k8sio_api_core_v1_PersistentVolumeSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PersistentVolumeSpec is the specification of a persistent volume.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "capacity": { + SchemaProps: spec.SchemaProps{ + Description: "A description of the persistent volume's resources and capacity. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#capacity", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + }, + }, + }, + }, + }, + "gcePersistentDisk": { + SchemaProps: spec.SchemaProps{ + Description: "GCEPersistentDisk represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk", + Ref: ref("k8s.io/api/core/v1.GCEPersistentDiskVolumeSource"), + }, + }, + "awsElasticBlockStore": { + SchemaProps: spec.SchemaProps{ + Description: "AWSElasticBlockStore represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore", + Ref: ref("k8s.io/api/core/v1.AWSElasticBlockStoreVolumeSource"), + }, + }, + "hostPath": { + SchemaProps: spec.SchemaProps{ + Description: "HostPath represents a directory on the host. Provisioned by a developer or tester. This is useful for single-node development and testing only! On-host storage is not supported in any way and WILL NOT WORK in a multi-node cluster. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath", + Ref: ref("k8s.io/api/core/v1.HostPathVolumeSource"), + }, + }, + "glusterfs": { + SchemaProps: spec.SchemaProps{ + Description: "Glusterfs represents a Glusterfs volume that is attached to a host and exposed to the pod. Provisioned by an admin. More info: https://examples.k8s.io/volumes/glusterfs/README.md", + Ref: ref("k8s.io/api/core/v1.GlusterfsPersistentVolumeSource"), + }, + }, + "nfs": { + SchemaProps: spec.SchemaProps{ + Description: "NFS represents an NFS mount on the host. Provisioned by an admin. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs", + Ref: ref("k8s.io/api/core/v1.NFSVolumeSource"), + }, + }, + "rbd": { + SchemaProps: spec.SchemaProps{ + Description: "RBD represents a Rados Block Device mount on the host that shares a pod's lifetime. More info: https://examples.k8s.io/volumes/rbd/README.md", + Ref: ref("k8s.io/api/core/v1.RBDPersistentVolumeSource"), + }, + }, + "iscsi": { + SchemaProps: spec.SchemaProps{ + Description: "ISCSI represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin.", + Ref: ref("k8s.io/api/core/v1.ISCSIPersistentVolumeSource"), + }, + }, + "cinder": { + SchemaProps: spec.SchemaProps{ + Description: "Cinder represents a cinder volume attached and mounted on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md", + Ref: ref("k8s.io/api/core/v1.CinderPersistentVolumeSource"), + }, + }, + "cephfs": { + SchemaProps: spec.SchemaProps{ + Description: "CephFS represents a Ceph FS mount on the host that shares a pod's lifetime", + Ref: ref("k8s.io/api/core/v1.CephFSPersistentVolumeSource"), + }, + }, + "fc": { + SchemaProps: spec.SchemaProps{ + Description: "FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod.", + Ref: ref("k8s.io/api/core/v1.FCVolumeSource"), + }, + }, + "flocker": { + SchemaProps: spec.SchemaProps{ + Description: "Flocker represents a Flocker volume attached to a kubelet's host machine and exposed to the pod for its usage. This depends on the Flocker control service being running", + Ref: ref("k8s.io/api/core/v1.FlockerVolumeSource"), + }, + }, + "flexVolume": { + SchemaProps: spec.SchemaProps{ + Description: "FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin.", + Ref: ref("k8s.io/api/core/v1.FlexPersistentVolumeSource"), + }, + }, + "azureFile": { + SchemaProps: spec.SchemaProps{ + Description: "AzureFile represents an Azure File Service mount on the host and bind mount to the pod.", + Ref: ref("k8s.io/api/core/v1.AzureFilePersistentVolumeSource"), + }, + }, + "vsphereVolume": { + SchemaProps: spec.SchemaProps{ + Description: "VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine", + Ref: ref("k8s.io/api/core/v1.VsphereVirtualDiskVolumeSource"), + }, + }, + "quobyte": { + SchemaProps: spec.SchemaProps{ + Description: "Quobyte represents a Quobyte mount on the host that shares a pod's lifetime", + Ref: ref("k8s.io/api/core/v1.QuobyteVolumeSource"), + }, + }, + "azureDisk": { + SchemaProps: spec.SchemaProps{ + Description: "AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.", + Ref: ref("k8s.io/api/core/v1.AzureDiskVolumeSource"), + }, + }, + "photonPersistentDisk": { + SchemaProps: spec.SchemaProps{ + Description: "PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine", + Ref: ref("k8s.io/api/core/v1.PhotonPersistentDiskVolumeSource"), + }, + }, + "portworxVolume": { + SchemaProps: spec.SchemaProps{ + Description: "PortworxVolume represents a portworx volume attached and mounted on kubelets host machine", + Ref: ref("k8s.io/api/core/v1.PortworxVolumeSource"), + }, + }, + "scaleIO": { + SchemaProps: spec.SchemaProps{ + Description: "ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes.", + Ref: ref("k8s.io/api/core/v1.ScaleIOPersistentVolumeSource"), + }, + }, + "local": { + SchemaProps: spec.SchemaProps{ + Description: "Local represents directly-attached storage with node affinity", + Ref: ref("k8s.io/api/core/v1.LocalVolumeSource"), + }, + }, + "storageos": { + SchemaProps: spec.SchemaProps{ + Description: "StorageOS represents a StorageOS volume that is attached to the kubelet's host machine and mounted into the pod More info: https://examples.k8s.io/volumes/storageos/README.md", + Ref: ref("k8s.io/api/core/v1.StorageOSPersistentVolumeSource"), + }, + }, + "csi": { + SchemaProps: spec.SchemaProps{ + Description: "CSI represents storage that is handled by an external CSI driver (Beta feature).", + Ref: ref("k8s.io/api/core/v1.CSIPersistentVolumeSource"), + }, + }, + "accessModes": { + SchemaProps: spec.SchemaProps{ + Description: "AccessModes contains all ways the volume can be mounted. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "claimRef": { + SchemaProps: spec.SchemaProps{ + Description: "ClaimRef is part of a bi-directional binding between PersistentVolume and PersistentVolumeClaim. Expected to be non-nil when bound. claim.VolumeName is the authoritative bind between PV and PVC. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#binding", + Ref: ref("k8s.io/api/core/v1.ObjectReference"), + }, + }, + "persistentVolumeReclaimPolicy": { + SchemaProps: spec.SchemaProps{ + Description: "What happens to a persistent volume when released from its claim. Valid options are Retain (default for manually created PersistentVolumes), Delete (default for dynamically provisioned PersistentVolumes), and Recycle (deprecated). Recycle must be supported by the volume plugin underlying this PersistentVolume. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#reclaiming", + Type: []string{"string"}, + Format: "", + }, + }, + "storageClassName": { + SchemaProps: spec.SchemaProps{ + Description: "Name of StorageClass to which this persistent volume belongs. Empty value means that this volume does not belong to any StorageClass.", + Type: []string{"string"}, + Format: "", + }, + }, + "mountOptions": { + SchemaProps: spec.SchemaProps{ + Description: "A list of mount options, e.g. [\"ro\", \"soft\"]. Not validated - mount will simply fail if one is invalid. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes/#mount-options", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "volumeMode": { + SchemaProps: spec.SchemaProps{ + Description: "volumeMode defines if a volume is intended to be used with a formatted filesystem or to remain in raw block state. Value of Filesystem is implied when not included in spec.", + Type: []string{"string"}, + Format: "", + }, + }, + "nodeAffinity": { + SchemaProps: spec.SchemaProps{ + Description: "NodeAffinity defines constraints that limit what nodes this volume can be accessed from. This field influences the scheduling of pods that use this volume.", + Ref: ref("k8s.io/api/core/v1.VolumeNodeAffinity"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.AWSElasticBlockStoreVolumeSource", "k8s.io/api/core/v1.AzureDiskVolumeSource", "k8s.io/api/core/v1.AzureFilePersistentVolumeSource", "k8s.io/api/core/v1.CSIPersistentVolumeSource", "k8s.io/api/core/v1.CephFSPersistentVolumeSource", "k8s.io/api/core/v1.CinderPersistentVolumeSource", "k8s.io/api/core/v1.FCVolumeSource", "k8s.io/api/core/v1.FlexPersistentVolumeSource", "k8s.io/api/core/v1.FlockerVolumeSource", "k8s.io/api/core/v1.GCEPersistentDiskVolumeSource", "k8s.io/api/core/v1.GlusterfsPersistentVolumeSource", "k8s.io/api/core/v1.HostPathVolumeSource", "k8s.io/api/core/v1.ISCSIPersistentVolumeSource", "k8s.io/api/core/v1.LocalVolumeSource", "k8s.io/api/core/v1.NFSVolumeSource", "k8s.io/api/core/v1.ObjectReference", "k8s.io/api/core/v1.PhotonPersistentDiskVolumeSource", "k8s.io/api/core/v1.PortworxVolumeSource", "k8s.io/api/core/v1.QuobyteVolumeSource", "k8s.io/api/core/v1.RBDPersistentVolumeSource", "k8s.io/api/core/v1.ScaleIOPersistentVolumeSource", "k8s.io/api/core/v1.StorageOSPersistentVolumeSource", "k8s.io/api/core/v1.VolumeNodeAffinity", "k8s.io/api/core/v1.VsphereVirtualDiskVolumeSource", "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + } +} + +func schema_k8sio_api_core_v1_PersistentVolumeStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PersistentVolumeStatus is the current status of a persistent volume.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "phase": { + SchemaProps: spec.SchemaProps{ + Description: "Phase indicates if a volume is available, bound to a claim, or released by a claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#phase", + Type: []string{"string"}, + Format: "", + }, + }, + "message": { + SchemaProps: spec.SchemaProps{ + Description: "A human-readable message indicating details about why the volume is in this state.", + Type: []string{"string"}, + Format: "", + }, + }, + "reason": { + SchemaProps: spec.SchemaProps{ + Description: "Reason is a brief CamelCase string that describes any failure and is meant for machine parsing and tidy display in the CLI.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_k8sio_api_core_v1_PhotonPersistentDiskVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Represents a Photon Controller persistent disk resource.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "pdID": { + SchemaProps: spec.SchemaProps{ + Description: "ID that identifies Photon Controller persistent disk", + Type: []string{"string"}, + Format: "", + }, + }, + "fsType": { + SchemaProps: spec.SchemaProps{ + Description: "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"pdID"}, + }, + }, + } +} + +func schema_k8sio_api_core_v1_Pod(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Pod is a collection of containers that can run on a host. This resource is created by clients and scheduled onto hosts.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Ref: ref("k8s.io/api/core/v1.PodSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Most recently observed status of the pod. This data may not be up to date. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Ref: ref("k8s.io/api/core/v1.PodStatus"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.PodSpec", "k8s.io/api/core/v1.PodStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_core_v1_PodAffinity(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Pod affinity is a group of inter pod affinity scheduling rules.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "requiredDuringSchedulingIgnoredDuringExecution": { + SchemaProps: spec.SchemaProps{ + Description: "If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.PodAffinityTerm"), + }, + }, + }, + }, + }, + "preferredDuringSchedulingIgnoredDuringExecution": { + SchemaProps: spec.SchemaProps{ + Description: "The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding \"weight\" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.WeightedPodAffinityTerm"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.PodAffinityTerm", "k8s.io/api/core/v1.WeightedPodAffinityTerm"}, + } +} + +func schema_k8sio_api_core_v1_PodAffinityTerm(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Defines a set of pods (namely those matching the labelSelector relative to the given namespace(s)) that this pod should be co-located (affinity) or not co-located (anti-affinity) with, where co-located is defined as running on a node whose value of the label with key matches that of any node on which a pod of the set of pods is running", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "labelSelector": { + SchemaProps: spec.SchemaProps{ + Description: "A label query over a set of resources, in this case pods.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + }, + }, + "namespaces": { + SchemaProps: spec.SchemaProps{ + Description: "namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means \"this pod's namespace\"", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "topologyKey": { + SchemaProps: spec.SchemaProps{ + Description: "This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. Empty topologyKey is not allowed.", + Type: []string{"string"}, + Format: "", + }, + }, + "namespaceSelector": { + SchemaProps: spec.SchemaProps{ + Description: "A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means \"this pod's namespace\". An empty selector ({}) matches all namespaces. This field is beta-level and is only honored when PodAffinityNamespaceSelector feature is enabled.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + }, + }, + }, + Required: []string{"topologyKey"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + } +} + +func schema_k8sio_api_core_v1_PodAntiAffinity(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Pod anti affinity is a group of inter pod anti affinity scheduling rules.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "requiredDuringSchedulingIgnoredDuringExecution": { + SchemaProps: spec.SchemaProps{ + Description: "If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.PodAffinityTerm"), + }, + }, + }, + }, + }, + "preferredDuringSchedulingIgnoredDuringExecution": { + SchemaProps: spec.SchemaProps{ + Description: "The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding \"weight\" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.WeightedPodAffinityTerm"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.PodAffinityTerm", "k8s.io/api/core/v1.WeightedPodAffinityTerm"}, + } +} + +func schema_k8sio_api_core_v1_PodAttachOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PodAttachOptions is the query options to a Pod's remote attach call.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "stdin": { + SchemaProps: spec.SchemaProps{ + Description: "Stdin if true, redirects the standard input stream of the pod for this call. Defaults to false.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "stdout": { + SchemaProps: spec.SchemaProps{ + Description: "Stdout if true indicates that stdout is to be redirected for the attach call. Defaults to true.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "stderr": { + SchemaProps: spec.SchemaProps{ + Description: "Stderr if true indicates that stderr is to be redirected for the attach call. Defaults to true.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "tty": { + SchemaProps: spec.SchemaProps{ + Description: "TTY if true indicates that a tty will be allocated for the attach call. This is passed through the container runtime so the tty is allocated on the worker node by the container runtime. Defaults to false.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "container": { + SchemaProps: spec.SchemaProps{ + Description: "The container in which to execute the command. Defaults to only container if there is only one container in the pod.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_k8sio_api_core_v1_PodCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PodCondition contains details for the current condition of this pod.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "type": { + SchemaProps: spec.SchemaProps{ + Description: "Type is the type of the condition. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions", + Type: []string{"string"}, + Format: "", + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Status is the status of the condition. Can be True, False, Unknown. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions", + Type: []string{"string"}, + Format: "", + }, + }, + "lastProbeTime": { + SchemaProps: spec.SchemaProps{ + Description: "Last time we probed the condition.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "lastTransitionTime": { + SchemaProps: spec.SchemaProps{ + Description: "Last time the condition transitioned from one status to another.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "reason": { + SchemaProps: spec.SchemaProps{ + Description: "Unique, one-word, CamelCase reason for the condition's last transition.", + Type: []string{"string"}, + Format: "", + }, + }, + "message": { + SchemaProps: spec.SchemaProps{ + Description: "Human-readable message indicating details about last transition.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"type", "status"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_k8sio_api_core_v1_PodDNSConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PodDNSConfig defines the DNS parameters of a pod in addition to those generated from DNSPolicy.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "nameservers": { + SchemaProps: spec.SchemaProps{ + Description: "A list of DNS name server IP addresses. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "searches": { + SchemaProps: spec.SchemaProps{ + Description: "A list of DNS search domains for host-name lookup. This will be appended to the base search paths generated from DNSPolicy. Duplicated search paths will be removed.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "options": { + SchemaProps: spec.SchemaProps{ + Description: "A list of DNS resolver options. This will be merged with the base options generated from DNSPolicy. Duplicated entries will be removed. Resolution options given in Options will override those that appear in the base DNSPolicy.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.PodDNSConfigOption"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.PodDNSConfigOption"}, + } +} + +func schema_k8sio_api_core_v1_PodDNSConfigOption(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PodDNSConfigOption defines DNS resolver options of a pod.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Required.", + Type: []string{"string"}, + Format: "", + }, + }, + "value": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_k8sio_api_core_v1_PodExecOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PodExecOptions is the query options to a Pod's remote exec call.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "stdin": { + SchemaProps: spec.SchemaProps{ + Description: "Redirect the standard input stream of the pod for this call. Defaults to false.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "stdout": { + SchemaProps: spec.SchemaProps{ + Description: "Redirect the standard output stream of the pod for this call.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "stderr": { + SchemaProps: spec.SchemaProps{ + Description: "Redirect the standard error stream of the pod for this call.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "tty": { + SchemaProps: spec.SchemaProps{ + Description: "TTY if true indicates that a tty will be allocated for the exec call. Defaults to false.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "container": { + SchemaProps: spec.SchemaProps{ + Description: "Container in which to execute the command. Defaults to only container if there is only one container in the pod.", + Type: []string{"string"}, + Format: "", + }, + }, + "command": { + SchemaProps: spec.SchemaProps{ + Description: "Command is the remote command to execute. argv array. Not executed within a shell.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + Required: []string{"command"}, + }, + }, + } +} + +func schema_k8sio_api_core_v1_PodIP(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "IP address information for entries in the (plural) PodIPs field. Each entry includes:\n IP: An IP address allocated to the pod. Routable at least within the cluster.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "ip": { + SchemaProps: spec.SchemaProps{ + Description: "ip is an IP address (IPv4 or IPv6) assigned to the pod", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_k8sio_api_core_v1_PodList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PodList is a list of Pods.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "List of pods. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.Pod"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.Pod", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_core_v1_PodLogOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PodLogOptions is the query options for a Pod's logs REST call.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "container": { + SchemaProps: spec.SchemaProps{ + Description: "The container for which to stream logs. Defaults to only container if there is one container in the pod.", + Type: []string{"string"}, + Format: "", + }, + }, + "follow": { + SchemaProps: spec.SchemaProps{ + Description: "Follow the log stream of the pod. Defaults to false.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "previous": { + SchemaProps: spec.SchemaProps{ + Description: "Return previous terminated container logs. Defaults to false.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "sinceSeconds": { + SchemaProps: spec.SchemaProps{ + Description: "A relative time in seconds before the current time from which to show logs. If this value precedes the time a pod was started, only logs since the pod start will be returned. If this value is in the future, no logs will be returned. Only one of sinceSeconds or sinceTime may be specified.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "sinceTime": { + SchemaProps: spec.SchemaProps{ + Description: "An RFC3339 timestamp from which to show logs. If this value precedes the time a pod was started, only logs since the pod start will be returned. If this value is in the future, no logs will be returned. Only one of sinceSeconds or sinceTime may be specified.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "timestamps": { + SchemaProps: spec.SchemaProps{ + Description: "If true, add an RFC3339 or RFC3339Nano timestamp at the beginning of every line of log output. Defaults to false.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "tailLines": { + SchemaProps: spec.SchemaProps{ + Description: "If set, the number of lines from the end of the logs to show. If not specified, logs are shown from the creation of the container or sinceSeconds or sinceTime", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "limitBytes": { + SchemaProps: spec.SchemaProps{ + Description: "If set, the number of bytes to read from the server before terminating the log output. This may not display a complete final line of logging, and may return slightly more or slightly less than the specified limit.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "insecureSkipTLSVerifyBackend": { + SchemaProps: spec.SchemaProps{ + Description: "insecureSkipTLSVerifyBackend indicates that the apiserver should not confirm the validity of the serving certificate of the backend it is connecting to. This will make the HTTPS connection between the apiserver and the backend insecure. This means the apiserver cannot verify the log data it is receiving came from the real kubelet. If the kubelet is configured to verify the apiserver's TLS credentials, it does not mean the connection to the real kubelet is vulnerable to a man in the middle attack (e.g. an attacker could not intercept the actual log data coming from the real kubelet).", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_k8sio_api_core_v1_PodOS(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PodOS defines the OS parameters of a pod.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name is the name of the operating system. The currently supported values are linux and windows. Additional value may be defined in future and can be one of: https://github.com/opencontainers/runtime-spec/blob/master/config.md#platform-specific-configuration Clients should expect to handle additional values and treat unrecognized values in this field as os: null", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"name"}, + }, + }, + } +} + +func schema_k8sio_api_core_v1_PodPortForwardOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PodPortForwardOptions is the query options to a Pod's port forward call when using WebSockets. The `port` query parameter must specify the port or ports (comma separated) to forward over. Port forwarding over SPDY does not use these options. It requires the port to be passed in the `port` header as part of request.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "ports": { + SchemaProps: spec.SchemaProps{ + Description: "List of ports to forward Required when using WebSockets", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + }, + }, + }, + }, + }, + } +} + +func schema_k8sio_api_core_v1_PodProxyOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PodProxyOptions is the query options to a Pod's proxy call.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "path": { + SchemaProps: spec.SchemaProps{ + Description: "Path is the URL path to use for the current proxy request to pod.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_k8sio_api_core_v1_PodReadinessGate(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PodReadinessGate contains the reference to a pod condition", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "conditionType": { + SchemaProps: spec.SchemaProps{ + Description: "ConditionType refers to a condition in the pod's condition list with matching type.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"conditionType"}, + }, + }, + } +} + +func schema_k8sio_api_core_v1_PodSecurityContext(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PodSecurityContext holds pod-level security attributes and common container settings. Some fields are also present in container.securityContext. Field values of container.securityContext take precedence over field values of PodSecurityContext.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "seLinuxOptions": { + SchemaProps: spec.SchemaProps{ + Description: "The SELinux context to be applied to all containers. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. Note that this field cannot be set when spec.os.name is windows.", + Ref: ref("k8s.io/api/core/v1.SELinuxOptions"), + }, + }, + "windowsOptions": { + SchemaProps: spec.SchemaProps{ + Description: "The Windows specific settings applied to all containers. If unspecified, the options within a container's SecurityContext will be used. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is linux.", + Ref: ref("k8s.io/api/core/v1.WindowsSecurityContextOptions"), + }, + }, + "runAsUser": { + SchemaProps: spec.SchemaProps{ + Description: "The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. Note that this field cannot be set when spec.os.name is windows.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "runAsGroup": { + SchemaProps: spec.SchemaProps{ + Description: "The GID to run the entrypoint of the container process. Uses runtime default if unset. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. Note that this field cannot be set when spec.os.name is windows.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "runAsNonRoot": { + SchemaProps: spec.SchemaProps{ + Description: "Indicates that the container must run as a non-root user. If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does. If unset or false, no such validation will be performed. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "supplementalGroups": { + SchemaProps: spec.SchemaProps{ + Description: "A list of groups applied to the first process run in each container, in addition to the container's primary GID. If unspecified, no groups will be added to any container. Note that this field cannot be set when spec.os.name is windows.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"integer"}, + Format: "int64", + }, + }, + }, + }, + }, + "fsGroup": { + SchemaProps: spec.SchemaProps{ + Description: "A special supplemental group that applies to all containers in a pod. Some volume types allow the Kubelet to change the ownership of that volume to be owned by the pod:\n\n1. The owning GID will be the FSGroup 2. The setgid bit is set (new files created in the volume will be owned by FSGroup) 3. The permission bits are OR'd with rw-rw----\n\nIf unset, the Kubelet will not modify the ownership and permissions of any volume. Note that this field cannot be set when spec.os.name is windows.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "sysctls": { + SchemaProps: spec.SchemaProps{ + Description: "Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch. Note that this field cannot be set when spec.os.name is windows.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.Sysctl"), + }, + }, + }, + }, + }, + "fsGroupChangePolicy": { + SchemaProps: spec.SchemaProps{ + Description: "fsGroupChangePolicy defines behavior of changing ownership and permission of the volume before being exposed inside Pod. This field will only apply to volume types which support fsGroup based ownership(and permissions). It will have no effect on ephemeral volume types such as: secret, configmaps and emptydir. Valid values are \"OnRootMismatch\" and \"Always\". If not specified, \"Always\" is used. Note that this field cannot be set when spec.os.name is windows.", + Type: []string{"string"}, + Format: "", + }, + }, + "seccompProfile": { + SchemaProps: spec.SchemaProps{ + Description: "The seccomp options to use by the containers in this pod. Note that this field cannot be set when spec.os.name is windows.", + Ref: ref("k8s.io/api/core/v1.SeccompProfile"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.SELinuxOptions", "k8s.io/api/core/v1.SeccompProfile", "k8s.io/api/core/v1.Sysctl", "k8s.io/api/core/v1.WindowsSecurityContextOptions"}, + } +} + +func schema_k8sio_api_core_v1_PodSignature(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Describes the class of pods that should avoid this node. Exactly one field should be set.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "podController": { + SchemaProps: spec.SchemaProps{ + Description: "Reference to controller whose pods should avoid this node.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.OwnerReference"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.OwnerReference"}, + } +} + +func schema_k8sio_api_core_v1_PodSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PodSpec is a description of a pod.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "volumes": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-patch-merge-key": "name", + "x-kubernetes-patch-strategy": "merge,retainKeys", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.Volume"), + }, + }, + }, + }, + }, + "initContainers": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-patch-merge-key": "name", + "x-kubernetes-patch-strategy": "merge", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "List of initialization containers belonging to the pod. Init containers are executed in order prior to containers being started. If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. The name for an init container or normal container must be unique among all containers. Init containers may not have Lifecycle actions, Readiness probes, Liveness probes, or Startup probes. The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit for each resource type, and then using the max of of that value or the sum of the normal containers. Limits are applied to init containers in a similar fashion. Init containers cannot currently be added or removed. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.Container"), + }, + }, + }, + }, + }, + "containers": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-patch-merge-key": "name", + "x-kubernetes-patch-strategy": "merge", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.Container"), + }, + }, + }, + }, + }, + "ephemeralContainers": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-patch-merge-key": "name", + "x-kubernetes-patch-strategy": "merge", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "List of ephemeral containers run in this pod. Ephemeral containers may be run in an existing pod to perform user-initiated actions such as debugging. This list cannot be specified when creating a pod, and it cannot be modified by updating the pod spec. In order to add an ephemeral container to an existing pod, use the pod's ephemeralcontainers subresource. This field is beta-level and available on clusters that haven't disabled the EphemeralContainers feature gate.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.EphemeralContainer"), + }, + }, + }, + }, + }, + "restartPolicy": { + SchemaProps: spec.SchemaProps{ + Description: "Restart policy for all containers within the pod. One of Always, OnFailure, Never. Default to Always. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy", + Type: []string{"string"}, + Format: "", + }, + }, + "terminationGracePeriodSeconds": { + SchemaProps: spec.SchemaProps{ + Description: "Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). If this value is nil, the default grace period will be used instead. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. Defaults to 30 seconds.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "activeDeadlineSeconds": { + SchemaProps: spec.SchemaProps{ + Description: "Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "dnsPolicy": { + SchemaProps: spec.SchemaProps{ + Description: "Set DNS policy for the pod. Defaults to \"ClusterFirst\". Valid values are 'ClusterFirstWithHostNet', 'ClusterFirst', 'Default' or 'None'. DNS parameters given in DNSConfig will be merged with the policy selected with DNSPolicy. To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'.", + Type: []string{"string"}, + Format: "", + }, + }, + "nodeSelector": { + SchemaProps: spec.SchemaProps{ + Description: "NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "serviceAccountName": { + SchemaProps: spec.SchemaProps{ + Description: "ServiceAccountName is the name of the ServiceAccount to use to run this pod. More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/", + Type: []string{"string"}, + Format: "", + }, + }, + "serviceAccount": { + SchemaProps: spec.SchemaProps{ + Description: "DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead.", + Type: []string{"string"}, + Format: "", + }, + }, + "automountServiceAccountToken": { + SchemaProps: spec.SchemaProps{ + Description: "AutomountServiceAccountToken indicates whether a service account token should be automatically mounted.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "nodeName": { + SchemaProps: spec.SchemaProps{ + Description: "NodeName is a request to schedule this pod onto a specific node. If it is non-empty, the scheduler simply schedules this pod onto that node, assuming that it fits resource requirements.", + Type: []string{"string"}, + Format: "", + }, + }, + "hostNetwork": { + SchemaProps: spec.SchemaProps{ + Description: "Host networking requested for this pod. Use the host's network namespace. If this option is set, the ports that will be used must be specified. Default to false.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "hostPID": { + SchemaProps: spec.SchemaProps{ + Description: "Use the host's pid namespace. Optional: Default to false.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "hostIPC": { + SchemaProps: spec.SchemaProps{ + Description: "Use the host's ipc namespace. Optional: Default to false.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "shareProcessNamespace": { + SchemaProps: spec.SchemaProps{ + Description: "Share a single process namespace between all of the containers in a pod. When this is set containers will be able to view and signal processes from other containers in the same pod, and the first process in each container will not be assigned PID 1. HostPID and ShareProcessNamespace cannot both be set. Optional: Default to false.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "securityContext": { + SchemaProps: spec.SchemaProps{ + Description: "SecurityContext holds pod-level security attributes and common container settings. Optional: Defaults to empty. See type description for default values of each field.", + Ref: ref("k8s.io/api/core/v1.PodSecurityContext"), + }, + }, + "imagePullSecrets": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-patch-merge-key": "name", + "x-kubernetes-patch-strategy": "merge", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), + }, + }, + }, + }, + }, + "hostname": { + SchemaProps: spec.SchemaProps{ + Description: "Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value.", + Type: []string{"string"}, + Format: "", + }, + }, + "subdomain": { + SchemaProps: spec.SchemaProps{ + Description: "If specified, the fully qualified Pod hostname will be \"...svc.\". If not specified, the pod will not have a domainname at all.", + Type: []string{"string"}, + Format: "", + }, + }, + "affinity": { + SchemaProps: spec.SchemaProps{ + Description: "If specified, the pod's scheduling constraints", + Ref: ref("k8s.io/api/core/v1.Affinity"), + }, + }, + "schedulerName": { + SchemaProps: spec.SchemaProps{ + Description: "If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler.", + Type: []string{"string"}, + Format: "", + }, + }, + "tolerations": { + SchemaProps: spec.SchemaProps{ + Description: "If specified, the pod's tolerations.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.Toleration"), + }, + }, + }, + }, + }, + "hostAliases": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-patch-merge-key": "ip", + "x-kubernetes-patch-strategy": "merge", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts file if specified. This is only valid for non-hostNetwork pods.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.HostAlias"), + }, + }, + }, + }, + }, + "priorityClassName": { + SchemaProps: spec.SchemaProps{ + Description: "If specified, indicates the pod's priority. \"system-node-critical\" and \"system-cluster-critical\" are two special keywords which indicate the highest priorities with the former being the highest priority. Any other name must be defined by creating a PriorityClass object with that name. If not specified, the pod priority will be default or zero if there is no default.", + Type: []string{"string"}, + Format: "", + }, + }, + "priority": { + SchemaProps: spec.SchemaProps{ + Description: "The priority value. Various system components use this field to find the priority of the pod. When Priority Admission Controller is enabled, it prevents users from setting this field. The admission controller populates this field from PriorityClassName. The higher the value, the higher the priority.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "dnsConfig": { + SchemaProps: spec.SchemaProps{ + Description: "Specifies the DNS parameters of a pod. Parameters specified here will be merged to the generated DNS configuration based on DNSPolicy.", + Ref: ref("k8s.io/api/core/v1.PodDNSConfig"), + }, + }, + "readinessGates": { + SchemaProps: spec.SchemaProps{ + Description: "If specified, all readiness gates will be evaluated for pod readiness. A pod is ready when all its containers are ready AND all conditions specified in the readiness gates have status equal to \"True\" More info: https://git.k8s.io/enhancements/keps/sig-network/580-pod-readiness-gates", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.PodReadinessGate"), + }, + }, + }, + }, + }, + "runtimeClassName": { + SchemaProps: spec.SchemaProps{ + Description: "RuntimeClassName refers to a RuntimeClass object in the node.k8s.io group, which should be used to run this pod. If no RuntimeClass resource matches the named class, the pod will not be run. If unset or empty, the \"legacy\" RuntimeClass will be used, which is an implicit class with an empty definition that uses the default runtime handler. More info: https://git.k8s.io/enhancements/keps/sig-node/585-runtime-class This is a beta feature as of Kubernetes v1.14.", + Type: []string{"string"}, + Format: "", + }, + }, + "enableServiceLinks": { + SchemaProps: spec.SchemaProps{ + Description: "EnableServiceLinks indicates whether information about services should be injected into pod's environment variables, matching the syntax of Docker links. Optional: Defaults to true.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "preemptionPolicy": { + SchemaProps: spec.SchemaProps{ + Description: "PreemptionPolicy is the Policy for preempting pods with lower priority. One of Never, PreemptLowerPriority. Defaults to PreemptLowerPriority if unset. This field is beta-level, gated by the NonPreemptingPriority feature-gate.", + Type: []string{"string"}, + Format: "", + }, + }, + "overhead": { + SchemaProps: spec.SchemaProps{ + Description: "Overhead represents the resource overhead associated with running a pod for a given RuntimeClass. This field will be autopopulated at admission time by the RuntimeClass admission controller. If the RuntimeClass admission controller is enabled, overhead must not be set in Pod create requests. The RuntimeClass admission controller will reject Pod create requests which have the overhead already set. If RuntimeClass is configured and selected in the PodSpec, Overhead will be set to the value defined in the corresponding RuntimeClass, otherwise it will remain unset and treated as zero. More info: https://git.k8s.io/enhancements/keps/sig-node/688-pod-overhead/README.md This field is beta-level as of Kubernetes v1.18, and is only honored by servers that enable the PodOverhead feature.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + }, + }, + }, + }, + }, + "topologySpreadConstraints": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-map-keys": []interface{}{ + "topologyKey", + "whenUnsatisfiable", + }, + "x-kubernetes-list-type": "map", + "x-kubernetes-patch-merge-key": "topologyKey", + "x-kubernetes-patch-strategy": "merge", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "TopologySpreadConstraints describes how a group of pods ought to spread across topology domains. Scheduler will schedule pods in a way which abides by the constraints. All topologySpreadConstraints are ANDed.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.TopologySpreadConstraint"), + }, + }, + }, + }, + }, + "setHostnameAsFQDN": { + SchemaProps: spec.SchemaProps{ + Description: "If true the pod's hostname will be configured as the pod's FQDN, rather than the leaf name (the default). In Linux containers, this means setting the FQDN in the hostname field of the kernel (the nodename field of struct utsname). In Windows containers, this means setting the registry value of hostname for the registry key HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters to FQDN. If a pod does not have FQDN, this has no effect. Default to false.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "os": { + SchemaProps: spec.SchemaProps{ + Description: "Specifies the OS of the containers in the pod. Some pod and container fields are restricted if this is set.\n\nIf the OS field is set to linux, the following fields must be unset: -securityContext.windowsOptions\n\nIf the OS field is set to windows, following fields must be unset: - spec.hostPID - spec.hostIPC - spec.securityContext.seLinuxOptions - spec.securityContext.seccompProfile - spec.securityContext.fsGroup - spec.securityContext.fsGroupChangePolicy - spec.securityContext.sysctls - spec.shareProcessNamespace - spec.securityContext.runAsUser - spec.securityContext.runAsGroup - spec.securityContext.supplementalGroups - spec.containers[*].securityContext.seLinuxOptions - spec.containers[*].securityContext.seccompProfile - spec.containers[*].securityContext.capabilities - spec.containers[*].securityContext.readOnlyRootFilesystem - spec.containers[*].securityContext.privileged - spec.containers[*].securityContext.allowPrivilegeEscalation - spec.containers[*].securityContext.procMount - spec.containers[*].securityContext.runAsUser - spec.containers[*].securityContext.runAsGroup This is an alpha field and requires the IdentifyPodOS feature", + Ref: ref("k8s.io/api/core/v1.PodOS"), + }, + }, + }, + Required: []string{"containers"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.Affinity", "k8s.io/api/core/v1.Container", "k8s.io/api/core/v1.EphemeralContainer", "k8s.io/api/core/v1.HostAlias", "k8s.io/api/core/v1.LocalObjectReference", "k8s.io/api/core/v1.PodDNSConfig", "k8s.io/api/core/v1.PodOS", "k8s.io/api/core/v1.PodReadinessGate", "k8s.io/api/core/v1.PodSecurityContext", "k8s.io/api/core/v1.Toleration", "k8s.io/api/core/v1.TopologySpreadConstraint", "k8s.io/api/core/v1.Volume", "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + } +} + +func schema_k8sio_api_core_v1_PodStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PodStatus represents information about the status of a pod. Status may trail the actual state of a system, especially if the node that hosts the pod cannot contact the control plane.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "phase": { + SchemaProps: spec.SchemaProps{ + Description: "The phase of a Pod is a simple, high-level summary of where the Pod is in its lifecycle. The conditions array, the reason and message fields, and the individual container status arrays contain more detail about the pod's status. There are five possible phase values:\n\nPending: The pod has been accepted by the Kubernetes system, but one or more of the container images has not been created. This includes time before being scheduled as well as time spent downloading images over the network, which could take a while. Running: The pod has been bound to a node, and all of the containers have been created. At least one container is still running, or is in the process of starting or restarting. Succeeded: All containers in the pod have terminated in success, and will not be restarted. Failed: All containers in the pod have terminated, and at least one container has terminated in failure. The container either exited with non-zero status or was terminated by the system. Unknown: For some reason the state of the pod could not be obtained, typically due to an error in communicating with the host of the pod.\n\nMore info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-phase", + Type: []string{"string"}, + Format: "", + }, + }, + "conditions": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-patch-merge-key": "type", + "x-kubernetes-patch-strategy": "merge", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "Current service state of pod. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.PodCondition"), + }, + }, + }, + }, + }, + "message": { + SchemaProps: spec.SchemaProps{ + Description: "A human readable message indicating details about why the pod is in this condition.", + Type: []string{"string"}, + Format: "", + }, + }, + "reason": { + SchemaProps: spec.SchemaProps{ + Description: "A brief CamelCase message indicating details about why the pod is in this state. e.g. 'Evicted'", + Type: []string{"string"}, + Format: "", + }, + }, + "nominatedNodeName": { + SchemaProps: spec.SchemaProps{ + Description: "nominatedNodeName is set only when this pod preempts other pods on the node, but it cannot be scheduled right away as preemption victims receive their graceful termination periods. This field does not guarantee that the pod will be scheduled on this node. Scheduler may decide to place the pod elsewhere if other nodes become available sooner. Scheduler may also decide to give the resources on this node to a higher priority pod that is created after preemption. As a result, this field may be different than PodSpec.nodeName when the pod is scheduled.", + Type: []string{"string"}, + Format: "", + }, + }, + "hostIP": { + SchemaProps: spec.SchemaProps{ + Description: "IP address of the host to which the pod is assigned. Empty if not yet scheduled.", + Type: []string{"string"}, + Format: "", + }, + }, + "podIP": { + SchemaProps: spec.SchemaProps{ + Description: "IP address allocated to the pod. Routable at least within the cluster. Empty if not yet allocated.", + Type: []string{"string"}, + Format: "", + }, + }, + "podIPs": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-patch-merge-key": "ip", + "x-kubernetes-patch-strategy": "merge", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "podIPs holds the IP addresses allocated to the pod. If this field is specified, the 0th entry must match the podIP field. Pods may be allocated at most 1 value for each of IPv4 and IPv6. This list is empty if no IPs have been allocated yet.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.PodIP"), + }, + }, + }, + }, + }, + "startTime": { + SchemaProps: spec.SchemaProps{ + Description: "RFC 3339 date and time at which the object was acknowledged by the Kubelet. This is before the Kubelet pulled the container image(s) for the pod.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "initContainerStatuses": { + SchemaProps: spec.SchemaProps{ + Description: "The list has one entry per init container in the manifest. The most recent successful init container will have ready = true, the most recently started container will have startTime set. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.ContainerStatus"), + }, + }, + }, + }, + }, + "containerStatuses": { + SchemaProps: spec.SchemaProps{ + Description: "The list has one entry per container in the manifest. Each entry is currently the output of `docker inspect`. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.ContainerStatus"), + }, + }, + }, + }, + }, + "qosClass": { + SchemaProps: spec.SchemaProps{ + Description: "The Quality of Service (QOS) classification assigned to the pod based on resource requirements See PodQOSClass type for available QOS classes More info: https://git.k8s.io/community/contributors/design-proposals/node/resource-qos.md", + Type: []string{"string"}, + Format: "", + }, + }, + "ephemeralContainerStatuses": { + SchemaProps: spec.SchemaProps{ + Description: "Status for any ephemeral containers that have run in this pod. This field is beta-level and available on clusters that haven't disabled the EphemeralContainers feature gate.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.ContainerStatus"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.ContainerStatus", "k8s.io/api/core/v1.PodCondition", "k8s.io/api/core/v1.PodIP", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_k8sio_api_core_v1_PodStatusResult(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PodStatusResult is a wrapper for PodStatus returned by kubelet that can be encode/decoded", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Most recently observed status of the pod. This data may not be up to date. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Ref: ref("k8s.io/api/core/v1.PodStatus"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.PodStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_core_v1_PodTemplate(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PodTemplate describes a template for creating copies of a predefined pod.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "template": { + SchemaProps: spec.SchemaProps{ + Description: "Template defines the pods that will be created from this pod template. https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Ref: ref("k8s.io/api/core/v1.PodTemplateSpec"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.PodTemplateSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_core_v1_PodTemplateList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PodTemplateList is a list of PodTemplates.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "List of pod templates", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.PodTemplate"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.PodTemplate", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_core_v1_PodTemplateSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PodTemplateSpec describes the data a pod should have when created from a template", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "metadata": { + SchemaProps: spec.SchemaProps{ + Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Ref: ref("k8s.io/api/core/v1.PodSpec"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.PodSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_core_v1_PortStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "port": { + SchemaProps: spec.SchemaProps{ + Description: "Port is the port number of the service port of which status is recorded here", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "protocol": { + SchemaProps: spec.SchemaProps{ + Description: "Protocol is the protocol of the service port of which status is recorded here The supported values are: \"TCP\", \"UDP\", \"SCTP\"", + Type: []string{"string"}, + Format: "", + }, + }, + "error": { + SchemaProps: spec.SchemaProps{ + Description: "Error is to record the problem with the service port The format of the error shall comply with the following rules: - built-in error values shall be specified in this file and those shall use\n CamelCase names\n- cloud provider specific error values must have names that comply with the\n format foo.example.com/CamelCase.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"port", "protocol"}, + }, + }, + } +} + +func schema_k8sio_api_core_v1_PortworxVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PortworxVolumeSource represents a Portworx volume resource.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "volumeID": { + SchemaProps: spec.SchemaProps{ + Description: "VolumeID uniquely identifies a Portworx volume", + Type: []string{"string"}, + Format: "", + }, + }, + "fsType": { + SchemaProps: spec.SchemaProps{ + Description: "FSType represents the filesystem type to mount Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\". Implicitly inferred to be \"ext4\" if unspecified.", + Type: []string{"string"}, + Format: "", + }, + }, + "readOnly": { + SchemaProps: spec.SchemaProps{ + Description: "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + Required: []string{"volumeID"}, + }, + }, + } +} + +func schema_k8sio_api_core_v1_PreferAvoidPodsEntry(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Describes a class of pods that should avoid this node.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "podSignature": { + SchemaProps: spec.SchemaProps{ + Description: "The class of pods.", + Ref: ref("k8s.io/api/core/v1.PodSignature"), + }, + }, + "evictionTime": { + SchemaProps: spec.SchemaProps{ + Description: "Time at which this entry was added to the list.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "reason": { + SchemaProps: spec.SchemaProps{ + Description: "(brief) reason why this entry was added to the list.", + Type: []string{"string"}, + Format: "", + }, + }, + "message": { + SchemaProps: spec.SchemaProps{ + Description: "Human readable message indicating why this entry was added to the list.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"podSignature"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.PodSignature", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_k8sio_api_core_v1_PreferredSchedulingTerm(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "An empty preferred scheduling term matches all objects with implicit weight 0 (i.e. it's a no-op). A null preferred scheduling term matches no objects (i.e. is also a no-op).", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "weight": { + SchemaProps: spec.SchemaProps{ + Description: "Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "preference": { + SchemaProps: spec.SchemaProps{ + Description: "A node selector term, associated with the corresponding weight.", + Ref: ref("k8s.io/api/core/v1.NodeSelectorTerm"), + }, + }, + }, + Required: []string{"weight", "preference"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.NodeSelectorTerm"}, + } +} + +func schema_k8sio_api_core_v1_Probe(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "exec": { + SchemaProps: spec.SchemaProps{ + Description: "Exec specifies the action to take.", + Ref: ref("k8s.io/api/core/v1.ExecAction"), + }, + }, + "httpGet": { + SchemaProps: spec.SchemaProps{ + Description: "HTTPGet specifies the http request to perform.", + Ref: ref("k8s.io/api/core/v1.HTTPGetAction"), + }, + }, + "tcpSocket": { + SchemaProps: spec.SchemaProps{ + Description: "TCPSocket specifies an action involving a TCP port.", + Ref: ref("k8s.io/api/core/v1.TCPSocketAction"), + }, + }, + "grpc": { + SchemaProps: spec.SchemaProps{ + Description: "GRPC specifies an action involving a GRPC port. This is an alpha field and requires enabling GRPCContainerProbe feature gate.", + Ref: ref("k8s.io/api/core/v1.GRPCAction"), + }, + }, + "initialDelaySeconds": { + SchemaProps: spec.SchemaProps{ + Description: "Number of seconds after the container has started before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "timeoutSeconds": { + SchemaProps: spec.SchemaProps{ + Description: "Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "periodSeconds": { + SchemaProps: spec.SchemaProps{ + Description: "How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "successThreshold": { + SchemaProps: spec.SchemaProps{ + Description: "Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "failureThreshold": { + SchemaProps: spec.SchemaProps{ + Description: "Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "terminationGracePeriodSeconds": { + SchemaProps: spec.SchemaProps{ + Description: "Optional duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the pod spec. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.ExecAction", "k8s.io/api/core/v1.GRPCAction", "k8s.io/api/core/v1.HTTPGetAction", "k8s.io/api/core/v1.TCPSocketAction"}, + } +} + +func schema_k8sio_api_core_v1_ProbeHandler(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ProbeHandler defines a specific action that should be taken in a probe. One and only one of the fields must be specified.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "exec": { + SchemaProps: spec.SchemaProps{ + Description: "Exec specifies the action to take.", + Ref: ref("k8s.io/api/core/v1.ExecAction"), + }, + }, + "httpGet": { + SchemaProps: spec.SchemaProps{ + Description: "HTTPGet specifies the http request to perform.", + Ref: ref("k8s.io/api/core/v1.HTTPGetAction"), + }, + }, + "tcpSocket": { + SchemaProps: spec.SchemaProps{ + Description: "TCPSocket specifies an action involving a TCP port.", + Ref: ref("k8s.io/api/core/v1.TCPSocketAction"), + }, + }, + "grpc": { + SchemaProps: spec.SchemaProps{ + Description: "GRPC specifies an action involving a GRPC port. This is an alpha field and requires enabling GRPCContainerProbe feature gate.", + Ref: ref("k8s.io/api/core/v1.GRPCAction"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.ExecAction", "k8s.io/api/core/v1.GRPCAction", "k8s.io/api/core/v1.HTTPGetAction", "k8s.io/api/core/v1.TCPSocketAction"}, + } +} + +func schema_k8sio_api_core_v1_ProjectedVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Represents a projected volume source", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "sources": { + SchemaProps: spec.SchemaProps{ + Description: "list of volume projections", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.VolumeProjection"), + }, + }, + }, + }, + }, + "defaultMode": { + SchemaProps: spec.SchemaProps{ + Description: "Mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.VolumeProjection"}, + } +} + +func schema_k8sio_api_core_v1_QuobyteVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Represents a Quobyte mount that lasts the lifetime of a pod. Quobyte volumes do not support ownership management or SELinux relabeling.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "registry": { + SchemaProps: spec.SchemaProps{ + Description: "Registry represents a single or multiple Quobyte Registry services specified as a string as host:port pair (multiple entries are separated with commas) which acts as the central registry for volumes", + Type: []string{"string"}, + Format: "", + }, + }, + "volume": { + SchemaProps: spec.SchemaProps{ + Description: "Volume is a string that references an already created Quobyte volume by name.", + Type: []string{"string"}, + Format: "", + }, + }, + "readOnly": { + SchemaProps: spec.SchemaProps{ + Description: "ReadOnly here will force the Quobyte volume to be mounted with read-only permissions. Defaults to false.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "user": { + SchemaProps: spec.SchemaProps{ + Description: "User to map volume access to Defaults to serivceaccount user", + Type: []string{"string"}, + Format: "", + }, + }, + "group": { + SchemaProps: spec.SchemaProps{ + Description: "Group to map volume access to Default is no group", + Type: []string{"string"}, + Format: "", + }, + }, + "tenant": { + SchemaProps: spec.SchemaProps{ + Description: "Tenant owning the given Quobyte volume in the Backend Used with dynamically provisioned Quobyte volumes, value is set by the plugin", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"registry", "volume"}, + }, + }, + } +} + +func schema_k8sio_api_core_v1_RBDPersistentVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Represents a Rados Block Device mount that lasts the lifetime of a pod. RBD volumes support ownership management and SELinux relabeling.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "monitors": { + SchemaProps: spec.SchemaProps{ + Description: "A collection of Ceph monitors. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "image": { + SchemaProps: spec.SchemaProps{ + Description: "The rados image name. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it", + Type: []string{"string"}, + Format: "", + }, + }, + "fsType": { + SchemaProps: spec.SchemaProps{ + Description: "Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd", + Type: []string{"string"}, + Format: "", + }, + }, + "pool": { + SchemaProps: spec.SchemaProps{ + Description: "The rados pool name. Default is rbd. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it", + Type: []string{"string"}, + Format: "", + }, + }, + "user": { + SchemaProps: spec.SchemaProps{ + Description: "The rados user name. Default is admin. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it", + Type: []string{"string"}, + Format: "", + }, + }, + "keyring": { + SchemaProps: spec.SchemaProps{ + Description: "Keyring is the path to key ring for RBDUser. Default is /etc/ceph/keyring. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it", + Type: []string{"string"}, + Format: "", + }, + }, + "secretRef": { + SchemaProps: spec.SchemaProps{ + Description: "SecretRef is name of the authentication secret for RBDUser. If provided overrides keyring. Default is nil. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it", + Ref: ref("k8s.io/api/core/v1.SecretReference"), + }, + }, + "readOnly": { + SchemaProps: spec.SchemaProps{ + Description: "ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + Required: []string{"monitors", "image"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.SecretReference"}, + } +} + +func schema_k8sio_api_core_v1_RBDVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Represents a Rados Block Device mount that lasts the lifetime of a pod. RBD volumes support ownership management and SELinux relabeling.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "monitors": { + SchemaProps: spec.SchemaProps{ + Description: "A collection of Ceph monitors. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "image": { + SchemaProps: spec.SchemaProps{ + Description: "The rados image name. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it", + Type: []string{"string"}, + Format: "", + }, + }, + "fsType": { + SchemaProps: spec.SchemaProps{ + Description: "Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd", + Type: []string{"string"}, + Format: "", + }, + }, + "pool": { + SchemaProps: spec.SchemaProps{ + Description: "The rados pool name. Default is rbd. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it", + Type: []string{"string"}, + Format: "", + }, + }, + "user": { + SchemaProps: spec.SchemaProps{ + Description: "The rados user name. Default is admin. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it", + Type: []string{"string"}, + Format: "", + }, + }, + "keyring": { + SchemaProps: spec.SchemaProps{ + Description: "Keyring is the path to key ring for RBDUser. Default is /etc/ceph/keyring. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it", + Type: []string{"string"}, + Format: "", + }, + }, + "secretRef": { + SchemaProps: spec.SchemaProps{ + Description: "SecretRef is name of the authentication secret for RBDUser. If provided overrides keyring. Default is nil. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it", + Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), + }, + }, + "readOnly": { + SchemaProps: spec.SchemaProps{ + Description: "ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + Required: []string{"monitors", "image"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.LocalObjectReference"}, + } +} + +func schema_k8sio_api_core_v1_RangeAllocation(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "RangeAllocation is not a public type.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "range": { + SchemaProps: spec.SchemaProps{ + Description: "Range is string that identifies the range represented by 'data'.", + Type: []string{"string"}, + Format: "", + }, + }, + "data": { + SchemaProps: spec.SchemaProps{ + Description: "Data is a bit array containing all allocated addresses in the previous segment.", + Type: []string{"string"}, + Format: "byte", + }, + }, + }, + Required: []string{"range", "data"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_core_v1_ReplicationController(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ReplicationController represents the configuration of a replication controller.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Description: "If the Labels of a ReplicationController are empty, they are defaulted to be the same as the Pod(s) that the replication controller manages. Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "Spec defines the specification of the desired behavior of the replication controller. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Ref: ref("k8s.io/api/core/v1.ReplicationControllerSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Status is the most recently observed status of the replication controller. This data may be out of date by some window of time. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Ref: ref("k8s.io/api/core/v1.ReplicationControllerStatus"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.ReplicationControllerSpec", "k8s.io/api/core/v1.ReplicationControllerStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_core_v1_ReplicationControllerCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ReplicationControllerCondition describes the state of a replication controller at a certain point.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "type": { + SchemaProps: spec.SchemaProps{ + Description: "Type of replication controller condition.", + Type: []string{"string"}, + Format: "", + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Status of the condition, one of True, False, Unknown.", + Type: []string{"string"}, + Format: "", + }, + }, + "lastTransitionTime": { + SchemaProps: spec.SchemaProps{ + Description: "The last time the condition transitioned from one status to another.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "reason": { + SchemaProps: spec.SchemaProps{ + Description: "The reason for the condition's last transition.", + Type: []string{"string"}, + Format: "", + }, + }, + "message": { + SchemaProps: spec.SchemaProps{ + Description: "A human readable message indicating details about the transition.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"type", "status"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_k8sio_api_core_v1_ReplicationControllerList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ReplicationControllerList is a collection of replication controllers.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "List of replication controllers. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.ReplicationController"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.ReplicationController", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_core_v1_ReplicationControllerSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ReplicationControllerSpec is the specification of a replication controller.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "replicas": { + SchemaProps: spec.SchemaProps{ + Description: "Replicas is the number of desired replicas. This is a pointer to distinguish between explicit zero and unspecified. Defaults to 1. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#what-is-a-replicationcontroller", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "minReadySeconds": { + SchemaProps: spec.SchemaProps{ + Description: "Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready)", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "selector": { + SchemaProps: spec.SchemaProps{ + Description: "Selector is a label query over pods that should match the Replicas count. If Selector is empty, it is defaulted to the labels present on the Pod template. Label keys and values that must match in order to be controlled by this replication controller, if empty defaulted to labels on Pod template. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "template": { + SchemaProps: spec.SchemaProps{ + Description: "Template is the object that describes the pod that will be created if insufficient replicas are detected. This takes precedence over a TemplateRef. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template", + Ref: ref("k8s.io/api/core/v1.PodTemplateSpec"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.PodTemplateSpec"}, + } +} + +func schema_k8sio_api_core_v1_ReplicationControllerStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ReplicationControllerStatus represents the current status of a replication controller.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "replicas": { + SchemaProps: spec.SchemaProps{ + Description: "Replicas is the most recently oberved number of replicas. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#what-is-a-replicationcontroller", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "fullyLabeledReplicas": { + SchemaProps: spec.SchemaProps{ + Description: "The number of pods that have labels matching the labels of the pod template of the replication controller.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "readyReplicas": { + SchemaProps: spec.SchemaProps{ + Description: "The number of ready replicas for this replication controller.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "availableReplicas": { + SchemaProps: spec.SchemaProps{ + Description: "The number of available replicas (ready for at least minReadySeconds) for this replication controller.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "observedGeneration": { + SchemaProps: spec.SchemaProps{ + Description: "ObservedGeneration reflects the generation of the most recently observed replication controller.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "conditions": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-patch-merge-key": "type", + "x-kubernetes-patch-strategy": "merge", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "Represents the latest available observations of a replication controller's current state.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.ReplicationControllerCondition"), + }, + }, + }, + }, + }, + }, + Required: []string{"replicas"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.ReplicationControllerCondition"}, + } +} + +func schema_k8sio_api_core_v1_ResourceFieldSelector(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ResourceFieldSelector represents container resources (cpu, memory) and their output format", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "containerName": { + SchemaProps: spec.SchemaProps{ + Description: "Container name: required for volumes, optional for env vars", + Type: []string{"string"}, + Format: "", + }, + }, + "resource": { + SchemaProps: spec.SchemaProps{ + Description: "Required: resource to select", + Type: []string{"string"}, + Format: "", + }, + }, + "divisor": { + SchemaProps: spec.SchemaProps{ + Description: "Specifies the output format of the exposed resources, defaults to \"1\"", + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + }, + }, + }, + Required: []string{"resource"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + } +} + +func schema_k8sio_api_core_v1_ResourceQuota(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ResourceQuota sets aggregate quota restrictions enforced per namespace", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "Spec defines the desired quota. https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Ref: ref("k8s.io/api/core/v1.ResourceQuotaSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Status defines the actual enforced quota and its current usage. https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Ref: ref("k8s.io/api/core/v1.ResourceQuotaStatus"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.ResourceQuotaSpec", "k8s.io/api/core/v1.ResourceQuotaStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_core_v1_ResourceQuotaList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ResourceQuotaList is a list of ResourceQuota items.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "Items is a list of ResourceQuota objects. More info: https://kubernetes.io/docs/concepts/policy/resource-quotas/", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.ResourceQuota"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.ResourceQuota", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_core_v1_ResourceQuotaSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ResourceQuotaSpec defines the desired hard limits to enforce for Quota.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "hard": { + SchemaProps: spec.SchemaProps{ + Description: "hard is the set of desired hard limits for each named resource. More info: https://kubernetes.io/docs/concepts/policy/resource-quotas/", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + }, + }, + }, + }, + }, + "scopes": { + SchemaProps: spec.SchemaProps{ + Description: "A collection of filters that must match each object tracked by a quota. If not specified, the quota matches all objects.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "scopeSelector": { + SchemaProps: spec.SchemaProps{ + Description: "scopeSelector is also a collection of filters like scopes that must match each object tracked by a quota but expressed using ScopeSelectorOperator in combination with possible values. For a resource to match, both scopes AND scopeSelector (if specified in spec), must be matched.", + Ref: ref("k8s.io/api/core/v1.ScopeSelector"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.ScopeSelector", "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + } +} + +func schema_k8sio_api_core_v1_ResourceQuotaStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ResourceQuotaStatus defines the enforced hard limits and observed use.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "hard": { + SchemaProps: spec.SchemaProps{ + Description: "Hard is the set of enforced hard limits for each named resource. More info: https://kubernetes.io/docs/concepts/policy/resource-quotas/", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + }, + }, + }, + }, + }, + "used": { + SchemaProps: spec.SchemaProps{ + Description: "Used is the current observed total usage of the resource in the namespace.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + } +} + +func schema_k8sio_api_core_v1_ResourceRequirements(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ResourceRequirements describes the compute resource requirements.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "limits": { + SchemaProps: spec.SchemaProps{ + Description: "Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + }, + }, + }, + }, + }, + "requests": { + SchemaProps: spec.SchemaProps{ + Description: "Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + } +} + +func schema_k8sio_api_core_v1_SELinuxOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "SELinuxOptions are the labels to be applied to the container", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "user": { + SchemaProps: spec.SchemaProps{ + Description: "User is a SELinux user label that applies to the container.", + Type: []string{"string"}, + Format: "", + }, + }, + "role": { + SchemaProps: spec.SchemaProps{ + Description: "Role is a SELinux role label that applies to the container.", + Type: []string{"string"}, + Format: "", + }, + }, + "type": { + SchemaProps: spec.SchemaProps{ + Description: "Type is a SELinux type label that applies to the container.", + Type: []string{"string"}, + Format: "", + }, + }, + "level": { + SchemaProps: spec.SchemaProps{ + Description: "Level is SELinux level label that applies to the container.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_k8sio_api_core_v1_ScaleIOPersistentVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ScaleIOPersistentVolumeSource represents a persistent ScaleIO volume", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "gateway": { + SchemaProps: spec.SchemaProps{ + Description: "The host address of the ScaleIO API Gateway.", + Type: []string{"string"}, + Format: "", + }, + }, + "system": { + SchemaProps: spec.SchemaProps{ + Description: "The name of the storage system as configured in ScaleIO.", + Type: []string{"string"}, + Format: "", + }, + }, + "secretRef": { + SchemaProps: spec.SchemaProps{ + Description: "SecretRef references to the secret for ScaleIO user and other sensitive information. If this is not provided, Login operation will fail.", + Ref: ref("k8s.io/api/core/v1.SecretReference"), + }, + }, + "sslEnabled": { + SchemaProps: spec.SchemaProps{ + Description: "Flag to enable/disable SSL communication with Gateway, default false", + Type: []string{"boolean"}, + Format: "", + }, + }, + "protectionDomain": { + SchemaProps: spec.SchemaProps{ + Description: "The name of the ScaleIO Protection Domain for the configured storage.", + Type: []string{"string"}, + Format: "", + }, + }, + "storagePool": { + SchemaProps: spec.SchemaProps{ + Description: "The ScaleIO Storage Pool associated with the protection domain.", + Type: []string{"string"}, + Format: "", + }, + }, + "storageMode": { + SchemaProps: spec.SchemaProps{ + Description: "Indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. Default is ThinProvisioned.", + Type: []string{"string"}, + Format: "", + }, + }, + "volumeName": { + SchemaProps: spec.SchemaProps{ + Description: "The name of a volume already created in the ScaleIO system that is associated with this volume source.", + Type: []string{"string"}, + Format: "", + }, + }, + "fsType": { + SchemaProps: spec.SchemaProps{ + Description: "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Default is \"xfs\"", + Type: []string{"string"}, + Format: "", + }, + }, + "readOnly": { + SchemaProps: spec.SchemaProps{ + Description: "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + Required: []string{"gateway", "system", "secretRef"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.SecretReference"}, + } +} + +func schema_k8sio_api_core_v1_ScaleIOVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ScaleIOVolumeSource represents a persistent ScaleIO volume", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "gateway": { + SchemaProps: spec.SchemaProps{ + Description: "The host address of the ScaleIO API Gateway.", + Type: []string{"string"}, + Format: "", + }, + }, + "system": { + SchemaProps: spec.SchemaProps{ + Description: "The name of the storage system as configured in ScaleIO.", + Type: []string{"string"}, + Format: "", + }, + }, + "secretRef": { + SchemaProps: spec.SchemaProps{ + Description: "SecretRef references to the secret for ScaleIO user and other sensitive information. If this is not provided, Login operation will fail.", + Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), + }, + }, + "sslEnabled": { + SchemaProps: spec.SchemaProps{ + Description: "Flag to enable/disable SSL communication with Gateway, default false", + Type: []string{"boolean"}, + Format: "", + }, + }, + "protectionDomain": { + SchemaProps: spec.SchemaProps{ + Description: "The name of the ScaleIO Protection Domain for the configured storage.", + Type: []string{"string"}, + Format: "", + }, + }, + "storagePool": { + SchemaProps: spec.SchemaProps{ + Description: "The ScaleIO Storage Pool associated with the protection domain.", + Type: []string{"string"}, + Format: "", + }, + }, + "storageMode": { + SchemaProps: spec.SchemaProps{ + Description: "Indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. Default is ThinProvisioned.", + Type: []string{"string"}, + Format: "", + }, + }, + "volumeName": { + SchemaProps: spec.SchemaProps{ + Description: "The name of a volume already created in the ScaleIO system that is associated with this volume source.", + Type: []string{"string"}, + Format: "", + }, + }, + "fsType": { + SchemaProps: spec.SchemaProps{ + Description: "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Default is \"xfs\".", + Type: []string{"string"}, + Format: "", + }, + }, + "readOnly": { + SchemaProps: spec.SchemaProps{ + Description: "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + Required: []string{"gateway", "system", "secretRef"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.LocalObjectReference"}, + } +} + +func schema_k8sio_api_core_v1_ScopeSelector(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "A scope selector represents the AND of the selectors represented by the scoped-resource selector requirements.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "matchExpressions": { + SchemaProps: spec.SchemaProps{ + Description: "A list of scope selector requirements by scope of the resources.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.ScopedResourceSelectorRequirement"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.ScopedResourceSelectorRequirement"}, + } +} + +func schema_k8sio_api_core_v1_ScopedResourceSelectorRequirement(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "A scoped-resource selector requirement is a selector that contains values, a scope name, and an operator that relates the scope name and values.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "scopeName": { + SchemaProps: spec.SchemaProps{ + Description: "The name of the scope that the selector applies to.", + Type: []string{"string"}, + Format: "", + }, + }, + "operator": { + SchemaProps: spec.SchemaProps{ + Description: "Represents a scope's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist.", + Type: []string{"string"}, + Format: "", + }, + }, + "values": { + SchemaProps: spec.SchemaProps{ + Description: "An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + Required: []string{"scopeName", "operator"}, + }, + }, + } +} + +func schema_k8sio_api_core_v1_SeccompProfile(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "SeccompProfile defines a pod/container's seccomp profile settings. Only one profile source may be set.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "type": { + SchemaProps: spec.SchemaProps{ + Description: "type indicates which kind of seccomp profile will be applied. Valid options are:\n\nLocalhost - a profile defined in a file on the node should be used. RuntimeDefault - the container runtime default profile should be used. Unconfined - no profile should be applied.", + Type: []string{"string"}, + Format: "", + }, + }, + "localhostProfile": { + SchemaProps: spec.SchemaProps{ + Description: "localhostProfile indicates a profile defined in a file on the node should be used. The profile must be preconfigured on the node to work. Must be a descending path, relative to the kubelet's configured seccomp profile location. Must only be set if type is \"Localhost\".", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"type"}, + }, + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-unions": []interface{}{ + map[string]interface{}{ + "discriminator": "type", + "fields-to-discriminateBy": map[string]interface{}{ + "localhostProfile": "LocalhostProfile", + }, + }, + }, + }, + }, + }, + } +} + +func schema_k8sio_api_core_v1_Secret(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Secret holds secret data of a certain type. The total bytes of the values in the Data field must be less than MaxSecretSize bytes.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "immutable": { + SchemaProps: spec.SchemaProps{ + Description: "Immutable, if set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "data": { + SchemaProps: spec.SchemaProps{ + Description: "Data contains the secret data. Each key must consist of alphanumeric characters, '-', '_' or '.'. The serialized form of the secret data is a base64 encoded string, representing the arbitrary (possibly non-string) data value here. Described in https://tools.ietf.org/html/rfc4648#section-4", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "byte", + }, + }, + }, + }, + }, + "stringData": { + SchemaProps: spec.SchemaProps{ + Description: "stringData allows specifying non-binary secret data in string form. It is provided as a write-only input field for convenience. All keys and values are merged into the data field on write, overwriting any existing values. The stringData field is never output when reading from the API.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "type": { + SchemaProps: spec.SchemaProps{ + Description: "Used to facilitate programmatic handling of secret data. More info: https://kubernetes.io/docs/concepts/configuration/secret/#secret-types", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_core_v1_SecretEnvSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "SecretEnvSource selects a Secret to populate the environment variables with.\n\nThe contents of the target Secret's Data field will represent the key-value pairs as environment variables.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", + Type: []string{"string"}, + Format: "", + }, + }, + "optional": { + SchemaProps: spec.SchemaProps{ + Description: "Specify whether the Secret must be defined", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_k8sio_api_core_v1_SecretKeySelector(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "SecretKeySelector selects a key of a Secret.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", + Type: []string{"string"}, + Format: "", + }, + }, + "key": { + SchemaProps: spec.SchemaProps{ + Description: "The key of the secret to select from. Must be a valid secret key.", + Type: []string{"string"}, + Format: "", + }, + }, + "optional": { + SchemaProps: spec.SchemaProps{ + Description: "Specify whether the Secret or its key must be defined", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + Required: []string{"key"}, + }, + }, + } +} + +func schema_k8sio_api_core_v1_SecretList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "SecretList is a list of Secret.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "Items is a list of secret objects. More info: https://kubernetes.io/docs/concepts/configuration/secret", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.Secret"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.Secret", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_core_v1_SecretProjection(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Adapts a secret into a projected volume.\n\nThe contents of the target Secret's Data field will be presented in a projected volume as files using the keys in the Data field as the file names. Note that this is identical to a secret volume source without the default mode.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", + Type: []string{"string"}, + Format: "", + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.KeyToPath"), + }, + }, + }, + }, + }, + "optional": { + SchemaProps: spec.SchemaProps{ + Description: "Specify whether the Secret or its key must be defined", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.KeyToPath"}, + } +} + +func schema_k8sio_api_core_v1_SecretReference(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "SecretReference represents a Secret Reference. It has enough information to retrieve secret in any namespace", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name is unique within a namespace to reference a secret resource.", + Type: []string{"string"}, + Format: "", + }, + }, + "namespace": { + SchemaProps: spec.SchemaProps{ + Description: "Namespace defines the space within which the secret name must be unique.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_k8sio_api_core_v1_SecretVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Adapts a Secret into a volume.\n\nThe contents of the target Secret's Data field will be presented in a volume as files using the keys in the Data field as the file names. Secret volumes support ownership management and SELinux relabeling.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "secretName": { + SchemaProps: spec.SchemaProps{ + Description: "Name of the secret in the pod's namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret", + Type: []string{"string"}, + Format: "", + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.KeyToPath"), + }, + }, + }, + }, + }, + "defaultMode": { + SchemaProps: spec.SchemaProps{ + Description: "Optional: mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "optional": { + SchemaProps: spec.SchemaProps{ + Description: "Specify whether the Secret or its keys must be defined", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.KeyToPath"}, + } +} + +func schema_k8sio_api_core_v1_SecurityContext(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "SecurityContext holds security configuration that will be applied to a container. Some fields are present in both SecurityContext and PodSecurityContext. When both are set, the values in SecurityContext take precedence.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "capabilities": { + SchemaProps: spec.SchemaProps{ + Description: "The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime. Note that this field cannot be set when spec.os.name is windows.", + Ref: ref("k8s.io/api/core/v1.Capabilities"), + }, + }, + "privileged": { + SchemaProps: spec.SchemaProps{ + Description: "Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false. Note that this field cannot be set when spec.os.name is windows.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "seLinuxOptions": { + SchemaProps: spec.SchemaProps{ + Description: "The SELinux context to be applied to the container. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is windows.", + Ref: ref("k8s.io/api/core/v1.SELinuxOptions"), + }, + }, + "windowsOptions": { + SchemaProps: spec.SchemaProps{ + Description: "The Windows specific settings applied to all containers. If unspecified, the options from the PodSecurityContext will be used. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is linux.", + Ref: ref("k8s.io/api/core/v1.WindowsSecurityContextOptions"), + }, + }, + "runAsUser": { + SchemaProps: spec.SchemaProps{ + Description: "The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is windows.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "runAsGroup": { + SchemaProps: spec.SchemaProps{ + Description: "The GID to run the entrypoint of the container process. Uses runtime default if unset. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is windows.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "runAsNonRoot": { + SchemaProps: spec.SchemaProps{ + Description: "Indicates that the container must run as a non-root user. If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does. If unset or false, no such validation will be performed. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "readOnlyRootFilesystem": { + SchemaProps: spec.SchemaProps{ + Description: "Whether this container has a read-only root filesystem. Default is false. Note that this field cannot be set when spec.os.name is windows.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "allowPrivilegeEscalation": { + SchemaProps: spec.SchemaProps{ + Description: "AllowPrivilegeEscalation controls whether a process can gain more privileges than its parent process. This bool directly controls if the no_new_privs flag will be set on the container process. AllowPrivilegeEscalation is true always when the container is: 1) run as Privileged 2) has CAP_SYS_ADMIN Note that this field cannot be set when spec.os.name is windows.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "procMount": { + SchemaProps: spec.SchemaProps{ + Description: "procMount denotes the type of proc mount to use for the containers. The default is DefaultProcMount which uses the container runtime defaults for readonly paths and masked paths. This requires the ProcMountType feature flag to be enabled. Note that this field cannot be set when spec.os.name is windows.", + Type: []string{"string"}, + Format: "", + }, + }, + "seccompProfile": { + SchemaProps: spec.SchemaProps{ + Description: "The seccomp options to use by this container. If seccomp options are provided at both the pod & container level, the container options override the pod options. Note that this field cannot be set when spec.os.name is windows.", + Ref: ref("k8s.io/api/core/v1.SeccompProfile"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.Capabilities", "k8s.io/api/core/v1.SELinuxOptions", "k8s.io/api/core/v1.SeccompProfile", "k8s.io/api/core/v1.WindowsSecurityContextOptions"}, + } +} + +func schema_k8sio_api_core_v1_SerializedReference(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "SerializedReference is a reference to serialized object.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "reference": { + SchemaProps: spec.SchemaProps{ + Description: "The reference to an object in the system.", + Ref: ref("k8s.io/api/core/v1.ObjectReference"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.ObjectReference"}, + } +} + +func schema_k8sio_api_core_v1_Service(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Service is a named abstraction of software service (for example, mysql) consisting of local port (for example 3306) that the proxy listens on, and the selector that determines which pods will answer requests sent through the proxy.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "Spec defines the behavior of a service. https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Ref: ref("k8s.io/api/core/v1.ServiceSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Most recently observed status of the service. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Ref: ref("k8s.io/api/core/v1.ServiceStatus"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.ServiceSpec", "k8s.io/api/core/v1.ServiceStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_core_v1_ServiceAccount(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ServiceAccount binds together: * a name, understood by users, and perhaps by peripheral systems, for an identity * a principal that can be authenticated and authorized * a set of secrets", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "secrets": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-patch-merge-key": "name", + "x-kubernetes-patch-strategy": "merge", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "Secrets is the list of secrets allowed to be used by pods running using this ServiceAccount. More info: https://kubernetes.io/docs/concepts/configuration/secret", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.ObjectReference"), + }, + }, + }, + }, + }, + "imagePullSecrets": { + SchemaProps: spec.SchemaProps{ + Description: "ImagePullSecrets is a list of references to secrets in the same namespace to use for pulling any images in pods that reference this ServiceAccount. ImagePullSecrets are distinct from Secrets because Secrets can be mounted in the pod, but ImagePullSecrets are only accessed by the kubelet. More info: https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), + }, + }, + }, + }, + }, + "automountServiceAccountToken": { + SchemaProps: spec.SchemaProps{ + Description: "AutomountServiceAccountToken indicates whether pods running as this service account should have an API token automatically mounted. Can be overridden at the pod level.", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.LocalObjectReference", "k8s.io/api/core/v1.ObjectReference", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_core_v1_ServiceAccountList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ServiceAccountList is a list of ServiceAccount objects", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "List of ServiceAccounts. More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.ServiceAccount"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.ServiceAccount", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_core_v1_ServiceAccountTokenProjection(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ServiceAccountTokenProjection represents a projected service account token volume. This projection can be used to insert a service account token into the pods runtime filesystem for use against APIs (Kubernetes API Server or otherwise).", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "audience": { + SchemaProps: spec.SchemaProps{ + Description: "Audience is the intended audience of the token. A recipient of a token must identify itself with an identifier specified in the audience of the token, and otherwise should reject the token. The audience defaults to the identifier of the apiserver.", + Type: []string{"string"}, + Format: "", + }, + }, + "expirationSeconds": { + SchemaProps: spec.SchemaProps{ + Description: "ExpirationSeconds is the requested duration of validity of the service account token. As the token approaches expiration, the kubelet volume plugin will proactively rotate the service account token. The kubelet will start trying to rotate the token if the token is older than 80 percent of its time to live or if the token is older than 24 hours.Defaults to 1 hour and must be at least 10 minutes.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "path": { + SchemaProps: spec.SchemaProps{ + Description: "Path is the path relative to the mount point of the file to project the token into.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"path"}, + }, + }, + } +} + +func schema_k8sio_api_core_v1_ServiceList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ServiceList holds a list of services.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "List of services", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.Service"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.Service", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_core_v1_ServicePort(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ServicePort contains information on service's port.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "The name of this port within the service. This must be a DNS_LABEL. All ports within a ServiceSpec must have unique names. When considering the endpoints for a Service, this must match the 'name' field in the EndpointPort. Optional if only one ServicePort is defined on this service.", + Type: []string{"string"}, + Format: "", + }, + }, + "protocol": { + SchemaProps: spec.SchemaProps{ + Description: "The IP protocol for this port. Supports \"TCP\", \"UDP\", and \"SCTP\". Default is TCP.", + Type: []string{"string"}, + Format: "", + }, + }, + "appProtocol": { + SchemaProps: spec.SchemaProps{ + Description: "The application protocol for this port. This field follows standard Kubernetes label syntax. Un-prefixed names are reserved for IANA standard service names (as per RFC-6335 and http://www.iana.org/assignments/service-names). Non-standard protocols should use prefixed names such as mycompany.com/my-custom-protocol.", + Type: []string{"string"}, + Format: "", + }, + }, + "port": { + SchemaProps: spec.SchemaProps{ + Description: "The port that will be exposed by this service.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "targetPort": { + SchemaProps: spec.SchemaProps{ + Description: "Number or name of the port to access on the pods targeted by the service. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. If this is a string, it will be looked up as a named port in the target Pod's container ports. If this is not specified, the value of the 'port' field is used (an identity map). This field is ignored for services with clusterIP=None, and should be omitted or set equal to the 'port' field. More info: https://kubernetes.io/docs/concepts/services-networking/service/#defining-a-service", + Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), + }, + }, + "nodePort": { + SchemaProps: spec.SchemaProps{ + Description: "The port on each node on which this service is exposed when type is NodePort or LoadBalancer. Usually assigned by the system. If a value is specified, in-range, and not in use it will be used, otherwise the operation will fail. If not specified, a port will be allocated if this Service requires one. If this field is specified when creating a Service which does not need it, creation will fail. This field will be wiped when updating a Service to no longer need it (e.g. changing type from NodePort to ClusterIP). More info: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + Required: []string{"port"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/util/intstr.IntOrString"}, + } +} + +func schema_k8sio_api_core_v1_ServiceProxyOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ServiceProxyOptions is the query options to a Service's proxy call.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "path": { + SchemaProps: spec.SchemaProps{ + Description: "Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_k8sio_api_core_v1_ServiceSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ServiceSpec describes the attributes that a user creates on a service.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "ports": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-map-keys": []interface{}{ + "port", + "protocol", + }, + "x-kubernetes-list-type": "map", + "x-kubernetes-patch-merge-key": "port", + "x-kubernetes-patch-strategy": "merge", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "The list of ports that are exposed by this service. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.ServicePort"), + }, + }, + }, + }, + }, + "selector": { + SchemaProps: spec.SchemaProps{ + Description: "Route service traffic to pods with label keys and values matching this selector. If empty or not present, the service is assumed to have an external process managing its endpoints, which Kubernetes will not modify. Only applies to types ClusterIP, NodePort, and LoadBalancer. Ignored if type is ExternalName. More info: https://kubernetes.io/docs/concepts/services-networking/service/", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "clusterIP": { + SchemaProps: spec.SchemaProps{ + Description: "clusterIP is the IP address of the service and is usually assigned randomly. If an address is specified manually, is in-range (as per system configuration), and is not in use, it will be allocated to the service; otherwise creation of the service will fail. This field may not be changed through updates unless the type field is also being changed to ExternalName (which requires this field to be blank) or the type field is being changed from ExternalName (in which case this field may optionally be specified, as describe above). Valid values are \"None\", empty string (\"\"), or a valid IP address. Setting this to \"None\" makes a \"headless service\" (no virtual IP), which is useful when direct endpoint connections are preferred and proxying is not required. Only applies to types ClusterIP, NodePort, and LoadBalancer. If this field is specified when creating a Service of type ExternalName, creation will fail. This field will be wiped when updating a Service to type ExternalName. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies", + Type: []string{"string"}, + Format: "", + }, + }, + "clusterIPs": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "ClusterIPs is a list of IP addresses assigned to this service, and are usually assigned randomly. If an address is specified manually, is in-range (as per system configuration), and is not in use, it will be allocated to the service; otherwise creation of the service will fail. This field may not be changed through updates unless the type field is also being changed to ExternalName (which requires this field to be empty) or the type field is being changed from ExternalName (in which case this field may optionally be specified, as describe above). Valid values are \"None\", empty string (\"\"), or a valid IP address. Setting this to \"None\" makes a \"headless service\" (no virtual IP), which is useful when direct endpoint connections are preferred and proxying is not required. Only applies to types ClusterIP, NodePort, and LoadBalancer. If this field is specified when creating a Service of type ExternalName, creation will fail. This field will be wiped when updating a Service to type ExternalName. If this field is not specified, it will be initialized from the clusterIP field. If this field is specified, clients must ensure that clusterIPs[0] and clusterIP have the same value.\n\nThis field may hold a maximum of two entries (dual-stack IPs, in either order). These IPs must correspond to the values of the ipFamilies field. Both clusterIPs and ipFamilies are governed by the ipFamilyPolicy field. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "type": { + SchemaProps: spec.SchemaProps{ + Description: "type determines how the Service is exposed. Defaults to ClusterIP. Valid options are ExternalName, ClusterIP, NodePort, and LoadBalancer. \"ClusterIP\" allocates a cluster-internal IP address for load-balancing to endpoints. Endpoints are determined by the selector or if that is not specified, by manual construction of an Endpoints object or EndpointSlice objects. If clusterIP is \"None\", no virtual IP is allocated and the endpoints are published as a set of endpoints rather than a virtual IP. \"NodePort\" builds on ClusterIP and allocates a port on every node which routes to the same endpoints as the clusterIP. \"LoadBalancer\" builds on NodePort and creates an external load-balancer (if supported in the current cloud) which routes to the same endpoints as the clusterIP. \"ExternalName\" aliases this service to the specified externalName. Several other fields do not apply to ExternalName services. More info: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types", + Type: []string{"string"}, + Format: "", + }, + }, + "externalIPs": { + SchemaProps: spec.SchemaProps{ + Description: "externalIPs is a list of IP addresses for which nodes in the cluster will also accept traffic for this service. These IPs are not managed by Kubernetes. The user is responsible for ensuring that traffic arrives at a node with this IP. A common example is external load-balancers that are not part of the Kubernetes system.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "sessionAffinity": { + SchemaProps: spec.SchemaProps{ + Description: "Supports \"ClientIP\" and \"None\". Used to maintain session affinity. Enable client IP based session affinity. Must be ClientIP or None. Defaults to None. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies", + Type: []string{"string"}, + Format: "", + }, + }, + "loadBalancerIP": { + SchemaProps: spec.SchemaProps{ + Description: "Only applies to Service Type: LoadBalancer LoadBalancer will get created with the IP specified in this field. This feature depends on whether the underlying cloud-provider supports specifying the loadBalancerIP when a load balancer is created. This field will be ignored if the cloud-provider does not support the feature.", + Type: []string{"string"}, + Format: "", + }, + }, + "loadBalancerSourceRanges": { + SchemaProps: spec.SchemaProps{ + Description: "If specified and supported by the platform, this will restrict traffic through the cloud-provider load-balancer will be restricted to the specified client IPs. This field will be ignored if the cloud-provider does not support the feature.\" More info: https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "externalName": { + SchemaProps: spec.SchemaProps{ + Description: "externalName is the external reference that discovery mechanisms will return as an alias for this service (e.g. a DNS CNAME record). No proxying will be involved. Must be a lowercase RFC-1123 hostname (https://tools.ietf.org/html/rfc1123) and requires `type` to be \"ExternalName\".", + Type: []string{"string"}, + Format: "", + }, + }, + "externalTrafficPolicy": { + SchemaProps: spec.SchemaProps{ + Description: "externalTrafficPolicy denotes if this Service desires to route external traffic to node-local or cluster-wide endpoints. \"Local\" preserves the client source IP and avoids a second hop for LoadBalancer and Nodeport type services, but risks potentially imbalanced traffic spreading. \"Cluster\" obscures the client source IP and may cause a second hop to another node, but should have good overall load-spreading.", + Type: []string{"string"}, + Format: "", + }, + }, + "healthCheckNodePort": { + SchemaProps: spec.SchemaProps{ + Description: "healthCheckNodePort specifies the healthcheck nodePort for the service. This only applies when type is set to LoadBalancer and externalTrafficPolicy is set to Local. If a value is specified, is in-range, and is not in use, it will be used. If not specified, a value will be automatically allocated. External systems (e.g. load-balancers) can use this port to determine if a given node holds endpoints for this service or not. If this field is specified when creating a Service which does not need it, creation will fail. This field will be wiped when updating a Service to no longer need it (e.g. changing type).", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "publishNotReadyAddresses": { + SchemaProps: spec.SchemaProps{ + Description: "publishNotReadyAddresses indicates that any agent which deals with endpoints for this Service should disregard any indications of ready/not-ready. The primary use case for setting this field is for a StatefulSet's Headless Service to propagate SRV DNS records for its Pods for the purpose of peer discovery. The Kubernetes controllers that generate Endpoints and EndpointSlice resources for Services interpret this to mean that all endpoints are considered \"ready\" even if the Pods themselves are not. Agents which consume only Kubernetes generated endpoints through the Endpoints or EndpointSlice resources can safely assume this behavior.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "sessionAffinityConfig": { + SchemaProps: spec.SchemaProps{ + Description: "sessionAffinityConfig contains the configurations of session affinity.", + Ref: ref("k8s.io/api/core/v1.SessionAffinityConfig"), + }, + }, + "ipFamilies": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "IPFamilies is a list of IP families (e.g. IPv4, IPv6) assigned to this service. This field is usually assigned automatically based on cluster configuration and the ipFamilyPolicy field. If this field is specified manually, the requested family is available in the cluster, and ipFamilyPolicy allows it, it will be used; otherwise creation of the service will fail. This field is conditionally mutable: it allows for adding or removing a secondary IP family, but it does not allow changing the primary IP family of the Service. Valid values are \"IPv4\" and \"IPv6\". This field only applies to Services of types ClusterIP, NodePort, and LoadBalancer, and does apply to \"headless\" services. This field will be wiped when updating a Service to type ExternalName.\n\nThis field may hold a maximum of two entries (dual-stack families, in either order). These families must correspond to the values of the clusterIPs field, if specified. Both clusterIPs and ipFamilies are governed by the ipFamilyPolicy field.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "ipFamilyPolicy": { + SchemaProps: spec.SchemaProps{ + Description: "IPFamilyPolicy represents the dual-stack-ness requested or required by this Service. If there is no value provided, then this field will be set to SingleStack. Services can be \"SingleStack\" (a single IP family), \"PreferDualStack\" (two IP families on dual-stack configured clusters or a single IP family on single-stack clusters), or \"RequireDualStack\" (two IP families on dual-stack configured clusters, otherwise fail). The ipFamilies and clusterIPs fields depend on the value of this field. This field will be wiped when updating a service to type ExternalName.", + Type: []string{"string"}, + Format: "", + }, + }, + "allocateLoadBalancerNodePorts": { + SchemaProps: spec.SchemaProps{ + Description: "allocateLoadBalancerNodePorts defines if NodePorts will be automatically allocated for services with type LoadBalancer. Default is \"true\". It may be set to \"false\" if the cluster load-balancer does not rely on NodePorts. If the caller requests specific NodePorts (by specifying a value), those requests will be respected, regardless of this field. This field may only be set for services with type LoadBalancer and will be cleared if the type is changed to any other type. This field is beta-level and is only honored by servers that enable the ServiceLBNodePortControl feature.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "loadBalancerClass": { + SchemaProps: spec.SchemaProps{ + Description: "loadBalancerClass is the class of the load balancer implementation this Service belongs to. If specified, the value of this field must be a label-style identifier, with an optional prefix, e.g. \"internal-vip\" or \"example.com/internal-vip\". Unprefixed names are reserved for end-users. This field can only be set when the Service type is 'LoadBalancer'. If not set, the default load balancer implementation is used, today this is typically done through the cloud provider integration, but should apply for any default implementation. If set, it is assumed that a load balancer implementation is watching for Services with a matching class. Any default load balancer implementation (e.g. cloud providers) should ignore Services that set this field. This field can only be set when creating or updating a Service to type 'LoadBalancer'. Once set, it can not be changed. This field will be wiped when a service is updated to a non 'LoadBalancer' type.", + Type: []string{"string"}, + Format: "", + }, + }, + "internalTrafficPolicy": { + SchemaProps: spec.SchemaProps{ + Description: "InternalTrafficPolicy specifies if the cluster internal traffic should be routed to all endpoints or node-local endpoints only. \"Cluster\" routes internal traffic to a Service to all endpoints. \"Local\" routes traffic to node-local endpoints only, traffic is dropped if no node-local endpoints are ready. The default value is \"Cluster\".", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.ServicePort", "k8s.io/api/core/v1.SessionAffinityConfig"}, + } +} + +func schema_k8sio_api_core_v1_ServiceStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ServiceStatus represents the current status of a service.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "loadBalancer": { + SchemaProps: spec.SchemaProps{ + Description: "LoadBalancer contains the current status of the load-balancer, if one is present.", + Ref: ref("k8s.io/api/core/v1.LoadBalancerStatus"), + }, + }, + "conditions": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-map-keys": []interface{}{ + "type", + }, + "x-kubernetes-list-type": "map", + "x-kubernetes-patch-merge-key": "type", + "x-kubernetes-patch-strategy": "merge", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "Current service state", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Condition"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.LoadBalancerStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.Condition"}, + } +} + +func schema_k8sio_api_core_v1_SessionAffinityConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "SessionAffinityConfig represents the configurations of session affinity.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "clientIP": { + SchemaProps: spec.SchemaProps{ + Description: "clientIP contains the configurations of Client IP based session affinity.", + Ref: ref("k8s.io/api/core/v1.ClientIPConfig"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.ClientIPConfig"}, + } +} + +func schema_k8sio_api_core_v1_StorageOSPersistentVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Represents a StorageOS persistent volume resource.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "volumeName": { + SchemaProps: spec.SchemaProps{ + Description: "VolumeName is the human-readable name of the StorageOS volume. Volume names are only unique within a namespace.", + Type: []string{"string"}, + Format: "", + }, + }, + "volumeNamespace": { + SchemaProps: spec.SchemaProps{ + Description: "VolumeNamespace specifies the scope of the volume within StorageOS. If no namespace is specified then the Pod's namespace will be used. This allows the Kubernetes name scoping to be mirrored within StorageOS for tighter integration. Set VolumeName to any name to override the default behaviour. Set to \"default\" if you are not using namespaces within StorageOS. Namespaces that do not pre-exist within StorageOS will be created.", + Type: []string{"string"}, + Format: "", + }, + }, + "fsType": { + SchemaProps: spec.SchemaProps{ + Description: "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.", + Type: []string{"string"}, + Format: "", + }, + }, + "readOnly": { + SchemaProps: spec.SchemaProps{ + Description: "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "secretRef": { + SchemaProps: spec.SchemaProps{ + Description: "SecretRef specifies the secret to use for obtaining the StorageOS API credentials. If not specified, default values will be attempted.", + Ref: ref("k8s.io/api/core/v1.ObjectReference"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.ObjectReference"}, + } +} + +func schema_k8sio_api_core_v1_StorageOSVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Represents a StorageOS persistent volume resource.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "volumeName": { + SchemaProps: spec.SchemaProps{ + Description: "VolumeName is the human-readable name of the StorageOS volume. Volume names are only unique within a namespace.", + Type: []string{"string"}, + Format: "", + }, + }, + "volumeNamespace": { + SchemaProps: spec.SchemaProps{ + Description: "VolumeNamespace specifies the scope of the volume within StorageOS. If no namespace is specified then the Pod's namespace will be used. This allows the Kubernetes name scoping to be mirrored within StorageOS for tighter integration. Set VolumeName to any name to override the default behaviour. Set to \"default\" if you are not using namespaces within StorageOS. Namespaces that do not pre-exist within StorageOS will be created.", + Type: []string{"string"}, + Format: "", + }, + }, + "fsType": { + SchemaProps: spec.SchemaProps{ + Description: "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.", + Type: []string{"string"}, + Format: "", + }, + }, + "readOnly": { + SchemaProps: spec.SchemaProps{ + Description: "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "secretRef": { + SchemaProps: spec.SchemaProps{ + Description: "SecretRef specifies the secret to use for obtaining the StorageOS API credentials. If not specified, default values will be attempted.", + Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.LocalObjectReference"}, + } +} + +func schema_k8sio_api_core_v1_Sysctl(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Sysctl defines a kernel parameter to be set", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name of a property to set", + Type: []string{"string"}, + Format: "", + }, + }, + "value": { + SchemaProps: spec.SchemaProps{ + Description: "Value of a property to set", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"name", "value"}, + }, + }, + } +} + +func schema_k8sio_api_core_v1_TCPSocketAction(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "TCPSocketAction describes an action based on opening a socket", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "port": { + SchemaProps: spec.SchemaProps{ + Description: "Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME.", + Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), + }, + }, + "host": { + SchemaProps: spec.SchemaProps{ + Description: "Optional: Host name to connect to, defaults to the pod IP.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"port"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/util/intstr.IntOrString"}, + } +} + +func schema_k8sio_api_core_v1_Taint(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "The node this Taint is attached to has the \"effect\" on any pod that does not tolerate the Taint.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "key": { + SchemaProps: spec.SchemaProps{ + Description: "Required. The taint key to be applied to a node.", + Type: []string{"string"}, + Format: "", + }, + }, + "value": { + SchemaProps: spec.SchemaProps{ + Description: "The taint value corresponding to the taint key.", + Type: []string{"string"}, + Format: "", + }, + }, + "effect": { + SchemaProps: spec.SchemaProps{ + Description: "Required. The effect of the taint on pods that do not tolerate the taint. Valid effects are NoSchedule, PreferNoSchedule and NoExecute.", + Type: []string{"string"}, + Format: "", + }, + }, + "timeAdded": { + SchemaProps: spec.SchemaProps{ + Description: "TimeAdded represents the time at which the taint was added. It is only written for NoExecute taints.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + }, + Required: []string{"key", "effect"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_k8sio_api_core_v1_Toleration(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "The pod this Toleration is attached to tolerates any taint that matches the triple using the matching operator .", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "key": { + SchemaProps: spec.SchemaProps{ + Description: "Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys.", + Type: []string{"string"}, + Format: "", + }, + }, + "operator": { + SchemaProps: spec.SchemaProps{ + Description: "Operator represents a key's relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category.", + Type: []string{"string"}, + Format: "", + }, + }, + "value": { + SchemaProps: spec.SchemaProps{ + Description: "Value is the taint value the toleration matches to. If the operator is Exists, the value should be empty, otherwise just a regular string.", + Type: []string{"string"}, + Format: "", + }, + }, + "effect": { + SchemaProps: spec.SchemaProps{ + Description: "Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute.", + Type: []string{"string"}, + Format: "", + }, + }, + "tolerationSeconds": { + SchemaProps: spec.SchemaProps{ + Description: "TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, it is not set, which means tolerate the taint forever (do not evict). Zero and negative values will be treated as 0 (evict immediately) by the system.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + }, + }, + }, + } +} + +func schema_k8sio_api_core_v1_TopologySelectorLabelRequirement(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "A topology selector requirement is a selector that matches given label. This is an alpha feature and may change in the future.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "key": { + SchemaProps: spec.SchemaProps{ + Description: "The label key that the selector applies to.", + Type: []string{"string"}, + Format: "", + }, + }, + "values": { + SchemaProps: spec.SchemaProps{ + Description: "An array of string values. One value must match the label to be selected. Each entry in Values is ORed.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + Required: []string{"key", "values"}, + }, + }, + } +} + +func schema_k8sio_api_core_v1_TopologySelectorTerm(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "A topology selector term represents the result of label queries. A null or empty topology selector term matches no objects. The requirements of them are ANDed. It provides a subset of functionality as NodeSelectorTerm. This is an alpha feature and may change in the future.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "matchLabelExpressions": { + SchemaProps: spec.SchemaProps{ + Description: "A list of topology selector requirements by labels.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.TopologySelectorLabelRequirement"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.TopologySelectorLabelRequirement"}, + } +} + +func schema_k8sio_api_core_v1_TopologySpreadConstraint(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "TopologySpreadConstraint specifies how to spread matching pods among the given topology.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "maxSkew": { + SchemaProps: spec.SchemaProps{ + Description: "MaxSkew describes the degree to which pods may be unevenly distributed. When `whenUnsatisfiable=DoNotSchedule`, it is the maximum permitted difference between the number of matching pods in the target topology and the global minimum. For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same labelSelector spread as 1/1/0: | zone1 | zone2 | zone3 | | P | P | | - if MaxSkew is 1, incoming pod can only be scheduled to zone3 to become 1/1/1; scheduling it onto zone1(zone2) would make the ActualSkew(2-0) on zone1(zone2) violate MaxSkew(1). - if MaxSkew is 2, incoming pod can be scheduled onto any zone. When `whenUnsatisfiable=ScheduleAnyway`, it is used to give higher precedence to topologies that satisfy it. It's a required field. Default value is 1 and 0 is not allowed.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "topologyKey": { + SchemaProps: spec.SchemaProps{ + Description: "TopologyKey is the key of node labels. Nodes that have a label with this key and identical values are considered to be in the same topology. We consider each as a \"bucket\", and try to put balanced number of pods into each bucket. It's a required field.", + Type: []string{"string"}, + Format: "", + }, + }, + "whenUnsatisfiable": { + SchemaProps: spec.SchemaProps{ + Description: "WhenUnsatisfiable indicates how to deal with a pod if it doesn't satisfy the spread constraint. - DoNotSchedule (default) tells the scheduler not to schedule it. - ScheduleAnyway tells the scheduler to schedule the pod in any location,\n but giving higher precedence to topologies that would help reduce the\n skew.\nA constraint is considered \"Unsatisfiable\" for an incoming pod if and only if every possible node assignment for that pod would violate \"MaxSkew\" on some topology. For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same labelSelector spread as 3/1/1: | zone1 | zone2 | zone3 | | P P P | P | P | If WhenUnsatisfiable is set to DoNotSchedule, incoming pod can only be scheduled to zone2(zone3) to become 3/2/1(3/1/2) as ActualSkew(2-1) on zone2(zone3) satisfies MaxSkew(1). In other words, the cluster can still be imbalanced, but scheduler won't make it *more* imbalanced. It's a required field.", + Type: []string{"string"}, + Format: "", + }, + }, + "labelSelector": { + SchemaProps: spec.SchemaProps{ + Description: "LabelSelector is used to find matching pods. Pods that match this label selector are counted to determine the number of pods in their corresponding topology domain.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + }, + }, + }, + Required: []string{"maxSkew", "topologyKey", "whenUnsatisfiable"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + } +} + +func schema_k8sio_api_core_v1_TypedLocalObjectReference(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "TypedLocalObjectReference contains enough information to let you locate the typed referenced object inside the same namespace.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "apiGroup": { + SchemaProps: spec.SchemaProps{ + Description: "APIGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required.", + Type: []string{"string"}, + Format: "", + }, + }, + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is the type of resource being referenced", + Type: []string{"string"}, + Format: "", + }, + }, + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name is the name of resource being referenced", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"kind", "name"}, + }, + }, + } +} + +func schema_k8sio_api_core_v1_Volume(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Volume represents a named volume in a pod that may be accessed by any container in the pod.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Volume's name. Must be a DNS_LABEL and unique within the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", + Type: []string{"string"}, + Format: "", + }, + }, + "hostPath": { + SchemaProps: spec.SchemaProps{ + Description: "HostPath represents a pre-existing file or directory on the host machine that is directly exposed to the container. This is generally used for system agents or other privileged things that are allowed to see the host machine. Most containers will NOT need this. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath", + Ref: ref("k8s.io/api/core/v1.HostPathVolumeSource"), + }, + }, + "emptyDir": { + SchemaProps: spec.SchemaProps{ + Description: "EmptyDir represents a temporary directory that shares a pod's lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir", + Ref: ref("k8s.io/api/core/v1.EmptyDirVolumeSource"), + }, + }, + "gcePersistentDisk": { + SchemaProps: spec.SchemaProps{ + Description: "GCEPersistentDisk represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk", + Ref: ref("k8s.io/api/core/v1.GCEPersistentDiskVolumeSource"), + }, + }, + "awsElasticBlockStore": { + SchemaProps: spec.SchemaProps{ + Description: "AWSElasticBlockStore represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore", + Ref: ref("k8s.io/api/core/v1.AWSElasticBlockStoreVolumeSource"), + }, + }, + "gitRepo": { + SchemaProps: spec.SchemaProps{ + Description: "GitRepo represents a git repository at a particular revision. DEPRECATED: GitRepo is deprecated. To provision a container with a git repo, mount an EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir into the Pod's container.", + Ref: ref("k8s.io/api/core/v1.GitRepoVolumeSource"), + }, + }, + "secret": { + SchemaProps: spec.SchemaProps{ + Description: "Secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret", + Ref: ref("k8s.io/api/core/v1.SecretVolumeSource"), + }, + }, + "nfs": { + SchemaProps: spec.SchemaProps{ + Description: "NFS represents an NFS mount on the host that shares a pod's lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs", + Ref: ref("k8s.io/api/core/v1.NFSVolumeSource"), + }, + }, + "iscsi": { + SchemaProps: spec.SchemaProps{ + Description: "ISCSI represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://examples.k8s.io/volumes/iscsi/README.md", + Ref: ref("k8s.io/api/core/v1.ISCSIVolumeSource"), + }, + }, + "glusterfs": { + SchemaProps: spec.SchemaProps{ + Description: "Glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime. More info: https://examples.k8s.io/volumes/glusterfs/README.md", + Ref: ref("k8s.io/api/core/v1.GlusterfsVolumeSource"), + }, + }, + "persistentVolumeClaim": { + SchemaProps: spec.SchemaProps{ + Description: "PersistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims", + Ref: ref("k8s.io/api/core/v1.PersistentVolumeClaimVolumeSource"), + }, + }, + "rbd": { + SchemaProps: spec.SchemaProps{ + Description: "RBD represents a Rados Block Device mount on the host that shares a pod's lifetime. More info: https://examples.k8s.io/volumes/rbd/README.md", + Ref: ref("k8s.io/api/core/v1.RBDVolumeSource"), + }, + }, + "flexVolume": { + SchemaProps: spec.SchemaProps{ + Description: "FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin.", + Ref: ref("k8s.io/api/core/v1.FlexVolumeSource"), + }, + }, + "cinder": { + SchemaProps: spec.SchemaProps{ + Description: "Cinder represents a cinder volume attached and mounted on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md", + Ref: ref("k8s.io/api/core/v1.CinderVolumeSource"), + }, + }, + "cephfs": { + SchemaProps: spec.SchemaProps{ + Description: "CephFS represents a Ceph FS mount on the host that shares a pod's lifetime", + Ref: ref("k8s.io/api/core/v1.CephFSVolumeSource"), + }, + }, + "flocker": { + SchemaProps: spec.SchemaProps{ + Description: "Flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running", + Ref: ref("k8s.io/api/core/v1.FlockerVolumeSource"), + }, + }, + "downwardAPI": { + SchemaProps: spec.SchemaProps{ + Description: "DownwardAPI represents downward API about the pod that should populate this volume", + Ref: ref("k8s.io/api/core/v1.DownwardAPIVolumeSource"), + }, + }, + "fc": { + SchemaProps: spec.SchemaProps{ + Description: "FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod.", + Ref: ref("k8s.io/api/core/v1.FCVolumeSource"), + }, + }, + "azureFile": { + SchemaProps: spec.SchemaProps{ + Description: "AzureFile represents an Azure File Service mount on the host and bind mount to the pod.", + Ref: ref("k8s.io/api/core/v1.AzureFileVolumeSource"), + }, + }, + "configMap": { + SchemaProps: spec.SchemaProps{ + Description: "ConfigMap represents a configMap that should populate this volume", + Ref: ref("k8s.io/api/core/v1.ConfigMapVolumeSource"), + }, + }, + "vsphereVolume": { + SchemaProps: spec.SchemaProps{ + Description: "VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine", + Ref: ref("k8s.io/api/core/v1.VsphereVirtualDiskVolumeSource"), + }, + }, + "quobyte": { + SchemaProps: spec.SchemaProps{ + Description: "Quobyte represents a Quobyte mount on the host that shares a pod's lifetime", + Ref: ref("k8s.io/api/core/v1.QuobyteVolumeSource"), + }, + }, + "azureDisk": { + SchemaProps: spec.SchemaProps{ + Description: "AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.", + Ref: ref("k8s.io/api/core/v1.AzureDiskVolumeSource"), + }, + }, + "photonPersistentDisk": { + SchemaProps: spec.SchemaProps{ + Description: "PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine", + Ref: ref("k8s.io/api/core/v1.PhotonPersistentDiskVolumeSource"), + }, + }, + "projected": { + SchemaProps: spec.SchemaProps{ + Description: "Items for all in one resources secrets, configmaps, and downward API", + Ref: ref("k8s.io/api/core/v1.ProjectedVolumeSource"), + }, + }, + "portworxVolume": { + SchemaProps: spec.SchemaProps{ + Description: "PortworxVolume represents a portworx volume attached and mounted on kubelets host machine", + Ref: ref("k8s.io/api/core/v1.PortworxVolumeSource"), + }, + }, + "scaleIO": { + SchemaProps: spec.SchemaProps{ + Description: "ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes.", + Ref: ref("k8s.io/api/core/v1.ScaleIOVolumeSource"), + }, + }, + "storageos": { + SchemaProps: spec.SchemaProps{ + Description: "StorageOS represents a StorageOS volume attached and mounted on Kubernetes nodes.", + Ref: ref("k8s.io/api/core/v1.StorageOSVolumeSource"), + }, + }, + "csi": { + SchemaProps: spec.SchemaProps{ + Description: "CSI (Container Storage Interface) represents ephemeral storage that is handled by certain external CSI drivers (Beta feature).", + Ref: ref("k8s.io/api/core/v1.CSIVolumeSource"), + }, + }, + "ephemeral": { + SchemaProps: spec.SchemaProps{ + Description: "Ephemeral represents a volume that is handled by a cluster storage driver. The volume's lifecycle is tied to the pod that defines it - it will be created before the pod starts, and deleted when the pod is removed.\n\nUse this if: a) the volume is only needed while the pod runs, b) features of normal volumes like restoring from snapshot or capacity\n tracking are needed,\nc) the storage driver is specified through a storage class, and d) the storage driver supports dynamic volume provisioning through\n a PersistentVolumeClaim (see EphemeralVolumeSource for more\n information on the connection between this volume type\n and PersistentVolumeClaim).\n\nUse PersistentVolumeClaim or one of the vendor-specific APIs for volumes that persist for longer than the lifecycle of an individual pod.\n\nUse CSI for light-weight local ephemeral volumes if the CSI driver is meant to be used that way - see the documentation of the driver for more information.\n\nA pod can use both types of ephemeral volumes and persistent volumes at the same time.", + Ref: ref("k8s.io/api/core/v1.EphemeralVolumeSource"), + }, + }, + }, + Required: []string{"name"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.AWSElasticBlockStoreVolumeSource", "k8s.io/api/core/v1.AzureDiskVolumeSource", "k8s.io/api/core/v1.AzureFileVolumeSource", "k8s.io/api/core/v1.CSIVolumeSource", "k8s.io/api/core/v1.CephFSVolumeSource", "k8s.io/api/core/v1.CinderVolumeSource", "k8s.io/api/core/v1.ConfigMapVolumeSource", "k8s.io/api/core/v1.DownwardAPIVolumeSource", "k8s.io/api/core/v1.EmptyDirVolumeSource", "k8s.io/api/core/v1.EphemeralVolumeSource", "k8s.io/api/core/v1.FCVolumeSource", "k8s.io/api/core/v1.FlexVolumeSource", "k8s.io/api/core/v1.FlockerVolumeSource", "k8s.io/api/core/v1.GCEPersistentDiskVolumeSource", "k8s.io/api/core/v1.GitRepoVolumeSource", "k8s.io/api/core/v1.GlusterfsVolumeSource", "k8s.io/api/core/v1.HostPathVolumeSource", "k8s.io/api/core/v1.ISCSIVolumeSource", "k8s.io/api/core/v1.NFSVolumeSource", "k8s.io/api/core/v1.PersistentVolumeClaimVolumeSource", "k8s.io/api/core/v1.PhotonPersistentDiskVolumeSource", "k8s.io/api/core/v1.PortworxVolumeSource", "k8s.io/api/core/v1.ProjectedVolumeSource", "k8s.io/api/core/v1.QuobyteVolumeSource", "k8s.io/api/core/v1.RBDVolumeSource", "k8s.io/api/core/v1.ScaleIOVolumeSource", "k8s.io/api/core/v1.SecretVolumeSource", "k8s.io/api/core/v1.StorageOSVolumeSource", "k8s.io/api/core/v1.VsphereVirtualDiskVolumeSource"}, + } +} + +func schema_k8sio_api_core_v1_VolumeDevice(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "volumeDevice describes a mapping of a raw block device within a container.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "name must match the name of a persistentVolumeClaim in the pod", + Type: []string{"string"}, + Format: "", + }, + }, + "devicePath": { + SchemaProps: spec.SchemaProps{ + Description: "devicePath is the path inside of the container that the device will be mapped to.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"name", "devicePath"}, + }, + }, + } +} + +func schema_k8sio_api_core_v1_VolumeMount(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "VolumeMount describes a mounting of a Volume within a container.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "This must match the Name of a Volume.", + Type: []string{"string"}, + Format: "", + }, + }, + "readOnly": { + SchemaProps: spec.SchemaProps{ + Description: "Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "mountPath": { + SchemaProps: spec.SchemaProps{ + Description: "Path within the container at which the volume should be mounted. Must not contain ':'.", + Type: []string{"string"}, + Format: "", + }, + }, + "subPath": { + SchemaProps: spec.SchemaProps{ + Description: "Path within the volume from which the container's volume should be mounted. Defaults to \"\" (volume's root).", + Type: []string{"string"}, + Format: "", + }, + }, + "mountPropagation": { + SchemaProps: spec.SchemaProps{ + Description: "mountPropagation determines how mounts are propagated from the host to container and the other way around. When not set, MountPropagationNone is used. This field is beta in 1.10.", + Type: []string{"string"}, + Format: "", + }, + }, + "subPathExpr": { + SchemaProps: spec.SchemaProps{ + Description: "Expanded path within the volume from which the container's volume should be mounted. Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. Defaults to \"\" (volume's root). SubPathExpr and SubPath are mutually exclusive.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"name", "mountPath"}, + }, + }, + } +} + +func schema_k8sio_api_core_v1_VolumeNodeAffinity(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "VolumeNodeAffinity defines constraints that limit what nodes this volume can be accessed from.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "required": { + SchemaProps: spec.SchemaProps{ + Description: "Required specifies hard node constraints that must be met.", + Ref: ref("k8s.io/api/core/v1.NodeSelector"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.NodeSelector"}, + } +} + +func schema_k8sio_api_core_v1_VolumeProjection(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Projection that may be projected along with other supported volume types", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "secret": { + SchemaProps: spec.SchemaProps{ + Description: "information about the secret data to project", + Ref: ref("k8s.io/api/core/v1.SecretProjection"), + }, + }, + "downwardAPI": { + SchemaProps: spec.SchemaProps{ + Description: "information about the downwardAPI data to project", + Ref: ref("k8s.io/api/core/v1.DownwardAPIProjection"), + }, + }, + "configMap": { + SchemaProps: spec.SchemaProps{ + Description: "information about the configMap data to project", + Ref: ref("k8s.io/api/core/v1.ConfigMapProjection"), + }, + }, + "serviceAccountToken": { + SchemaProps: spec.SchemaProps{ + Description: "information about the serviceAccountToken data to project", + Ref: ref("k8s.io/api/core/v1.ServiceAccountTokenProjection"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.ConfigMapProjection", "k8s.io/api/core/v1.DownwardAPIProjection", "k8s.io/api/core/v1.SecretProjection", "k8s.io/api/core/v1.ServiceAccountTokenProjection"}, + } +} + +func schema_k8sio_api_core_v1_VolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Represents the source of a volume to mount. Only one of its members may be specified.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "hostPath": { + SchemaProps: spec.SchemaProps{ + Description: "HostPath represents a pre-existing file or directory on the host machine that is directly exposed to the container. This is generally used for system agents or other privileged things that are allowed to see the host machine. Most containers will NOT need this. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath", + Ref: ref("k8s.io/api/core/v1.HostPathVolumeSource"), + }, + }, + "emptyDir": { + SchemaProps: spec.SchemaProps{ + Description: "EmptyDir represents a temporary directory that shares a pod's lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir", + Ref: ref("k8s.io/api/core/v1.EmptyDirVolumeSource"), + }, + }, + "gcePersistentDisk": { + SchemaProps: spec.SchemaProps{ + Description: "GCEPersistentDisk represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk", + Ref: ref("k8s.io/api/core/v1.GCEPersistentDiskVolumeSource"), + }, + }, + "awsElasticBlockStore": { + SchemaProps: spec.SchemaProps{ + Description: "AWSElasticBlockStore represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore", + Ref: ref("k8s.io/api/core/v1.AWSElasticBlockStoreVolumeSource"), + }, + }, + "gitRepo": { + SchemaProps: spec.SchemaProps{ + Description: "GitRepo represents a git repository at a particular revision. DEPRECATED: GitRepo is deprecated. To provision a container with a git repo, mount an EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir into the Pod's container.", + Ref: ref("k8s.io/api/core/v1.GitRepoVolumeSource"), + }, + }, + "secret": { + SchemaProps: spec.SchemaProps{ + Description: "Secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret", + Ref: ref("k8s.io/api/core/v1.SecretVolumeSource"), + }, + }, + "nfs": { + SchemaProps: spec.SchemaProps{ + Description: "NFS represents an NFS mount on the host that shares a pod's lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs", + Ref: ref("k8s.io/api/core/v1.NFSVolumeSource"), + }, + }, + "iscsi": { + SchemaProps: spec.SchemaProps{ + Description: "ISCSI represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://examples.k8s.io/volumes/iscsi/README.md", + Ref: ref("k8s.io/api/core/v1.ISCSIVolumeSource"), + }, + }, + "glusterfs": { + SchemaProps: spec.SchemaProps{ + Description: "Glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime. More info: https://examples.k8s.io/volumes/glusterfs/README.md", + Ref: ref("k8s.io/api/core/v1.GlusterfsVolumeSource"), + }, + }, + "persistentVolumeClaim": { + SchemaProps: spec.SchemaProps{ + Description: "PersistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims", + Ref: ref("k8s.io/api/core/v1.PersistentVolumeClaimVolumeSource"), + }, + }, + "rbd": { + SchemaProps: spec.SchemaProps{ + Description: "RBD represents a Rados Block Device mount on the host that shares a pod's lifetime. More info: https://examples.k8s.io/volumes/rbd/README.md", + Ref: ref("k8s.io/api/core/v1.RBDVolumeSource"), + }, + }, + "flexVolume": { + SchemaProps: spec.SchemaProps{ + Description: "FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin.", + Ref: ref("k8s.io/api/core/v1.FlexVolumeSource"), + }, + }, + "cinder": { + SchemaProps: spec.SchemaProps{ + Description: "Cinder represents a cinder volume attached and mounted on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md", + Ref: ref("k8s.io/api/core/v1.CinderVolumeSource"), + }, + }, + "cephfs": { + SchemaProps: spec.SchemaProps{ + Description: "CephFS represents a Ceph FS mount on the host that shares a pod's lifetime", + Ref: ref("k8s.io/api/core/v1.CephFSVolumeSource"), + }, + }, + "flocker": { + SchemaProps: spec.SchemaProps{ + Description: "Flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running", + Ref: ref("k8s.io/api/core/v1.FlockerVolumeSource"), + }, + }, + "downwardAPI": { + SchemaProps: spec.SchemaProps{ + Description: "DownwardAPI represents downward API about the pod that should populate this volume", + Ref: ref("k8s.io/api/core/v1.DownwardAPIVolumeSource"), + }, + }, + "fc": { + SchemaProps: spec.SchemaProps{ + Description: "FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod.", + Ref: ref("k8s.io/api/core/v1.FCVolumeSource"), + }, + }, + "azureFile": { + SchemaProps: spec.SchemaProps{ + Description: "AzureFile represents an Azure File Service mount on the host and bind mount to the pod.", + Ref: ref("k8s.io/api/core/v1.AzureFileVolumeSource"), + }, + }, + "configMap": { + SchemaProps: spec.SchemaProps{ + Description: "ConfigMap represents a configMap that should populate this volume", + Ref: ref("k8s.io/api/core/v1.ConfigMapVolumeSource"), + }, + }, + "vsphereVolume": { + SchemaProps: spec.SchemaProps{ + Description: "VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine", + Ref: ref("k8s.io/api/core/v1.VsphereVirtualDiskVolumeSource"), + }, + }, + "quobyte": { + SchemaProps: spec.SchemaProps{ + Description: "Quobyte represents a Quobyte mount on the host that shares a pod's lifetime", + Ref: ref("k8s.io/api/core/v1.QuobyteVolumeSource"), + }, + }, + "azureDisk": { + SchemaProps: spec.SchemaProps{ + Description: "AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.", + Ref: ref("k8s.io/api/core/v1.AzureDiskVolumeSource"), + }, + }, + "photonPersistentDisk": { + SchemaProps: spec.SchemaProps{ + Description: "PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine", + Ref: ref("k8s.io/api/core/v1.PhotonPersistentDiskVolumeSource"), + }, + }, + "projected": { + SchemaProps: spec.SchemaProps{ + Description: "Items for all in one resources secrets, configmaps, and downward API", + Ref: ref("k8s.io/api/core/v1.ProjectedVolumeSource"), + }, + }, + "portworxVolume": { + SchemaProps: spec.SchemaProps{ + Description: "PortworxVolume represents a portworx volume attached and mounted on kubelets host machine", + Ref: ref("k8s.io/api/core/v1.PortworxVolumeSource"), + }, + }, + "scaleIO": { + SchemaProps: spec.SchemaProps{ + Description: "ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes.", + Ref: ref("k8s.io/api/core/v1.ScaleIOVolumeSource"), + }, + }, + "storageos": { + SchemaProps: spec.SchemaProps{ + Description: "StorageOS represents a StorageOS volume attached and mounted on Kubernetes nodes.", + Ref: ref("k8s.io/api/core/v1.StorageOSVolumeSource"), + }, + }, + "csi": { + SchemaProps: spec.SchemaProps{ + Description: "CSI (Container Storage Interface) represents ephemeral storage that is handled by certain external CSI drivers (Beta feature).", + Ref: ref("k8s.io/api/core/v1.CSIVolumeSource"), + }, + }, + "ephemeral": { + SchemaProps: spec.SchemaProps{ + Description: "Ephemeral represents a volume that is handled by a cluster storage driver. The volume's lifecycle is tied to the pod that defines it - it will be created before the pod starts, and deleted when the pod is removed.\n\nUse this if: a) the volume is only needed while the pod runs, b) features of normal volumes like restoring from snapshot or capacity\n tracking are needed,\nc) the storage driver is specified through a storage class, and d) the storage driver supports dynamic volume provisioning through\n a PersistentVolumeClaim (see EphemeralVolumeSource for more\n information on the connection between this volume type\n and PersistentVolumeClaim).\n\nUse PersistentVolumeClaim or one of the vendor-specific APIs for volumes that persist for longer than the lifecycle of an individual pod.\n\nUse CSI for light-weight local ephemeral volumes if the CSI driver is meant to be used that way - see the documentation of the driver for more information.\n\nA pod can use both types of ephemeral volumes and persistent volumes at the same time.", + Ref: ref("k8s.io/api/core/v1.EphemeralVolumeSource"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.AWSElasticBlockStoreVolumeSource", "k8s.io/api/core/v1.AzureDiskVolumeSource", "k8s.io/api/core/v1.AzureFileVolumeSource", "k8s.io/api/core/v1.CSIVolumeSource", "k8s.io/api/core/v1.CephFSVolumeSource", "k8s.io/api/core/v1.CinderVolumeSource", "k8s.io/api/core/v1.ConfigMapVolumeSource", "k8s.io/api/core/v1.DownwardAPIVolumeSource", "k8s.io/api/core/v1.EmptyDirVolumeSource", "k8s.io/api/core/v1.EphemeralVolumeSource", "k8s.io/api/core/v1.FCVolumeSource", "k8s.io/api/core/v1.FlexVolumeSource", "k8s.io/api/core/v1.FlockerVolumeSource", "k8s.io/api/core/v1.GCEPersistentDiskVolumeSource", "k8s.io/api/core/v1.GitRepoVolumeSource", "k8s.io/api/core/v1.GlusterfsVolumeSource", "k8s.io/api/core/v1.HostPathVolumeSource", "k8s.io/api/core/v1.ISCSIVolumeSource", "k8s.io/api/core/v1.NFSVolumeSource", "k8s.io/api/core/v1.PersistentVolumeClaimVolumeSource", "k8s.io/api/core/v1.PhotonPersistentDiskVolumeSource", "k8s.io/api/core/v1.PortworxVolumeSource", "k8s.io/api/core/v1.ProjectedVolumeSource", "k8s.io/api/core/v1.QuobyteVolumeSource", "k8s.io/api/core/v1.RBDVolumeSource", "k8s.io/api/core/v1.ScaleIOVolumeSource", "k8s.io/api/core/v1.SecretVolumeSource", "k8s.io/api/core/v1.StorageOSVolumeSource", "k8s.io/api/core/v1.VsphereVirtualDiskVolumeSource"}, + } +} + +func schema_k8sio_api_core_v1_VsphereVirtualDiskVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Represents a vSphere volume resource.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "volumePath": { + SchemaProps: spec.SchemaProps{ + Description: "Path that identifies vSphere volume vmdk", + Type: []string{"string"}, + Format: "", + }, + }, + "fsType": { + SchemaProps: spec.SchemaProps{ + Description: "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.", + Type: []string{"string"}, + Format: "", + }, + }, + "storagePolicyName": { + SchemaProps: spec.SchemaProps{ + Description: "Storage Policy Based Management (SPBM) profile name.", + Type: []string{"string"}, + Format: "", + }, + }, + "storagePolicyID": { + SchemaProps: spec.SchemaProps{ + Description: "Storage Policy Based Management (SPBM) profile ID associated with the StoragePolicyName.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"volumePath"}, + }, + }, + } +} + +func schema_k8sio_api_core_v1_WeightedPodAffinityTerm(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s)", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "weight": { + SchemaProps: spec.SchemaProps{ + Description: "weight associated with matching the corresponding podAffinityTerm, in the range 1-100.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "podAffinityTerm": { + SchemaProps: spec.SchemaProps{ + Description: "Required. A pod affinity term, associated with the corresponding weight.", + Ref: ref("k8s.io/api/core/v1.PodAffinityTerm"), + }, + }, + }, + Required: []string{"weight", "podAffinityTerm"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.PodAffinityTerm"}, + } +} + +func schema_k8sio_api_core_v1_WindowsSecurityContextOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "WindowsSecurityContextOptions contain Windows-specific options and credentials.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "gmsaCredentialSpecName": { + SchemaProps: spec.SchemaProps{ + Description: "GMSACredentialSpecName is the name of the GMSA credential spec to use.", + Type: []string{"string"}, + Format: "", + }, + }, + "gmsaCredentialSpec": { + SchemaProps: spec.SchemaProps{ + Description: "GMSACredentialSpec is where the GMSA admission webhook (https://github.com/kubernetes-sigs/windows-gmsa) inlines the contents of the GMSA credential spec named by the GMSACredentialSpecName field.", + Type: []string{"string"}, + Format: "", + }, + }, + "runAsUserName": { + SchemaProps: spec.SchemaProps{ + Description: "The UserName in Windows to run the entrypoint of the container process. Defaults to the user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.", + Type: []string{"string"}, + Format: "", + }, + }, + "hostProcess": { + SchemaProps: spec.SchemaProps{ + Description: "HostProcess determines if a container should be run as a 'Host Process' container. This field is alpha-level and will only be honored by components that enable the WindowsHostProcessContainers feature flag. Setting this field without the feature flag will result in errors when validating the Pod. All of a Pod's containers must have the same effective HostProcess value (it is not allowed to have a mix of HostProcess containers and non-HostProcess containers). In addition, if HostProcess is true then HostNetwork must also be set to true.", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_apimachinery_pkg_api_resource_Quantity(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Quantity is a fixed-point representation of a number. It provides convenient marshaling/unmarshaling in JSON and YAML, in addition to String() and AsInt64() accessors.\n\nThe serialization format is:\n\n ::= \n (Note that may be empty, from the \"\" case in .)\n ::= 0 | 1 | ... | 9 ::= | ::= | . | . | . ::= \"+\" | \"-\" ::= | ::= | | ::= Ki | Mi | Gi | Ti | Pi | Ei\n (International System of units; See: http://physics.nist.gov/cuu/Units/binary.html)\n ::= m | \"\" | k | M | G | T | P | E\n (Note that 1024 = 1Ki but 1000 = 1k; I didn't choose the capitalization.)\n ::= \"e\" | \"E\" \n\nNo matter which of the three exponent forms is used, no quantity may represent a number greater than 2^63-1 in magnitude, nor may it have more than 3 decimal places. Numbers larger or more precise will be capped or rounded up. (E.g.: 0.1m will rounded up to 1m.) This may be extended in the future if we require larger or smaller quantities.\n\nWhen a Quantity is parsed from a string, it will remember the type of suffix it had, and will use the same type again when it is serialized.\n\nBefore serializing, Quantity will be put in \"canonical form\". This means that Exponent/suffix will be adjusted up or down (with a corresponding increase or decrease in Mantissa) such that:\n a. No precision is lost\n b. No fractional digits will be emitted\n c. The exponent (or suffix) is as large as possible.\nThe sign will be omitted unless the number is negative.\n\nExamples:\n 1.5 will be serialized as \"1500m\"\n 1.5Gi will be serialized as \"1536Mi\"\n\nNote that the quantity will NEVER be internally represented by a floating point number. That is the whole point of this exercise.\n\nNon-canonical values will still parse as long as they are well formed, but will be re-emitted in their canonical form. (So always use canonical form, or don't diff.)\n\nThis format is intended to make it difficult to use these numbers without writing some sort of special handling code in the hopes that that will cause implementors to also use a fixed point implementation.", + Type: resource.Quantity{}.OpenAPISchemaType(), + Format: resource.Quantity{}.OpenAPISchemaFormat(), + }, + }, + } +} + +func schema_apimachinery_pkg_api_resource_int64Amount(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "int64Amount represents a fixed precision numerator and arbitrary scale exponent. It is faster than operations on inf.Dec for values that can be represented as int64.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "value": { + SchemaProps: spec.SchemaProps{ + Type: []string{"integer"}, + Format: "int64", + }, + }, + "scale": { + SchemaProps: spec.SchemaProps{ + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + Required: []string{"value", "scale"}, + }, + }, + } +} + +func schema_pkg_apis_meta_v1_APIGroup(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "APIGroup contains the name, the supported versions, and the preferred version of a group.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "name": { + SchemaProps: spec.SchemaProps{ + Description: "name is the name of the group.", + Type: []string{"string"}, + Format: "", + }, + }, + "versions": { + SchemaProps: spec.SchemaProps{ + Description: "versions are the versions supported in this group.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionForDiscovery"), + }, + }, + }, + }, + }, + "preferredVersion": { + SchemaProps: spec.SchemaProps{ + Description: "preferredVersion is the version preferred by the API server, which probably is the storage version.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionForDiscovery"), + }, + }, + "serverAddressByClientCIDRs": { + SchemaProps: spec.SchemaProps{ + Description: "a map of client CIDR to server address that is serving this group. This is to help clients reach servers in the most network-efficient way possible. Clients can use the appropriate server address as per the CIDR that they match. In case of multiple matches, clients should use the longest matching CIDR. The server returns only those CIDRs that it thinks that the client can match. For example: the master will return an internal IP CIDR only, if the client reaches the server using an internal IP. Server looks at X-Forwarded-For header or X-Real-Ip header or request.RemoteAddr (in that order) to get the client IP.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ServerAddressByClientCIDR"), + }, + }, + }, + }, + }, + }, + Required: []string{"name", "versions"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionForDiscovery", "k8s.io/apimachinery/pkg/apis/meta/v1.ServerAddressByClientCIDR"}, + } +} + +func schema_pkg_apis_meta_v1_APIGroupList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "APIGroupList is a list of APIGroup, to allow clients to discover the API at /apis.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "groups": { + SchemaProps: spec.SchemaProps{ + Description: "groups is a list of APIGroup.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.APIGroup"), + }, + }, + }, + }, + }, + }, + Required: []string{"groups"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.APIGroup"}, + } +} + +func schema_pkg_apis_meta_v1_APIResource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "APIResource specifies the name of a resource and whether it is namespaced.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "name is the plural name of the resource.", + Type: []string{"string"}, + Format: "", + }, + }, + "singularName": { + SchemaProps: spec.SchemaProps{ + Description: "singularName is the singular name of the resource. This allows clients to handle plural and singular opaquely. The singularName is more correct for reporting status on a single item and both singular and plural are allowed from the kubectl CLI interface.", + Type: []string{"string"}, + Format: "", + }, + }, + "namespaced": { + SchemaProps: spec.SchemaProps{ + Description: "namespaced indicates if a resource is namespaced or not.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "group": { + SchemaProps: spec.SchemaProps{ + Description: "group is the preferred group of the resource. Empty implies the group of the containing resource list. For subresources, this may have a different value, for example: Scale\".", + Type: []string{"string"}, + Format: "", + }, + }, + "version": { + SchemaProps: spec.SchemaProps{ + Description: "version is the preferred version of the resource. Empty implies the version of the containing resource list For subresources, this may have a different value, for example: v1 (while inside a v1beta1 version of the core resource's group)\".", + Type: []string{"string"}, + Format: "", + }, + }, + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "kind is the kind for the resource (e.g. 'Foo' is the kind for a resource 'foo')", + Type: []string{"string"}, + Format: "", + }, + }, + "verbs": { + SchemaProps: spec.SchemaProps{ + Description: "verbs is a list of supported kube verbs (this includes get, list, watch, create, update, patch, delete, deletecollection, and proxy)", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "shortNames": { + SchemaProps: spec.SchemaProps{ + Description: "shortNames is a list of suggested short names of the resource.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "categories": { + SchemaProps: spec.SchemaProps{ + Description: "categories is a list of the grouped resources this resource belongs to (e.g. 'all')", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "storageVersionHash": { + SchemaProps: spec.SchemaProps{ + Description: "The hash value of the storage version, the version this resource is converted to when written to the data store. Value must be treated as opaque by clients. Only equality comparison on the value is valid. This is an alpha feature and may change or be removed in the future. The field is populated by the apiserver only if the StorageVersionHash feature gate is enabled. This field will remain optional even if it graduates.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"name", "singularName", "namespaced", "kind", "verbs"}, + }, + }, + } +} + +func schema_pkg_apis_meta_v1_APIResourceList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "APIResourceList is a list of APIResource, it is used to expose the name of the resources supported in a specific group and version, and if the resource is namespaced.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "groupVersion": { + SchemaProps: spec.SchemaProps{ + Description: "groupVersion is the group and version this APIResourceList is for.", + Type: []string{"string"}, + Format: "", + }, + }, + "resources": { + SchemaProps: spec.SchemaProps{ + Description: "resources contains the name of the resources and if they are namespaced.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.APIResource"), + }, + }, + }, + }, + }, + }, + Required: []string{"groupVersion", "resources"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.APIResource"}, + } +} + +func schema_pkg_apis_meta_v1_APIVersions(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "APIVersions lists the versions that are available, to allow clients to discover the API at /api, which is the root path of the legacy v1 API.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "versions": { + SchemaProps: spec.SchemaProps{ + Description: "versions are the api versions that are available.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "serverAddressByClientCIDRs": { + SchemaProps: spec.SchemaProps{ + Description: "a map of client CIDR to server address that is serving this group. This is to help clients reach servers in the most network-efficient way possible. Clients can use the appropriate server address as per the CIDR that they match. In case of multiple matches, clients should use the longest matching CIDR. The server returns only those CIDRs that it thinks that the client can match. For example: the master will return an internal IP CIDR only, if the client reaches the server using an internal IP. Server looks at X-Forwarded-For header or X-Real-Ip header or request.RemoteAddr (in that order) to get the client IP.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ServerAddressByClientCIDR"), + }, + }, + }, + }, + }, + }, + Required: []string{"versions", "serverAddressByClientCIDRs"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ServerAddressByClientCIDR"}, + } +} + +func schema_pkg_apis_meta_v1_ApplyOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ApplyOptions may be provided when applying an API object. FieldManager is required for apply requests. ApplyOptions is equivalent to PatchOptions. It is provided as a convenience with documentation that speaks specifically to how the options fields relate to apply.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "dryRun": { + SchemaProps: spec.SchemaProps{ + Description: "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "force": { + SchemaProps: spec.SchemaProps{ + Description: "Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "fieldManager": { + SchemaProps: spec.SchemaProps{ + Description: "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"force", "fieldManager"}, + }, + }, + } +} + +func schema_pkg_apis_meta_v1_Condition(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Condition contains details for one aspect of the current state of this API Resource.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "type": { + SchemaProps: spec.SchemaProps{ + Description: "type of condition in CamelCase or in foo.example.com/CamelCase.", + Type: []string{"string"}, + Format: "", + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "status of the condition, one of True, False, Unknown.", + Type: []string{"string"}, + Format: "", + }, + }, + "observedGeneration": { + SchemaProps: spec.SchemaProps{ + Description: "observedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "lastTransitionTime": { + SchemaProps: spec.SchemaProps{ + Description: "lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "reason": { + SchemaProps: spec.SchemaProps{ + Description: "reason contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty.", + Type: []string{"string"}, + Format: "", + }, + }, + "message": { + SchemaProps: spec.SchemaProps{ + Description: "message is a human readable message indicating details about the transition. This may be an empty string.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"type", "status", "lastTransitionTime", "reason", "message"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_pkg_apis_meta_v1_CreateOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CreateOptions may be provided when creating an API object.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "dryRun": { + SchemaProps: spec.SchemaProps{ + Description: "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "fieldManager": { + SchemaProps: spec.SchemaProps{ + Description: "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.", + Type: []string{"string"}, + Format: "", + }, + }, + "fieldValidation": { + SchemaProps: spec.SchemaProps{ + Description: "fieldValidation determines how the server should respond to unknown/duplicate fields in the object in the request. Introduced as alpha in 1.23, older servers or servers with the `ServerSideFieldValidation` feature disabled will discard valid values specified in this param and not perform any server side field validation. Valid values are: - Ignore: ignores unknown/duplicate fields. - Warn: responds with a warning for each unknown/duplicate field, but successfully serves the request. - Strict: fails the request on unknown/duplicate fields.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_pkg_apis_meta_v1_DeleteOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DeleteOptions may be provided when deleting an API object.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "gracePeriodSeconds": { + SchemaProps: spec.SchemaProps{ + Description: "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "preconditions": { + SchemaProps: spec.SchemaProps{ + Description: "Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Preconditions"), + }, + }, + "orphanDependents": { + SchemaProps: spec.SchemaProps{ + Description: "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "propagationPolicy": { + SchemaProps: spec.SchemaProps{ + Description: "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.", + Type: []string{"string"}, + Format: "", + }, + }, + "dryRun": { + SchemaProps: spec.SchemaProps{ + Description: "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Preconditions"}, + } +} + +func schema_pkg_apis_meta_v1_Duration(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Duration is a wrapper around time.Duration which supports correct marshaling to YAML and JSON. In particular, it marshals into strings, which can be used as map keys in json.", + Type: v1.Duration{}.OpenAPISchemaType(), + Format: v1.Duration{}.OpenAPISchemaFormat(), + }, + }, + } +} + +func schema_pkg_apis_meta_v1_FieldsV1(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "FieldsV1 stores a set of fields in a data structure like a Trie, in JSON format.\n\nEach key is either a '.' representing the field itself, and will always map to an empty set, or a string representing a sub-field or item. The string will follow one of these four formats: 'f:', where is the name of a field in a struct, or key in a map 'v:', where is the exact json formatted value of a list item 'i:', where is position of a item in a list 'k:', where is a map of a list item's key fields to their unique values If a key maps to an empty Fields value, the field that key represents is part of the set.\n\nThe exact format is defined in sigs.k8s.io/structured-merge-diff", + Type: []string{"object"}, + }, + }, + } +} + +func schema_pkg_apis_meta_v1_GetOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "GetOptions is the standard query options to the standard REST get call.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "resourceVersion": { + SchemaProps: spec.SchemaProps{ + Description: "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_pkg_apis_meta_v1_GroupKind(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "GroupKind specifies a Group and a Kind, but does not force a version. This is useful for identifying concepts during lookup stages without having partially valid types", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "group": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "kind": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"group", "kind"}, + }, + }, + } +} + +func schema_pkg_apis_meta_v1_GroupResource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "GroupResource specifies a Group and a Resource, but does not force a version. This is useful for identifying concepts during lookup stages without having partially valid types", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "group": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "resource": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"group", "resource"}, + }, + }, + } +} + +func schema_pkg_apis_meta_v1_GroupVersion(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "GroupVersion contains the \"group\" and the \"version\", which uniquely identifies the API.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "group": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "version": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"group", "version"}, + }, + }, + } +} + +func schema_pkg_apis_meta_v1_GroupVersionForDiscovery(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "GroupVersion contains the \"group/version\" and \"version\" string of a version. It is made a struct to keep extensibility.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "groupVersion": { + SchemaProps: spec.SchemaProps{ + Description: "groupVersion specifies the API group and version in the form \"group/version\"", + Type: []string{"string"}, + Format: "", + }, + }, + "version": { + SchemaProps: spec.SchemaProps{ + Description: "version specifies the version in the form of \"version\". This is to save the clients the trouble of splitting the GroupVersion.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"groupVersion", "version"}, + }, + }, + } +} + +func schema_pkg_apis_meta_v1_GroupVersionKind(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "GroupVersionKind unambiguously identifies a kind. It doesn't anonymously include GroupVersion to avoid automatic coercion. It doesn't use a GroupVersion to avoid custom marshalling", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "group": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "version": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "kind": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"group", "version", "kind"}, + }, + }, + } +} + +func schema_pkg_apis_meta_v1_GroupVersionResource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "GroupVersionResource unambiguously identifies a resource. It doesn't anonymously include GroupVersion to avoid automatic coercion. It doesn't use a GroupVersion to avoid custom marshalling", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "group": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "version": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "resource": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"group", "version", "resource"}, + }, + }, + } +} + +func schema_pkg_apis_meta_v1_InternalEvent(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "InternalEvent makes watch.Event versioned", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "Type": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "Object": { + SchemaProps: spec.SchemaProps{ + Description: "Object is:\n * If Type is Added or Modified: the new state of the object.\n * If Type is Deleted: the state of the object immediately before deletion.\n * If Type is Bookmark: the object (instance of a type being watched) where\n only ResourceVersion field is set. On successful restart of watch from a\n bookmark resourceVersion, client is guaranteed to not get repeat event\n nor miss any events.\n * If Type is Error: *api.Status is recommended; other types may make sense\n depending on context.", + Ref: ref("k8s.io/apimachinery/pkg/runtime.Object"), + }, + }, + }, + Required: []string{"Type", "Object"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/runtime.Object"}, + } +} + +func schema_pkg_apis_meta_v1_LabelSelector(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "matchLabels": { + SchemaProps: spec.SchemaProps{ + Description: "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is \"key\", the operator is \"In\", and the values array contains only \"value\". The requirements are ANDed.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "matchExpressions": { + SchemaProps: spec.SchemaProps{ + Description: "matchExpressions is a list of label selector requirements. The requirements are ANDed.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelectorRequirement"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelectorRequirement"}, + } +} + +func schema_pkg_apis_meta_v1_LabelSelectorRequirement(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "key": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-patch-merge-key": "key", + "x-kubernetes-patch-strategy": "merge", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "key is the label key that the selector applies to.", + Type: []string{"string"}, + Format: "", + }, + }, + "operator": { + SchemaProps: spec.SchemaProps{ + Description: "operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.", + Type: []string{"string"}, + Format: "", + }, + }, + "values": { + SchemaProps: spec.SchemaProps{ + Description: "values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + Required: []string{"key", "operator"}, + }, + }, + } +} + +func schema_pkg_apis_meta_v1_List(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "List holds a list of objects, which may not be known by the server.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "List of objects", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/apimachinery/pkg/runtime.RawExtension"}, + } +} + +func schema_pkg_apis_meta_v1_ListMeta(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ListMeta describes metadata that synthetic resources must have, including lists and various status objects. A resource may have only one of {ObjectMeta, ListMeta}.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "selfLink": { + SchemaProps: spec.SchemaProps{ + Description: "selfLink is a URL representing this object. Populated by the system. Read-only.\n\nDEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release.", + Type: []string{"string"}, + Format: "", + }, + }, + "resourceVersion": { + SchemaProps: spec.SchemaProps{ + Description: "String that identifies the server's internal version of this object that can be used by clients to determine when objects have changed. Value must be treated as opaque by clients and passed unmodified back to the server. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency", + Type: []string{"string"}, + Format: "", + }, + }, + "continue": { + SchemaProps: spec.SchemaProps{ + Description: "continue may be set if the user set a limit on the number of items returned, and indicates that the server has more data available. The value is opaque and may be used to issue another request to the endpoint that served this list to retrieve the next set of available objects. Continuing a consistent list may not be possible if the server configuration has changed or more than a few minutes have passed. The resourceVersion field returned when using this continue value will be identical to the value in the first response, unless you have received this token from an error message.", + Type: []string{"string"}, + Format: "", + }, + }, + "remainingItemCount": { + SchemaProps: spec.SchemaProps{ + Description: "remainingItemCount is the number of subsequent items in the list which are not included in this list response. If the list request contained label or field selectors, then the number of remaining items is unknown and the field will be left unset and omitted during serialization. If the list is complete (either because it is not chunking or because this is the last chunk), then there are no more remaining items and this field will be left unset and omitted during serialization. Servers older than v1.15 do not set this field. The intended use of the remainingItemCount is *estimating* the size of a collection. Clients should not rely on the remainingItemCount to be set or to be exact.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + }, + }, + }, + } +} + +func schema_pkg_apis_meta_v1_ListOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ListOptions is the query options to a standard REST list call.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "labelSelector": { + SchemaProps: spec.SchemaProps{ + Description: "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + Type: []string{"string"}, + Format: "", + }, + }, + "fieldSelector": { + SchemaProps: spec.SchemaProps{ + Description: "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + Type: []string{"string"}, + Format: "", + }, + }, + "watch": { + SchemaProps: spec.SchemaProps{ + Description: "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "allowWatchBookmarks": { + SchemaProps: spec.SchemaProps{ + Description: "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "resourceVersion": { + SchemaProps: spec.SchemaProps{ + Description: "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + Type: []string{"string"}, + Format: "", + }, + }, + "resourceVersionMatch": { + SchemaProps: spec.SchemaProps{ + Description: "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + Type: []string{"string"}, + Format: "", + }, + }, + "timeoutSeconds": { + SchemaProps: spec.SchemaProps{ + Description: "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "limit": { + SchemaProps: spec.SchemaProps{ + Description: "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "continue": { + SchemaProps: spec.SchemaProps{ + Description: "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_pkg_apis_meta_v1_ManagedFieldsEntry(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ManagedFieldsEntry is a workflow-id, a FieldSet and the group version of the resource that the fieldset applies to.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "manager": { + SchemaProps: spec.SchemaProps{ + Description: "Manager is an identifier of the workflow managing these fields.", + Type: []string{"string"}, + Format: "", + }, + }, + "operation": { + SchemaProps: spec.SchemaProps{ + Description: "Operation is the type of operation which lead to this ManagedFieldsEntry being created. The only valid values for this field are 'Apply' and 'Update'.", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the version of this resource that this field set applies to. The format is \"group/version\" just like the top-level APIVersion field. It is necessary to track the version of a field set because it cannot be automatically converted.", + Type: []string{"string"}, + Format: "", + }, + }, + "time": { + SchemaProps: spec.SchemaProps{ + Description: "Time is timestamp of when these fields were set. It should always be empty if Operation is 'Apply'", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "fieldsType": { + SchemaProps: spec.SchemaProps{ + Description: "FieldsType is the discriminator for the different fields format and version. There is currently only one possible value: \"FieldsV1\"", + Type: []string{"string"}, + Format: "", + }, + }, + "fieldsV1": { + SchemaProps: spec.SchemaProps{ + Description: "FieldsV1 holds the first JSON version format as described in the \"FieldsV1\" type.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.FieldsV1"), + }, + }, + "subresource": { + SchemaProps: spec.SchemaProps{ + Description: "Subresource is the name of the subresource used to update that object, or empty string if the object was updated through the main resource. The value of this field is used to distinguish between managers, even if they share the same name. For example, a status update will be distinct from a regular update using the same manager name. Note that the APIVersion field is not related to the Subresource field and it always corresponds to the version of the main resource.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.FieldsV1", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_pkg_apis_meta_v1_MicroTime(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "MicroTime is version of Time with microsecond level precision.", + Type: v1.MicroTime{}.OpenAPISchemaType(), + Format: v1.MicroTime{}.OpenAPISchemaFormat(), + }, + }, + } +} + +func schema_pkg_apis_meta_v1_ObjectMeta(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name must be unique within a namespace. Is required when creating resources, although some resources may allow a client to request the generation of an appropriate name automatically. Name is primarily intended for creation idempotence and configuration definition. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/identifiers#names", + Type: []string{"string"}, + Format: "", + }, + }, + "generateName": { + SchemaProps: spec.SchemaProps{ + Description: "GenerateName is an optional prefix, used by the server, to generate a unique name ONLY IF the Name field has not been provided. If this field is used, the name returned to the client will be different than the name passed. This value will also be combined with a unique suffix. The provided value has the same validation rules as the Name field, and may be truncated by the length of the suffix required to make the value unique on the server.\n\nIf this field is specified and the generated name exists, the server will NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header).\n\nApplied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#idempotency", + Type: []string{"string"}, + Format: "", + }, + }, + "namespace": { + SchemaProps: spec.SchemaProps{ + Description: "Namespace defines the space within which each name must be unique. An empty namespace is equivalent to the \"default\" namespace, but \"default\" is the canonical representation. Not all objects are required to be scoped to a namespace - the value of this field for those objects will be empty.\n\nMust be a DNS_LABEL. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/namespaces", + Type: []string{"string"}, + Format: "", + }, + }, + "selfLink": { + SchemaProps: spec.SchemaProps{ + Description: "SelfLink is a URL representing this object. Populated by the system. Read-only.\n\nDEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release.", + Type: []string{"string"}, + Format: "", + }, + }, + "uid": { + SchemaProps: spec.SchemaProps{ + Description: "UID is the unique in time and space value for this object. It is typically generated by the server on successful creation of a resource and is not allowed to change on PUT operations.\n\nPopulated by the system. Read-only. More info: http://kubernetes.io/docs/user-guide/identifiers#uids", + Type: []string{"string"}, + Format: "", + }, + }, + "resourceVersion": { + SchemaProps: spec.SchemaProps{ + Description: "An opaque value that represents the internal version of this object that can be used by clients to determine when objects have changed. May be used for optimistic concurrency, change detection, and the watch operation on a resource or set of resources. Clients must treat these values as opaque and passed unmodified back to the server. They may only be valid for a particular resource or set of resources.\n\nPopulated by the system. Read-only. Value must be treated as opaque by clients and . More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency", + Type: []string{"string"}, + Format: "", + }, + }, + "generation": { + SchemaProps: spec.SchemaProps{ + Description: "A sequence number representing a specific generation of the desired state. Populated by the system. Read-only.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "creationTimestamp": { + SchemaProps: spec.SchemaProps{ + Description: "CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC.\n\nPopulated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "deletionTimestamp": { + SchemaProps: spec.SchemaProps{ + Description: "DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This field is set by the server when a graceful deletion is requested by the user, and is not directly settable by a client. The resource is expected to be deleted (no longer visible from resource lists, and not reachable by name) after the time in this field, once the finalizers list is empty. As long as the finalizers list contains items, deletion is blocked. Once the deletionTimestamp is set, this value may not be unset or be set further into the future, although it may be shortened or the resource may be deleted prior to this time. For example, a user may request that a pod is deleted in 30 seconds. The Kubelet will react by sending a graceful termination signal to the containers in the pod. After that 30 seconds, the Kubelet will send a hard termination signal (SIGKILL) to the container and after cleanup, remove the pod from the API. In the presence of network partitions, this object may still exist after this timestamp, until an administrator or automated process can determine the resource is fully terminated. If not set, graceful deletion of the object has not been requested.\n\nPopulated by the system when a graceful deletion is requested. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "deletionGracePeriodSeconds": { + SchemaProps: spec.SchemaProps{ + Description: "Number of seconds allowed for this object to gracefully terminate before it will be removed from the system. Only set when deletionTimestamp is also set. May only be shortened. Read-only.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "labels": { + SchemaProps: spec.SchemaProps{ + Description: "Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. More info: http://kubernetes.io/docs/user-guide/labels", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "annotations": { + SchemaProps: spec.SchemaProps{ + Description: "Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: http://kubernetes.io/docs/user-guide/annotations", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "ownerReferences": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-patch-merge-key": "uid", + "x-kubernetes-patch-strategy": "merge", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "List of objects depended by this object. If ALL objects in the list have been deleted, this object will be garbage collected. If this object is managed by a controller, then an entry in this list will point to this controller, with the controller field set to true. There cannot be more than one managing controller.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.OwnerReference"), + }, + }, + }, + }, + }, + "finalizers": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-patch-strategy": "merge", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "Must be empty before the object is deleted from the registry. Each entry is an identifier for the responsible component that will remove the entry from the list. If the deletionTimestamp of the object is non-nil, entries in this list can only be removed. Finalizers may be processed and removed in any order. Order is NOT enforced because it introduces significant risk of stuck finalizers. finalizers is a shared field, any actor with permission can reorder it. If the finalizer list is processed in order, then this can lead to a situation in which the component responsible for the first finalizer in the list is waiting for a signal (field value, external system, or other) produced by a component responsible for a finalizer later in the list, resulting in a deadlock. Without enforced ordering finalizers are free to order amongst themselves and are not vulnerable to ordering changes in the list.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "clusterName": { + SchemaProps: spec.SchemaProps{ + Description: "The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request.", + Type: []string{"string"}, + Format: "", + }, + }, + "managedFields": { + SchemaProps: spec.SchemaProps{ + Description: "ManagedFields maps workflow-id and version to the set of fields that are managed by that workflow. This is mostly for internal housekeeping, and users typically shouldn't need to set or understand this field. A workflow can be the user's name, a controller's name, or the name of a specific apply path like \"ci-cd\". The set of fields is always in the version that the workflow used when modifying the object.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ManagedFieldsEntry"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ManagedFieldsEntry", "k8s.io/apimachinery/pkg/apis/meta/v1.OwnerReference", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_pkg_apis_meta_v1_OwnerReference(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "OwnerReference contains enough information to let you identify an owning object. An owning object must be in the same namespace as the dependent, or be cluster-scoped, so there is no namespace field.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "API version of the referent.", + Type: []string{"string"}, + Format: "", + }, + }, + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names", + Type: []string{"string"}, + Format: "", + }, + }, + "uid": { + SchemaProps: spec.SchemaProps{ + Description: "UID of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#uids", + Type: []string{"string"}, + Format: "", + }, + }, + "controller": { + SchemaProps: spec.SchemaProps{ + Description: "If true, this reference points to the managing controller.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "blockOwnerDeletion": { + SchemaProps: spec.SchemaProps{ + Description: "If true, AND if the owner has the \"foregroundDeletion\" finalizer, then the owner cannot be deleted from the key-value store until this reference is removed. Defaults to false. To set this field, a user needs \"delete\" permission of the owner, otherwise 422 (Unprocessable Entity) will be returned.", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + Required: []string{"apiVersion", "kind", "name", "uid"}, + }, + }, + } +} + +func schema_pkg_apis_meta_v1_PartialObjectMetadata(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PartialObjectMetadata is a generic representation of any object with ObjectMeta. It allows clients to get access to a particular ObjectMeta schema without knowing the details of the version.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_pkg_apis_meta_v1_PartialObjectMetadataList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PartialObjectMetadataList contains a list of objects containing only their metadata", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "items contains each of the included items.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.PartialObjectMetadata"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/apimachinery/pkg/apis/meta/v1.PartialObjectMetadata"}, + } +} + +func schema_pkg_apis_meta_v1_Patch(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", + Type: []string{"object"}, + }, + }, + } +} + +func schema_pkg_apis_meta_v1_PatchOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PatchOptions may be provided when patching an API object. PatchOptions is meant to be a superset of UpdateOptions.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "dryRun": { + SchemaProps: spec.SchemaProps{ + Description: "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "force": { + SchemaProps: spec.SchemaProps{ + Description: "Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "fieldManager": { + SchemaProps: spec.SchemaProps{ + Description: "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).", + Type: []string{"string"}, + Format: "", + }, + }, + "fieldValidation": { + SchemaProps: spec.SchemaProps{ + Description: "fieldValidation determines how the server should respond to unknown/duplicate fields in the object in the request. Introduced as alpha in 1.23, older servers or servers with the `ServerSideFieldValidation` feature disabled will discard valid values specified in this param and not perform any server side field validation. Valid values are: - Ignore: ignores unknown/duplicate fields. - Warn: responds with a warning for each unknown/duplicate field, but successfully serves the request. - Strict: fails the request on unknown/duplicate fields.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_pkg_apis_meta_v1_Preconditions(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Preconditions must be fulfilled before an operation (update, delete, etc.) is carried out.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "uid": { + SchemaProps: spec.SchemaProps{ + Description: "Specifies the target UID.", + Type: []string{"string"}, + Format: "", + }, + }, + "resourceVersion": { + SchemaProps: spec.SchemaProps{ + Description: "Specifies the target ResourceVersion", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_pkg_apis_meta_v1_RootPaths(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "RootPaths lists the paths available at root. For example: \"/healthz\", \"/apis\".", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "paths": { + SchemaProps: spec.SchemaProps{ + Description: "paths are the paths available at root.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + Required: []string{"paths"}, + }, + }, + } +} + +func schema_pkg_apis_meta_v1_ServerAddressByClientCIDR(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ServerAddressByClientCIDR helps the client to determine the server address that they should use, depending on the clientCIDR that they match.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "clientCIDR": { + SchemaProps: spec.SchemaProps{ + Description: "The CIDR with which clients can match their IP to figure out the server address that they should use.", + Type: []string{"string"}, + Format: "", + }, + }, + "serverAddress": { + SchemaProps: spec.SchemaProps{ + Description: "Address of this server, suitable for a client that matches the above CIDR. This can be a hostname, hostname:port, IP or IP:port.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"clientCIDR", "serverAddress"}, + }, + }, + } +} + +func schema_pkg_apis_meta_v1_Status(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Status is a return value for calls that don't return other objects.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Status of the operation. One of: \"Success\" or \"Failure\". More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Type: []string{"string"}, + Format: "", + }, + }, + "message": { + SchemaProps: spec.SchemaProps{ + Description: "A human-readable description of the status of this operation.", + Type: []string{"string"}, + Format: "", + }, + }, + "reason": { + SchemaProps: spec.SchemaProps{ + Description: "A machine-readable description of why this operation is in the \"Failure\" status. If this value is empty there is no information available. A Reason clarifies an HTTP status code but does not override it.", + Type: []string{"string"}, + Format: "", + }, + }, + "details": { + SchemaProps: spec.SchemaProps{ + Description: "Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.StatusDetails"), + }, + }, + "code": { + SchemaProps: spec.SchemaProps{ + Description: "Suggested HTTP return code for this status, 0 if not set.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/apimachinery/pkg/apis/meta/v1.StatusDetails"}, + } +} + +func schema_pkg_apis_meta_v1_StatusCause(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "StatusCause provides more information about an api.Status failure, including cases when multiple errors are encountered.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "reason": { + SchemaProps: spec.SchemaProps{ + Description: "A machine-readable description of the cause of the error. If this value is empty there is no information available.", + Type: []string{"string"}, + Format: "", + }, + }, + "message": { + SchemaProps: spec.SchemaProps{ + Description: "A human-readable description of the cause of the error. This field may be presented as-is to a reader.", + Type: []string{"string"}, + Format: "", + }, + }, + "field": { + SchemaProps: spec.SchemaProps{ + Description: "The field of the resource that has caused this error, as named by its JSON serialization. May include dot and postfix notation for nested attributes. Arrays are zero-indexed. Fields may appear more than once in an array of causes due to fields having multiple errors. Optional.\n\nExamples:\n \"name\" - the field \"name\" on the current resource\n \"items[0].name\" - the field \"name\" on the first array entry in \"items\"", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_pkg_apis_meta_v1_StatusDetails(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "StatusDetails is a set of additional properties that MAY be set by the server to provide additional information about a response. The Reason field of a Status object defines what attributes will be set. Clients must ignore fields that do not match the defined type of each attribute, and should assume that any attribute may be empty, invalid, or under defined.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described).", + Type: []string{"string"}, + Format: "", + }, + }, + "group": { + SchemaProps: spec.SchemaProps{ + Description: "The group attribute of the resource associated with the status StatusReason.", + Type: []string{"string"}, + Format: "", + }, + }, + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "The kind attribute of the resource associated with the status StatusReason. On some operations may differ from the requested resource Kind. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "uid": { + SchemaProps: spec.SchemaProps{ + Description: "UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids", + Type: []string{"string"}, + Format: "", + }, + }, + "causes": { + SchemaProps: spec.SchemaProps{ + Description: "The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.StatusCause"), + }, + }, + }, + }, + }, + "retryAfterSeconds": { + SchemaProps: spec.SchemaProps{ + Description: "If specified, the time in seconds before the operation should be retried. Some errors may indicate the client must take an alternate action - for those errors this field may indicate how long to wait before taking the alternate action.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.StatusCause"}, + } +} + +func schema_pkg_apis_meta_v1_Table(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Table is a tabular representation of a set of API resources. The server transforms the object into a set of preferred columns for quickly reviewing the objects.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "columnDefinitions": { + SchemaProps: spec.SchemaProps{ + Description: "columnDefinitions describes each column in the returned items array. The number of cells per row will always match the number of column definitions.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.TableColumnDefinition"), + }, + }, + }, + }, + }, + "rows": { + SchemaProps: spec.SchemaProps{ + Description: "rows is the list of items in the table.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.TableRow"), + }, + }, + }, + }, + }, + }, + Required: []string{"columnDefinitions", "rows"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/apimachinery/pkg/apis/meta/v1.TableColumnDefinition", "k8s.io/apimachinery/pkg/apis/meta/v1.TableRow"}, + } +} + +func schema_pkg_apis_meta_v1_TableColumnDefinition(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "TableColumnDefinition contains information about a column returned in the Table.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "name is a human readable name for the column.", + Type: []string{"string"}, + Format: "", + }, + }, + "type": { + SchemaProps: spec.SchemaProps{ + Description: "type is an OpenAPI type definition for this column, such as number, integer, string, or array. See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for more.", + Type: []string{"string"}, + Format: "", + }, + }, + "format": { + SchemaProps: spec.SchemaProps{ + Description: "format is an optional OpenAPI type modifier for this column. A format modifies the type and imposes additional rules, like date or time formatting for a string. The 'name' format is applied to the primary identifier column which has type 'string' to assist in clients identifying column is the resource name. See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for more.", + Type: []string{"string"}, + Format: "", + }, + }, + "description": { + SchemaProps: spec.SchemaProps{ + Description: "description is a human readable description of this column.", + Type: []string{"string"}, + Format: "", + }, + }, + "priority": { + SchemaProps: spec.SchemaProps{ + Description: "priority is an integer defining the relative importance of this column compared to others. Lower numbers are considered higher priority. Columns that may be omitted in limited space scenarios should be given a higher priority.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + Required: []string{"name", "type", "format", "description", "priority"}, + }, + }, + } +} + +func schema_pkg_apis_meta_v1_TableOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "TableOptions are used when a Table is requested by the caller.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "includeObject": { + SchemaProps: spec.SchemaProps{ + Description: "includeObject decides whether to include each object along with its columnar information. Specifying \"None\" will return no object, specifying \"Object\" will return the full object contents, and specifying \"Metadata\" (the default) will return the object's metadata in the PartialObjectMetadata kind in version v1beta1 of the meta.k8s.io API group.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_pkg_apis_meta_v1_TableRow(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "TableRow is an individual row in a table.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "cells": { + SchemaProps: spec.SchemaProps{ + Description: "cells will be as wide as the column definitions array and may contain strings, numbers (float64 or int64), booleans, simple maps, lists, or null. See the type field of the column definition for a more detailed description.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Format: "", + }, + }, + }, + }, + }, + "conditions": { + SchemaProps: spec.SchemaProps{ + Description: "conditions describe additional status of a row that are relevant for a human user. These conditions apply to the row, not to the object, and will be specific to table output. The only defined condition type is 'Completed', for a row that indicates a resource that has run to completion and can be given less visual priority.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.TableRowCondition"), + }, + }, + }, + }, + }, + "object": { + SchemaProps: spec.SchemaProps{ + Description: "This field contains the requested additional information about each object based on the includeObject policy when requesting the Table. If \"None\", this field is empty, if \"Object\" this will be the default serialization of the object for the current API version, and if \"Metadata\" (the default) will contain the object metadata. Check the returned kind and apiVersion of the object before parsing. The media type of the object will always match the enclosing list - if this as a JSON table, these will be JSON encoded objects.", + Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), + }, + }, + }, + Required: []string{"cells"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.TableRowCondition", "k8s.io/apimachinery/pkg/runtime.RawExtension"}, + } +} + +func schema_pkg_apis_meta_v1_TableRowCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "TableRowCondition allows a row to be marked with additional information.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "type": { + SchemaProps: spec.SchemaProps{ + Description: "Type of row condition. The only defined value is 'Completed' indicating that the object this row represents has reached a completed state and may be given less visual priority than other rows. Clients are not required to honor any conditions but should be consistent where possible about handling the conditions.", + Type: []string{"string"}, + Format: "", + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Status of the condition, one of True, False, Unknown.", + Type: []string{"string"}, + Format: "", + }, + }, + "reason": { + SchemaProps: spec.SchemaProps{ + Description: "(brief) machine readable reason for the condition's last transition.", + Type: []string{"string"}, + Format: "", + }, + }, + "message": { + SchemaProps: spec.SchemaProps{ + Description: "Human readable message indicating details about last transition.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"type", "status"}, + }, + }, + } +} + +func schema_pkg_apis_meta_v1_Time(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers.", + Type: v1.Time{}.OpenAPISchemaType(), + Format: v1.Time{}.OpenAPISchemaFormat(), + }, + }, + } +} + +func schema_pkg_apis_meta_v1_Timestamp(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Timestamp is a struct that is equivalent to Time, but intended for protobuf marshalling/unmarshalling. It is generated into a serialization that matches Time. Do not use in Go structs.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "seconds": { + SchemaProps: spec.SchemaProps{ + Description: "Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "nanos": { + SchemaProps: spec.SchemaProps{ + Description: "Non-negative fractions of a second at nanosecond resolution. Negative second values with fractions must still have non-negative nanos values that count forward in time. Must be from 0 to 999,999,999 inclusive. This field may be limited in precision depending on context.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + Required: []string{"seconds", "nanos"}, + }, + }, + } +} + +func schema_pkg_apis_meta_v1_TypeMeta(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "TypeMeta describes an individual object in an API response or request with strings representing the type of the object and its API schema version. Structures that are versioned or persisted should inline TypeMeta.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_pkg_apis_meta_v1_UpdateOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "UpdateOptions may be provided when updating an API object. All fields in UpdateOptions should also be present in PatchOptions.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "dryRun": { + SchemaProps: spec.SchemaProps{ + Description: "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "fieldManager": { + SchemaProps: spec.SchemaProps{ + Description: "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.", + Type: []string{"string"}, + Format: "", + }, + }, + "fieldValidation": { + SchemaProps: spec.SchemaProps{ + Description: "fieldValidation determines how the server should respond to unknown/duplicate fields in the object in the request. Introduced as alpha in 1.23, older servers or servers with the `ServerSideFieldValidation` feature disabled will discard valid values specified in this param and not perform any server side field validation. Valid values are: - Ignore: ignores unknown/duplicate fields. - Warn: responds with a warning for each unknown/duplicate field, but successfully serves the request. - Strict: fails the request on unknown/duplicate fields.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_pkg_apis_meta_v1_WatchEvent(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Event represents a single event to a watched resource.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "type": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "object": { + SchemaProps: spec.SchemaProps{ + Description: "Object is:\n * If Type is Added or Modified: the new state of the object.\n * If Type is Deleted: the state of the object immediately before deletion.\n * If Type is Error: *Status is recommended; other types may make sense\n depending on context.", + Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), + }, + }, + }, + Required: []string{"type", "object"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/runtime.RawExtension"}, + } +} + +func schema_k8sio_apimachinery_pkg_runtime_RawExtension(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "RawExtension is used to hold extensions in external versions.\n\nTo use this, make a field which has RawExtension as its type in your external, versioned struct, and Object in your internal struct. You also need to register your various plugin types.\n\n// Internal package: type MyAPIObject struct {\n\truntime.TypeMeta `json:\",inline\"`\n\tMyPlugin runtime.Object `json:\"myPlugin\"`\n} type PluginA struct {\n\tAOption string `json:\"aOption\"`\n}\n\n// External package: type MyAPIObject struct {\n\truntime.TypeMeta `json:\",inline\"`\n\tMyPlugin runtime.RawExtension `json:\"myPlugin\"`\n} type PluginA struct {\n\tAOption string `json:\"aOption\"`\n}\n\n// On the wire, the JSON will look something like this: {\n\t\"kind\":\"MyAPIObject\",\n\t\"apiVersion\":\"v1\",\n\t\"myPlugin\": {\n\t\t\"kind\":\"PluginA\",\n\t\t\"aOption\":\"foo\",\n\t},\n}\n\nSo what happens? Decode first uses json or yaml to unmarshal the serialized data into your external MyAPIObject. That causes the raw JSON to be stored, but not unpacked. The next step is to copy (using pkg/conversion) into the internal struct. The runtime package's DefaultScheme has conversion functions installed which will unpack the JSON stored in RawExtension, turning it into the correct object type, and storing it in the Object. (TODO: In the case where the object is of an unknown type, a runtime.Unknown object will be created and stored.)", + Type: []string{"object"}, + }, + }, + } +} + +func schema_k8sio_apimachinery_pkg_runtime_TypeMeta(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "TypeMeta is shared by all top level objects. The proper way to use it is to inline it in your type, like this: type MyAwesomeAPIObject struct {\n runtime.TypeMeta `json:\",inline\"`\n ... // other fields\n} func (obj *MyAwesomeAPIObject) SetGroupVersionKind(gvk *metav1.GroupVersionKind) { metav1.UpdateTypeMeta(obj,gvk) }; GroupVersionKind() *GroupVersionKind\n\nTypeMeta is provided here for convenience. You may use it directly from this package or define your own with the same fields.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "kind": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_k8sio_apimachinery_pkg_runtime_Unknown(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Unknown allows api objects with unknown types to be passed-through. This can be used to deal with the API objects from a plug-in. Unknown objects still have functioning TypeMeta features-- kind, version, etc. metadata and field mutatation.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "kind": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "Raw": { + SchemaProps: spec.SchemaProps{ + Description: "Raw will hold the complete serialized object which couldn't be matched with a registered type. Most likely, nothing should be done with this except for passing it through the system.", + Type: []string{"string"}, + Format: "byte", + }, + }, + "ContentEncoding": { + SchemaProps: spec.SchemaProps{ + Description: "ContentEncoding is encoding used to encode 'Raw' data. Unspecified means no encoding.", + Type: []string{"string"}, + Format: "", + }, + }, + "ContentType": { + SchemaProps: spec.SchemaProps{ + Description: "ContentType is serialization method used to serialize 'Raw'. Unspecified means ContentTypeJSON.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"Raw", "ContentEncoding", "ContentType"}, + }, + }, + } +} + +func schema_apimachinery_pkg_util_intstr_IntOrString(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "IntOrString is a type that can hold an int32 or a string. When used in JSON or YAML marshalling and unmarshalling, it produces or consumes the inner type. This allows you to have, for example, a JSON field that can accept a name or number.", + Type: intstr.IntOrString{}.OpenAPISchemaType(), + Format: intstr.IntOrString{}.OpenAPISchemaFormat(), + }, + }, + } +} + +func schema_kubevirtio_api_core_v1_AccessCredential(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "AccessCredential represents a credential source that can be used to authorize remote access to the vm guest Only one of its members may be specified.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "sshPublicKey": { + SchemaProps: spec.SchemaProps{ + Description: "SSHPublicKey represents the source and method of applying a ssh public key into a guest virtual machine.", + Ref: ref("kubevirt.io/api/core/v1.SSHPublicKeyAccessCredential"), + }, + }, + "userPassword": { + SchemaProps: spec.SchemaProps{ + Description: "UserPassword represents the source and method for applying a guest user's password", + Ref: ref("kubevirt.io/api/core/v1.UserPasswordAccessCredential"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "kubevirt.io/api/core/v1.SSHPublicKeyAccessCredential", "kubevirt.io/api/core/v1.UserPasswordAccessCredential"}, + } +} + +func schema_kubevirtio_api_core_v1_AccessCredentialSecretSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "secretName": { + SchemaProps: spec.SchemaProps{ + Description: "SecretName represents the name of the secret in the VMI's namespace", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"secretName"}, + }, + }, + } +} + +func schema_kubevirtio_api_core_v1_AddVolumeOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "AddVolumeOptions is provided when dynamically hot plugging a volume and disk", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name represents the name that will be used to map the disk to the corresponding volume. This overrides any name set inside the Disk struct itself.", + Type: []string{"string"}, + Format: "", + }, + }, + "disk": { + SchemaProps: spec.SchemaProps{ + Description: "Disk represents the hotplug disk that will be plugged into the running VMI", + Ref: ref("kubevirt.io/api/core/v1.Disk"), + }, + }, + "volumeSource": { + SchemaProps: spec.SchemaProps{ + Description: "VolumeSource represents the source of the volume to map to the disk.", + Ref: ref("kubevirt.io/api/core/v1.HotplugVolumeSource"), + }, + }, + "dryRun": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + Required: []string{"name", "disk", "volumeSource"}, + }, + }, + Dependencies: []string{ + "kubevirt.io/api/core/v1.Disk", "kubevirt.io/api/core/v1.HotplugVolumeSource"}, + } +} + +func schema_kubevirtio_api_core_v1_AuthorizedKeysFile(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "AuthorizedKeysFile represents a path within the guest that ssh public keys should be propagated to", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "filePath": { + SchemaProps: spec.SchemaProps{ + Description: "FilePath represents the place on the guest that the authorized_keys file should be writen to. This is expected to be a full path including both the base directory and file name.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"filePath"}, + }, + }, + } +} + +func schema_kubevirtio_api_core_v1_BIOS(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "If set (default), BIOS will be used.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "useSerial": { + SchemaProps: spec.SchemaProps{ + Description: "If set, the BIOS output will be transmitted over serial", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_kubevirtio_api_core_v1_BlockSize(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "BlockSize provides the option to change the block size presented to the VM for a disk. Only one of its members may be specified.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "custom": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/api/core/v1.CustomBlockSize"), + }, + }, + "matchVolume": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/api/core/v1.FeatureState"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "kubevirt.io/api/core/v1.CustomBlockSize", "kubevirt.io/api/core/v1.FeatureState"}, + } +} + +func schema_kubevirtio_api_core_v1_Bootloader(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Represents the firmware blob used to assist in the domain creation process. Used for setting the QEMU BIOS file path for the libvirt domain.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "bios": { + SchemaProps: spec.SchemaProps{ + Description: "If set (default), BIOS will be used.", + Ref: ref("kubevirt.io/api/core/v1.BIOS"), + }, + }, + "efi": { + SchemaProps: spec.SchemaProps{ + Description: "If set, EFI will be used instead of BIOS.", + Ref: ref("kubevirt.io/api/core/v1.EFI"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "kubevirt.io/api/core/v1.BIOS", "kubevirt.io/api/core/v1.EFI"}, + } +} + +func schema_kubevirtio_api_core_v1_CDRomTarget(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "bus": { + SchemaProps: spec.SchemaProps{ + Description: "Bus indicates the type of disk device to emulate. supported values: virtio, sata, scsi.", + Type: []string{"string"}, + Format: "", + }, + }, + "readonly": { + SchemaProps: spec.SchemaProps{ + Description: "ReadOnly. Defaults to true.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "tray": { + SchemaProps: spec.SchemaProps{ + Description: "Tray indicates if the tray of the device is open or closed. Allowed values are \"open\" and \"closed\". Defaults to closed.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_kubevirtio_api_core_v1_CPU(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CPU allows specifying the CPU topology.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "cores": { + SchemaProps: spec.SchemaProps{ + Description: "Cores specifies the number of cores inside the vmi. Must be a value greater or equal 1.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "sockets": { + SchemaProps: spec.SchemaProps{ + Description: "Sockets specifies the number of sockets inside the vmi. Must be a value greater or equal 1.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "threads": { + SchemaProps: spec.SchemaProps{ + Description: "Threads specifies the number of threads inside the vmi. Must be a value greater or equal 1.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "model": { + SchemaProps: spec.SchemaProps{ + Description: "Model specifies the CPU model inside the VMI. List of available models https://github.com/libvirt/libvirt/tree/master/src/cpu_map. It is possible to specify special cases like \"host-passthrough\" to get the same CPU as the node and \"host-model\" to get CPU closest to the node one. Defaults to host-model.", + Type: []string{"string"}, + Format: "", + }, + }, + "features": { + SchemaProps: spec.SchemaProps{ + Description: "Features specifies the CPU features list inside the VMI.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/api/core/v1.CPUFeature"), + }, + }, + }, + }, + }, + "dedicatedCpuPlacement": { + SchemaProps: spec.SchemaProps{ + Description: "DedicatedCPUPlacement requests the scheduler to place the VirtualMachineInstance on a node with enough dedicated pCPUs and pin the vCPUs to it.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "numa": { + SchemaProps: spec.SchemaProps{ + Description: "NUMA allows specifying settings for the guest NUMA topology", + Ref: ref("kubevirt.io/api/core/v1.NUMA"), + }, + }, + "isolateEmulatorThread": { + SchemaProps: spec.SchemaProps{ + Description: "IsolateEmulatorThread requests one more dedicated pCPU to be allocated for the VMI to place the emulator thread on it.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "realtime": { + SchemaProps: spec.SchemaProps{ + Description: "Realtime instructs the virt-launcher to tune the VMI for lower latency, optional for real time workloads", + Ref: ref("kubevirt.io/api/core/v1.Realtime"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "kubevirt.io/api/core/v1.CPUFeature", "kubevirt.io/api/core/v1.NUMA", "kubevirt.io/api/core/v1.Realtime"}, + } +} + +func schema_kubevirtio_api_core_v1_CPUFeature(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CPUFeature allows specifying a CPU feature.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name of the CPU feature", + Type: []string{"string"}, + Format: "", + }, + }, + "policy": { + SchemaProps: spec.SchemaProps{ + Description: "Policy is the CPU feature attribute which can have the following attributes: force - The virtual CPU will claim the feature is supported regardless of it being supported by host CPU. require - Guest creation will fail unless the feature is supported by the host CPU or the hypervisor is able to emulate it. optional - The feature will be supported by virtual CPU if and only if it is supported by host CPU. disable - The feature will not be supported by virtual CPU. forbid - Guest creation will fail if the feature is supported by host CPU. Defaults to require", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"name"}, + }, + }, + } +} + +func schema_kubevirtio_api_core_v1_CertConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CertConfig contains the tunables for TLS certificates", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "duration": { + SchemaProps: spec.SchemaProps{ + Description: "The requested 'duration' (i.e. lifetime) of the Certificate.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + "renewBefore": { + SchemaProps: spec.SchemaProps{ + Description: "The amount of time before the currently issued certificate's \"notAfter\" time that we will begin to attempt to renew the certificate.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Duration"}, + } +} + +func schema_kubevirtio_api_core_v1_Chassis(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Chassis specifies the chassis info passed to the domain.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "manufacturer": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "version": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "serial": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "asset": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "sku": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_kubevirtio_api_core_v1_ClientPassthroughDevices(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Represent a subset of client devices that can be accessed by VMI. At the moment only, USB devices using Usbredir's library and tooling. Another fit would be a smartcard with libcacard.\n\nThe struct is currently empty as there is no immediate request for user-facing APIs. This structure simply turns on USB redirection of UsbClientPassthroughMaxNumberOf devices.", + Type: []string{"object"}, + }, + }, + } +} + +func schema_kubevirtio_api_core_v1_Clock(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Represents the clock and timers of a vmi.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "utc": { + SchemaProps: spec.SchemaProps{ + Description: "UTC sets the guest clock to UTC on each boot. If an offset is specified, guest changes to the clock will be kept during reboots and are not reset.", + Ref: ref("kubevirt.io/api/core/v1.ClockOffsetUTC"), + }, + }, + "timezone": { + SchemaProps: spec.SchemaProps{ + Description: "Timezone sets the guest clock to the specified timezone. Zone name follows the TZ environment variable format (e.g. 'America/New_York').", + Type: []string{"string"}, + Format: "", + }, + }, + "timer": { + SchemaProps: spec.SchemaProps{ + Description: "Timer specifies whih timers are attached to the vmi.", + Ref: ref("kubevirt.io/api/core/v1.Timer"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "kubevirt.io/api/core/v1.ClockOffsetUTC", "kubevirt.io/api/core/v1.Timer"}, + } +} + +func schema_kubevirtio_api_core_v1_ClockOffset(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Exactly one of its members must be set.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "utc": { + SchemaProps: spec.SchemaProps{ + Description: "UTC sets the guest clock to UTC on each boot. If an offset is specified, guest changes to the clock will be kept during reboots and are not reset.", + Ref: ref("kubevirt.io/api/core/v1.ClockOffsetUTC"), + }, + }, + "timezone": { + SchemaProps: spec.SchemaProps{ + Description: "Timezone sets the guest clock to the specified timezone. Zone name follows the TZ environment variable format (e.g. 'America/New_York').", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{ + "kubevirt.io/api/core/v1.ClockOffsetUTC"}, + } +} + +func schema_kubevirtio_api_core_v1_ClockOffsetUTC(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "UTC sets the guest clock to UTC on each boot.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "offsetSeconds": { + SchemaProps: spec.SchemaProps{ + Description: "OffsetSeconds specifies an offset in seconds, relative to UTC. If set, guest changes to the clock will be kept during reboots and not reset.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + }, + }, + } +} + +func schema_kubevirtio_api_core_v1_CloudInitConfigDriveSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Represents a cloud-init config drive user data source. More info: https://cloudinit.readthedocs.io/en/latest/topics/datasources/configdrive.html", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "secretRef": { + SchemaProps: spec.SchemaProps{ + Description: "UserDataSecretRef references a k8s secret that contains config drive userdata.", + Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), + }, + }, + "userDataBase64": { + SchemaProps: spec.SchemaProps{ + Description: "UserDataBase64 contains config drive cloud-init userdata as a base64 encoded string.", + Type: []string{"string"}, + Format: "", + }, + }, + "userData": { + SchemaProps: spec.SchemaProps{ + Description: "UserData contains config drive inline cloud-init userdata.", + Type: []string{"string"}, + Format: "", + }, + }, + "networkDataSecretRef": { + SchemaProps: spec.SchemaProps{ + Description: "NetworkDataSecretRef references a k8s secret that contains config drive networkdata.", + Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), + }, + }, + "networkDataBase64": { + SchemaProps: spec.SchemaProps{ + Description: "NetworkDataBase64 contains config drive cloud-init networkdata as a base64 encoded string.", + Type: []string{"string"}, + Format: "", + }, + }, + "networkData": { + SchemaProps: spec.SchemaProps{ + Description: "NetworkData contains config drive inline cloud-init networkdata.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.LocalObjectReference"}, + } +} + +func schema_kubevirtio_api_core_v1_CloudInitNoCloudSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Represents a cloud-init nocloud user data source. More info: http://cloudinit.readthedocs.io/en/latest/topics/datasources/nocloud.html", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "secretRef": { + SchemaProps: spec.SchemaProps{ + Description: "UserDataSecretRef references a k8s secret that contains NoCloud userdata.", + Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), + }, + }, + "userDataBase64": { + SchemaProps: spec.SchemaProps{ + Description: "UserDataBase64 contains NoCloud cloud-init userdata as a base64 encoded string.", + Type: []string{"string"}, + Format: "", + }, + }, + "userData": { + SchemaProps: spec.SchemaProps{ + Description: "UserData contains NoCloud inline cloud-init userdata.", + Type: []string{"string"}, + Format: "", + }, + }, + "networkDataSecretRef": { + SchemaProps: spec.SchemaProps{ + Description: "NetworkDataSecretRef references a k8s secret that contains NoCloud networkdata.", + Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), + }, + }, + "networkDataBase64": { + SchemaProps: spec.SchemaProps{ + Description: "NetworkDataBase64 contains NoCloud cloud-init networkdata as a base64 encoded string.", + Type: []string{"string"}, + Format: "", + }, + }, + "networkData": { + SchemaProps: spec.SchemaProps{ + Description: "NetworkData contains NoCloud inline cloud-init networkdata.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.LocalObjectReference"}, + } +} + +func schema_kubevirtio_api_core_v1_ClusterProfilerRequest(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "labelSelector": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "continue": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "pageSize": { + SchemaProps: spec.SchemaProps{ + Type: []string{"integer"}, + Format: "int64", + }, + }, + }, + Required: []string{"pageSize"}, + }, + }, + } +} + +func schema_kubevirtio_api_core_v1_ClusterProfilerResults(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "componentResults": { + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/api/core/v1.ProfilerResult"), + }, + }, + }, + }, + }, + "continue": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"componentResults"}, + }, + }, + Dependencies: []string{ + "kubevirt.io/api/core/v1.ProfilerResult"}, + } +} + +func schema_kubevirtio_api_core_v1_ComponentConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "nodePlacement": { + SchemaProps: spec.SchemaProps{ + Description: "nodePlacement describes scheduling configuration for specific KubeVirt components", + Ref: ref("kubevirt.io/api/core/v1.NodePlacement"), + }, + }, + "replicas": { + SchemaProps: spec.SchemaProps{ + Description: "replicas indicates how many replicas should be created for each KubeVirt infrastructure component (like virt-api or virt-controller). Defaults to 2. WARNING: this is an advanced feature that prevents auto-scaling for core kubevirt components. Please use with caution!", + Type: []string{"integer"}, + Format: "byte", + }, + }, + }, + }, + }, + Dependencies: []string{ + "kubevirt.io/api/core/v1.NodePlacement"}, + } +} + +func schema_kubevirtio_api_core_v1_ConfigDriveSSHPublicKeyAccessCredentialPropagation(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + }, + }, + } +} + +func schema_kubevirtio_api_core_v1_ConfigMapVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ConfigMapVolumeSource adapts a ConfigMap into a volume. More info: https://kubernetes.io/docs/concepts/storage/volumes/#configmap", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", + Type: []string{"string"}, + Format: "", + }, + }, + "optional": { + SchemaProps: spec.SchemaProps{ + Description: "Specify whether the ConfigMap or it's keys must be defined", + Type: []string{"boolean"}, + Format: "", + }, + }, + "volumeLabel": { + SchemaProps: spec.SchemaProps{ + Description: "The volume label of the resulting disk inside the VMI. Different bootstrapping mechanisms require different values. Typical values are \"cidata\" (cloud-init), \"config-2\" (cloud-init) or \"OEMDRV\" (kickstart).", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_kubevirtio_api_core_v1_ContainerDiskSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Represents a docker image with an embedded disk.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "image": { + SchemaProps: spec.SchemaProps{ + Description: "Image is the name of the image with the embedded disk.", + Type: []string{"string"}, + Format: "", + }, + }, + "imagePullSecret": { + SchemaProps: spec.SchemaProps{ + Description: "ImagePullSecret is the name of the Docker registry secret required to pull the image. The secret must already exist.", + Type: []string{"string"}, + Format: "", + }, + }, + "path": { + SchemaProps: spec.SchemaProps{ + Description: "Path defines the path to disk file in the container", + Type: []string{"string"}, + Format: "", + }, + }, + "imagePullPolicy": { + SchemaProps: spec.SchemaProps{ + Description: "Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"image"}, + }, + }, + } +} + +func schema_kubevirtio_api_core_v1_CustomBlockSize(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CustomBlockSize represents the desired logical and physical block size for a VM disk.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "logical": { + SchemaProps: spec.SchemaProps{ + Type: []string{"integer"}, + Format: "int32", + }, + }, + "physical": { + SchemaProps: spec.SchemaProps{ + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + Required: []string{"logical", "physical"}, + }, + }, + } +} + +func schema_kubevirtio_api_core_v1_CustomizeComponents(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "patches": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/api/core/v1.CustomizeComponentsPatch"), + }, + }, + }, + }, + }, + "flags": { + SchemaProps: spec.SchemaProps{ + Description: "Configure the value used for deployment and daemonset resources", + Ref: ref("kubevirt.io/api/core/v1.Flags"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "kubevirt.io/api/core/v1.CustomizeComponentsPatch", "kubevirt.io/api/core/v1.Flags"}, + } +} + +func schema_kubevirtio_api_core_v1_CustomizeComponentsPatch(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "resourceName": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "resourceType": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "patch": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "type": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"resourceName", "resourceType", "patch", "type"}, + }, + }, + } +} + +func schema_kubevirtio_api_core_v1_DHCPOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Extra DHCP options to use in the interface.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "bootFileName": { + SchemaProps: spec.SchemaProps{ + Description: "If specified will pass option 67 to interface's DHCP server", + Type: []string{"string"}, + Format: "", + }, + }, + "tftpServerName": { + SchemaProps: spec.SchemaProps{ + Description: "If specified will pass option 66 to interface's DHCP server", + Type: []string{"string"}, + Format: "", + }, + }, + "ntpServers": { + SchemaProps: spec.SchemaProps{ + Description: "If specified will pass the configured NTP server to the VM via DHCP option 042.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "privateOptions": { + SchemaProps: spec.SchemaProps{ + Description: "If specified will pass extra DHCP options for private use, range: 224-254", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/api/core/v1.DHCPPrivateOptions"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "kubevirt.io/api/core/v1.DHCPPrivateOptions"}, + } +} + +func schema_kubevirtio_api_core_v1_DHCPPrivateOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DHCPExtraOptions defines Extra DHCP options for a VM.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "option": { + SchemaProps: spec.SchemaProps{ + Description: "Option is an Integer value from 224-254 Required.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "value": { + SchemaProps: spec.SchemaProps{ + Description: "Value is a String value for the Option provided Required.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"option", "value"}, + }, + }, + } +} + +func schema_kubevirtio_api_core_v1_DataVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name represents the name of the DataVolume in the same namespace", + Type: []string{"string"}, + Format: "", + }, + }, + "hotpluggable": { + SchemaProps: spec.SchemaProps{ + Description: "Hotpluggable indicates whether the volume can be hotplugged and hotunplugged.", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + Required: []string{"name"}, + }, + }, + } +} + +func schema_kubevirtio_api_core_v1_DataVolumeTemplateDummyStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + }, + }, + } +} + +func schema_kubevirtio_api_core_v1_DataVolumeTemplateSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "DataVolumeSpec contains the DataVolume specification.", + Ref: ref("kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.DataVolumeSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "DataVolumeTemplateDummyStatus is here simply for backwards compatibility with a previous API.", + Ref: ref("kubevirt.io/api/core/v1.DataVolumeTemplateDummyStatus"), + }, + }, + }, + Required: []string{"spec"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "kubevirt.io/api/core/v1.DataVolumeTemplateDummyStatus", "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.DataVolumeSpec"}, + } +} + +func schema_kubevirtio_api_core_v1_DeveloperConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DeveloperConfiguration holds developer options", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "featureGates": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "pvcTolerateLessSpaceUpToPercent": { + SchemaProps: spec.SchemaProps{ + Type: []string{"integer"}, + Format: "int32", + }, + }, + "minimumReservePVCBytes": { + SchemaProps: spec.SchemaProps{ + Type: []string{"integer"}, + Format: "int64", + }, + }, + "memoryOvercommit": { + SchemaProps: spec.SchemaProps{ + Type: []string{"integer"}, + Format: "int32", + }, + }, + "nodeSelectors": { + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "useEmulation": { + SchemaProps: spec.SchemaProps{ + Description: "UseEmulation can be set to true to allow fallback to software emulation in case hardware-assisted emulation is not available.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "cpuAllocationRatio": { + SchemaProps: spec.SchemaProps{ + Type: []string{"integer"}, + Format: "int32", + }, + }, + "minimumClusterTSCFrequency": { + SchemaProps: spec.SchemaProps{ + Description: "Allow overriding the automatically determined minimum TSC frequency of the cluster and fixate the minimum to this frequency.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "diskVerification": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/api/core/v1.DiskVerification"), + }, + }, + "logVerbosity": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/api/core/v1.LogVerbosity"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "kubevirt.io/api/core/v1.DiskVerification", "kubevirt.io/api/core/v1.LogVerbosity"}, + } +} + +func schema_kubevirtio_api_core_v1_Devices(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "useVirtioTransitional": { + SchemaProps: spec.SchemaProps{ + Description: "Fall back to legacy virtio 0.9 support if virtio bus is selected on devices. This is helpful for old machines like CentOS6 or RHEL6 which do not understand virtio_non_transitional (virtio 1.0).", + Type: []string{"boolean"}, + Format: "", + }, + }, + "disableHotplug": { + SchemaProps: spec.SchemaProps{ + Description: "DisableHotplug disabled the ability to hotplug disks.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "disks": { + SchemaProps: spec.SchemaProps{ + Description: "Disks describes disks, cdroms and luns which are connected to the vmi.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/api/core/v1.Disk"), + }, + }, + }, + }, + }, + "watchdog": { + SchemaProps: spec.SchemaProps{ + Description: "Watchdog describes a watchdog device which can be added to the vmi.", + Ref: ref("kubevirt.io/api/core/v1.Watchdog"), + }, + }, + "interfaces": { + SchemaProps: spec.SchemaProps{ + Description: "Interfaces describe network interfaces which are added to the vmi.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/api/core/v1.Interface"), + }, + }, + }, + }, + }, + "inputs": { + SchemaProps: spec.SchemaProps{ + Description: "Inputs describe input devices", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/api/core/v1.Input"), + }, + }, + }, + }, + }, + "autoattachPodInterface": { + SchemaProps: spec.SchemaProps{ + Description: "Whether to attach a pod network interface. Defaults to true.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "autoattachGraphicsDevice": { + SchemaProps: spec.SchemaProps{ + Description: "Whether to attach the default graphics device or not. VNC will not be available if set to false. Defaults to true.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "autoattachSerialConsole": { + SchemaProps: spec.SchemaProps{ + Description: "Whether to attach the default serial console or not. Serial console access will not be available if set to false. Defaults to true.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "autoattachMemBalloon": { + SchemaProps: spec.SchemaProps{ + Description: "Whether to attach the Memory balloon device with default period. Period can be adjusted in virt-config. Defaults to true.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "rng": { + SchemaProps: spec.SchemaProps{ + Description: "Whether to have random number generator from host", + Ref: ref("kubevirt.io/api/core/v1.Rng"), + }, + }, + "blockMultiQueue": { + SchemaProps: spec.SchemaProps{ + Description: "Whether or not to enable virtio multi-queue for block devices. Defaults to false.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "networkInterfaceMultiqueue": { + SchemaProps: spec.SchemaProps{ + Description: "If specified, virtual network interfaces configured with a virtio bus will also enable the vhost multiqueue feature for network devices. The number of queues created depends on additional factors of the VirtualMachineInstance, like the number of guest CPUs.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "gpus": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "Whether to attach a GPU device to the vmi.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/api/core/v1.GPU"), + }, + }, + }, + }, + }, + "filesystems": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "Filesystems describes filesystem which is connected to the vmi.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/api/core/v1.Filesystem"), + }, + }, + }, + }, + }, + "hostDevices": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "Whether to attach a host device to the vmi.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/api/core/v1.HostDevice"), + }, + }, + }, + }, + }, + "clientPassthrough": { + SchemaProps: spec.SchemaProps{ + Description: "To configure and access client devices such as redirecting USB", + Ref: ref("kubevirt.io/api/core/v1.ClientPassthroughDevices"), + }, + }, + "sound": { + SchemaProps: spec.SchemaProps{ + Description: "Whether to emulate a sound device.", + Ref: ref("kubevirt.io/api/core/v1.SoundDevice"), + }, + }, + "tpm": { + SchemaProps: spec.SchemaProps{ + Description: "Whether to emulate a TPM device.", + Ref: ref("kubevirt.io/api/core/v1.TPMDevice"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "kubevirt.io/api/core/v1.ClientPassthroughDevices", "kubevirt.io/api/core/v1.Disk", "kubevirt.io/api/core/v1.Filesystem", "kubevirt.io/api/core/v1.GPU", "kubevirt.io/api/core/v1.HostDevice", "kubevirt.io/api/core/v1.Input", "kubevirt.io/api/core/v1.Interface", "kubevirt.io/api/core/v1.Rng", "kubevirt.io/api/core/v1.SoundDevice", "kubevirt.io/api/core/v1.TPMDevice", "kubevirt.io/api/core/v1.Watchdog"}, + } +} + +func schema_kubevirtio_api_core_v1_Disk(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name is the device name", + Type: []string{"string"}, + Format: "", + }, + }, + "disk": { + SchemaProps: spec.SchemaProps{ + Description: "Attach a volume as a disk to the vmi.", + Ref: ref("kubevirt.io/api/core/v1.DiskTarget"), + }, + }, + "lun": { + SchemaProps: spec.SchemaProps{ + Description: "Attach a volume as a LUN to the vmi.", + Ref: ref("kubevirt.io/api/core/v1.LunTarget"), + }, + }, + "cdrom": { + SchemaProps: spec.SchemaProps{ + Description: "Attach a volume as a cdrom to the vmi.", + Ref: ref("kubevirt.io/api/core/v1.CDRomTarget"), + }, + }, + "bootOrder": { + SchemaProps: spec.SchemaProps{ + Description: "BootOrder is an integer value > 0, used to determine ordering of boot devices. Lower values take precedence. Each disk or interface that has a boot order must have a unique value. Disks without a boot order are not tried if a disk with a boot order exists.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "serial": { + SchemaProps: spec.SchemaProps{ + Description: "Serial provides the ability to specify a serial number for the disk device.", + Type: []string{"string"}, + Format: "", + }, + }, + "dedicatedIOThread": { + SchemaProps: spec.SchemaProps{ + Description: "dedicatedIOThread indicates this disk should have an exclusive IO Thread. Enabling this implies useIOThreads = true. Defaults to false.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "cache": { + SchemaProps: spec.SchemaProps{ + Description: "Cache specifies which kvm disk cache mode should be used. Supported values are: CacheNone, CacheWriteThrough.", + Type: []string{"string"}, + Format: "", + }, + }, + "io": { + SchemaProps: spec.SchemaProps{ + Description: "IO specifies which QEMU disk IO mode should be used. Supported values are: native, default, threads.", + Type: []string{"string"}, + Format: "", + }, + }, + "tag": { + SchemaProps: spec.SchemaProps{ + Description: "If specified, disk address and its tag will be provided to the guest via config drive metadata", + Type: []string{"string"}, + Format: "", + }, + }, + "blockSize": { + SchemaProps: spec.SchemaProps{ + Description: "If specified, the virtual disk will be presented with the given block sizes.", + Ref: ref("kubevirt.io/api/core/v1.BlockSize"), + }, + }, + "shareable": { + SchemaProps: spec.SchemaProps{ + Description: "If specified the disk is made sharable and multiple write from different VMs are permitted", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + Required: []string{"name"}, + }, + }, + Dependencies: []string{ + "kubevirt.io/api/core/v1.BlockSize", "kubevirt.io/api/core/v1.CDRomTarget", "kubevirt.io/api/core/v1.DiskTarget", "kubevirt.io/api/core/v1.LunTarget"}, + } +} + +func schema_kubevirtio_api_core_v1_DiskDevice(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Represents the target of a volume to mount. Only one of its members may be specified.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "disk": { + SchemaProps: spec.SchemaProps{ + Description: "Attach a volume as a disk to the vmi.", + Ref: ref("kubevirt.io/api/core/v1.DiskTarget"), + }, + }, + "lun": { + SchemaProps: spec.SchemaProps{ + Description: "Attach a volume as a LUN to the vmi.", + Ref: ref("kubevirt.io/api/core/v1.LunTarget"), + }, + }, + "cdrom": { + SchemaProps: spec.SchemaProps{ + Description: "Attach a volume as a cdrom to the vmi.", + Ref: ref("kubevirt.io/api/core/v1.CDRomTarget"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "kubevirt.io/api/core/v1.CDRomTarget", "kubevirt.io/api/core/v1.DiskTarget", "kubevirt.io/api/core/v1.LunTarget"}, + } +} + +func schema_kubevirtio_api_core_v1_DiskTarget(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "bus": { + SchemaProps: spec.SchemaProps{ + Description: "Bus indicates the type of disk device to emulate. supported values: virtio, sata, scsi.", + Type: []string{"string"}, + Format: "", + }, + }, + "readonly": { + SchemaProps: spec.SchemaProps{ + Description: "ReadOnly. Defaults to false.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "pciAddress": { + SchemaProps: spec.SchemaProps{ + Description: "If specified, the virtual disk will be placed on the guests pci address with the specified PCI address. For example: 0000:81:01.10", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_kubevirtio_api_core_v1_DiskVerification(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DiskVerification holds container disks verification limits", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "memoryLimit": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + }, + }, + }, + Required: []string{"memoryLimit"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + } +} + +func schema_kubevirtio_api_core_v1_DomainSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "resources": { + SchemaProps: spec.SchemaProps{ + Description: "Resources describes the Compute Resources required by this vmi.", + Ref: ref("kubevirt.io/api/core/v1.ResourceRequirements"), + }, + }, + "cpu": { + SchemaProps: spec.SchemaProps{ + Description: "CPU allow specified the detailed CPU topology inside the vmi.", + Ref: ref("kubevirt.io/api/core/v1.CPU"), + }, + }, + "memory": { + SchemaProps: spec.SchemaProps{ + Description: "Memory allow specifying the VMI memory features.", + Ref: ref("kubevirt.io/api/core/v1.Memory"), + }, + }, + "machine": { + SchemaProps: spec.SchemaProps{ + Description: "Machine type.", + Ref: ref("kubevirt.io/api/core/v1.Machine"), + }, + }, + "firmware": { + SchemaProps: spec.SchemaProps{ + Description: "Firmware.", + Ref: ref("kubevirt.io/api/core/v1.Firmware"), + }, + }, + "clock": { + SchemaProps: spec.SchemaProps{ + Description: "Clock sets the clock and timers of the vmi.", + Ref: ref("kubevirt.io/api/core/v1.Clock"), + }, + }, + "features": { + SchemaProps: spec.SchemaProps{ + Description: "Features like acpi, apic, hyperv, smm.", + Ref: ref("kubevirt.io/api/core/v1.Features"), + }, + }, + "devices": { + SchemaProps: spec.SchemaProps{ + Description: "Devices allows adding disks, network interfaces, and others", + Ref: ref("kubevirt.io/api/core/v1.Devices"), + }, + }, + "ioThreadsPolicy": { + SchemaProps: spec.SchemaProps{ + Description: "Controls whether or not disks will share IOThreads. Omitting IOThreadsPolicy disables use of IOThreads. One of: shared, auto", + Type: []string{"string"}, + Format: "", + }, + }, + "chassis": { + SchemaProps: spec.SchemaProps{ + Description: "Chassis specifies the chassis info passed to the domain.", + Ref: ref("kubevirt.io/api/core/v1.Chassis"), + }, + }, + "launchSecurity": { + SchemaProps: spec.SchemaProps{ + Description: "Launch Security setting of the vmi.", + Ref: ref("kubevirt.io/api/core/v1.LaunchSecurity"), + }, + }, + }, + Required: []string{"devices"}, + }, + }, + Dependencies: []string{ + "kubevirt.io/api/core/v1.CPU", "kubevirt.io/api/core/v1.Chassis", "kubevirt.io/api/core/v1.Clock", "kubevirt.io/api/core/v1.Devices", "kubevirt.io/api/core/v1.Features", "kubevirt.io/api/core/v1.Firmware", "kubevirt.io/api/core/v1.LaunchSecurity", "kubevirt.io/api/core/v1.Machine", "kubevirt.io/api/core/v1.Memory", "kubevirt.io/api/core/v1.ResourceRequirements"}, + } +} + +func schema_kubevirtio_api_core_v1_DownwardAPIVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DownwardAPIVolumeSource represents a volume containing downward API info.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "fields": { + SchemaProps: spec.SchemaProps{ + Description: "Fields is a list of downward API volume file", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.DownwardAPIVolumeFile"), + }, + }, + }, + }, + }, + "volumeLabel": { + SchemaProps: spec.SchemaProps{ + Description: "The volume label of the resulting disk inside the VMI. Different bootstrapping mechanisms require different values. Typical values are \"cidata\" (cloud-init), \"config-2\" (cloud-init) or \"OEMDRV\" (kickstart).", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.DownwardAPIVolumeFile"}, + } +} + +func schema_kubevirtio_api_core_v1_DownwardMetricsVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DownwardMetricsVolumeSource adds a very small disk to VMIs which contains a limited view of host and guest metrics. The disk content is compatible with vhostmd (https://github.com/vhostmd/vhostmd) and vm-dump-metrics.", + Type: []string{"object"}, + }, + }, + } +} + +func schema_kubevirtio_api_core_v1_EFI(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "If set, EFI will be used instead of BIOS.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "secureBoot": { + SchemaProps: spec.SchemaProps{ + Description: "If set, SecureBoot will be enabled and the OVMF roms will be swapped for SecureBoot-enabled ones. Requires SMM to be enabled. Defaults to true", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_kubevirtio_api_core_v1_EmptyDiskSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "EmptyDisk represents a temporary disk which shares the vmis lifecycle.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "capacity": { + SchemaProps: spec.SchemaProps{ + Description: "Capacity of the sparse disk.", + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + }, + }, + }, + Required: []string{"capacity"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + } +} + +func schema_kubevirtio_api_core_v1_EphemeralVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "persistentVolumeClaim": { + SchemaProps: spec.SchemaProps{ + Description: "PersistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace. Directly attached to the vmi via qemu. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims", + Ref: ref("k8s.io/api/core/v1.PersistentVolumeClaimVolumeSource"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.PersistentVolumeClaimVolumeSource"}, + } +} + +func schema_kubevirtio_api_core_v1_FeatureAPIC(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "enabled": { + SchemaProps: spec.SchemaProps{ + Description: "Enabled determines if the feature should be enabled or disabled on the guest. Defaults to true.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "endOfInterrupt": { + SchemaProps: spec.SchemaProps{ + Description: "EndOfInterrupt enables the end of interrupt notification in the guest. Defaults to false.", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_kubevirtio_api_core_v1_FeatureHyperv(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Hyperv specific features.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "relaxed": { + SchemaProps: spec.SchemaProps{ + Description: "Relaxed instructs the guest OS to disable watchdog timeouts. Defaults to the machine type setting.", + Ref: ref("kubevirt.io/api/core/v1.FeatureState"), + }, + }, + "vapic": { + SchemaProps: spec.SchemaProps{ + Description: "VAPIC improves the paravirtualized handling of interrupts. Defaults to the machine type setting.", + Ref: ref("kubevirt.io/api/core/v1.FeatureState"), + }, + }, + "spinlocks": { + SchemaProps: spec.SchemaProps{ + Description: "Spinlocks allows to configure the spinlock retry attempts.", + Ref: ref("kubevirt.io/api/core/v1.FeatureSpinlocks"), + }, + }, + "vpindex": { + SchemaProps: spec.SchemaProps{ + Description: "VPIndex enables the Virtual Processor Index to help windows identifying virtual processors. Defaults to the machine type setting.", + Ref: ref("kubevirt.io/api/core/v1.FeatureState"), + }, + }, + "runtime": { + SchemaProps: spec.SchemaProps{ + Description: "Runtime improves the time accounting to improve scheduling in the guest. Defaults to the machine type setting.", + Ref: ref("kubevirt.io/api/core/v1.FeatureState"), + }, + }, + "synic": { + SchemaProps: spec.SchemaProps{ + Description: "SyNIC enables the Synthetic Interrupt Controller. Defaults to the machine type setting.", + Ref: ref("kubevirt.io/api/core/v1.FeatureState"), + }, + }, + "synictimer": { + SchemaProps: spec.SchemaProps{ + Description: "SyNICTimer enables Synthetic Interrupt Controller Timers, reducing CPU load. Defaults to the machine type setting.", + Ref: ref("kubevirt.io/api/core/v1.SyNICTimer"), + }, + }, + "reset": { + SchemaProps: spec.SchemaProps{ + Description: "Reset enables Hyperv reboot/reset for the vmi. Requires synic. Defaults to the machine type setting.", + Ref: ref("kubevirt.io/api/core/v1.FeatureState"), + }, + }, + "vendorid": { + SchemaProps: spec.SchemaProps{ + Description: "VendorID allows setting the hypervisor vendor id. Defaults to the machine type setting.", + Ref: ref("kubevirt.io/api/core/v1.FeatureVendorID"), + }, + }, + "frequencies": { + SchemaProps: spec.SchemaProps{ + Description: "Frequencies improves the TSC clock source handling for Hyper-V on KVM. Defaults to the machine type setting.", + Ref: ref("kubevirt.io/api/core/v1.FeatureState"), + }, + }, + "reenlightenment": { + SchemaProps: spec.SchemaProps{ + Description: "Reenlightenment enables the notifications on TSC frequency changes. Defaults to the machine type setting.", + Ref: ref("kubevirt.io/api/core/v1.FeatureState"), + }, + }, + "tlbflush": { + SchemaProps: spec.SchemaProps{ + Description: "TLBFlush improves performances in overcommited environments. Requires vpindex. Defaults to the machine type setting.", + Ref: ref("kubevirt.io/api/core/v1.FeatureState"), + }, + }, + "ipi": { + SchemaProps: spec.SchemaProps{ + Description: "IPI improves performances in overcommited environments. Requires vpindex. Defaults to the machine type setting.", + Ref: ref("kubevirt.io/api/core/v1.FeatureState"), + }, + }, + "evmcs": { + SchemaProps: spec.SchemaProps{ + Description: "EVMCS Speeds up L2 vmexits, but disables other virtualization features. Requires vapic. Defaults to the machine type setting.", + Ref: ref("kubevirt.io/api/core/v1.FeatureState"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "kubevirt.io/api/core/v1.FeatureSpinlocks", "kubevirt.io/api/core/v1.FeatureState", "kubevirt.io/api/core/v1.FeatureVendorID", "kubevirt.io/api/core/v1.SyNICTimer"}, + } +} + +func schema_kubevirtio_api_core_v1_FeatureKVM(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "hidden": { + SchemaProps: spec.SchemaProps{ + Description: "Hide the KVM hypervisor from standard MSR based discovery. Defaults to false", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_kubevirtio_api_core_v1_FeatureSpinlocks(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "enabled": { + SchemaProps: spec.SchemaProps{ + Description: "Enabled determines if the feature should be enabled or disabled on the guest. Defaults to true.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "spinlocks": { + SchemaProps: spec.SchemaProps{ + Description: "Retries indicates the number of retries. Must be a value greater or equal 4096. Defaults to 4096.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + }, + }, + }, + } +} + +func schema_kubevirtio_api_core_v1_FeatureState(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Represents if a feature is enabled or disabled.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "enabled": { + SchemaProps: spec.SchemaProps{ + Description: "Enabled determines if the feature should be enabled or disabled on the guest. Defaults to true.", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_kubevirtio_api_core_v1_FeatureVendorID(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "enabled": { + SchemaProps: spec.SchemaProps{ + Description: "Enabled determines if the feature should be enabled or disabled on the guest. Defaults to true.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "vendorid": { + SchemaProps: spec.SchemaProps{ + Description: "VendorID sets the hypervisor vendor id, visible to the vmi. String up to twelve characters.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_kubevirtio_api_core_v1_Features(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "acpi": { + SchemaProps: spec.SchemaProps{ + Description: "ACPI enables/disables ACPI inside the guest. Defaults to enabled.", + Ref: ref("kubevirt.io/api/core/v1.FeatureState"), + }, + }, + "apic": { + SchemaProps: spec.SchemaProps{ + Description: "Defaults to the machine type setting.", + Ref: ref("kubevirt.io/api/core/v1.FeatureAPIC"), + }, + }, + "hyperv": { + SchemaProps: spec.SchemaProps{ + Description: "Defaults to the machine type setting.", + Ref: ref("kubevirt.io/api/core/v1.FeatureHyperv"), + }, + }, + "smm": { + SchemaProps: spec.SchemaProps{ + Description: "SMM enables/disables System Management Mode. TSEG not yet implemented.", + Ref: ref("kubevirt.io/api/core/v1.FeatureState"), + }, + }, + "kvm": { + SchemaProps: spec.SchemaProps{ + Description: "Configure how KVM presence is exposed to the guest.", + Ref: ref("kubevirt.io/api/core/v1.FeatureKVM"), + }, + }, + "pvspinlock": { + SchemaProps: spec.SchemaProps{ + Description: "Notify the guest that the host supports paravirtual spinlocks. For older kernels this feature should be explicitly disabled.", + Ref: ref("kubevirt.io/api/core/v1.FeatureState"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "kubevirt.io/api/core/v1.FeatureAPIC", "kubevirt.io/api/core/v1.FeatureHyperv", "kubevirt.io/api/core/v1.FeatureKVM", "kubevirt.io/api/core/v1.FeatureState"}, + } +} + +func schema_kubevirtio_api_core_v1_Filesystem(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name is the device name", + Type: []string{"string"}, + Format: "", + }, + }, + "virtiofs": { + SchemaProps: spec.SchemaProps{ + Description: "Virtiofs is supported", + Ref: ref("kubevirt.io/api/core/v1.FilesystemVirtiofs"), + }, + }, + }, + Required: []string{"name", "virtiofs"}, + }, + }, + Dependencies: []string{ + "kubevirt.io/api/core/v1.FilesystemVirtiofs"}, + } +} + +func schema_kubevirtio_api_core_v1_FilesystemVirtiofs(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + }, + }, + } +} + +func schema_kubevirtio_api_core_v1_Firmware(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "uuid": { + SchemaProps: spec.SchemaProps{ + Description: "UUID reported by the vmi bios. Defaults to a random generated uid.", + Type: []string{"string"}, + Format: "", + }, + }, + "bootloader": { + SchemaProps: spec.SchemaProps{ + Description: "Settings to control the bootloader that is used.", + Ref: ref("kubevirt.io/api/core/v1.Bootloader"), + }, + }, + "serial": { + SchemaProps: spec.SchemaProps{ + Description: "The system-serial-number in SMBIOS", + Type: []string{"string"}, + Format: "", + }, + }, + "kernelBoot": { + SchemaProps: spec.SchemaProps{ + Description: "Settings to set the kernel for booting.", + Ref: ref("kubevirt.io/api/core/v1.KernelBoot"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "kubevirt.io/api/core/v1.Bootloader", "kubevirt.io/api/core/v1.KernelBoot"}, + } +} + +func schema_kubevirtio_api_core_v1_Flags(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Flags will create a patch that will replace all flags for the container's command field. The only flags that will be used are those define. There are no guarantees around forward/backward compatibility. If set incorrectly this will cause the resource when rolled out to error until flags are updated.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "api": { + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "controller": { + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "handler": { + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + }, + }, + } +} + +func schema_kubevirtio_api_core_v1_FlavorMatcher(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "FlavorMatcher references a flavor that is used to fill fields in the VMI template.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name is the name of the VirtualMachineFlavor or VirtualMachineClusterFlavor", + Type: []string{"string"}, + Format: "", + }, + }, + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind specifies which flavor resource is referenced. Allowed values are: \"VirtualMachineFlavor\" and \"VirtualMachineClusterFlavor\". If not specified, \"VirtualMachineClusterFlavor\" is used by default.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"name"}, + }, + }, + } +} + +func schema_kubevirtio_api_core_v1_FreezeUnfreezeTimeout(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "FreezeUnfreezeTimeout represent the time unfreeze will be triggered if guest was not unfrozen by unfreeze command", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "unfreezeTimeout": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + }, + Required: []string{"unfreezeTimeout"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Duration"}, + } +} + +func schema_kubevirtio_api_core_v1_GPU(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name of the GPU device as exposed by a device plugin", + Type: []string{"string"}, + Format: "", + }, + }, + "deviceName": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "virtualGPUOptions": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/api/core/v1.VGPUOptions"), + }, + }, + "tag": { + SchemaProps: spec.SchemaProps{ + Description: "If specified, the virtual network interface address and its tag will be provided to the guest via config drive", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"name", "deviceName"}, + }, + }, + Dependencies: []string{ + "kubevirt.io/api/core/v1.VGPUOptions"}, + } +} + +func schema_kubevirtio_api_core_v1_GenerationStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "GenerationStatus keeps track of the generation for a given resource so that decisions about forced updates can be made.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "group": { + SchemaProps: spec.SchemaProps{ + Description: "group is the group of the thing you're tracking", + Type: []string{"string"}, + Format: "", + }, + }, + "resource": { + SchemaProps: spec.SchemaProps{ + Description: "resource is the resource type of the thing you're tracking", + Type: []string{"string"}, + Format: "", + }, + }, + "namespace": { + SchemaProps: spec.SchemaProps{ + Description: "namespace is where the thing you're tracking is", + Type: []string{"string"}, + Format: "", + }, + }, + "name": { + SchemaProps: spec.SchemaProps{ + Description: "name is the name of the thing you're tracking", + Type: []string{"string"}, + Format: "", + }, + }, + "lastGeneration": { + SchemaProps: spec.SchemaProps{ + Description: "lastGeneration is the last generation of the workload controller involved", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "hash": { + SchemaProps: spec.SchemaProps{ + Description: "hash is an optional field set for resources without generation that are content sensitive like secrets and configmaps", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"group", "resource", "name", "lastGeneration"}, + }, + }, + } +} + +func schema_kubevirtio_api_core_v1_GuestAgentCommandInfo(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "List of commands that QEMU guest agent supports", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "enabled": { + SchemaProps: spec.SchemaProps{ + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + Required: []string{"name"}, + }, + }, + } +} + +func schema_kubevirtio_api_core_v1_GuestAgentPing(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "GuestAgentPing configures the guest-agent based ping probe", + Type: []string{"object"}, + }, + }, + } +} + +func schema_kubevirtio_api_core_v1_HPETTimer(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "tickPolicy": { + SchemaProps: spec.SchemaProps{ + Description: "TickPolicy determines what happens when QEMU misses a deadline for injecting a tick to the guest. One of \"delay\", \"catchup\", \"merge\", \"discard\".", + Type: []string{"string"}, + Format: "", + }, + }, + "present": { + SchemaProps: spec.SchemaProps{ + Description: "Enabled set to false makes sure that the machine type or a preset can't add the timer. Defaults to true.", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_kubevirtio_api_core_v1_Handler(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Handler defines a specific action that should be taken", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "exec": { + SchemaProps: spec.SchemaProps{ + Description: "One and only one of the following should be specified. Exec specifies the action to take, it will be executed on the guest through the qemu-guest-agent. If the guest agent is not available, this probe will fail.", + Ref: ref("k8s.io/api/core/v1.ExecAction"), + }, + }, + "guestAgentPing": { + SchemaProps: spec.SchemaProps{ + Description: "GuestAgentPing contacts the qemu-guest-agent for availability checks.", + Ref: ref("kubevirt.io/api/core/v1.GuestAgentPing"), + }, + }, + "httpGet": { + SchemaProps: spec.SchemaProps{ + Description: "HTTPGet specifies the http request to perform.", + Ref: ref("k8s.io/api/core/v1.HTTPGetAction"), + }, + }, + "tcpSocket": { + SchemaProps: spec.SchemaProps{ + Description: "TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported", + Ref: ref("k8s.io/api/core/v1.TCPSocketAction"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.ExecAction", "k8s.io/api/core/v1.HTTPGetAction", "k8s.io/api/core/v1.TCPSocketAction", "kubevirt.io/api/core/v1.GuestAgentPing"}, + } +} + +func schema_kubevirtio_api_core_v1_HostDevice(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "deviceName": { + SchemaProps: spec.SchemaProps{ + Description: "DeviceName is the resource name of the host device exposed by a device plugin", + Type: []string{"string"}, + Format: "", + }, + }, + "tag": { + SchemaProps: spec.SchemaProps{ + Description: "If specified, the virtual network interface address and its tag will be provided to the guest via config drive", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"name", "deviceName"}, + }, + }, + } +} + +func schema_kubevirtio_api_core_v1_HostDisk(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Represents a disk created on the cluster level", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "path": { + SchemaProps: spec.SchemaProps{ + Description: "The path to HostDisk image located on the cluster", + Type: []string{"string"}, + Format: "", + }, + }, + "type": { + SchemaProps: spec.SchemaProps{ + Description: "Contains information if disk.img exists or should be created allowed options are 'Disk' and 'DiskOrCreate'", + Type: []string{"string"}, + Format: "", + }, + }, + "capacity": { + SchemaProps: spec.SchemaProps{ + Description: "Capacity of the sparse disk", + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + }, + }, + "shared": { + SchemaProps: spec.SchemaProps{ + Description: "Shared indicate whether the path is shared between nodes", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + Required: []string{"path", "type"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + } +} + +func schema_kubevirtio_api_core_v1_HotplugVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "HotplugVolumeSource Represents the source of a volume to mount which are capable of being hotplugged on a live running VMI. Only one of its members may be specified.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "persistentVolumeClaim": { + SchemaProps: spec.SchemaProps{ + Description: "PersistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace. Directly attached to the vmi via qemu. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims", + Ref: ref("kubevirt.io/api/core/v1.PersistentVolumeClaimVolumeSource"), + }, + }, + "dataVolume": { + SchemaProps: spec.SchemaProps{ + Description: "DataVolume represents the dynamic creation a PVC for this volume as well as the process of populating that PVC with a disk image.", + Ref: ref("kubevirt.io/api/core/v1.DataVolumeSource"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "kubevirt.io/api/core/v1.DataVolumeSource", "kubevirt.io/api/core/v1.PersistentVolumeClaimVolumeSource"}, + } +} + +func schema_kubevirtio_api_core_v1_HotplugVolumeStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "HotplugVolumeStatus represents the hotplug status of the volume", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "attachPodName": { + SchemaProps: spec.SchemaProps{ + Description: "AttachPodName is the name of the pod used to attach the volume to the node.", + Type: []string{"string"}, + Format: "", + }, + }, + "attachPodUID": { + SchemaProps: spec.SchemaProps{ + Description: "AttachPodUID is the UID of the pod used to attach the volume to the node.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_kubevirtio_api_core_v1_Hugepages(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Hugepages allow to use hugepages for the VirtualMachineInstance instead of regular memory.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "pageSize": { + SchemaProps: spec.SchemaProps{ + Description: "PageSize specifies the hugepage size, for x86_64 architecture valid values are 1Gi and 2Mi.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_kubevirtio_api_core_v1_HypervTimer(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "present": { + SchemaProps: spec.SchemaProps{ + Description: "Enabled set to false makes sure that the machine type or a preset can't add the timer. Defaults to true.", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_kubevirtio_api_core_v1_I6300ESBWatchdog(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "i6300esb watchdog device.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "action": { + SchemaProps: spec.SchemaProps{ + Description: "The action to take. Valid values are poweroff, reset, shutdown. Defaults to reset.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_kubevirtio_api_core_v1_Input(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "bus": { + SchemaProps: spec.SchemaProps{ + Description: "Bus indicates the bus of input device to emulate. Supported values: virtio, usb.", + Type: []string{"string"}, + Format: "", + }, + }, + "type": { + SchemaProps: spec.SchemaProps{ + Description: "Type indicated the type of input device. Supported values: tablet.", + Type: []string{"string"}, + Format: "", + }, + }, + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name is the device name", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"type", "name"}, + }, + }, + } +} + +func schema_kubevirtio_api_core_v1_Interface(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Logical name of the interface as well as a reference to the associated networks. Must match the Name of a Network.", + Type: []string{"string"}, + Format: "", + }, + }, + "model": { + SchemaProps: spec.SchemaProps{ + Description: "Interface model. One of: e1000, e1000e, ne2k_pci, pcnet, rtl8139, virtio. Defaults to virtio.", + Type: []string{"string"}, + Format: "", + }, + }, + "bridge": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/api/core/v1.InterfaceBridge"), + }, + }, + "slirp": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/api/core/v1.InterfaceSlirp"), + }, + }, + "masquerade": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/api/core/v1.InterfaceMasquerade"), + }, + }, + "sriov": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/api/core/v1.InterfaceSRIOV"), + }, + }, + "macvtap": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/api/core/v1.InterfaceMacvtap"), + }, + }, + "ports": { + SchemaProps: spec.SchemaProps{ + Description: "List of ports to be forwarded to the virtual machine.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/api/core/v1.Port"), + }, + }, + }, + }, + }, + "macAddress": { + SchemaProps: spec.SchemaProps{ + Description: "Interface MAC address. For example: de:ad:00:00:be:af or DE-AD-00-00-BE-AF.", + Type: []string{"string"}, + Format: "", + }, + }, + "bootOrder": { + SchemaProps: spec.SchemaProps{ + Description: "BootOrder is an integer value > 0, used to determine ordering of boot devices. Lower values take precedence. Each interface or disk that has a boot order must have a unique value. Interfaces without a boot order are not tried.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "pciAddress": { + SchemaProps: spec.SchemaProps{ + Description: "If specified, the virtual network interface will be placed on the guests pci address with the specified PCI address. For example: 0000:81:01.10", + Type: []string{"string"}, + Format: "", + }, + }, + "dhcpOptions": { + SchemaProps: spec.SchemaProps{ + Description: "If specified the network interface will pass additional DHCP options to the VMI", + Ref: ref("kubevirt.io/api/core/v1.DHCPOptions"), + }, + }, + "tag": { + SchemaProps: spec.SchemaProps{ + Description: "If specified, the virtual network interface address and its tag will be provided to the guest via config drive", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"name"}, + }, + }, + Dependencies: []string{ + "kubevirt.io/api/core/v1.DHCPOptions", "kubevirt.io/api/core/v1.InterfaceBridge", "kubevirt.io/api/core/v1.InterfaceMacvtap", "kubevirt.io/api/core/v1.InterfaceMasquerade", "kubevirt.io/api/core/v1.InterfaceSRIOV", "kubevirt.io/api/core/v1.InterfaceSlirp", "kubevirt.io/api/core/v1.Port"}, + } +} + +func schema_kubevirtio_api_core_v1_InterfaceBindingMethod(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Represents the method which will be used to connect the interface to the guest. Only one of its members may be specified.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "bridge": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/api/core/v1.InterfaceBridge"), + }, + }, + "slirp": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/api/core/v1.InterfaceSlirp"), + }, + }, + "masquerade": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/api/core/v1.InterfaceMasquerade"), + }, + }, + "sriov": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/api/core/v1.InterfaceSRIOV"), + }, + }, + "macvtap": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/api/core/v1.InterfaceMacvtap"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "kubevirt.io/api/core/v1.InterfaceBridge", "kubevirt.io/api/core/v1.InterfaceMacvtap", "kubevirt.io/api/core/v1.InterfaceMasquerade", "kubevirt.io/api/core/v1.InterfaceSRIOV", "kubevirt.io/api/core/v1.InterfaceSlirp"}, + } +} + +func schema_kubevirtio_api_core_v1_InterfaceBridge(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "InterfaceBridge connects to a given network via a linux bridge.", + Type: []string{"object"}, + }, + }, + } +} + +func schema_kubevirtio_api_core_v1_InterfaceMacvtap(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "InterfaceMacvtap connects to a given network by extending the Kubernetes node's L2 networks via a macvtap interface.", + Type: []string{"object"}, + }, + }, + } +} + +func schema_kubevirtio_api_core_v1_InterfaceMasquerade(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "InterfaceMasquerade connects to a given network using netfilter rules to nat the traffic.", + Type: []string{"object"}, + }, + }, + } +} + +func schema_kubevirtio_api_core_v1_InterfaceSRIOV(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "InterfaceSRIOV connects to a given network by passing-through an SR-IOV PCI device via vfio.", + Type: []string{"object"}, + }, + }, + } +} + +func schema_kubevirtio_api_core_v1_InterfaceSlirp(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "InterfaceSlirp connects to a given network using QEMU user networking mode.", + Type: []string{"object"}, + }, + }, + } +} + +func schema_kubevirtio_api_core_v1_KVMTimer(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "present": { + SchemaProps: spec.SchemaProps{ + Description: "Enabled set to false makes sure that the machine type or a preset can't add the timer. Defaults to true.", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_kubevirtio_api_core_v1_KernelBoot(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Represents the firmware blob used to assist in the kernel boot process. Used for setting the kernel, initrd and command line arguments", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kernelArgs": { + SchemaProps: spec.SchemaProps{ + Description: "Arguments to be passed to the kernel at boot time", + Type: []string{"string"}, + Format: "", + }, + }, + "container": { + SchemaProps: spec.SchemaProps{ + Description: "Container defines the container that containes kernel artifacts", + Ref: ref("kubevirt.io/api/core/v1.KernelBootContainer"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "kubevirt.io/api/core/v1.KernelBootContainer"}, + } +} + +func schema_kubevirtio_api_core_v1_KernelBootContainer(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "If set, the VM will be booted from the defined kernel / initrd.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "image": { + SchemaProps: spec.SchemaProps{ + Description: "Image that contains initrd / kernel files.", + Type: []string{"string"}, + Format: "", + }, + }, + "imagePullSecret": { + SchemaProps: spec.SchemaProps{ + Description: "ImagePullSecret is the name of the Docker registry secret required to pull the image. The secret must already exist.", + Type: []string{"string"}, + Format: "", + }, + }, + "imagePullPolicy": { + SchemaProps: spec.SchemaProps{ + Description: "Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images", + Type: []string{"string"}, + Format: "", + }, + }, + "kernelPath": { + SchemaProps: spec.SchemaProps{ + Description: "The fully-qualified path to the kernel image in the host OS", + Type: []string{"string"}, + Format: "", + }, + }, + "initrdPath": { + SchemaProps: spec.SchemaProps{ + Description: "the fully-qualified path to the ramdisk image in the host OS", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"image"}, + }, + }, + } +} + +func schema_kubevirtio_api_core_v1_KubeVirt(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "KubeVirt represents the object deploying all KubeVirt resources", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/api/core/v1.KubeVirtSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/api/core/v1.KubeVirtStatus"), + }, + }, + }, + Required: []string{"spec"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "kubevirt.io/api/core/v1.KubeVirtSpec", "kubevirt.io/api/core/v1.KubeVirtStatus"}, + } +} + +func schema_kubevirtio_api_core_v1_KubeVirtCertificateRotateStrategy(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "selfSigned": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/api/core/v1.KubeVirtSelfSignConfiguration"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "kubevirt.io/api/core/v1.KubeVirtSelfSignConfiguration"}, + } +} + +func schema_kubevirtio_api_core_v1_KubeVirtCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "KubeVirtCondition represents a condition of a KubeVirt deployment", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "type": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "lastProbeTime": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "lastTransitionTime": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "reason": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "message": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"type", "status"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_kubevirtio_api_core_v1_KubeVirtConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "KubeVirtConfiguration holds all kubevirt configurations", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "cpuModel": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "cpuRequest": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + }, + }, + "developerConfiguration": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/api/core/v1.DeveloperConfiguration"), + }, + }, + "emulatedMachines": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "imagePullPolicy": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "migrations": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/api/core/v1.MigrationConfiguration"), + }, + }, + "machineType": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "network": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/api/core/v1.NetworkConfiguration"), + }, + }, + "ovmfPath": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "selinuxLauncherType": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "defaultRuntimeClass": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "smbios": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/api/core/v1.SMBiosConfiguration"), + }, + }, + "evictionStrategy": { + SchemaProps: spec.SchemaProps{ + Description: "EvictionStrategy defines at the cluster level if the VirtualMachineInstance should be migrated instead of shut-off in case of a node drain. If the VirtualMachineInstance specific field is set it overrides the cluster level one.", + Type: []string{"string"}, + Format: "", + }, + }, + "supportedGuestAgentVersions": { + SchemaProps: spec.SchemaProps{ + Description: "deprecated", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "memBalloonStatsPeriod": { + SchemaProps: spec.SchemaProps{ + Type: []string{"integer"}, + Format: "int64", + }, + }, + "permittedHostDevices": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/api/core/v1.PermittedHostDevices"), + }, + }, + "mediatedDevicesConfiguration": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/api/core/v1.MediatedDevicesConfiguration"), + }, + }, + "minCPUModel": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "obsoleteCPUModels": { + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + }, + }, + "virtualMachineInstancesPerNode": { + SchemaProps: spec.SchemaProps{ + Type: []string{"integer"}, + Format: "int32", + }, + }, + "apiConfiguration": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/api/core/v1.ReloadableComponentConfiguration"), + }, + }, + "webhookConfiguration": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/api/core/v1.ReloadableComponentConfiguration"), + }, + }, + "controllerConfiguration": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/api/core/v1.ReloadableComponentConfiguration"), + }, + }, + "handlerConfiguration": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/api/core/v1.ReloadableComponentConfiguration"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/api/resource.Quantity", "kubevirt.io/api/core/v1.DeveloperConfiguration", "kubevirt.io/api/core/v1.MediatedDevicesConfiguration", "kubevirt.io/api/core/v1.MigrationConfiguration", "kubevirt.io/api/core/v1.NetworkConfiguration", "kubevirt.io/api/core/v1.PermittedHostDevices", "kubevirt.io/api/core/v1.ReloadableComponentConfiguration", "kubevirt.io/api/core/v1.SMBiosConfiguration"}, + } +} + +func schema_kubevirtio_api_core_v1_KubeVirtList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "KubeVirtList is a list of KubeVirts", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/api/core/v1.KubeVirt"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "kubevirt.io/api/core/v1.KubeVirt"}, + } +} + +func schema_kubevirtio_api_core_v1_KubeVirtSelfSignConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "caRotateInterval": { + SchemaProps: spec.SchemaProps{ + Description: "Deprecated. Use CA.Duration instead", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + "certRotateInterval": { + SchemaProps: spec.SchemaProps{ + Description: "Deprecated. Use Server.Duration instead", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + "caOverlapInterval": { + SchemaProps: spec.SchemaProps{ + Description: "Deprecated. Use CA.Duration and CA.RenewBefore instead", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + "ca": { + SchemaProps: spec.SchemaProps{ + Description: "CA configuration CA certs are kept in the CA bundle as long as they are valid", + Ref: ref("kubevirt.io/api/core/v1.CertConfig"), + }, + }, + "server": { + SchemaProps: spec.SchemaProps{ + Description: "Server configuration Certs are rotated and discarded", + Ref: ref("kubevirt.io/api/core/v1.CertConfig"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "kubevirt.io/api/core/v1.CertConfig"}, + } +} + +func schema_kubevirtio_api_core_v1_KubeVirtSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "imageTag": { + SchemaProps: spec.SchemaProps{ + Description: "The image tag to use for the continer images installed. Defaults to the same tag as the operator's container image.", + Type: []string{"string"}, + Format: "", + }, + }, + "imageRegistry": { + SchemaProps: spec.SchemaProps{ + Description: "The image registry to pull the container images from Defaults to the same registry the operator's container image is pulled from.", + Type: []string{"string"}, + Format: "", + }, + }, + "imagePullPolicy": { + SchemaProps: spec.SchemaProps{ + Description: "The ImagePullPolicy to use.", + Type: []string{"string"}, + Format: "", + }, + }, + "monitorNamespace": { + SchemaProps: spec.SchemaProps{ + Description: "The namespace Prometheus is deployed in Defaults to openshift-monitor", + Type: []string{"string"}, + Format: "", + }, + }, + "serviceMonitorNamespace": { + SchemaProps: spec.SchemaProps{ + Description: "The namespace the service monitor will be deployed\n When ServiceMonitorNamespace is set, then we'll install the service monitor object in that namespace\notherwise we will use the monitoring namespace.", + Type: []string{"string"}, + Format: "", + }, + }, + "monitorAccount": { + SchemaProps: spec.SchemaProps{ + Description: "The name of the Prometheus service account that needs read-access to KubeVirt endpoints Defaults to prometheus-k8s", + Type: []string{"string"}, + Format: "", + }, + }, + "workloadUpdateStrategy": { + SchemaProps: spec.SchemaProps{ + Description: "WorkloadUpdateStrategy defines at the cluster level how to handle automated workload updates", + Ref: ref("kubevirt.io/api/core/v1.KubeVirtWorkloadUpdateStrategy"), + }, + }, + "uninstallStrategy": { + SchemaProps: spec.SchemaProps{ + Description: "Specifies if kubevirt can be deleted if workloads are still present. This is mainly a precaution to avoid accidental data loss", + Type: []string{"string"}, + Format: "", + }, + }, + "certificateRotateStrategy": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/api/core/v1.KubeVirtCertificateRotateStrategy"), + }, + }, + "productVersion": { + SchemaProps: spec.SchemaProps{ + Description: "Designate the apps.kubevirt.io/version label for KubeVirt components. Useful if KubeVirt is included as part of a product. If ProductVersion is not specified, KubeVirt's version will be used.", + Type: []string{"string"}, + Format: "", + }, + }, + "productName": { + SchemaProps: spec.SchemaProps{ + Description: "Designate the apps.kubevirt.io/part-of label for KubeVirt components. Useful if KubeVirt is included as part of a product. If ProductName is not specified, the part-of label will be omitted.", + Type: []string{"string"}, + Format: "", + }, + }, + "productComponent": { + SchemaProps: spec.SchemaProps{ + Description: "Designate the apps.kubevirt.io/component label for KubeVirt components. Useful if KubeVirt is included as part of a product. If ProductComponent is not specified, the component label default value is kubevirt.", + Type: []string{"string"}, + Format: "", + }, + }, + "configuration": { + SchemaProps: spec.SchemaProps{ + Description: "holds kubevirt configurations. same as the virt-configMap", + Ref: ref("kubevirt.io/api/core/v1.KubeVirtConfiguration"), + }, + }, + "infra": { + SchemaProps: spec.SchemaProps{ + Description: "selectors and tolerations that should apply to KubeVirt infrastructure components", + Ref: ref("kubevirt.io/api/core/v1.ComponentConfig"), + }, + }, + "workloads": { + SchemaProps: spec.SchemaProps{ + Description: "selectors and tolerations that should apply to KubeVirt workloads", + Ref: ref("kubevirt.io/api/core/v1.ComponentConfig"), + }, + }, + "customizeComponents": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/api/core/v1.CustomizeComponents"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "kubevirt.io/api/core/v1.ComponentConfig", "kubevirt.io/api/core/v1.CustomizeComponents", "kubevirt.io/api/core/v1.KubeVirtCertificateRotateStrategy", "kubevirt.io/api/core/v1.KubeVirtConfiguration", "kubevirt.io/api/core/v1.KubeVirtWorkloadUpdateStrategy"}, + } +} + +func schema_kubevirtio_api_core_v1_KubeVirtStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "KubeVirtStatus represents information pertaining to a KubeVirt deployment.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "phase": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "conditions": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/api/core/v1.KubeVirtCondition"), + }, + }, + }, + }, + }, + "operatorVersion": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "targetKubeVirtRegistry": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "targetKubeVirtVersion": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "targetDeploymentConfig": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "targetDeploymentID": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "observedKubeVirtRegistry": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "observedKubeVirtVersion": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "observedDeploymentConfig": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "observedDeploymentID": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "outdatedVirtualMachineInstanceWorkloads": { + SchemaProps: spec.SchemaProps{ + Type: []string{"integer"}, + Format: "int32", + }, + }, + "observedGeneration": { + SchemaProps: spec.SchemaProps{ + Type: []string{"integer"}, + Format: "int64", + }, + }, + "generations": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/api/core/v1.GenerationStatus"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "kubevirt.io/api/core/v1.GenerationStatus", "kubevirt.io/api/core/v1.KubeVirtCondition"}, + } +} + +func schema_kubevirtio_api_core_v1_KubeVirtWorkloadUpdateStrategy(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "KubeVirtWorkloadUpdateStrategy defines options related to updating a KubeVirt install", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "workloadUpdateMethods": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "WorkloadUpdateMethods defines the methods that can be used to disrupt workloads during automated workload updates. When multiple methods are present, the least disruptive method takes precedence over more disruptive methods. For example if both LiveMigrate and Shutdown methods are listed, only VMs which are not live migratable will be restarted/shutdown\n\nAn empty list defaults to no automated workload updating", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "batchEvictionSize": { + SchemaProps: spec.SchemaProps{ + Description: "BatchEvictionSize Represents the number of VMIs that can be forced updated per the BatchShutdownInteral interval\n\nDefaults to 10", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "batchEvictionInterval": { + SchemaProps: spec.SchemaProps{ + Description: "BatchEvictionInterval Represents the interval to wait before issuing the next batch of shutdowns\n\nDefaults to 1 minute", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Duration"}, + } +} + +func schema_kubevirtio_api_core_v1_LaunchSecurity(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "sev": { + SchemaProps: spec.SchemaProps{ + Description: "AMD Secure Encrypted Virtualization (SEV).", + Ref: ref("kubevirt.io/api/core/v1.SEV"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "kubevirt.io/api/core/v1.SEV"}, + } +} + +func schema_kubevirtio_api_core_v1_LogVerbosity(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "LogVerbosity sets log verbosity level of various components", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "virtAPI": { + SchemaProps: spec.SchemaProps{ + Type: []string{"integer"}, + Format: "int32", + }, + }, + "virtController": { + SchemaProps: spec.SchemaProps{ + Type: []string{"integer"}, + Format: "int32", + }, + }, + "virtHandler": { + SchemaProps: spec.SchemaProps{ + Type: []string{"integer"}, + Format: "int32", + }, + }, + "virtLauncher": { + SchemaProps: spec.SchemaProps{ + Type: []string{"integer"}, + Format: "int32", + }, + }, + "virtOperator": { + SchemaProps: spec.SchemaProps{ + Type: []string{"integer"}, + Format: "int32", + }, + }, + "nodeVerbosity": { + SchemaProps: spec.SchemaProps{ + Description: "NodeVerbosity represents a map of nodes with a specific verbosity level", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + }, + }, + }, + }, + }, + } +} + +func schema_kubevirtio_api_core_v1_LunTarget(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "bus": { + SchemaProps: spec.SchemaProps{ + Description: "Bus indicates the type of disk device to emulate. supported values: virtio, sata, scsi.", + Type: []string{"string"}, + Format: "", + }, + }, + "readonly": { + SchemaProps: spec.SchemaProps{ + Description: "ReadOnly. Defaults to false.", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_kubevirtio_api_core_v1_Machine(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "type": { + SchemaProps: spec.SchemaProps{ + Description: "QEMU machine type is the actual chipset of the VirtualMachineInstance.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_kubevirtio_api_core_v1_MediatedDevicesConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "MediatedDevicesConfiguration holds information about MDEV types to be defined, if available", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "mediatedDevicesTypes": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "nodeMediatedDeviceTypes": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/api/core/v1.NodeMediatedDeviceTypesConfig"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "kubevirt.io/api/core/v1.NodeMediatedDeviceTypesConfig"}, + } +} + +func schema_kubevirtio_api_core_v1_MediatedHostDevice(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "MediatedHostDevice represents a host mediated device allowed for passthrough", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "mdevNameSelector": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "resourceName": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "externalResourceProvider": { + SchemaProps: spec.SchemaProps{ + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + Required: []string{"mdevNameSelector", "resourceName"}, + }, + }, + } +} + +func schema_kubevirtio_api_core_v1_Memory(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Memory allows specifying the VirtualMachineInstance memory features.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "hugepages": { + SchemaProps: spec.SchemaProps{ + Description: "Hugepages allow to use hugepages for the VirtualMachineInstance instead of regular memory.", + Ref: ref("kubevirt.io/api/core/v1.Hugepages"), + }, + }, + "guest": { + SchemaProps: spec.SchemaProps{ + Description: "Guest allows to specifying the amount of memory which is visible inside the Guest OS. The Guest must lie between Requests and Limits from the resources section. Defaults to the requested memory in the resources section if not specified.", + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/api/resource.Quantity", "kubevirt.io/api/core/v1.Hugepages"}, + } +} + +func schema_kubevirtio_api_core_v1_MigrateOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "MigrateOptions may be provided on migrate request.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "dryRun": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + }, + }, + } +} + +func schema_kubevirtio_api_core_v1_MigrationConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "MigrationConfiguration holds migration options", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "nodeDrainTaintKey": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "parallelOutboundMigrationsPerNode": { + SchemaProps: spec.SchemaProps{ + Type: []string{"integer"}, + Format: "int64", + }, + }, + "parallelMigrationsPerCluster": { + SchemaProps: spec.SchemaProps{ + Type: []string{"integer"}, + Format: "int64", + }, + }, + "allowAutoConverge": { + SchemaProps: spec.SchemaProps{ + Type: []string{"boolean"}, + Format: "", + }, + }, + "bandwidthPerMigration": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + }, + }, + "completionTimeoutPerGiB": { + SchemaProps: spec.SchemaProps{ + Type: []string{"integer"}, + Format: "int64", + }, + }, + "progressTimeout": { + SchemaProps: spec.SchemaProps{ + Type: []string{"integer"}, + Format: "int64", + }, + }, + "unsafeMigrationOverride": { + SchemaProps: spec.SchemaProps{ + Type: []string{"boolean"}, + Format: "", + }, + }, + "allowPostCopy": { + SchemaProps: spec.SchemaProps{ + Type: []string{"boolean"}, + Format: "", + }, + }, + "disableTLS": { + SchemaProps: spec.SchemaProps{ + Type: []string{"boolean"}, + Format: "", + }, + }, + "network": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + } +} + +func schema_kubevirtio_api_core_v1_MultusNetwork(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Represents the multus cni network.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "networkName": { + SchemaProps: spec.SchemaProps{ + Description: "References to a NetworkAttachmentDefinition CRD object. Format: , /. If namespace is not specified, VMI namespace is assumed.", + Type: []string{"string"}, + Format: "", + }, + }, + "default": { + SchemaProps: spec.SchemaProps{ + Description: "Select the default network and add it to the multus-cni.io/default-network annotation.", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + Required: []string{"networkName"}, + }, + }, + } +} + +func schema_kubevirtio_api_core_v1_NUMA(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "guestMappingPassthrough": { + SchemaProps: spec.SchemaProps{ + Description: "GuestMappingPassthrough will create an efficient guest topology based on host CPUs exclusively assigned to a pod. The created topology ensures that memory and CPUs on the virtual numa nodes never cross boundaries of host numa nodes.", + Ref: ref("kubevirt.io/api/core/v1.NUMAGuestMappingPassthrough"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "kubevirt.io/api/core/v1.NUMAGuestMappingPassthrough"}, + } +} + +func schema_kubevirtio_api_core_v1_NUMAGuestMappingPassthrough(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "NUMAGuestMappingPassthrough instructs kubevirt to model numa topology which is compatible with the CPU pinning on the guest. This will result in a subset of the node numa topology being passed through, ensuring that virtual numa nodes and their memory never cross boundaries coming from the node numa mapping.", + Type: []string{"object"}, + }, + }, + } +} + +func schema_kubevirtio_api_core_v1_Network(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Network represents a network type and a resource that should be connected to the vm.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Network name. Must be a DNS_LABEL and unique within the vm. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", + Type: []string{"string"}, + Format: "", + }, + }, + "pod": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/api/core/v1.PodNetwork"), + }, + }, + "multus": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/api/core/v1.MultusNetwork"), + }, + }, + }, + Required: []string{"name"}, + }, + }, + Dependencies: []string{ + "kubevirt.io/api/core/v1.MultusNetwork", "kubevirt.io/api/core/v1.PodNetwork"}, + } +} + +func schema_kubevirtio_api_core_v1_NetworkConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "NetworkConfiguration holds network options", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "defaultNetworkInterface": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "permitSlirpInterface": { + SchemaProps: spec.SchemaProps{ + Type: []string{"boolean"}, + Format: "", + }, + }, + "permitBridgeInterfaceOnPodNetwork": { + SchemaProps: spec.SchemaProps{ + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_kubevirtio_api_core_v1_NetworkSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Represents the source resource that will be connected to the vm. Only one of its members may be specified.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "pod": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/api/core/v1.PodNetwork"), + }, + }, + "multus": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/api/core/v1.MultusNetwork"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "kubevirt.io/api/core/v1.MultusNetwork", "kubevirt.io/api/core/v1.PodNetwork"}, + } +} + +func schema_kubevirtio_api_core_v1_NodeMediatedDeviceTypesConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "NodeMediatedDeviceTypesConfig holds information about MDEV types to be defined in a specifc node that matches the NodeSelector field.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "nodeSelector": { + SchemaProps: spec.SchemaProps{ + Description: "NodeSelector is a selector which must be true for the vmi to fit on a node. Selector which must match a node's labels for the vmi to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "mediatedDevicesTypes": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + Required: []string{"nodeSelector", "mediatedDevicesTypes"}, + }, + }, + } +} + +func schema_kubevirtio_api_core_v1_NodePlacement(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "NodePlacement describes node scheduling configuration.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "nodeSelector": { + SchemaProps: spec.SchemaProps{ + Description: "nodeSelector is the node selector applied to the relevant kind of pods It specifies a map of key-value pairs: for the pod to be eligible to run on a node, the node must have each of the indicated key-value pairs as labels (it can have additional labels as well). See https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "affinity": { + SchemaProps: spec.SchemaProps{ + Description: "affinity enables pod affinity/anti-affinity placement expanding the types of constraints that can be expressed with nodeSelector. affinity is going to be applied to the relevant kind of pods in parallel with nodeSelector See https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#affinity-and-anti-affinity", + Ref: ref("k8s.io/api/core/v1.Affinity"), + }, + }, + "tolerations": { + SchemaProps: spec.SchemaProps{ + Description: "tolerations is a list of tolerations applied to the relevant kind of pods See https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ for more info. These are additional tolerations other than default ones.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.Toleration"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.Affinity", "k8s.io/api/core/v1.Toleration"}, + } +} + +func schema_kubevirtio_api_core_v1_PITTimer(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "tickPolicy": { + SchemaProps: spec.SchemaProps{ + Description: "TickPolicy determines what happens when QEMU misses a deadline for injecting a tick to the guest. One of \"delay\", \"catchup\", \"discard\".", + Type: []string{"string"}, + Format: "", + }, + }, + "present": { + SchemaProps: spec.SchemaProps{ + Description: "Enabled set to false makes sure that the machine type or a preset can't add the timer. Defaults to true.", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_kubevirtio_api_core_v1_PauseOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PauseOptions may be provided on pause request.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "dryRun": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + }, + }, + } +} + +func schema_kubevirtio_api_core_v1_PciHostDevice(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PciHostDevice represents a host PCI device allowed for passthrough", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "pciVendorSelector": { + SchemaProps: spec.SchemaProps{ + Description: "The vendor_id:product_id tuple of the PCI device", + Type: []string{"string"}, + Format: "", + }, + }, + "resourceName": { + SchemaProps: spec.SchemaProps{ + Description: "The name of the resource that is representing the device. Exposed by a device plugin and requested by VMs. Typically of the form vendor.com/product_nameThe name of the resource that is representing the device. Exposed by a device plugin and requested by VMs. Typically of the form vendor.com/product_name", + Type: []string{"string"}, + Format: "", + }, + }, + "externalResourceProvider": { + SchemaProps: spec.SchemaProps{ + Description: "If true, KubeVirt will leave the allocation and monitoring to an external device plugin", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + Required: []string{"pciVendorSelector", "resourceName"}, + }, + }, + } +} + +func schema_kubevirtio_api_core_v1_PermittedHostDevices(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PermittedHostDevices holds information about devices allowed for passthrough", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "pciHostDevices": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/api/core/v1.PciHostDevice"), + }, + }, + }, + }, + }, + "mediatedDevices": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/api/core/v1.MediatedHostDevice"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "kubevirt.io/api/core/v1.MediatedHostDevice", "kubevirt.io/api/core/v1.PciHostDevice"}, + } +} + +func schema_kubevirtio_api_core_v1_PersistentVolumeClaimInfo(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PersistentVolumeClaimInfo contains the relavant information virt-handler needs cached about a PVC", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "accessModes": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "AccessModes contains the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "volumeMode": { + SchemaProps: spec.SchemaProps{ + Description: "VolumeMode defines what type of volume is required by the claim. Value of Filesystem is implied when not included in claim spec.", + Type: []string{"string"}, + Format: "", + }, + }, + "capacity": { + SchemaProps: spec.SchemaProps{ + Description: "Capacity represents the capacity set on the corresponding PVC status", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + }, + }, + }, + }, + }, + "requests": { + SchemaProps: spec.SchemaProps{ + Description: "Requests represents the resources requested by the corresponding PVC spec", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + }, + }, + }, + }, + }, + "preallocated": { + SchemaProps: spec.SchemaProps{ + Description: "Preallocated indicates if the PVC's storage is preallocated or not", + Type: []string{"boolean"}, + Format: "", + }, + }, + "filesystemOverhead": { + SchemaProps: spec.SchemaProps{ + Description: "Percentage of filesystem's size to be reserved when resizing the PVC", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + } +} + +func schema_kubevirtio_api_core_v1_PersistentVolumeClaimVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PersistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace. Directly attached to the vmi via qemu. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "claimName": { + SchemaProps: spec.SchemaProps{ + Description: "ClaimName is the name of a PersistentVolumeClaim in the same namespace as the pod using this volume. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims", + Type: []string{"string"}, + Format: "", + }, + }, + "readOnly": { + SchemaProps: spec.SchemaProps{ + Description: "Will force the ReadOnly setting in VolumeMounts. Default false.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "hotpluggable": { + SchemaProps: spec.SchemaProps{ + Description: "Hotpluggable indicates whether the volume can be hotplugged and hotunplugged.", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + Required: []string{"claimName"}, + }, + }, + } +} + +func schema_kubevirtio_api_core_v1_PodNetwork(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Represents the stock pod network interface.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "vmNetworkCIDR": { + SchemaProps: spec.SchemaProps{ + Description: "CIDR for vm network. Default 10.0.2.0/24 if not specified.", + Type: []string{"string"}, + Format: "", + }, + }, + "vmIPv6NetworkCIDR": { + SchemaProps: spec.SchemaProps{ + Description: "IPv6 CIDR for the vm network. Defaults to fd10:0:2::/120 if not specified.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_kubevirtio_api_core_v1_Port(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Port represents a port to expose from the virtual machine. Default protocol TCP. The port field is mandatory", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "If specified, this must be an IANA_SVC_NAME and unique within the pod. Each named port in a pod must have a unique name. Name for the port that can be referred to by services.", + Type: []string{"string"}, + Format: "", + }, + }, + "protocol": { + SchemaProps: spec.SchemaProps{ + Description: "Protocol for port. Must be UDP or TCP. Defaults to \"TCP\".", + Type: []string{"string"}, + Format: "", + }, + }, + "port": { + SchemaProps: spec.SchemaProps{ + Description: "Number of port to expose for the virtual machine. This must be a valid port number, 0 < x < 65536.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + Required: []string{"port"}, + }, + }, + } +} + +func schema_kubevirtio_api_core_v1_Probe(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Probe describes a health check to be performed against a VirtualMachineInstance to determine whether it is alive or ready to receive traffic.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "exec": { + SchemaProps: spec.SchemaProps{ + Description: "One and only one of the following should be specified. Exec specifies the action to take, it will be executed on the guest through the qemu-guest-agent. If the guest agent is not available, this probe will fail.", + Ref: ref("k8s.io/api/core/v1.ExecAction"), + }, + }, + "guestAgentPing": { + SchemaProps: spec.SchemaProps{ + Description: "GuestAgentPing contacts the qemu-guest-agent for availability checks.", + Ref: ref("kubevirt.io/api/core/v1.GuestAgentPing"), + }, + }, + "httpGet": { + SchemaProps: spec.SchemaProps{ + Description: "HTTPGet specifies the http request to perform.", + Ref: ref("k8s.io/api/core/v1.HTTPGetAction"), + }, + }, + "tcpSocket": { + SchemaProps: spec.SchemaProps{ + Description: "TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported", + Ref: ref("k8s.io/api/core/v1.TCPSocketAction"), + }, + }, + "initialDelaySeconds": { + SchemaProps: spec.SchemaProps{ + Description: "Number of seconds after the VirtualMachineInstance has started before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "timeoutSeconds": { + SchemaProps: spec.SchemaProps{ + Description: "Number of seconds after which the probe times out. For exec probes the timeout fails the probe but does not terminate the command running on the guest. This means a blocking command can result in an increasing load on the guest. A small buffer will be added to the resulting workload exec probe to compensate for delays caused by the qemu guest exec mechanism. Defaults to 1 second. Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "periodSeconds": { + SchemaProps: spec.SchemaProps{ + Description: "How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "successThreshold": { + SchemaProps: spec.SchemaProps{ + Description: "Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness. Minimum value is 1.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "failureThreshold": { + SchemaProps: spec.SchemaProps{ + Description: "Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.ExecAction", "k8s.io/api/core/v1.HTTPGetAction", "k8s.io/api/core/v1.TCPSocketAction", "kubevirt.io/api/core/v1.GuestAgentPing"}, + } +} + +func schema_kubevirtio_api_core_v1_ProfilerResult(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "pprofData": { + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "byte", + }, + }, + }, + }, + }, + }, + }, + }, + } +} + +func schema_kubevirtio_api_core_v1_QemuGuestAgentSSHPublicKeyAccessCredentialPropagation(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "users": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "set", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "Users represents a list of guest users that should have the ssh public keys added to their authorized_keys file.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + Required: []string{"users"}, + }, + }, + } +} + +func schema_kubevirtio_api_core_v1_QemuGuestAgentUserPasswordAccessCredentialPropagation(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + }, + }, + } +} + +func schema_kubevirtio_api_core_v1_RESTClientConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "RESTClientConfiguration allows configuring certain aspects of the k8s rest client.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "rateLimiter": { + SchemaProps: spec.SchemaProps{ + Description: "RateLimiter allows selecting and configuring different rate limiters for the k8s client.", + Ref: ref("kubevirt.io/api/core/v1.RateLimiter"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "kubevirt.io/api/core/v1.RateLimiter"}, + } +} + +func schema_kubevirtio_api_core_v1_RTCTimer(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "tickPolicy": { + SchemaProps: spec.SchemaProps{ + Description: "TickPolicy determines what happens when QEMU misses a deadline for injecting a tick to the guest. One of \"delay\", \"catchup\".", + Type: []string{"string"}, + Format: "", + }, + }, + "present": { + SchemaProps: spec.SchemaProps{ + Description: "Enabled set to false makes sure that the machine type or a preset can't add the timer. Defaults to true.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "track": { + SchemaProps: spec.SchemaProps{ + Description: "Track the guest or the wall clock.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_kubevirtio_api_core_v1_RateLimiter(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "tokenBucketRateLimiter": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/api/core/v1.TokenBucketRateLimiter"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "kubevirt.io/api/core/v1.TokenBucketRateLimiter"}, + } +} + +func schema_kubevirtio_api_core_v1_Realtime(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Realtime holds the tuning knobs specific for realtime workloads.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "mask": { + SchemaProps: spec.SchemaProps{ + Description: "Mask defines the vcpu mask expression that defines which vcpus are used for realtime. Format matches libvirt's expressions. Example: \"0-3,^1\",\"0,2,3\",\"2-3\"", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_kubevirtio_api_core_v1_ReloadableComponentConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ReloadableComponentConfiguration holds all generic k8s configuration options which can be reloaded by components without requiring a restart.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "restClient": { + SchemaProps: spec.SchemaProps{ + Description: "RestClient can be used to tune certain aspects of the k8s client in use.", + Ref: ref("kubevirt.io/api/core/v1.RESTClientConfiguration"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "kubevirt.io/api/core/v1.RESTClientConfiguration"}, + } +} + +func schema_kubevirtio_api_core_v1_RemoveVolumeOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "RemoveVolumeOptions is provided when dynamically hot unplugging volume and disk", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name represents the name that maps to both the disk and volume that should be removed", + Type: []string{"string"}, + Format: "", + }, + }, + "dryRun": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + Required: []string{"name"}, + }, + }, + } +} + +func schema_kubevirtio_api_core_v1_ResourceRequirements(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "requests": { + SchemaProps: spec.SchemaProps{ + Description: "Requests is a description of the initial vmi resources. Valid resource keys are \"memory\" and \"cpu\".", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + }, + }, + }, + }, + }, + "limits": { + SchemaProps: spec.SchemaProps{ + Description: "Limits describes the maximum amount of compute resources allowed. Valid resource keys are \"memory\" and \"cpu\".", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + }, + }, + }, + }, + }, + "overcommitGuestOverhead": { + SchemaProps: spec.SchemaProps{ + Description: "Don't ask the scheduler to take the guest-management overhead into account. Instead put the overhead only into the container's memory limit. This can lead to crashes if all memory is in use on a node. Defaults to false.", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + } +} + +func schema_kubevirtio_api_core_v1_RestartOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "RestartOptions may be provided when deleting an API object.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "gracePeriodSeconds": { + SchemaProps: spec.SchemaProps{ + Description: "The duration in seconds before the object should be force-restarted. Value must be non-negative integer. The value zero indicates, restart immediately. If this value is nil, the default grace period for deletion of the corresponding VMI for the specified type will be used to determine on how much time to give the VMI to restart. Defaults to a per object value if not specified. zero means restart immediately. Allowed Values: nil and 0", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "dryRun": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + }, + }, + } +} + +func schema_kubevirtio_api_core_v1_Rng(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Rng represents the random device passed from host", + Type: []string{"object"}, + }, + }, + } +} + +func schema_kubevirtio_api_core_v1_SEV(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + }, + }, + } +} + +func schema_kubevirtio_api_core_v1_SMBiosConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "manufacturer": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "product": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "version": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "sku": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "family": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_kubevirtio_api_core_v1_SSHPublicKeyAccessCredential(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "SSHPublicKeyAccessCredential represents a source and propagation method for injecting ssh public keys into a vm guest", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "source": { + SchemaProps: spec.SchemaProps{ + Description: "Source represents where the public keys are pulled from", + Ref: ref("kubevirt.io/api/core/v1.SSHPublicKeyAccessCredentialSource"), + }, + }, + "propagationMethod": { + SchemaProps: spec.SchemaProps{ + Description: "PropagationMethod represents how the public key is injected into the vm guest.", + Ref: ref("kubevirt.io/api/core/v1.SSHPublicKeyAccessCredentialPropagationMethod"), + }, + }, + }, + Required: []string{"source", "propagationMethod"}, + }, + }, + Dependencies: []string{ + "kubevirt.io/api/core/v1.SSHPublicKeyAccessCredentialPropagationMethod", "kubevirt.io/api/core/v1.SSHPublicKeyAccessCredentialSource"}, + } +} + +func schema_kubevirtio_api_core_v1_SSHPublicKeyAccessCredentialPropagationMethod(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "SSHPublicKeyAccessCredentialPropagationMethod represents the method used to inject a ssh public key into the vm guest. Only one of its members may be specified.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "configDrive": { + SchemaProps: spec.SchemaProps{ + Description: "ConfigDrivePropagation means that the ssh public keys are injected into the VM using metadata using the configDrive cloud-init provider", + Ref: ref("kubevirt.io/api/core/v1.ConfigDriveSSHPublicKeyAccessCredentialPropagation"), + }, + }, + "qemuGuestAgent": { + SchemaProps: spec.SchemaProps{ + Description: "QemuGuestAgentAccessCredentailPropagation means ssh public keys are dynamically injected into the vm at runtime via the qemu guest agent. This feature requires the qemu guest agent to be running within the guest.", + Ref: ref("kubevirt.io/api/core/v1.QemuGuestAgentSSHPublicKeyAccessCredentialPropagation"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "kubevirt.io/api/core/v1.ConfigDriveSSHPublicKeyAccessCredentialPropagation", "kubevirt.io/api/core/v1.QemuGuestAgentSSHPublicKeyAccessCredentialPropagation"}, + } +} + +func schema_kubevirtio_api_core_v1_SSHPublicKeyAccessCredentialSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "SSHPublicKeyAccessCredentialSource represents where to retrieve the ssh key credentials Only one of its members may be specified.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "secret": { + SchemaProps: spec.SchemaProps{ + Description: "Secret means that the access credential is pulled from a kubernetes secret", + Ref: ref("kubevirt.io/api/core/v1.AccessCredentialSecretSource"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "kubevirt.io/api/core/v1.AccessCredentialSecretSource"}, + } +} + +func schema_kubevirtio_api_core_v1_SecretVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "SecretVolumeSource adapts a Secret into a volume.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "secretName": { + SchemaProps: spec.SchemaProps{ + Description: "Name of the secret in the pod's namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret", + Type: []string{"string"}, + Format: "", + }, + }, + "optional": { + SchemaProps: spec.SchemaProps{ + Description: "Specify whether the Secret or it's keys must be defined", + Type: []string{"boolean"}, + Format: "", + }, + }, + "volumeLabel": { + SchemaProps: spec.SchemaProps{ + Description: "The volume label of the resulting disk inside the VMI. Different bootstrapping mechanisms require different values. Typical values are \"cidata\" (cloud-init), \"config-2\" (cloud-init) or \"OEMDRV\" (kickstart).", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_kubevirtio_api_core_v1_ServiceAccountVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ServiceAccountVolumeSource adapts a ServiceAccount into a volume.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "serviceAccountName": { + SchemaProps: spec.SchemaProps{ + Description: "Name of the service account in the pod's namespace to use. More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_kubevirtio_api_core_v1_SoundDevice(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Represents the user's configuration to emulate sound cards in the VMI.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "User's defined name for this sound device", + Type: []string{"string"}, + Format: "", + }, + }, + "model": { + SchemaProps: spec.SchemaProps{ + Description: "We only support ich9 or ac97. If SoundDevice is not set: No sound card is emulated. If SoundDevice is set but Model is not: ich9", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"name"}, + }, + }, + } +} + +func schema_kubevirtio_api_core_v1_StartOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "StartOptions may be provided on start request.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "paused": { + SchemaProps: spec.SchemaProps{ + Description: "Indicates that VM will be started in paused state.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "dryRun": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + }, + }, + } +} + +func schema_kubevirtio_api_core_v1_StopOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "StopOptions may be provided when deleting an API object.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "gracePeriod": { + SchemaProps: spec.SchemaProps{ + Description: "this updates the VMIs terminationGracePeriodSeconds during shutdown", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "dryRun": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + }, + }, + } +} + +func schema_kubevirtio_api_core_v1_SyNICTimer(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "enabled": { + SchemaProps: spec.SchemaProps{ + Type: []string{"boolean"}, + Format: "", + }, + }, + "direct": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/api/core/v1.FeatureState"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "kubevirt.io/api/core/v1.FeatureState"}, + } +} + +func schema_kubevirtio_api_core_v1_SysprepSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Represents a Sysprep volume source.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "secret": { + SchemaProps: spec.SchemaProps{ + Description: "Secret references a k8s Secret that contains Sysprep answer file named autounattend.xml that should be attached as disk of CDROM type.", + Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), + }, + }, + "configMap": { + SchemaProps: spec.SchemaProps{ + Description: "ConfigMap references a ConfigMap that contains Sysprep answer file named autounattend.xml that should be attached as disk of CDROM type.", + Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.LocalObjectReference"}, + } +} + +func schema_kubevirtio_api_core_v1_TPMDevice(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + }, + }, + } +} + +func schema_kubevirtio_api_core_v1_Timer(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Represents all available timers in a vmi.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "hpet": { + SchemaProps: spec.SchemaProps{ + Description: "HPET (High Precision Event Timer) - multiple timers with periodic interrupts.", + Ref: ref("kubevirt.io/api/core/v1.HPETTimer"), + }, + }, + "kvm": { + SchemaProps: spec.SchemaProps{ + Description: "KVM \t(KVM clock) - lets guests read the host’s wall clock time (paravirtualized). For linux guests.", + Ref: ref("kubevirt.io/api/core/v1.KVMTimer"), + }, + }, + "pit": { + SchemaProps: spec.SchemaProps{ + Description: "PIT (Programmable Interval Timer) - a timer with periodic interrupts.", + Ref: ref("kubevirt.io/api/core/v1.PITTimer"), + }, + }, + "rtc": { + SchemaProps: spec.SchemaProps{ + Description: "RTC (Real Time Clock) - a continuously running timer with periodic interrupts.", + Ref: ref("kubevirt.io/api/core/v1.RTCTimer"), + }, + }, + "hyperv": { + SchemaProps: spec.SchemaProps{ + Description: "Hyperv (Hypervclock) - lets guests read the host’s wall clock time (paravirtualized). For windows guests.", + Ref: ref("kubevirt.io/api/core/v1.HypervTimer"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "kubevirt.io/api/core/v1.HPETTimer", "kubevirt.io/api/core/v1.HypervTimer", "kubevirt.io/api/core/v1.KVMTimer", "kubevirt.io/api/core/v1.PITTimer", "kubevirt.io/api/core/v1.RTCTimer"}, + } +} + +func schema_kubevirtio_api_core_v1_TokenBucketRateLimiter(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "qps": { + SchemaProps: spec.SchemaProps{ + Description: "QPS indicates the maximum QPS to the apiserver from this client. If it's zero, the component default will be used", + Type: []string{"number"}, + Format: "float", + }, + }, + "burst": { + SchemaProps: spec.SchemaProps{ + Description: "Maximum burst for throttle. If it's zero, the component default will be used", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + Required: []string{"qps", "burst"}, + }, + }, + } +} + +func schema_kubevirtio_api_core_v1_TopologyHints(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "tscFrequency": { + SchemaProps: spec.SchemaProps{ + Type: []string{"integer"}, + Format: "int64", + }, + }, + }, + }, + }, + } +} + +func schema_kubevirtio_api_core_v1_UnpauseOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "UnpauseOptions may be provided on unpause request.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "dryRun": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + }, + }, + } +} + +func schema_kubevirtio_api_core_v1_UserPasswordAccessCredential(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "UserPasswordAccessCredential represents a source and propagation method for injecting user passwords into a vm guest Only one of its members may be specified.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "source": { + SchemaProps: spec.SchemaProps{ + Description: "Source represents where the user passwords are pulled from", + Ref: ref("kubevirt.io/api/core/v1.UserPasswordAccessCredentialSource"), + }, + }, + "propagationMethod": { + SchemaProps: spec.SchemaProps{ + Description: "propagationMethod represents how the user passwords are injected into the vm guest.", + Ref: ref("kubevirt.io/api/core/v1.UserPasswordAccessCredentialPropagationMethod"), + }, + }, + }, + Required: []string{"source", "propagationMethod"}, + }, + }, + Dependencies: []string{ + "kubevirt.io/api/core/v1.UserPasswordAccessCredentialPropagationMethod", "kubevirt.io/api/core/v1.UserPasswordAccessCredentialSource"}, + } +} + +func schema_kubevirtio_api_core_v1_UserPasswordAccessCredentialPropagationMethod(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "UserPasswordAccessCredentialPropagationMethod represents the method used to inject a user passwords into the vm guest. Only one of its members may be specified.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "qemuGuestAgent": { + SchemaProps: spec.SchemaProps{ + Description: "QemuGuestAgentAccessCredentailPropagation means passwords are dynamically injected into the vm at runtime via the qemu guest agent. This feature requires the qemu guest agent to be running within the guest.", + Ref: ref("kubevirt.io/api/core/v1.QemuGuestAgentUserPasswordAccessCredentialPropagation"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "kubevirt.io/api/core/v1.QemuGuestAgentUserPasswordAccessCredentialPropagation"}, + } +} + +func schema_kubevirtio_api_core_v1_UserPasswordAccessCredentialSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "UserPasswordAccessCredentialSource represents where to retrieve the user password credentials Only one of its members may be specified.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "secret": { + SchemaProps: spec.SchemaProps{ + Description: "Secret means that the access credential is pulled from a kubernetes secret", + Ref: ref("kubevirt.io/api/core/v1.AccessCredentialSecretSource"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "kubevirt.io/api/core/v1.AccessCredentialSecretSource"}, + } +} + +func schema_kubevirtio_api_core_v1_VGPUDisplayOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "enabled": { + SchemaProps: spec.SchemaProps{ + Description: "Enabled determines if a display addapter backed by a vGPU should be enabled or disabled on the guest. Defaults to true.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "ramFB": { + SchemaProps: spec.SchemaProps{ + Description: "Enables a boot framebuffer, until the guest OS loads a real GPU driver Defaults to true.", + Ref: ref("kubevirt.io/api/core/v1.FeatureState"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "kubevirt.io/api/core/v1.FeatureState"}, + } +} + +func schema_kubevirtio_api_core_v1_VGPUOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "display": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/api/core/v1.VGPUDisplayOptions"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "kubevirt.io/api/core/v1.VGPUDisplayOptions"}, + } +} + +func schema_kubevirtio_api_core_v1_VMISelector(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name of the VirtualMachineInstance to migrate", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"name"}, + }, + }, + } +} + +func schema_kubevirtio_api_core_v1_VirtualMachine(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "VirtualMachine handles the VirtualMachines that are not running or are in a stopped state The VirtualMachine contains the template to create the VirtualMachineInstance. It also mirrors the running state of the created VirtualMachineInstance in its status.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "Spec contains the specification of VirtualMachineInstance created", + Ref: ref("kubevirt.io/api/core/v1.VirtualMachineSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Status holds the current state of the controller and brief information about its associated VirtualMachineInstance", + Ref: ref("kubevirt.io/api/core/v1.VirtualMachineStatus"), + }, + }, + }, + Required: []string{"spec"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "kubevirt.io/api/core/v1.VirtualMachineSpec", "kubevirt.io/api/core/v1.VirtualMachineStatus"}, + } +} + +func schema_kubevirtio_api_core_v1_VirtualMachineCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "VirtualMachineCondition represents the state of VirtualMachine", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "type": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "lastProbeTime": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "lastTransitionTime": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "reason": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "message": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"type", "status"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_kubevirtio_api_core_v1_VirtualMachineInstance(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "VirtualMachineInstance is *the* VirtualMachineInstance Definition. It represents a virtual machine in the runtime environment of kubernetes.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "VirtualMachineInstance Spec contains the VirtualMachineInstance specification.", + Ref: ref("kubevirt.io/api/core/v1.VirtualMachineInstanceSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Status is the high level overview of how the VirtualMachineInstance is doing. It contains information available to controllers and users.", + Ref: ref("kubevirt.io/api/core/v1.VirtualMachineInstanceStatus"), + }, + }, + }, + Required: []string{"spec"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "kubevirt.io/api/core/v1.VirtualMachineInstanceSpec", "kubevirt.io/api/core/v1.VirtualMachineInstanceStatus"}, + } +} + +func schema_kubevirtio_api_core_v1_VirtualMachineInstanceCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "type": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "lastProbeTime": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "lastTransitionTime": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "reason": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "message": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"type", "status"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_kubevirtio_api_core_v1_VirtualMachineInstanceFileSystem(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "VirtualMachineInstanceFileSystem represents guest os disk", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "diskName": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "mountPoint": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "fileSystemType": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "usedBytes": { + SchemaProps: spec.SchemaProps{ + Type: []string{"integer"}, + Format: "int32", + }, + }, + "totalBytes": { + SchemaProps: spec.SchemaProps{ + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + Required: []string{"diskName", "mountPoint", "fileSystemType", "usedBytes", "totalBytes"}, + }, + }, + } +} + +func schema_kubevirtio_api_core_v1_VirtualMachineInstanceFileSystemInfo(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "VirtualMachineInstanceFileSystemInfo represents information regarding single guest os filesystem", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "disks": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/api/core/v1.VirtualMachineInstanceFileSystem"), + }, + }, + }, + }, + }, + }, + Required: []string{"disks"}, + }, + }, + Dependencies: []string{ + "kubevirt.io/api/core/v1.VirtualMachineInstanceFileSystem"}, + } +} + +func schema_kubevirtio_api_core_v1_VirtualMachineInstanceFileSystemList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "VirtualMachineInstanceFileSystemList comprises the list of all filesystems on guest machine", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/api/core/v1.VirtualMachineInstanceFileSystem"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "kubevirt.io/api/core/v1.VirtualMachineInstanceFileSystem"}, + } +} + +func schema_kubevirtio_api_core_v1_VirtualMachineInstanceGuestAgentInfo(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "VirtualMachineInstanceGuestAgentInfo represents information from the installed guest agent", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "guestAgentVersion": { + SchemaProps: spec.SchemaProps{ + Description: "GAVersion is a version of currently installed guest agent", + Type: []string{"string"}, + Format: "", + }, + }, + "supportedCommands": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "Return command list the guest agent supports", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/api/core/v1.GuestAgentCommandInfo"), + }, + }, + }, + }, + }, + "hostname": { + SchemaProps: spec.SchemaProps{ + Description: "Hostname represents FQDN of a guest", + Type: []string{"string"}, + Format: "", + }, + }, + "os": { + SchemaProps: spec.SchemaProps{ + Description: "OS contains the guest operating system information", + Ref: ref("kubevirt.io/api/core/v1.VirtualMachineInstanceGuestOSInfo"), + }, + }, + "timezone": { + SchemaProps: spec.SchemaProps{ + Description: "Timezone is guest os current timezone", + Type: []string{"string"}, + Format: "", + }, + }, + "userList": { + SchemaProps: spec.SchemaProps{ + Description: "UserList is a list of active guest OS users", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/api/core/v1.VirtualMachineInstanceGuestOSUser"), + }, + }, + }, + }, + }, + "fsInfo": { + SchemaProps: spec.SchemaProps{ + Description: "FSInfo is a guest os filesystem information containing the disk mapping and disk mounts with usage", + Ref: ref("kubevirt.io/api/core/v1.VirtualMachineInstanceFileSystemInfo"), + }, + }, + "fsFreezeStatus": { + SchemaProps: spec.SchemaProps{ + Description: "FSFreezeStatus is the state of the fs of the guest it can be either frozen or thawed", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{ + "kubevirt.io/api/core/v1.GuestAgentCommandInfo", "kubevirt.io/api/core/v1.VirtualMachineInstanceFileSystemInfo", "kubevirt.io/api/core/v1.VirtualMachineInstanceGuestOSInfo", "kubevirt.io/api/core/v1.VirtualMachineInstanceGuestOSUser"}, + } +} + +func schema_kubevirtio_api_core_v1_VirtualMachineInstanceGuestOSInfo(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name of the Guest OS", + Type: []string{"string"}, + Format: "", + }, + }, + "kernelRelease": { + SchemaProps: spec.SchemaProps{ + Description: "Guest OS Kernel Release", + Type: []string{"string"}, + Format: "", + }, + }, + "version": { + SchemaProps: spec.SchemaProps{ + Description: "Guest OS Version", + Type: []string{"string"}, + Format: "", + }, + }, + "prettyName": { + SchemaProps: spec.SchemaProps{ + Description: "Guest OS Pretty Name", + Type: []string{"string"}, + Format: "", + }, + }, + "versionId": { + SchemaProps: spec.SchemaProps{ + Description: "Version ID of the Guest OS", + Type: []string{"string"}, + Format: "", + }, + }, + "kernelVersion": { + SchemaProps: spec.SchemaProps{ + Description: "Kernel version of the Guest OS", + Type: []string{"string"}, + Format: "", + }, + }, + "machine": { + SchemaProps: spec.SchemaProps{ + Description: "Machine type of the Guest OS", + Type: []string{"string"}, + Format: "", + }, + }, + "id": { + SchemaProps: spec.SchemaProps{ + Description: "Guest OS Id", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_kubevirtio_api_core_v1_VirtualMachineInstanceGuestOSUser(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "VirtualMachineGuestOSUser is the single user of the guest os", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "userName": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "domain": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "loginTime": { + SchemaProps: spec.SchemaProps{ + Type: []string{"number"}, + Format: "double", + }, + }, + }, + Required: []string{"userName"}, + }, + }, + } +} + +func schema_kubevirtio_api_core_v1_VirtualMachineInstanceGuestOSUserList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "VirtualMachineInstanceGuestOSUserList comprises the list of all active users on guest machine", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/api/core/v1.VirtualMachineInstanceGuestOSUser"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "kubevirt.io/api/core/v1.VirtualMachineInstanceGuestOSUser"}, + } +} + +func schema_kubevirtio_api_core_v1_VirtualMachineInstanceList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "VirtualMachineInstanceList is a list of VirtualMachines", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/api/core/v1.VirtualMachineInstance"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "kubevirt.io/api/core/v1.VirtualMachineInstance"}, + } +} + +func schema_kubevirtio_api_core_v1_VirtualMachineInstanceMigration(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "VirtualMachineInstanceMigration represents the object tracking a VMI's migration to another host in the cluster", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/api/core/v1.VirtualMachineInstanceMigrationSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/api/core/v1.VirtualMachineInstanceMigrationStatus"), + }, + }, + }, + Required: []string{"spec"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "kubevirt.io/api/core/v1.VirtualMachineInstanceMigrationSpec", "kubevirt.io/api/core/v1.VirtualMachineInstanceMigrationStatus"}, + } +} + +func schema_kubevirtio_api_core_v1_VirtualMachineInstanceMigrationCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "type": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "lastProbeTime": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "lastTransitionTime": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "reason": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "message": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"type", "status"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_kubevirtio_api_core_v1_VirtualMachineInstanceMigrationList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "VirtualMachineInstanceMigrationList is a list of VirtualMachineMigrations", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/api/core/v1.VirtualMachineInstanceMigration"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "kubevirt.io/api/core/v1.VirtualMachineInstanceMigration"}, + } +} + +func schema_kubevirtio_api_core_v1_VirtualMachineInstanceMigrationSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "vmiName": { + SchemaProps: spec.SchemaProps{ + Description: "The name of the VMI to perform the migration on. VMI must exist in the migration objects namespace", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_kubevirtio_api_core_v1_VirtualMachineInstanceMigrationState(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "startTimestamp": { + SchemaProps: spec.SchemaProps{ + Description: "The time the migration action began", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "endTimestamp": { + SchemaProps: spec.SchemaProps{ + Description: "The time the migration action ended", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "targetNodeDomainDetected": { + SchemaProps: spec.SchemaProps{ + Description: "The Target Node has seen the Domain Start Event", + Type: []string{"boolean"}, + Format: "", + }, + }, + "targetNodeAddress": { + SchemaProps: spec.SchemaProps{ + Description: "The address of the target node to use for the migration", + Type: []string{"string"}, + Format: "", + }, + }, + "targetDirectMigrationNodePorts": { + SchemaProps: spec.SchemaProps{ + Description: "The list of ports opened for live migration on the destination node", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + }, + }, + "targetNode": { + SchemaProps: spec.SchemaProps{ + Description: "The target node that the VMI is moving to", + Type: []string{"string"}, + Format: "", + }, + }, + "targetPod": { + SchemaProps: spec.SchemaProps{ + Description: "The target pod that the VMI is moving to", + Type: []string{"string"}, + Format: "", + }, + }, + "targetAttachmentPodUID": { + SchemaProps: spec.SchemaProps{ + Description: "The UID of the target attachment pod for hotplug volumes", + Type: []string{"string"}, + Format: "", + }, + }, + "sourceNode": { + SchemaProps: spec.SchemaProps{ + Description: "The source node that the VMI originated on", + Type: []string{"string"}, + Format: "", + }, + }, + "completed": { + SchemaProps: spec.SchemaProps{ + Description: "Indicates the migration completed", + Type: []string{"boolean"}, + Format: "", + }, + }, + "failed": { + SchemaProps: spec.SchemaProps{ + Description: "Indicates that the migration failed", + Type: []string{"boolean"}, + Format: "", + }, + }, + "abortRequested": { + SchemaProps: spec.SchemaProps{ + Description: "Indicates that the migration has been requested to abort", + Type: []string{"boolean"}, + Format: "", + }, + }, + "abortStatus": { + SchemaProps: spec.SchemaProps{ + Description: "Indicates the final status of the live migration abortion", + Type: []string{"string"}, + Format: "", + }, + }, + "migrationUid": { + SchemaProps: spec.SchemaProps{ + Description: "The VirtualMachineInstanceMigration object associated with this migration", + Type: []string{"string"}, + Format: "", + }, + }, + "mode": { + SchemaProps: spec.SchemaProps{ + Description: "Lets us know if the vmi is currently running pre or post copy migration", + Type: []string{"string"}, + Format: "", + }, + }, + "migrationPolicyName": { + SchemaProps: spec.SchemaProps{ + Description: "Name of the migration policy. If string is empty, no policy is matched", + Type: []string{"string"}, + Format: "", + }, + }, + "migrationConfiguration": { + SchemaProps: spec.SchemaProps{ + Description: "Migration configurations to apply", + Ref: ref("kubevirt.io/api/core/v1.MigrationConfiguration"), + }, + }, + "targetCPUSet": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "If the VMI requires dedicated CPUs, this field will hold the dedicated CPU set on the target node", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + }, + }, + "targetNodeTopology": { + SchemaProps: spec.SchemaProps{ + Description: "If the VMI requires dedicated CPUs, this field will hold the numa topology on the target node", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Time", "kubevirt.io/api/core/v1.MigrationConfiguration"}, + } +} + +func schema_kubevirtio_api_core_v1_VirtualMachineInstanceMigrationStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "VirtualMachineInstanceMigration reprents information pertaining to a VMI's migration.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "phase": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "conditions": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/api/core/v1.VirtualMachineInstanceMigrationCondition"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "kubevirt.io/api/core/v1.VirtualMachineInstanceMigrationCondition"}, + } +} + +func schema_kubevirtio_api_core_v1_VirtualMachineInstanceNetworkInterface(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "ipAddress": { + SchemaProps: spec.SchemaProps{ + Description: "IP address of a Virtual Machine interface. It is always the first item of IPs", + Type: []string{"string"}, + Format: "", + }, + }, + "mac": { + SchemaProps: spec.SchemaProps{ + Description: "Hardware address of a Virtual Machine interface", + Type: []string{"string"}, + Format: "", + }, + }, + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name of the interface, corresponds to name of the network assigned to the interface", + Type: []string{"string"}, + Format: "", + }, + }, + "ipAddresses": { + SchemaProps: spec.SchemaProps{ + Description: "List of all IP addresses of a Virtual Machine interface", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "interfaceName": { + SchemaProps: spec.SchemaProps{ + Description: "The interface name inside the Virtual Machine", + Type: []string{"string"}, + Format: "", + }, + }, + "infoSource": { + SchemaProps: spec.SchemaProps{ + Description: "Specifies the origin of the interface data collected. values: domain, guest-agent, or both", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_kubevirtio_api_core_v1_VirtualMachineInstancePhaseTransitionTimestamp(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "VirtualMachineInstancePhaseTransitionTimestamp gives a timestamp in relation to when a phase is set on a vmi", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "phase": { + SchemaProps: spec.SchemaProps{ + Description: "Phase is the status of the VirtualMachineInstance in kubernetes world. It is not the VirtualMachineInstance status, but partially correlates to it.", + Type: []string{"string"}, + Format: "", + }, + }, + "phaseTransitionTimestamp": { + SchemaProps: spec.SchemaProps{ + Description: "PhaseTransitionTimestamp is the timestamp of when the phase change occurred", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_kubevirtio_api_core_v1_VirtualMachineInstancePreset(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "VirtualMachineInstancePreset defines a VMI spec.domain to be applied to all VMIs that match the provided label selector More info: https://kubevirt.io/user-guide/virtual_machines/presets/#overrides", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "VirtualMachineInstance Spec contains the VirtualMachineInstance specification.", + Ref: ref("kubevirt.io/api/core/v1.VirtualMachineInstancePresetSpec"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "kubevirt.io/api/core/v1.VirtualMachineInstancePresetSpec"}, + } +} + +func schema_kubevirtio_api_core_v1_VirtualMachineInstancePresetList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "VirtualMachineInstancePresetList is a list of VirtualMachinePresets", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/api/core/v1.VirtualMachineInstancePreset"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "kubevirt.io/api/core/v1.VirtualMachineInstancePreset"}, + } +} + +func schema_kubevirtio_api_core_v1_VirtualMachineInstancePresetSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "selector": { + SchemaProps: spec.SchemaProps{ + Description: "Selector is a label query over a set of VMIs. Required.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + }, + }, + "domain": { + SchemaProps: spec.SchemaProps{ + Description: "Domain is the same object type as contained in VirtualMachineInstanceSpec", + Ref: ref("kubevirt.io/api/core/v1.DomainSpec"), + }, + }, + }, + Required: []string{"selector"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector", "kubevirt.io/api/core/v1.DomainSpec"}, + } +} + +func schema_kubevirtio_api_core_v1_VirtualMachineInstanceReplicaSet(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "VirtualMachineInstance is *the* VirtualMachineInstance Definition. It represents a virtual machine in the runtime environment of kubernetes.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "VirtualMachineInstance Spec contains the VirtualMachineInstance specification.", + Ref: ref("kubevirt.io/api/core/v1.VirtualMachineInstanceReplicaSetSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Status is the high level overview of how the VirtualMachineInstance is doing. It contains information available to controllers and users.", + Ref: ref("kubevirt.io/api/core/v1.VirtualMachineInstanceReplicaSetStatus"), + }, + }, + }, + Required: []string{"spec"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "kubevirt.io/api/core/v1.VirtualMachineInstanceReplicaSetSpec", "kubevirt.io/api/core/v1.VirtualMachineInstanceReplicaSetStatus"}, + } +} + +func schema_kubevirtio_api_core_v1_VirtualMachineInstanceReplicaSetCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "type": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "lastProbeTime": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "lastTransitionTime": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "reason": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "message": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"type", "status"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_kubevirtio_api_core_v1_VirtualMachineInstanceReplicaSetList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "VMIList is a list of VMIs", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/api/core/v1.VirtualMachineInstanceReplicaSet"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "kubevirt.io/api/core/v1.VirtualMachineInstanceReplicaSet"}, + } +} + +func schema_kubevirtio_api_core_v1_VirtualMachineInstanceReplicaSetSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "replicas": { + SchemaProps: spec.SchemaProps{ + Description: "Number of desired pods. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "selector": { + SchemaProps: spec.SchemaProps{ + Description: "Label selector for pods. Existing ReplicaSets whose pods are selected by this will be the ones affected by this deployment.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + }, + }, + "template": { + SchemaProps: spec.SchemaProps{ + Description: "Template describes the pods that will be created.", + Ref: ref("kubevirt.io/api/core/v1.VirtualMachineInstanceTemplateSpec"), + }, + }, + "paused": { + SchemaProps: spec.SchemaProps{ + Description: "Indicates that the replica set is paused.", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + Required: []string{"selector", "template"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector", "kubevirt.io/api/core/v1.VirtualMachineInstanceTemplateSpec"}, + } +} + +func schema_kubevirtio_api_core_v1_VirtualMachineInstanceReplicaSetStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "replicas": { + SchemaProps: spec.SchemaProps{ + Description: "Total number of non-terminated pods targeted by this deployment (their labels match the selector).", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "readyReplicas": { + SchemaProps: spec.SchemaProps{ + Description: "The number of ready replicas for this replica set.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "conditions": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/api/core/v1.VirtualMachineInstanceReplicaSetCondition"), + }, + }, + }, + }, + }, + "labelSelector": { + SchemaProps: spec.SchemaProps{ + Description: "Canonical form of the label selector for HPA which consumes it through the scale subresource.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{ + "kubevirt.io/api/core/v1.VirtualMachineInstanceReplicaSetCondition"}, + } +} + +func schema_kubevirtio_api_core_v1_VirtualMachineInstanceSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "VirtualMachineInstanceSpec is a description of a VirtualMachineInstance.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "priorityClassName": { + SchemaProps: spec.SchemaProps{ + Description: "If specified, indicates the pod's priority. If not specified, the pod priority will be default or zero if there is no default.", + Type: []string{"string"}, + Format: "", + }, + }, + "domain": { + SchemaProps: spec.SchemaProps{ + Description: "Specification of the desired behavior of the VirtualMachineInstance on the host.", + Ref: ref("kubevirt.io/api/core/v1.DomainSpec"), + }, + }, + "nodeSelector": { + SchemaProps: spec.SchemaProps{ + Description: "NodeSelector is a selector which must be true for the vmi to fit on a node. Selector which must match a node's labels for the vmi to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "affinity": { + SchemaProps: spec.SchemaProps{ + Description: "If affinity is specifies, obey all the affinity rules", + Ref: ref("k8s.io/api/core/v1.Affinity"), + }, + }, + "schedulerName": { + SchemaProps: spec.SchemaProps{ + Description: "If specified, the VMI will be dispatched by specified scheduler. If not specified, the VMI will be dispatched by default scheduler.", + Type: []string{"string"}, + Format: "", + }, + }, + "tolerations": { + SchemaProps: spec.SchemaProps{ + Description: "If toleration is specified, obey all the toleration rules.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.Toleration"), + }, + }, + }, + }, + }, + "evictionStrategy": { + SchemaProps: spec.SchemaProps{ + Description: "EvictionStrategy can be set to \"LiveMigrate\" if the VirtualMachineInstance should be migrated instead of shut-off in case of a node drain.", + Type: []string{"string"}, + Format: "", + }, + }, + "startStrategy": { + SchemaProps: spec.SchemaProps{ + Description: "StartStrategy can be set to \"Paused\" if Virtual Machine should be started in paused state.", + Type: []string{"string"}, + Format: "", + }, + }, + "terminationGracePeriodSeconds": { + SchemaProps: spec.SchemaProps{ + Description: "Grace period observed after signalling a VirtualMachineInstance to stop after which the VirtualMachineInstance is force terminated.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "volumes": { + SchemaProps: spec.SchemaProps{ + Description: "List of volumes that can be mounted by disks belonging to the vmi.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/api/core/v1.Volume"), + }, + }, + }, + }, + }, + "livenessProbe": { + SchemaProps: spec.SchemaProps{ + Description: "Periodic probe of VirtualMachineInstance liveness. VirtualmachineInstances will be stopped if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes", + Ref: ref("kubevirt.io/api/core/v1.Probe"), + }, + }, + "readinessProbe": { + SchemaProps: spec.SchemaProps{ + Description: "Periodic probe of VirtualMachineInstance service readiness. VirtualmachineInstances will be removed from service endpoints if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes", + Ref: ref("kubevirt.io/api/core/v1.Probe"), + }, + }, + "hostname": { + SchemaProps: spec.SchemaProps{ + Description: "Specifies the hostname of the vmi If not specified, the hostname will be set to the name of the vmi, if dhcp or cloud-init is configured properly.", + Type: []string{"string"}, + Format: "", + }, + }, + "subdomain": { + SchemaProps: spec.SchemaProps{ + Description: "If specified, the fully qualified vmi hostname will be \"...svc.\". If not specified, the vmi will not have a domainname at all. The DNS entry will resolve to the vmi, no matter if the vmi itself can pick up a hostname.", + Type: []string{"string"}, + Format: "", + }, + }, + "networks": { + SchemaProps: spec.SchemaProps{ + Description: "List of networks that can be attached to a vm's virtual interface.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/api/core/v1.Network"), + }, + }, + }, + }, + }, + "dnsPolicy": { + SchemaProps: spec.SchemaProps{ + Description: "Set DNS policy for the pod. Defaults to \"ClusterFirst\". Valid values are 'ClusterFirstWithHostNet', 'ClusterFirst', 'Default' or 'None'. DNS parameters given in DNSConfig will be merged with the policy selected with DNSPolicy. To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'.", + Type: []string{"string"}, + Format: "", + }, + }, + "dnsConfig": { + SchemaProps: spec.SchemaProps{ + Description: "Specifies the DNS parameters of a pod. Parameters specified here will be merged to the generated DNS configuration based on DNSPolicy.", + Ref: ref("k8s.io/api/core/v1.PodDNSConfig"), + }, + }, + "accessCredentials": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "Specifies a set of public keys to inject into the vm guest", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/api/core/v1.AccessCredential"), + }, + }, + }, + }, + }, + }, + Required: []string{"domain"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.Affinity", "k8s.io/api/core/v1.PodDNSConfig", "k8s.io/api/core/v1.Toleration", "kubevirt.io/api/core/v1.AccessCredential", "kubevirt.io/api/core/v1.DomainSpec", "kubevirt.io/api/core/v1.Network", "kubevirt.io/api/core/v1.Probe", "kubevirt.io/api/core/v1.Volume"}, + } +} + +func schema_kubevirtio_api_core_v1_VirtualMachineInstanceStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "VirtualMachineInstanceStatus represents information about the status of a VirtualMachineInstance. Status may trail the actual state of a system.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "nodeName": { + SchemaProps: spec.SchemaProps{ + Description: "NodeName is the name where the VirtualMachineInstance is currently running.", + Type: []string{"string"}, + Format: "", + }, + }, + "reason": { + SchemaProps: spec.SchemaProps{ + Description: "A brief CamelCase message indicating details about why the VMI is in this state. e.g. 'NodeUnresponsive'", + Type: []string{"string"}, + Format: "", + }, + }, + "conditions": { + SchemaProps: spec.SchemaProps{ + Description: "Conditions are specific points in VirtualMachineInstance's pod runtime.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/api/core/v1.VirtualMachineInstanceCondition"), + }, + }, + }, + }, + }, + "phase": { + SchemaProps: spec.SchemaProps{ + Description: "Phase is the status of the VirtualMachineInstance in kubernetes world. It is not the VirtualMachineInstance status, but partially correlates to it.", + Type: []string{"string"}, + Format: "", + }, + }, + "phaseTransitionTimestamps": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "PhaseTransitionTimestamp is the timestamp of when the last phase change occurred", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/api/core/v1.VirtualMachineInstancePhaseTransitionTimestamp"), + }, + }, + }, + }, + }, + "interfaces": { + SchemaProps: spec.SchemaProps{ + Description: "Interfaces represent the details of available network interfaces.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/api/core/v1.VirtualMachineInstanceNetworkInterface"), + }, + }, + }, + }, + }, + "guestOSInfo": { + SchemaProps: spec.SchemaProps{ + Description: "Guest OS Information", + Ref: ref("kubevirt.io/api/core/v1.VirtualMachineInstanceGuestOSInfo"), + }, + }, + "migrationState": { + SchemaProps: spec.SchemaProps{ + Description: "Represents the status of a live migration", + Ref: ref("kubevirt.io/api/core/v1.VirtualMachineInstanceMigrationState"), + }, + }, + "migrationMethod": { + SchemaProps: spec.SchemaProps{ + Description: "Represents the method using which the vmi can be migrated: live migration or block migration", + Type: []string{"string"}, + Format: "", + }, + }, + "migrationTransport": { + SchemaProps: spec.SchemaProps{ + Description: "This represents the migration transport", + Type: []string{"string"}, + Format: "", + }, + }, + "qosClass": { + SchemaProps: spec.SchemaProps{ + Description: "The Quality of Service (QOS) classification assigned to the virtual machine instance based on resource requirements See PodQOSClass type for available QOS classes More info: https://git.k8s.io/community/contributors/design-proposals/node/resource-qos.md", + Type: []string{"string"}, + Format: "", + }, + }, + "launcherContainerImageVersion": { + SchemaProps: spec.SchemaProps{ + Description: "LauncherContainerImageVersion indicates what container image is currently active for the vmi.", + Type: []string{"string"}, + Format: "", + }, + }, + "evacuationNodeName": { + SchemaProps: spec.SchemaProps{ + Description: "EvacuationNodeName is used to track the eviction process of a VMI. It stores the name of the node that we want to evacuate. It is meant to be used by KubeVirt core components only and can't be set or modified by users.", + Type: []string{"string"}, + Format: "", + }, + }, + "activePods": { + SchemaProps: spec.SchemaProps{ + Description: "ActivePods is a mapping of pod UID to node name. It is possible for multiple pods to be running for a single VMI during migration.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "volumeStatus": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "VolumeStatus contains the statuses of all the volumes", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/api/core/v1.VolumeStatus"), + }, + }, + }, + }, + }, + "fsFreezeStatus": { + SchemaProps: spec.SchemaProps{ + Description: "FSFreezeStatus is the state of the fs of the guest it can be either frozen or thawed", + Type: []string{"string"}, + Format: "", + }, + }, + "topologyHints": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/api/core/v1.TopologyHints"), + }, + }, + "virtualMachineRevisionName": { + SchemaProps: spec.SchemaProps{ + Description: "VirtualMachineRevisionName is used to get the vm revision of the vmi when doing an online vm snapshot", + Type: []string{"string"}, + Format: "", + }, + }, + "runtimeUser": { + SchemaProps: spec.SchemaProps{ + Description: "RuntimeUser is used to determine what user will be used in launcher", + Type: []string{"integer"}, + Format: "int64", + }, + }, + }, + }, + }, + Dependencies: []string{ + "kubevirt.io/api/core/v1.TopologyHints", "kubevirt.io/api/core/v1.VirtualMachineInstanceCondition", "kubevirt.io/api/core/v1.VirtualMachineInstanceGuestOSInfo", "kubevirt.io/api/core/v1.VirtualMachineInstanceMigrationState", "kubevirt.io/api/core/v1.VirtualMachineInstanceNetworkInterface", "kubevirt.io/api/core/v1.VirtualMachineInstancePhaseTransitionTimestamp", "kubevirt.io/api/core/v1.VolumeStatus"}, + } +} + +func schema_kubevirtio_api_core_v1_VirtualMachineInstanceTemplateSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "metadata": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "VirtualMachineInstance Spec contains the VirtualMachineInstance specification.", + Ref: ref("kubevirt.io/api/core/v1.VirtualMachineInstanceSpec"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "kubevirt.io/api/core/v1.VirtualMachineInstanceSpec"}, + } +} + +func schema_kubevirtio_api_core_v1_VirtualMachineList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "VirtualMachineList is a list of virtualmachines", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/api/core/v1.VirtualMachine"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "kubevirt.io/api/core/v1.VirtualMachine"}, + } +} + +func schema_kubevirtio_api_core_v1_VirtualMachineSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "VirtualMachineSpec describes how the proper VirtualMachine should look like", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "running": { + SchemaProps: spec.SchemaProps{ + Description: "Running controls whether the associatied VirtualMachineInstance is created or not Mutually exclusive with RunStrategy", + Type: []string{"boolean"}, + Format: "", + }, + }, + "runStrategy": { + SchemaProps: spec.SchemaProps{ + Description: "Running state indicates the requested running state of the VirtualMachineInstance mutually exclusive with Running", + Type: []string{"string"}, + Format: "", + }, + }, + "flavor": { + SchemaProps: spec.SchemaProps{ + Description: "FlavorMatcher references a flavor that is used to fill fields in Template", + Ref: ref("kubevirt.io/api/core/v1.FlavorMatcher"), + }, + }, + "template": { + SchemaProps: spec.SchemaProps{ + Description: "Template is the direct specification of VirtualMachineInstance", + Ref: ref("kubevirt.io/api/core/v1.VirtualMachineInstanceTemplateSpec"), + }, + }, + "dataVolumeTemplates": { + SchemaProps: spec.SchemaProps{ + Description: "dataVolumeTemplates is a list of dataVolumes that the VirtualMachineInstance template can reference. DataVolumes in this list are dynamically created for the VirtualMachine and are tied to the VirtualMachine's life-cycle.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/api/core/v1.DataVolumeTemplateSpec"), + }, + }, + }, + }, + }, + }, + Required: []string{"template"}, + }, + }, + Dependencies: []string{ + "kubevirt.io/api/core/v1.DataVolumeTemplateSpec", "kubevirt.io/api/core/v1.FlavorMatcher", "kubevirt.io/api/core/v1.VirtualMachineInstanceTemplateSpec"}, + } +} + +func schema_kubevirtio_api_core_v1_VirtualMachineStartFailure(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "VirtualMachineStartFailure tracks VMIs which failed to transition successfully to running using the VM status", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "consecutiveFailCount": { + SchemaProps: spec.SchemaProps{ + Type: []string{"integer"}, + Format: "int32", + }, + }, + "lastFailedVMIUID": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "retryAfterTimestamp": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_kubevirtio_api_core_v1_VirtualMachineStateChangeRequest(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "action": { + SchemaProps: spec.SchemaProps{ + Description: "Indicates the type of action that is requested. e.g. Start or Stop", + Type: []string{"string"}, + Format: "", + }, + }, + "data": { + SchemaProps: spec.SchemaProps{ + Description: "Provides additional data in order to perform the Action", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "uid": { + SchemaProps: spec.SchemaProps{ + Description: "Indicates the UUID of an existing Virtual Machine Instance that this change request applies to -- if applicable", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"action"}, + }, + }, + } +} + +func schema_kubevirtio_api_core_v1_VirtualMachineStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "VirtualMachineStatus represents the status returned by the controller to describe how the VirtualMachine is doing", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "snapshotInProgress": { + SchemaProps: spec.SchemaProps{ + Description: "SnapshotInProgress is the name of the VirtualMachineSnapshot currently executing", + Type: []string{"string"}, + Format: "", + }, + }, + "restoreInProgress": { + SchemaProps: spec.SchemaProps{ + Description: "RestoreInProgress is the name of the VirtualMachineRestore currently executing", + Type: []string{"string"}, + Format: "", + }, + }, + "created": { + SchemaProps: spec.SchemaProps{ + Description: "Created indicates if the virtual machine is created in the cluster", + Type: []string{"boolean"}, + Format: "", + }, + }, + "ready": { + SchemaProps: spec.SchemaProps{ + Description: "Ready indicates if the virtual machine is running and ready", + Type: []string{"boolean"}, + Format: "", + }, + }, + "printableStatus": { + SchemaProps: spec.SchemaProps{ + Description: "PrintableStatus is a human readable, high-level representation of the status of the virtual machine", + Type: []string{"string"}, + Format: "", + }, + }, + "conditions": { + SchemaProps: spec.SchemaProps{ + Description: "Hold the state information of the VirtualMachine and its VirtualMachineInstance", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/api/core/v1.VirtualMachineCondition"), + }, + }, + }, + }, + }, + "stateChangeRequests": { + SchemaProps: spec.SchemaProps{ + Description: "StateChangeRequests indicates a list of actions that should be taken on a VMI e.g. stop a specific VMI then start a new one.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/api/core/v1.VirtualMachineStateChangeRequest"), + }, + }, + }, + }, + }, + "volumeRequests": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "VolumeRequests indicates a list of volumes add or remove from the VMI template and hotplug on an active running VMI.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/api/core/v1.VirtualMachineVolumeRequest"), + }, + }, + }, + }, + }, + "volumeSnapshotStatuses": { + SchemaProps: spec.SchemaProps{ + Description: "VolumeSnapshotStatuses indicates a list of statuses whether snapshotting is supported by each volume.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/api/core/v1.VolumeSnapshotStatus"), + }, + }, + }, + }, + }, + "startFailure": { + SchemaProps: spec.SchemaProps{ + Description: "StartFailure tracks consecutive VMI startup failures for the purposes of crash loop backoffs", + Ref: ref("kubevirt.io/api/core/v1.VirtualMachineStartFailure"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "kubevirt.io/api/core/v1.VirtualMachineCondition", "kubevirt.io/api/core/v1.VirtualMachineStartFailure", "kubevirt.io/api/core/v1.VirtualMachineStateChangeRequest", "kubevirt.io/api/core/v1.VirtualMachineVolumeRequest", "kubevirt.io/api/core/v1.VolumeSnapshotStatus"}, + } +} + +func schema_kubevirtio_api_core_v1_VirtualMachineVolumeRequest(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "addVolumeOptions": { + SchemaProps: spec.SchemaProps{ + Description: "AddVolumeOptions when set indicates a volume should be added. The details within this field specify how to add the volume", + Ref: ref("kubevirt.io/api/core/v1.AddVolumeOptions"), + }, + }, + "removeVolumeOptions": { + SchemaProps: spec.SchemaProps{ + Description: "RemoveVolumeOptions when set indicates a volume should be removed. The details within this field specify how to add the volume", + Ref: ref("kubevirt.io/api/core/v1.RemoveVolumeOptions"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "kubevirt.io/api/core/v1.AddVolumeOptions", "kubevirt.io/api/core/v1.RemoveVolumeOptions"}, + } +} + +func schema_kubevirtio_api_core_v1_Volume(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Volume represents a named volume in a vmi.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Volume's name. Must be a DNS_LABEL and unique within the vmi. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", + Type: []string{"string"}, + Format: "", + }, + }, + "hostDisk": { + SchemaProps: spec.SchemaProps{ + Description: "HostDisk represents a disk created on the cluster level", + Ref: ref("kubevirt.io/api/core/v1.HostDisk"), + }, + }, + "persistentVolumeClaim": { + SchemaProps: spec.SchemaProps{ + Description: "PersistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace. Directly attached to the vmi via qemu. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims", + Ref: ref("kubevirt.io/api/core/v1.PersistentVolumeClaimVolumeSource"), + }, + }, + "cloudInitNoCloud": { + SchemaProps: spec.SchemaProps{ + Description: "CloudInitNoCloud represents a cloud-init NoCloud user-data source. The NoCloud data will be added as a disk to the vmi. A proper cloud-init installation is required inside the guest. More info: http://cloudinit.readthedocs.io/en/latest/topics/datasources/nocloud.html", + Ref: ref("kubevirt.io/api/core/v1.CloudInitNoCloudSource"), + }, + }, + "cloudInitConfigDrive": { + SchemaProps: spec.SchemaProps{ + Description: "CloudInitConfigDrive represents a cloud-init Config Drive user-data source. The Config Drive data will be added as a disk to the vmi. A proper cloud-init installation is required inside the guest. More info: https://cloudinit.readthedocs.io/en/latest/topics/datasources/configdrive.html", + Ref: ref("kubevirt.io/api/core/v1.CloudInitConfigDriveSource"), + }, + }, + "sysprep": { + SchemaProps: spec.SchemaProps{ + Description: "Represents a Sysprep volume source.", + Ref: ref("kubevirt.io/api/core/v1.SysprepSource"), + }, + }, + "containerDisk": { + SchemaProps: spec.SchemaProps{ + Description: "ContainerDisk references a docker image, embedding a qcow or raw disk. More info: https://kubevirt.gitbooks.io/user-guide/registry-disk.html", + Ref: ref("kubevirt.io/api/core/v1.ContainerDiskSource"), + }, + }, + "ephemeral": { + SchemaProps: spec.SchemaProps{ + Description: "Ephemeral is a special volume source that \"wraps\" specified source and provides copy-on-write image on top of it.", + Ref: ref("kubevirt.io/api/core/v1.EphemeralVolumeSource"), + }, + }, + "emptyDisk": { + SchemaProps: spec.SchemaProps{ + Description: "EmptyDisk represents a temporary disk which shares the vmis lifecycle. More info: https://kubevirt.gitbooks.io/user-guide/disks-and-volumes.html", + Ref: ref("kubevirt.io/api/core/v1.EmptyDiskSource"), + }, + }, + "dataVolume": { + SchemaProps: spec.SchemaProps{ + Description: "DataVolume represents the dynamic creation a PVC for this volume as well as the process of populating that PVC with a disk image.", + Ref: ref("kubevirt.io/api/core/v1.DataVolumeSource"), + }, + }, + "configMap": { + SchemaProps: spec.SchemaProps{ + Description: "ConfigMapSource represents a reference to a ConfigMap in the same namespace. More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/", + Ref: ref("kubevirt.io/api/core/v1.ConfigMapVolumeSource"), + }, + }, + "secret": { + SchemaProps: spec.SchemaProps{ + Description: "SecretVolumeSource represents a reference to a secret data in the same namespace. More info: https://kubernetes.io/docs/concepts/configuration/secret/", + Ref: ref("kubevirt.io/api/core/v1.SecretVolumeSource"), + }, + }, + "downwardAPI": { + SchemaProps: spec.SchemaProps{ + Description: "DownwardAPI represents downward API about the pod that should populate this volume", + Ref: ref("kubevirt.io/api/core/v1.DownwardAPIVolumeSource"), + }, + }, + "serviceAccount": { + SchemaProps: spec.SchemaProps{ + Description: "ServiceAccountVolumeSource represents a reference to a service account. There can only be one volume of this type! More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/", + Ref: ref("kubevirt.io/api/core/v1.ServiceAccountVolumeSource"), + }, + }, + "downwardMetrics": { + SchemaProps: spec.SchemaProps{ + Description: "DownwardMetrics adds a very small disk to VMIs which contains a limited view of host and guest metrics. The disk content is compatible with vhostmd (https://github.com/vhostmd/vhostmd) and vm-dump-metrics.", + Ref: ref("kubevirt.io/api/core/v1.DownwardMetricsVolumeSource"), + }, + }, + }, + Required: []string{"name"}, + }, + }, + Dependencies: []string{ + "kubevirt.io/api/core/v1.CloudInitConfigDriveSource", "kubevirt.io/api/core/v1.CloudInitNoCloudSource", "kubevirt.io/api/core/v1.ConfigMapVolumeSource", "kubevirt.io/api/core/v1.ContainerDiskSource", "kubevirt.io/api/core/v1.DataVolumeSource", "kubevirt.io/api/core/v1.DownwardAPIVolumeSource", "kubevirt.io/api/core/v1.DownwardMetricsVolumeSource", "kubevirt.io/api/core/v1.EmptyDiskSource", "kubevirt.io/api/core/v1.EphemeralVolumeSource", "kubevirt.io/api/core/v1.HostDisk", "kubevirt.io/api/core/v1.PersistentVolumeClaimVolumeSource", "kubevirt.io/api/core/v1.SecretVolumeSource", "kubevirt.io/api/core/v1.ServiceAccountVolumeSource", "kubevirt.io/api/core/v1.SysprepSource"}, + } +} + +func schema_kubevirtio_api_core_v1_VolumeSnapshotStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Volume name", + Type: []string{"string"}, + Format: "", + }, + }, + "enabled": { + SchemaProps: spec.SchemaProps{ + Description: "True if the volume supports snapshotting", + Type: []string{"boolean"}, + Format: "", + }, + }, + "reason": { + SchemaProps: spec.SchemaProps{ + Description: "Empty if snapshotting is enabled, contains reason otherwise", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"name", "enabled"}, + }, + }, + } +} + +func schema_kubevirtio_api_core_v1_VolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Represents the source of a volume to mount. Only one of its members may be specified.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "hostDisk": { + SchemaProps: spec.SchemaProps{ + Description: "HostDisk represents a disk created on the cluster level", + Ref: ref("kubevirt.io/api/core/v1.HostDisk"), + }, + }, + "persistentVolumeClaim": { + SchemaProps: spec.SchemaProps{ + Description: "PersistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace. Directly attached to the vmi via qemu. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims", + Ref: ref("kubevirt.io/api/core/v1.PersistentVolumeClaimVolumeSource"), + }, + }, + "cloudInitNoCloud": { + SchemaProps: spec.SchemaProps{ + Description: "CloudInitNoCloud represents a cloud-init NoCloud user-data source. The NoCloud data will be added as a disk to the vmi. A proper cloud-init installation is required inside the guest. More info: http://cloudinit.readthedocs.io/en/latest/topics/datasources/nocloud.html", + Ref: ref("kubevirt.io/api/core/v1.CloudInitNoCloudSource"), + }, + }, + "cloudInitConfigDrive": { + SchemaProps: spec.SchemaProps{ + Description: "CloudInitConfigDrive represents a cloud-init Config Drive user-data source. The Config Drive data will be added as a disk to the vmi. A proper cloud-init installation is required inside the guest. More info: https://cloudinit.readthedocs.io/en/latest/topics/datasources/configdrive.html", + Ref: ref("kubevirt.io/api/core/v1.CloudInitConfigDriveSource"), + }, + }, + "sysprep": { + SchemaProps: spec.SchemaProps{ + Description: "Represents a Sysprep volume source.", + Ref: ref("kubevirt.io/api/core/v1.SysprepSource"), + }, + }, + "containerDisk": { + SchemaProps: spec.SchemaProps{ + Description: "ContainerDisk references a docker image, embedding a qcow or raw disk. More info: https://kubevirt.gitbooks.io/user-guide/registry-disk.html", + Ref: ref("kubevirt.io/api/core/v1.ContainerDiskSource"), + }, + }, + "ephemeral": { + SchemaProps: spec.SchemaProps{ + Description: "Ephemeral is a special volume source that \"wraps\" specified source and provides copy-on-write image on top of it.", + Ref: ref("kubevirt.io/api/core/v1.EphemeralVolumeSource"), + }, + }, + "emptyDisk": { + SchemaProps: spec.SchemaProps{ + Description: "EmptyDisk represents a temporary disk which shares the vmis lifecycle. More info: https://kubevirt.gitbooks.io/user-guide/disks-and-volumes.html", + Ref: ref("kubevirt.io/api/core/v1.EmptyDiskSource"), + }, + }, + "dataVolume": { + SchemaProps: spec.SchemaProps{ + Description: "DataVolume represents the dynamic creation a PVC for this volume as well as the process of populating that PVC with a disk image.", + Ref: ref("kubevirt.io/api/core/v1.DataVolumeSource"), + }, + }, + "configMap": { + SchemaProps: spec.SchemaProps{ + Description: "ConfigMapSource represents a reference to a ConfigMap in the same namespace. More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/", + Ref: ref("kubevirt.io/api/core/v1.ConfigMapVolumeSource"), + }, + }, + "secret": { + SchemaProps: spec.SchemaProps{ + Description: "SecretVolumeSource represents a reference to a secret data in the same namespace. More info: https://kubernetes.io/docs/concepts/configuration/secret/", + Ref: ref("kubevirt.io/api/core/v1.SecretVolumeSource"), + }, + }, + "downwardAPI": { + SchemaProps: spec.SchemaProps{ + Description: "DownwardAPI represents downward API about the pod that should populate this volume", + Ref: ref("kubevirt.io/api/core/v1.DownwardAPIVolumeSource"), + }, + }, + "serviceAccount": { + SchemaProps: spec.SchemaProps{ + Description: "ServiceAccountVolumeSource represents a reference to a service account. There can only be one volume of this type! More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/", + Ref: ref("kubevirt.io/api/core/v1.ServiceAccountVolumeSource"), + }, + }, + "downwardMetrics": { + SchemaProps: spec.SchemaProps{ + Description: "DownwardMetrics adds a very small disk to VMIs which contains a limited view of host and guest metrics. The disk content is compatible with vhostmd (https://github.com/vhostmd/vhostmd) and vm-dump-metrics.", + Ref: ref("kubevirt.io/api/core/v1.DownwardMetricsVolumeSource"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "kubevirt.io/api/core/v1.CloudInitConfigDriveSource", "kubevirt.io/api/core/v1.CloudInitNoCloudSource", "kubevirt.io/api/core/v1.ConfigMapVolumeSource", "kubevirt.io/api/core/v1.ContainerDiskSource", "kubevirt.io/api/core/v1.DataVolumeSource", "kubevirt.io/api/core/v1.DownwardAPIVolumeSource", "kubevirt.io/api/core/v1.DownwardMetricsVolumeSource", "kubevirt.io/api/core/v1.EmptyDiskSource", "kubevirt.io/api/core/v1.EphemeralVolumeSource", "kubevirt.io/api/core/v1.HostDisk", "kubevirt.io/api/core/v1.PersistentVolumeClaimVolumeSource", "kubevirt.io/api/core/v1.SecretVolumeSource", "kubevirt.io/api/core/v1.ServiceAccountVolumeSource", "kubevirt.io/api/core/v1.SysprepSource"}, + } +} + +func schema_kubevirtio_api_core_v1_VolumeStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "VolumeStatus represents information about the status of volumes attached to the VirtualMachineInstance.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name is the name of the volume", + Type: []string{"string"}, + Format: "", + }, + }, + "target": { + SchemaProps: spec.SchemaProps{ + Description: "Target is the target name used when adding the volume to the VM, eg: vda", + Type: []string{"string"}, + Format: "", + }, + }, + "phase": { + SchemaProps: spec.SchemaProps{ + Description: "Phase is the phase", + Type: []string{"string"}, + Format: "", + }, + }, + "reason": { + SchemaProps: spec.SchemaProps{ + Description: "Reason is a brief description of why we are in the current hotplug volume phase", + Type: []string{"string"}, + Format: "", + }, + }, + "message": { + SchemaProps: spec.SchemaProps{ + Description: "Message is a detailed message about the current hotplug volume phase", + Type: []string{"string"}, + Format: "", + }, + }, + "persistentVolumeClaimInfo": { + SchemaProps: spec.SchemaProps{ + Description: "PersistentVolumeClaimInfo is information about the PVC that handler requires during start flow", + Ref: ref("kubevirt.io/api/core/v1.PersistentVolumeClaimInfo"), + }, + }, + "hotplugVolume": { + SchemaProps: spec.SchemaProps{ + Description: "If the volume is hotplug, this will contain the hotplug status.", + Ref: ref("kubevirt.io/api/core/v1.HotplugVolumeStatus"), + }, + }, + "size": { + SchemaProps: spec.SchemaProps{ + Description: "Represents the size of the volume", + Type: []string{"integer"}, + Format: "int64", + }, + }, + }, + Required: []string{"name", "target"}, + }, + }, + Dependencies: []string{ + "kubevirt.io/api/core/v1.HotplugVolumeStatus", "kubevirt.io/api/core/v1.PersistentVolumeClaimInfo"}, + } +} + +func schema_kubevirtio_api_core_v1_Watchdog(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Named watchdog device.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name of the watchdog.", + Type: []string{"string"}, + Format: "", + }, + }, + "i6300esb": { + SchemaProps: spec.SchemaProps{ + Description: "i6300esb watchdog device.", + Ref: ref("kubevirt.io/api/core/v1.I6300ESBWatchdog"), + }, + }, + }, + Required: []string{"name"}, + }, + }, + Dependencies: []string{ + "kubevirt.io/api/core/v1.I6300ESBWatchdog"}, + } +} + +func schema_kubevirtio_api_core_v1_WatchdogDevice(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Hardware watchdog device. Exactly one of its members must be set.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "i6300esb": { + SchemaProps: spec.SchemaProps{ + Description: "i6300esb watchdog device.", + Ref: ref("kubevirt.io/api/core/v1.I6300ESBWatchdog"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "kubevirt.io/api/core/v1.I6300ESBWatchdog"}, + } +} + +func schema_kubevirtio_api_flavor_v1alpha1_VirtualMachineClusterFlavor(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "VirtualMachineClusterFlavor is a cluster scoped version of VirtualMachineFlavor resource.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "VirtualMachineFlavorSpec for the flavor", + Ref: ref("kubevirt.io/api/flavor/v1alpha1.VirtualMachineFlavorSpec"), + }, + }, + }, + Required: []string{"spec"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "kubevirt.io/api/flavor/v1alpha1.VirtualMachineFlavorSpec"}, + } +} + +func schema_kubevirtio_api_flavor_v1alpha1_VirtualMachineClusterFlavorList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "VirtualMachineClusterFlavorList is a list of VirtualMachineClusterFlavor resources.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/api/flavor/v1alpha1.VirtualMachineClusterFlavor"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "kubevirt.io/api/flavor/v1alpha1.VirtualMachineClusterFlavor"}, + } +} + +func schema_kubevirtio_api_flavor_v1alpha1_VirtualMachineFlavor(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "VirtualMachineFlavor resource contains common VirtualMachine configuration that can be used by multiple VirtualMachine resources.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "VirtualMachineFlavorSpec for the flavor", + Ref: ref("kubevirt.io/api/flavor/v1alpha1.VirtualMachineFlavorSpec"), + }, + }, + }, + Required: []string{"spec"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "kubevirt.io/api/flavor/v1alpha1.VirtualMachineFlavorSpec"}, + } +} + +func schema_kubevirtio_api_flavor_v1alpha1_VirtualMachineFlavorList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "VirtualMachineFlavorList is a list of VirtualMachineFlavor resources.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/api/flavor/v1alpha1.VirtualMachineFlavor"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "kubevirt.io/api/flavor/v1alpha1.VirtualMachineFlavor"}, + } +} + +func schema_kubevirtio_api_flavor_v1alpha1_VirtualMachineFlavorSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "VirtualMachineFlavorSpec", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "cpu": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/api/core/v1.CPU"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "kubevirt.io/api/core/v1.CPU"}, + } +} + +func schema_kubevirtio_api_migrations_v1alpha1_MigrationPolicy(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "MigrationPolicy holds migration policy (i.e. configurations) to apply to a VM or group of VMs", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/api/migrations/v1alpha1.MigrationPolicySpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/api/migrations/v1alpha1.MigrationPolicyStatus"), + }, + }, + }, + Required: []string{"spec"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "kubevirt.io/api/migrations/v1alpha1.MigrationPolicySpec", "kubevirt.io/api/migrations/v1alpha1.MigrationPolicyStatus"}, + } +} + +func schema_kubevirtio_api_migrations_v1alpha1_MigrationPolicyList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "MigrationPolicyList is a list of MigrationPolicy", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/api/migrations/v1alpha1.MigrationPolicy"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "kubevirt.io/api/migrations/v1alpha1.MigrationPolicy"}, + } +} + +func schema_kubevirtio_api_migrations_v1alpha1_MigrationPolicySpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "selectors": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/api/migrations/v1alpha1.Selectors"), + }, + }, + "allowAutoConverge": { + SchemaProps: spec.SchemaProps{ + Type: []string{"boolean"}, + Format: "", + }, + }, + "bandwidthPerMigration": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + }, + }, + "completionTimeoutPerGiB": { + SchemaProps: spec.SchemaProps{ + Type: []string{"integer"}, + Format: "int64", + }, + }, + "allowPostCopy": { + SchemaProps: spec.SchemaProps{ + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + Required: []string{"selectors"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/api/resource.Quantity", "kubevirt.io/api/migrations/v1alpha1.Selectors"}, + } +} + +func schema_kubevirtio_api_migrations_v1alpha1_MigrationPolicyStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + }, + }, + } +} + +func schema_kubevirtio_api_migrations_v1alpha1_Selectors(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "namespaceSelector": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + }, + }, + "virtualMachineInstanceSelector": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + } +} + +func schema_kubevirtio_api_pool_v1alpha1_VirtualMachinePool(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "VirtualMachinePool resource contains a VirtualMachine configuration that can be used to replicate multiple VirtualMachine resources.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/api/pool/v1alpha1.VirtualMachinePoolSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/api/pool/v1alpha1.VirtualMachinePoolStatus"), + }, + }, + }, + Required: []string{"spec"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "kubevirt.io/api/pool/v1alpha1.VirtualMachinePoolSpec", "kubevirt.io/api/pool/v1alpha1.VirtualMachinePoolStatus"}, + } +} + +func schema_kubevirtio_api_pool_v1alpha1_VirtualMachinePoolCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "type": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "lastProbeTime": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "lastTransitionTime": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "reason": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "message": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"type", "status"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_kubevirtio_api_pool_v1alpha1_VirtualMachinePoolList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "VirtualMachinePoolList is a list of VirtualMachinePool resources.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/api/pool/v1alpha1.VirtualMachinePool"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "kubevirt.io/api/pool/v1alpha1.VirtualMachinePool"}, + } +} + +func schema_kubevirtio_api_pool_v1alpha1_VirtualMachinePoolSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "replicas": { + SchemaProps: spec.SchemaProps{ + Description: "Number of desired pods. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "selector": { + SchemaProps: spec.SchemaProps{ + Description: "Label selector for pods. Existing Poolss whose pods are selected by this will be the ones affected by this deployment.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + }, + }, + "virtualMachineTemplate": { + SchemaProps: spec.SchemaProps{ + Description: "Template describes the VM that will be created.", + Ref: ref("kubevirt.io/api/pool/v1alpha1.VirtualMachineTemplateSpec"), + }, + }, + "paused": { + SchemaProps: spec.SchemaProps{ + Description: "Indicates that the pool is paused.", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + Required: []string{"selector", "virtualMachineTemplate"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector", "kubevirt.io/api/pool/v1alpha1.VirtualMachineTemplateSpec"}, + } +} + +func schema_kubevirtio_api_pool_v1alpha1_VirtualMachinePoolStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "replicas": { + SchemaProps: spec.SchemaProps{ + Type: []string{"integer"}, + Format: "int32", + }, + }, + "conditions": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/api/pool/v1alpha1.VirtualMachinePoolCondition"), + }, + }, + }, + }, + }, + "labelSelector": { + SchemaProps: spec.SchemaProps{ + Description: "Canonical form of the label selector for HPA which consumes it through the scale subresource.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{ + "kubevirt.io/api/pool/v1alpha1.VirtualMachinePoolCondition"}, + } +} + +func schema_kubevirtio_api_pool_v1alpha1_VirtualMachineTemplateSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "metadata": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "VirtualMachineSpec contains the VirtualMachine specification.", + Ref: ref("kubevirt.io/api/core/v1.VirtualMachineSpec"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "kubevirt.io/api/core/v1.VirtualMachineSpec"}, + } +} + +func schema_kubevirtio_api_snapshot_v1alpha1_Condition(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Condition defines conditions", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "type": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "lastProbeTime": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "lastTransitionTime": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "reason": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "message": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"type", "status"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_kubevirtio_api_snapshot_v1alpha1_Error(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Error is the last error encountered during the snapshot/restore", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "time": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "message": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_kubevirtio_api_snapshot_v1alpha1_PersistentVolumeClaim(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "metadata": { + SchemaProps: spec.SchemaProps{ + Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "Spec defines the desired characteristics of a volume requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims", + Ref: ref("k8s.io/api/core/v1.PersistentVolumeClaimSpec"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.PersistentVolumeClaimSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_kubevirtio_api_snapshot_v1alpha1_SourceSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "SourceSpec contains the appropriate spec for the resource being snapshotted", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "virtualMachine": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/api/snapshot/v1alpha1.VirtualMachine"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "kubevirt.io/api/snapshot/v1alpha1.VirtualMachine"}, + } +} + +func schema_kubevirtio_api_snapshot_v1alpha1_VirtualMachine(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "metadata": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "VirtualMachineSpec contains the VirtualMachine specification.", + Ref: ref("kubevirt.io/api/core/v1.VirtualMachineSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Status holds the current state of the controller and brief information about its associated VirtualMachineInstance", + Ref: ref("kubevirt.io/api/core/v1.VirtualMachineStatus"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "kubevirt.io/api/core/v1.VirtualMachineSpec", "kubevirt.io/api/core/v1.VirtualMachineStatus"}, + } +} + +func schema_kubevirtio_api_snapshot_v1alpha1_VirtualMachineRestore(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "VirtualMachineRestore defines the operation of restoring a VM", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/api/snapshot/v1alpha1.VirtualMachineRestoreSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/api/snapshot/v1alpha1.VirtualMachineRestoreStatus"), + }, + }, + }, + Required: []string{"spec"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "kubevirt.io/api/snapshot/v1alpha1.VirtualMachineRestoreSpec", "kubevirt.io/api/snapshot/v1alpha1.VirtualMachineRestoreStatus"}, + } +} + +func schema_kubevirtio_api_snapshot_v1alpha1_VirtualMachineRestoreList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "VirtualMachineRestoreList is a list of VirtualMachineRestore resources", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/api/snapshot/v1alpha1.VirtualMachineRestore"), + }, + }, + }, + }, + }, + }, + Required: []string{"metadata", "items"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "kubevirt.io/api/snapshot/v1alpha1.VirtualMachineRestore"}, + } +} + +func schema_kubevirtio_api_snapshot_v1alpha1_VirtualMachineRestoreSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "VirtualMachineRestoreSpec is the spec for a VirtualMachineRestoreresource", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "target": { + SchemaProps: spec.SchemaProps{ + Description: "initially only VirtualMachine type supported", + Ref: ref("k8s.io/api/core/v1.TypedLocalObjectReference"), + }, + }, + "virtualMachineSnapshotName": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "patches": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "If the target for the restore does not exist, it will be created. Patches holds JSON patches that would be applied to the target manifest before it's created. Patches should fit the target's Kind.\n\nExample for a patch: {\"op\": \"replace\", \"path\": \"/metadata/name\", \"value\": \"new-vm-name\"}", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + Required: []string{"target", "virtualMachineSnapshotName"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.TypedLocalObjectReference"}, + } +} + +func schema_kubevirtio_api_snapshot_v1alpha1_VirtualMachineRestoreStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "VirtualMachineRestoreStatus is the spec for a VirtualMachineRestoreresource", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "restores": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/api/snapshot/v1alpha1.VolumeRestore"), + }, + }, + }, + }, + }, + "restoreTime": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "deletedDataVolumes": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "complete": { + SchemaProps: spec.SchemaProps{ + Type: []string{"boolean"}, + Format: "", + }, + }, + "conditions": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/api/snapshot/v1alpha1.Condition"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Time", "kubevirt.io/api/snapshot/v1alpha1.Condition", "kubevirt.io/api/snapshot/v1alpha1.VolumeRestore"}, + } +} + +func schema_kubevirtio_api_snapshot_v1alpha1_VirtualMachineSnapshot(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "VirtualMachineSnapshot defines the operation of snapshotting a VM", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/api/snapshot/v1alpha1.VirtualMachineSnapshotSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/api/snapshot/v1alpha1.VirtualMachineSnapshotStatus"), + }, + }, + }, + Required: []string{"spec"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "kubevirt.io/api/snapshot/v1alpha1.VirtualMachineSnapshotSpec", "kubevirt.io/api/snapshot/v1alpha1.VirtualMachineSnapshotStatus"}, + } +} + +func schema_kubevirtio_api_snapshot_v1alpha1_VirtualMachineSnapshotContent(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "VirtualMachineSnapshotContent contains the snapshot data", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/api/snapshot/v1alpha1.VirtualMachineSnapshotContentSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/api/snapshot/v1alpha1.VirtualMachineSnapshotContentStatus"), + }, + }, + }, + Required: []string{"spec"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "kubevirt.io/api/snapshot/v1alpha1.VirtualMachineSnapshotContentSpec", "kubevirt.io/api/snapshot/v1alpha1.VirtualMachineSnapshotContentStatus"}, + } +} + +func schema_kubevirtio_api_snapshot_v1alpha1_VirtualMachineSnapshotContentList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "VirtualMachineSnapshotContentList is a list of VirtualMachineSnapshot resources", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/api/snapshot/v1alpha1.VirtualMachineSnapshotContent"), + }, + }, + }, + }, + }, + }, + Required: []string{"metadata", "items"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "kubevirt.io/api/snapshot/v1alpha1.VirtualMachineSnapshotContent"}, + } +} + +func schema_kubevirtio_api_snapshot_v1alpha1_VirtualMachineSnapshotContentSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "VirtualMachineSnapshotContentSpec is the spec for a VirtualMachineSnapshotContent resource", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "virtualMachineSnapshotName": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "source": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/api/snapshot/v1alpha1.SourceSpec"), + }, + }, + "volumeBackups": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/api/snapshot/v1alpha1.VolumeBackup"), + }, + }, + }, + }, + }, + }, + Required: []string{"source"}, + }, + }, + Dependencies: []string{ + "kubevirt.io/api/snapshot/v1alpha1.SourceSpec", "kubevirt.io/api/snapshot/v1alpha1.VolumeBackup"}, + } +} + +func schema_kubevirtio_api_snapshot_v1alpha1_VirtualMachineSnapshotContentStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "VirtualMachineSnapshotContentStatus is the status for a VirtualMachineSnapshotStatus resource", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "creationTime": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "readyToUse": { + SchemaProps: spec.SchemaProps{ + Type: []string{"boolean"}, + Format: "", + }, + }, + "error": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/api/snapshot/v1alpha1.Error"), + }, + }, + "volumeSnapshotStatus": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/api/snapshot/v1alpha1.VolumeSnapshotStatus"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Time", "kubevirt.io/api/snapshot/v1alpha1.Error", "kubevirt.io/api/snapshot/v1alpha1.VolumeSnapshotStatus"}, + } +} + +func schema_kubevirtio_api_snapshot_v1alpha1_VirtualMachineSnapshotList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "VirtualMachineSnapshotList is a list of VirtualMachineSnapshot resources", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/api/snapshot/v1alpha1.VirtualMachineSnapshot"), + }, + }, + }, + }, + }, + }, + Required: []string{"metadata", "items"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "kubevirt.io/api/snapshot/v1alpha1.VirtualMachineSnapshot"}, + } +} + +func schema_kubevirtio_api_snapshot_v1alpha1_VirtualMachineSnapshotSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "VirtualMachineSnapshotSpec is the spec for a VirtualMachineSnapshot resource", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "source": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.TypedLocalObjectReference"), + }, + }, + "deletionPolicy": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "failureDeadline": { + SchemaProps: spec.SchemaProps{ + Description: "This time represents the number of seconds we permit the vm snapshot to take. In case we pass this deadline we mark this snapshot as failed. Defaults to DefaultFailureDeadline - 5min", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + }, + Required: []string{"source"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.TypedLocalObjectReference", "k8s.io/apimachinery/pkg/apis/meta/v1.Duration"}, + } +} + +func schema_kubevirtio_api_snapshot_v1alpha1_VirtualMachineSnapshotStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "VirtualMachineSnapshotStatus is the status for a VirtualMachineSnapshot resource", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "sourceUID": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "virtualMachineSnapshotContentName": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "creationTime": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "phase": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "readyToUse": { + SchemaProps: spec.SchemaProps{ + Type: []string{"boolean"}, + Format: "", + }, + }, + "error": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/api/snapshot/v1alpha1.Error"), + }, + }, + "conditions": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/api/snapshot/v1alpha1.Condition"), + }, + }, + }, + }, + }, + "indications": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "set", + }, + }, + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Time", "kubevirt.io/api/snapshot/v1alpha1.Condition", "kubevirt.io/api/snapshot/v1alpha1.Error"}, + } +} + +func schema_kubevirtio_api_snapshot_v1alpha1_VolumeBackup(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "VolumeBackup contains the data neeed to restore a PVC", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "volumeName": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "persistentVolumeClaim": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/api/snapshot/v1alpha1.PersistentVolumeClaim"), + }, + }, + "volumeSnapshotName": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"volumeName", "persistentVolumeClaim"}, + }, + }, + Dependencies: []string{ + "kubevirt.io/api/snapshot/v1alpha1.PersistentVolumeClaim"}, + } +} + +func schema_kubevirtio_api_snapshot_v1alpha1_VolumeRestore(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "VolumeRestore contains the data neeed to restore a PVC", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "volumeName": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "persistentVolumeClaim": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "volumeSnapshotName": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "dataVolumeName": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"volumeName", "persistentVolumeClaim", "volumeSnapshotName"}, + }, + }, + } +} + +func schema_kubevirtio_api_snapshot_v1alpha1_VolumeSnapshotStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "VolumeSnapshotStatus is the status of a VolumeSnapshot", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "volumeSnapshotName": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "creationTime": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "readyToUse": { + SchemaProps: spec.SchemaProps{ + Type: []string{"boolean"}, + Format: "", + }, + }, + "error": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/api/snapshot/v1alpha1.Error"), + }, + }, + }, + Required: []string{"volumeSnapshotName"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Time", "kubevirt.io/api/snapshot/v1alpha1.Error"}, + } +} + +func schema_pkg_apis_core_v1beta1_CDI(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CDI is the CDI Operator CRD", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.CDISpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.CDIStatus"), + }, + }, + }, + Required: []string{"spec"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.CDISpec", "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.CDIStatus"}, + } +} + +func schema_pkg_apis_core_v1beta1_CDICertConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CDICertConfig has the CertConfigs for CDI", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "ca": { + SchemaProps: spec.SchemaProps{ + Description: "CA configuration CA certs are kept in the CA bundle as long as they are valid", + Ref: ref("kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.CertConfig"), + }, + }, + "server": { + SchemaProps: spec.SchemaProps{ + Description: "Server configuration Certs are rotated and discarded", + Ref: ref("kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.CertConfig"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.CertConfig"}, + } +} + +func schema_pkg_apis_core_v1beta1_CDIConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CDIConfig provides a user configuration for CDI", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.CDIConfigSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.CDIConfigStatus"), + }, + }, + }, + Required: []string{"spec"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.CDIConfigSpec", "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.CDIConfigStatus"}, + } +} + +func schema_pkg_apis_core_v1beta1_CDIConfigList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CDIConfigList provides the needed parameters to do request a list of CDIConfigs from the system", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "Items provides a list of CDIConfigs", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.CDIConfig"), + }, + }, + }, + }, + }, + }, + Required: []string{"metadata", "items"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.CDIConfig"}, + } +} + +func schema_pkg_apis_core_v1beta1_CDIConfigSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CDIConfigSpec defines specification for user configuration", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "uploadProxyURLOverride": { + SchemaProps: spec.SchemaProps{ + Description: "Override the URL used when uploading to a DataVolume", + Type: []string{"string"}, + Format: "", + }, + }, + "importProxy": { + SchemaProps: spec.SchemaProps{ + Description: "ImportProxy contains importer pod proxy configuration.", + Ref: ref("kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.ImportProxy"), + }, + }, + "scratchSpaceStorageClass": { + SchemaProps: spec.SchemaProps{ + Description: "Override the storage class to used for scratch space during transfer operations. The scratch space storage class is determined in the following order: 1. value of scratchSpaceStorageClass, if that doesn't exist, use the default storage class, if there is no default storage class, use the storage class of the DataVolume, if no storage class specified, use no storage class for scratch space", + Type: []string{"string"}, + Format: "", + }, + }, + "podResourceRequirements": { + SchemaProps: spec.SchemaProps{ + Description: "ResourceRequirements describes the compute resource requirements.", + Ref: ref("k8s.io/api/core/v1.ResourceRequirements"), + }, + }, + "featureGates": { + SchemaProps: spec.SchemaProps{ + Description: "FeatureGates are a list of specific enabled feature gates", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "filesystemOverhead": { + SchemaProps: spec.SchemaProps{ + Description: "FilesystemOverhead describes the space reserved for overhead when using Filesystem volumes. A value is between 0 and 1, if not defined it is 0.055 (5.5% overhead)", + Ref: ref("kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.FilesystemOverhead"), + }, + }, + "preallocation": { + SchemaProps: spec.SchemaProps{ + Description: "Preallocation controls whether storage for DataVolumes should be allocated in advance.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "insecureRegistries": { + SchemaProps: spec.SchemaProps{ + Description: "InsecureRegistries is a list of TLS disabled registries", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.ResourceRequirements", "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.FilesystemOverhead", "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.ImportProxy"}, + } +} + +func schema_pkg_apis_core_v1beta1_CDIConfigStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CDIConfigStatus provides the most recently observed status of the CDI Config resource", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "uploadProxyURL": { + SchemaProps: spec.SchemaProps{ + Description: "The calculated upload proxy URL", + Type: []string{"string"}, + Format: "", + }, + }, + "importProxy": { + SchemaProps: spec.SchemaProps{ + Description: "ImportProxy contains importer pod proxy configuration.", + Ref: ref("kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.ImportProxy"), + }, + }, + "scratchSpaceStorageClass": { + SchemaProps: spec.SchemaProps{ + Description: "The calculated storage class to be used for scratch space", + Type: []string{"string"}, + Format: "", + }, + }, + "defaultPodResourceRequirements": { + SchemaProps: spec.SchemaProps{ + Description: "ResourceRequirements describes the compute resource requirements.", + Ref: ref("k8s.io/api/core/v1.ResourceRequirements"), + }, + }, + "filesystemOverhead": { + SchemaProps: spec.SchemaProps{ + Description: "FilesystemOverhead describes the space reserved for overhead when using Filesystem volumes. A percentage value is between 0 and 1", + Ref: ref("kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.FilesystemOverhead"), + }, + }, + "preallocation": { + SchemaProps: spec.SchemaProps{ + Description: "Preallocation controls whether storage for DataVolumes should be allocated in advance.", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.ResourceRequirements", "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.FilesystemOverhead", "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.ImportProxy"}, + } +} + +func schema_pkg_apis_core_v1beta1_CDIList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CDIList provides the needed parameters to do request a list of CDIs from the system", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "Items provides a list of CDIs", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.CDI"), + }, + }, + }, + }, + }, + }, + Required: []string{"metadata", "items"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.CDI"}, + } +} + +func schema_pkg_apis_core_v1beta1_CDISpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CDISpec defines our specification for the CDI installation", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "imagePullPolicy": { + SchemaProps: spec.SchemaProps{ + Description: "PullPolicy describes a policy for if/when to pull a container image", + Type: []string{"string"}, + Format: "", + }, + }, + "uninstallStrategy": { + SchemaProps: spec.SchemaProps{ + Description: "CDIUninstallStrategy defines the state to leave CDI on uninstall", + Type: []string{"string"}, + Format: "", + }, + }, + "infra": { + SchemaProps: spec.SchemaProps{ + Description: "Rules on which nodes CDI infrastructure pods will be scheduled", + Ref: ref("kubevirt.io/controller-lifecycle-operator-sdk/pkg/sdk/api.NodePlacement"), + }, + }, + "workload": { + SchemaProps: spec.SchemaProps{ + Description: "Restrict on which nodes CDI workload pods will be scheduled", + Ref: ref("kubevirt.io/controller-lifecycle-operator-sdk/pkg/sdk/api.NodePlacement"), + }, + }, + "cloneStrategyOverride": { + SchemaProps: spec.SchemaProps{ + Description: "Clone strategy override: should we use a host-assisted copy even if snapshots are available?", + Type: []string{"string"}, + Format: "", + }, + }, + "config": { + SchemaProps: spec.SchemaProps{ + Description: "CDIConfig at CDI level", + Ref: ref("kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.CDIConfigSpec"), + }, + }, + "certConfig": { + SchemaProps: spec.SchemaProps{ + Description: "certificate configuration", + Ref: ref("kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.CDICertConfig"), + }, + }, + "priorityClass": { + SchemaProps: spec.SchemaProps{ + Description: "PriorityClass of the CDI control plane", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{ + "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.CDICertConfig", "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.CDIConfigSpec", "kubevirt.io/controller-lifecycle-operator-sdk/pkg/sdk/api.NodePlacement"}, + } +} + +func schema_pkg_apis_core_v1beta1_CDIStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CDIStatus defines the status of the installation", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "phase": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "conditions": { + SchemaProps: spec.SchemaProps{ + Description: "A list of current conditions of the resource", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("github.com/openshift/custom-resource-status/conditions/v1.Condition"), + }, + }, + }, + }, + }, + "operatorVersion": { + SchemaProps: spec.SchemaProps{ + Description: "The version of the resource as defined by the operator", + Type: []string{"string"}, + Format: "", + }, + }, + "targetVersion": { + SchemaProps: spec.SchemaProps{ + Description: "The desired version of the resource", + Type: []string{"string"}, + Format: "", + }, + }, + "observedVersion": { + SchemaProps: spec.SchemaProps{ + Description: "The observed version of the resource", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{ + "github.com/openshift/custom-resource-status/conditions/v1.Condition"}, + } +} + +func schema_pkg_apis_core_v1beta1_CertConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CertConfig contains the tunables for TLS certificates", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "duration": { + SchemaProps: spec.SchemaProps{ + Description: "The requested 'duration' (i.e. lifetime) of the Certificate.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + "renewBefore": { + SchemaProps: spec.SchemaProps{ + Description: "The amount of time before the currently issued certificate's `notAfter` time that we will begin to attempt to renew the certificate.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Duration"}, + } +} + +func schema_pkg_apis_core_v1beta1_ClaimPropertySet(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ClaimPropertySet is a set of properties applicable to PVC", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "accessModes": { + SchemaProps: spec.SchemaProps{ + Description: "AccessModes contains the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "volumeMode": { + SchemaProps: spec.SchemaProps{ + Description: "VolumeMode defines what type of volume is required by the claim. Value of Filesystem is implied when not included in claim spec.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_pkg_apis_core_v1beta1_ConditionState(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ConditionState represents the state of a condition", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "status": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "lastTransitionTime": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "lastHeartbeatTime": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "reason": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "message": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"status"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_pkg_apis_core_v1beta1_DataImportCron(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DataImportCron defines a cron job for recurring polling/importing disk images as PVCs into a golden image namespace", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.DataImportCronSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.DataImportCronStatus"), + }, + }, + }, + Required: []string{"spec"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.DataImportCronSpec", "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.DataImportCronStatus"}, + } +} + +func schema_pkg_apis_core_v1beta1_DataImportCronCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DataImportCronCondition represents the state of a data import cron condition", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "type": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "lastTransitionTime": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "lastHeartbeatTime": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "reason": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "message": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"type", "status"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_pkg_apis_core_v1beta1_DataImportCronList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DataImportCronList provides the needed parameters to do request a list of DataImportCrons from the system", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "Items provides a list of DataImportCrons", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.DataImportCron"), + }, + }, + }, + }, + }, + }, + Required: []string{"metadata", "items"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.DataImportCron"}, + } +} + +func schema_pkg_apis_core_v1beta1_DataImportCronSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DataImportCronSpec defines specification for DataImportCron", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "template": { + SchemaProps: spec.SchemaProps{ + Description: "Template specifies template for the DVs to be created", + Ref: ref("kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.DataVolume"), + }, + }, + "schedule": { + SchemaProps: spec.SchemaProps{ + Description: "Schedule specifies in cron format when and how often to look for new imports", + Type: []string{"string"}, + Format: "", + }, + }, + "garbageCollect": { + SchemaProps: spec.SchemaProps{ + Description: "GarbageCollect specifies whether old PVCs should be cleaned up after a new PVC is imported. Options are currently \"Outdated\" and \"Never\", defaults to \"Outdated\".", + Type: []string{"string"}, + Format: "", + }, + }, + "importsToKeep": { + SchemaProps: spec.SchemaProps{ + Description: "Number of import PVCs to keep when garbage collecting. Default is 3.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "managedDataSource": { + SchemaProps: spec.SchemaProps{ + Description: "ManagedDataSource specifies the name of the corresponding DataSource this cron will manage. DataSource has to be in the same namespace.", + Type: []string{"string"}, + Format: "", + }, + }, + "retentionPolicy": { + SchemaProps: spec.SchemaProps{ + Description: "RetentionPolicy specifies whether the created DataVolumes and DataSources are retained when their DataImportCron is deleted. Default is RatainAll.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"template", "schedule", "managedDataSource"}, + }, + }, + Dependencies: []string{ + "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.DataVolume"}, + } +} + +func schema_pkg_apis_core_v1beta1_DataImportCronStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DataImportCronStatus provides the most recently observed status of the DataImportCron", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "currentImports": { + SchemaProps: spec.SchemaProps{ + Description: "CurrentImports are the imports in progress. Currently only a single import is supported.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.ImportStatus"), + }, + }, + }, + }, + }, + "lastImportedPVC": { + SchemaProps: spec.SchemaProps{ + Description: "LastImportedPVC is the last imported PVC", + Ref: ref("kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.DataVolumeSourcePVC"), + }, + }, + "lastExecutionTimestamp": { + SchemaProps: spec.SchemaProps{ + Description: "LastExecutionTimestamp is the time of the last polling", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "lastImportTimestamp": { + SchemaProps: spec.SchemaProps{ + Description: "LastImportTimestamp is the time of the last import", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "conditions": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.DataImportCronCondition"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Time", "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.DataImportCronCondition", "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.DataVolumeSourcePVC", "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.ImportStatus"}, + } +} + +func schema_pkg_apis_core_v1beta1_DataSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DataSource references an import/clone source for a DataVolume", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.DataSourceSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.DataSourceStatus"), + }, + }, + }, + Required: []string{"spec"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.DataSourceSpec", "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.DataSourceStatus"}, + } +} + +func schema_pkg_apis_core_v1beta1_DataSourceCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DataSourceCondition represents the state of a data source condition", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "type": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "lastTransitionTime": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "lastHeartbeatTime": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "reason": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "message": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"type", "status"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_pkg_apis_core_v1beta1_DataSourceList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DataSourceList provides the needed parameters to do request a list of Data Sources from the system", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "Items provides a list of DataSources", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.DataSource"), + }, + }, + }, + }, + }, + }, + Required: []string{"metadata", "items"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.DataSource"}, + } +} + +func schema_pkg_apis_core_v1beta1_DataSourceSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DataSourceSource represents the source for our DataSource", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "pvc": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.DataVolumeSourcePVC"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.DataVolumeSourcePVC"}, + } +} + +func schema_pkg_apis_core_v1beta1_DataSourceSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DataSourceSpec defines specification for DataSource", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "source": { + SchemaProps: spec.SchemaProps{ + Description: "Source is the source of the data referenced by the DataSource", + Ref: ref("kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.DataSourceSource"), + }, + }, + }, + Required: []string{"source"}, + }, + }, + Dependencies: []string{ + "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.DataSourceSource"}, + } +} + +func schema_pkg_apis_core_v1beta1_DataSourceStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DataSourceStatus provides the most recently observed status of the DataSource", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "conditions": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.DataSourceCondition"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.DataSourceCondition"}, + } +} + +func schema_pkg_apis_core_v1beta1_DataVolume(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DataVolume is an abstraction on top of PersistentVolumeClaims to allow easy population of those PersistentVolumeClaims with relation to VirtualMachines", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.DataVolumeSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.DataVolumeStatus"), + }, + }, + }, + Required: []string{"spec"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.DataVolumeSpec", "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.DataVolumeStatus"}, + } +} + +func schema_pkg_apis_core_v1beta1_DataVolumeBlankImage(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DataVolumeBlankImage provides the parameters to create a new raw blank image for the PVC", + Type: []string{"object"}, + }, + }, + } +} + +func schema_pkg_apis_core_v1beta1_DataVolumeCheckpoint(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DataVolumeCheckpoint defines a stage in a warm migration.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "previous": { + SchemaProps: spec.SchemaProps{ + Description: "Previous is the identifier of the snapshot from the previous checkpoint.", + Type: []string{"string"}, + Format: "", + }, + }, + "current": { + SchemaProps: spec.SchemaProps{ + Description: "Current is the identifier of the snapshot created for this checkpoint.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"previous", "current"}, + }, + }, + } +} + +func schema_pkg_apis_core_v1beta1_DataVolumeCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DataVolumeCondition represents the state of a data volume condition.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "type": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "lastTransitionTime": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "lastHeartbeatTime": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "reason": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "message": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"type", "status"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_pkg_apis_core_v1beta1_DataVolumeList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DataVolumeList provides the needed parameters to do request a list of Data Volumes from the system", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "Items provides a list of DataVolumes", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.DataVolume"), + }, + }, + }, + }, + }, + }, + Required: []string{"metadata", "items"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.DataVolume"}, + } +} + +func schema_pkg_apis_core_v1beta1_DataVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DataVolumeSource represents the source for our Data Volume, this can be HTTP, Imageio, S3, Registry or an existing PVC", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "http": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.DataVolumeSourceHTTP"), + }, + }, + "s3": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.DataVolumeSourceS3"), + }, + }, + "registry": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.DataVolumeSourceRegistry"), + }, + }, + "pvc": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.DataVolumeSourcePVC"), + }, + }, + "upload": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.DataVolumeSourceUpload"), + }, + }, + "blank": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.DataVolumeBlankImage"), + }, + }, + "imageio": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.DataVolumeSourceImageIO"), + }, + }, + "vddk": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.DataVolumeSourceVDDK"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.DataVolumeBlankImage", "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.DataVolumeSourceHTTP", "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.DataVolumeSourceImageIO", "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.DataVolumeSourcePVC", "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.DataVolumeSourceRegistry", "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.DataVolumeSourceS3", "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.DataVolumeSourceUpload", "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.DataVolumeSourceVDDK"}, + } +} + +func schema_pkg_apis_core_v1beta1_DataVolumeSourceHTTP(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DataVolumeSourceHTTP can be either an http or https endpoint, with an optional basic auth user name and password, and an optional configmap containing additional CAs", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "url": { + SchemaProps: spec.SchemaProps{ + Description: "URL is the URL of the http(s) endpoint", + Type: []string{"string"}, + Format: "", + }, + }, + "secretRef": { + SchemaProps: spec.SchemaProps{ + Description: "SecretRef A Secret reference, the secret should contain accessKeyId (user name) base64 encoded, and secretKey (password) also base64 encoded", + Type: []string{"string"}, + Format: "", + }, + }, + "certConfigMap": { + SchemaProps: spec.SchemaProps{ + Description: "CertConfigMap is a configmap reference, containing a Certificate Authority(CA) public key, and a base64 encoded pem certificate", + Type: []string{"string"}, + Format: "", + }, + }, + "extraHeaders": { + SchemaProps: spec.SchemaProps{ + Description: "ExtraHeaders is a list of strings containing extra headers to include with HTTP transfer requests", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "secretExtraHeaders": { + SchemaProps: spec.SchemaProps{ + Description: "SecretExtraHeaders is a list of Secret references, each containing an extra HTTP header that may include sensitive information", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + Required: []string{"url"}, + }, + }, + } +} + +func schema_pkg_apis_core_v1beta1_DataVolumeSourceImageIO(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DataVolumeSourceImageIO provides the parameters to create a Data Volume from an imageio source", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "url": { + SchemaProps: spec.SchemaProps{ + Description: "URL is the URL of the ovirt-engine", + Type: []string{"string"}, + Format: "", + }, + }, + "diskId": { + SchemaProps: spec.SchemaProps{ + Description: "DiskID provides id of a disk to be imported", + Type: []string{"string"}, + Format: "", + }, + }, + "secretRef": { + SchemaProps: spec.SchemaProps{ + Description: "SecretRef provides the secret reference needed to access the ovirt-engine", + Type: []string{"string"}, + Format: "", + }, + }, + "certConfigMap": { + SchemaProps: spec.SchemaProps{ + Description: "CertConfigMap provides a reference to the CA cert", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"url", "diskId"}, + }, + }, + } +} + +func schema_pkg_apis_core_v1beta1_DataVolumeSourcePVC(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DataVolumeSourcePVC provides the parameters to create a Data Volume from an existing PVC", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "namespace": { + SchemaProps: spec.SchemaProps{ + Description: "The namespace of the source PVC", + Type: []string{"string"}, + Format: "", + }, + }, + "name": { + SchemaProps: spec.SchemaProps{ + Description: "The name of the source PVC", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"namespace", "name"}, + }, + }, + } +} + +func schema_pkg_apis_core_v1beta1_DataVolumeSourceRef(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DataVolumeSourceRef defines an indirect reference to the source of data for the DataVolume", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "The kind of the source reference, currently only \"DataSource\" is supported", + Type: []string{"string"}, + Format: "", + }, + }, + "namespace": { + SchemaProps: spec.SchemaProps{ + Description: "The namespace of the source reference, defaults to the DataVolume namespace", + Type: []string{"string"}, + Format: "", + }, + }, + "name": { + SchemaProps: spec.SchemaProps{ + Description: "The name of the source reference", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"kind", "name"}, + }, + }, + } +} + +func schema_pkg_apis_core_v1beta1_DataVolumeSourceRegistry(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DataVolumeSourceRegistry provides the parameters to create a Data Volume from an registry source", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "url": { + SchemaProps: spec.SchemaProps{ + Description: "URL is the url of the registry source (starting with the scheme: docker, oci-archive)", + Type: []string{"string"}, + Format: "", + }, + }, + "imageStream": { + SchemaProps: spec.SchemaProps{ + Description: "ImageStream is the name of image stream for import", + Type: []string{"string"}, + Format: "", + }, + }, + "pullMethod": { + SchemaProps: spec.SchemaProps{ + Description: "PullMethod can be either \"pod\" (default import), or \"node\" (node docker cache based import)", + Type: []string{"string"}, + Format: "", + }, + }, + "secretRef": { + SchemaProps: spec.SchemaProps{ + Description: "SecretRef provides the secret reference needed to access the Registry source", + Type: []string{"string"}, + Format: "", + }, + }, + "certConfigMap": { + SchemaProps: spec.SchemaProps{ + Description: "CertConfigMap provides a reference to the Registry certs", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_pkg_apis_core_v1beta1_DataVolumeSourceS3(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DataVolumeSourceS3 provides the parameters to create a Data Volume from an S3 source", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "url": { + SchemaProps: spec.SchemaProps{ + Description: "URL is the url of the S3 source", + Type: []string{"string"}, + Format: "", + }, + }, + "secretRef": { + SchemaProps: spec.SchemaProps{ + Description: "SecretRef provides the secret reference needed to access the S3 source", + Type: []string{"string"}, + Format: "", + }, + }, + "certConfigMap": { + SchemaProps: spec.SchemaProps{ + Description: "CertConfigMap is a configmap reference, containing a Certificate Authority(CA) public key, and a base64 encoded pem certificate", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"url"}, + }, + }, + } +} + +func schema_pkg_apis_core_v1beta1_DataVolumeSourceUpload(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DataVolumeSourceUpload provides the parameters to create a Data Volume by uploading the source", + Type: []string{"object"}, + }, + }, + } +} + +func schema_pkg_apis_core_v1beta1_DataVolumeSourceVDDK(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DataVolumeSourceVDDK provides the parameters to create a Data Volume from a Vmware source", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "url": { + SchemaProps: spec.SchemaProps{ + Description: "URL is the URL of the vCenter or ESXi host with the VM to migrate", + Type: []string{"string"}, + Format: "", + }, + }, + "uuid": { + SchemaProps: spec.SchemaProps{ + Description: "UUID is the UUID of the virtual machine that the backing file is attached to in vCenter/ESXi", + Type: []string{"string"}, + Format: "", + }, + }, + "backingFile": { + SchemaProps: spec.SchemaProps{ + Description: "BackingFile is the path to the virtual hard disk to migrate from vCenter/ESXi", + Type: []string{"string"}, + Format: "", + }, + }, + "thumbprint": { + SchemaProps: spec.SchemaProps{ + Description: "Thumbprint is the certificate thumbprint of the vCenter or ESXi host", + Type: []string{"string"}, + Format: "", + }, + }, + "secretRef": { + SchemaProps: spec.SchemaProps{ + Description: "SecretRef provides a reference to a secret containing the username and password needed to access the vCenter or ESXi host", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_pkg_apis_core_v1beta1_DataVolumeSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DataVolumeSpec defines the DataVolume type specification", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "source": { + SchemaProps: spec.SchemaProps{ + Description: "Source is the src of the data for the requested DataVolume", + Ref: ref("kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.DataVolumeSource"), + }, + }, + "sourceRef": { + SchemaProps: spec.SchemaProps{ + Description: "SourceRef is an indirect reference to the source of data for the requested DataVolume", + Ref: ref("kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.DataVolumeSourceRef"), + }, + }, + "pvc": { + SchemaProps: spec.SchemaProps{ + Description: "PVC is the PVC specification", + Ref: ref("k8s.io/api/core/v1.PersistentVolumeClaimSpec"), + }, + }, + "storage": { + SchemaProps: spec.SchemaProps{ + Description: "Storage is the requested storage specification", + Ref: ref("kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.StorageSpec"), + }, + }, + "priorityClassName": { + SchemaProps: spec.SchemaProps{ + Description: "PriorityClassName for Importer, Cloner and Uploader pod", + Type: []string{"string"}, + Format: "", + }, + }, + "contentType": { + SchemaProps: spec.SchemaProps{ + Description: "DataVolumeContentType options: \"kubevirt\", \"archive\"", + Type: []string{"string"}, + Format: "", + }, + }, + "checkpoints": { + SchemaProps: spec.SchemaProps{ + Description: "Checkpoints is a list of DataVolumeCheckpoints, representing stages in a multistage import.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.DataVolumeCheckpoint"), + }, + }, + }, + }, + }, + "finalCheckpoint": { + SchemaProps: spec.SchemaProps{ + Description: "FinalCheckpoint indicates whether the current DataVolumeCheckpoint is the final checkpoint.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "preallocation": { + SchemaProps: spec.SchemaProps{ + Description: "Preallocation controls whether storage for DataVolumes should be allocated in advance.", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.PersistentVolumeClaimSpec", "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.DataVolumeCheckpoint", "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.DataVolumeSource", "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.DataVolumeSourceRef", "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.StorageSpec"}, + } +} + +func schema_pkg_apis_core_v1beta1_DataVolumeStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DataVolumeStatus contains the current status of the DataVolume", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "phase": { + SchemaProps: spec.SchemaProps{ + Description: "Phase is the current phase of the data volume", + Type: []string{"string"}, + Format: "", + }, + }, + "progress": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "restartCount": { + SchemaProps: spec.SchemaProps{ + Description: "RestartCount is the number of times the pod populating the DataVolume has restarted", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "conditions": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.DataVolumeCondition"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.DataVolumeCondition"}, + } +} + +func schema_pkg_apis_core_v1beta1_FilesystemOverhead(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "FilesystemOverhead defines the reserved size for PVCs with VolumeMode: Filesystem", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "global": { + SchemaProps: spec.SchemaProps{ + Description: "Global is how much space of a Filesystem volume should be reserved for overhead. This value is used unless overridden by a more specific value (per storageClass)", + Type: []string{"string"}, + Format: "", + }, + }, + "storageClass": { + SchemaProps: spec.SchemaProps{ + Description: "StorageClass specifies how much space of a Filesystem volume should be reserved for safety. The keys are the storageClass and the values are the overhead. This value overrides the global value", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + }, + }, + } +} + +func schema_pkg_apis_core_v1beta1_ImportProxy(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ImportProxy provides the information on how to configure the importer pod proxy.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "HTTPProxy": { + SchemaProps: spec.SchemaProps{ + Description: "HTTPProxy is the URL http://:@: of the import proxy for HTTP requests. Empty means unset and will not result in the import pod env var.", + Type: []string{"string"}, + Format: "", + }, + }, + "HTTPSProxy": { + SchemaProps: spec.SchemaProps{ + Description: "HTTPSProxy is the URL https://:@: of the import proxy for HTTPS requests. Empty means unset and will not result in the import pod env var.", + Type: []string{"string"}, + Format: "", + }, + }, + "noProxy": { + SchemaProps: spec.SchemaProps{ + Description: "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 the import pod env var.", + Type: []string{"string"}, + Format: "", + }, + }, + "trustedCAProxy": { + SchemaProps: spec.SchemaProps{ + Description: "TrustedCAProxy is the name of a ConfigMap in the cdi namespace that contains a user-provided trusted certificate authority (CA) bundle. The TrustedCAProxy field is consumed by the import controller that is resposible for coping it to a config map named trusted-ca-proxy-bundle-cm in the cdi namespace. Here is an example of the ConfigMap (in yaml):\n\napiVersion: v1 kind: ConfigMap metadata:\n name: trusted-ca-proxy-bundle-cm\n namespace: cdi\ndata:\n ca.pem: |\n -----BEGIN CERTIFICATE-----\n\t ... ...\n\t -----END CERTIFICATE-----", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_pkg_apis_core_v1beta1_ImportStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ImportStatus of a currently in progress import", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "DataVolumeName": { + SchemaProps: spec.SchemaProps{ + Description: "DataVolumeName is the currently in progress import DataVolume", + Type: []string{"string"}, + Format: "", + }, + }, + "Digest": { + SchemaProps: spec.SchemaProps{ + Description: "Digest of the currently imported image", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"DataVolumeName", "Digest"}, + }, + }, + } +} + +func schema_pkg_apis_core_v1beta1_ObjectTransfer(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ObjectTransfer is the cluster scoped object transfer resource", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.ObjectTransferSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.ObjectTransferStatus"), + }, + }, + }, + Required: []string{"spec"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.ObjectTransferSpec", "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.ObjectTransferStatus"}, + } +} + +func schema_pkg_apis_core_v1beta1_ObjectTransferCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ObjectTransferCondition contains condition data", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "type": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "lastTransitionTime": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "lastHeartbeatTime": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "reason": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "message": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"type", "status"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_pkg_apis_core_v1beta1_ObjectTransferList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ObjectTransferList provides the needed parameters to do request a list of ObjectTransfers from the system", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "Items provides a list of ObjectTransfers", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.ObjectTransfer"), + }, + }, + }, + }, + }, + }, + Required: []string{"metadata", "items"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.ObjectTransfer"}, + } +} + +func schema_pkg_apis_core_v1beta1_ObjectTransferSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ObjectTransferSpec specifies the source/target of the transfer", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "source": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.TransferSource"), + }, + }, + "target": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.TransferTarget"), + }, + }, + "parentName": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"source", "target"}, + }, + }, + Dependencies: []string{ + "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.TransferSource", "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.TransferTarget"}, + } +} + +func schema_pkg_apis_core_v1beta1_ObjectTransferStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ObjectTransferStatus is the status of the ObjectTransfer", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "data": { + SchemaProps: spec.SchemaProps{ + Description: "Data is a place for intermediary state. Or anything really.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "phase": { + SchemaProps: spec.SchemaProps{ + Description: "Phase is the current phase of the transfer", + Type: []string{"string"}, + Format: "", + }, + }, + "conditions": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.ObjectTransferCondition"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.ObjectTransferCondition"}, + } +} + +func schema_pkg_apis_core_v1beta1_StorageProfile(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "StorageProfile provides a CDI specific recommendation for storage parameters", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.StorageProfileSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.StorageProfileStatus"), + }, + }, + }, + Required: []string{"spec"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.StorageProfileSpec", "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.StorageProfileStatus"}, + } +} + +func schema_pkg_apis_core_v1beta1_StorageProfileList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "StorageProfileList provides the needed parameters to request a list of StorageProfile from the system", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "Items provides a list of StorageProfile", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.StorageProfile"), + }, + }, + }, + }, + }, + }, + Required: []string{"metadata", "items"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.StorageProfile"}, + } +} + +func schema_pkg_apis_core_v1beta1_StorageProfileSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "StorageProfileSpec defines specification for StorageProfile", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "cloneStrategy": { + SchemaProps: spec.SchemaProps{ + Description: "CloneStrategy defines the preferred method for performing a CDI clone", + Type: []string{"string"}, + Format: "", + }, + }, + "claimPropertySets": { + SchemaProps: spec.SchemaProps{ + Description: "ClaimPropertySets is a provided set of properties applicable to PVC", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.ClaimPropertySet"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.ClaimPropertySet"}, + } +} + +func schema_pkg_apis_core_v1beta1_StorageProfileStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "StorageProfileStatus provides the most recently observed status of the StorageProfile", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "storageClass": { + SchemaProps: spec.SchemaProps{ + Description: "The StorageClass name for which capabilities are defined", + Type: []string{"string"}, + Format: "", + }, + }, + "provisioner": { + SchemaProps: spec.SchemaProps{ + Description: "The Storage class provisioner plugin name", + Type: []string{"string"}, + Format: "", + }, + }, + "cloneStrategy": { + SchemaProps: spec.SchemaProps{ + Description: "CloneStrategy defines the preferred method for performing a CDI clone", + Type: []string{"string"}, + Format: "", + }, + }, + "claimPropertySets": { + SchemaProps: spec.SchemaProps{ + Description: "ClaimPropertySets computed from the spec and detected in the system", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.ClaimPropertySet"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1.ClaimPropertySet"}, + } +} + +func schema_pkg_apis_core_v1beta1_StorageSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "StorageSpec defines the Storage type specification", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "accessModes": { + SchemaProps: spec.SchemaProps{ + Description: "AccessModes contains the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "selector": { + SchemaProps: spec.SchemaProps{ + Description: "A label query over volumes to consider for binding.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + }, + }, + "resources": { + SchemaProps: spec.SchemaProps{ + Description: "Resources represents the minimum resources the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources", + Ref: ref("k8s.io/api/core/v1.ResourceRequirements"), + }, + }, + "volumeName": { + SchemaProps: spec.SchemaProps{ + Description: "VolumeName is the binding reference to the PersistentVolume backing this claim.", + Type: []string{"string"}, + Format: "", + }, + }, + "storageClassName": { + SchemaProps: spec.SchemaProps{ + Description: "Name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1", + Type: []string{"string"}, + Format: "", + }, + }, + "volumeMode": { + SchemaProps: spec.SchemaProps{ + Description: "volumeMode defines what type of volume is required by the claim. Value of Filesystem is implied when not included in claim spec.", + Type: []string{"string"}, + Format: "", + }, + }, + "dataSource": { + SchemaProps: spec.SchemaProps{ + Description: "This field can be used to specify either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) * An existing PVC (PersistentVolumeClaim) * An existing custom resource that implements data population (Alpha) In order to use custom resource types that implement data population, the AnyVolumeDataSource feature gate must be enabled. If the provisioner or an external controller can support the specified data source, it will create a new volume based on the contents of the specified data source.", + Ref: ref("k8s.io/api/core/v1.TypedLocalObjectReference"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.ResourceRequirements", "k8s.io/api/core/v1.TypedLocalObjectReference", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + } +} + +func schema_pkg_apis_core_v1beta1_TransferSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "TransferSource is the source of a ObjectTransfer", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "kind": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "namespace": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "name": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "requiredAnnotations": { + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + Required: []string{"kind", "namespace", "name"}, + }, + }, + } +} + +func schema_pkg_apis_core_v1beta1_TransferTarget(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "TransferTarget is the target of an ObjectTransfer", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "namespace": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "name": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} diff --git a/vendor/kubevirt.io/client-go/api/utils.go b/vendor/kubevirt.io/client-go/api/utils.go new file mode 100644 index 000000000000..12f11a693c70 --- /dev/null +++ b/vendor/kubevirt.io/client-go/api/utils.go @@ -0,0 +1,47 @@ +/* + * This file is part of the KubeVirt project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Copyright 2017 Red Hat, Inc. + * + */ + +package api + +import ( + k8sv1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/api/resource" + k8smetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + v1 "kubevirt.io/api/core/v1" +) + +// This is meant for testing +func NewMinimalVMI(name string) *v1.VirtualMachineInstance { + return NewMinimalVMIWithNS(k8sv1.NamespaceDefault, name) +} + +// This is meant for testing +func NewMinimalVMIWithNS(namespace, name string) *v1.VirtualMachineInstance { + vmi := v1.NewVMIReferenceFromNameWithNS(namespace, name) + vmi.Spec = v1.VirtualMachineInstanceSpec{Domain: v1.DomainSpec{}} + vmi.Spec.Domain.Resources.Requests = k8sv1.ResourceList{ + k8sv1.ResourceMemory: resource.MustParse("8192Ki"), + } + vmi.TypeMeta = k8smetav1.TypeMeta{ + APIVersion: v1.GroupVersion.String(), + Kind: "VirtualMachineInstance", + } + return vmi +} diff --git a/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/BUILD.bazel b/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/BUILD.bazel new file mode 100644 index 000000000000..8af4f32c5fdc --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/BUILD.bazel @@ -0,0 +1,18 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = [ + "clientset.go", + "doc.go", + ], + importpath = "kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned", + visibility = ["//visibility:public"], + deps = [ + "//staging/src/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/core/v1beta1:go_default_library", + "//staging/src/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/upload/v1beta1:go_default_library", + "//vendor/k8s.io/client-go/discovery:go_default_library", + "//vendor/k8s.io/client-go/rest:go_default_library", + "//vendor/k8s.io/client-go/util/flowcontrol:go_default_library", + ], +) diff --git a/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/clientset.go b/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/clientset.go new file mode 100644 index 000000000000..70cd81901daf --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/clientset.go @@ -0,0 +1,112 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package versioned + +import ( + "fmt" + + discovery "k8s.io/client-go/discovery" + rest "k8s.io/client-go/rest" + flowcontrol "k8s.io/client-go/util/flowcontrol" + + cdiv1beta1 "kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/core/v1beta1" + uploadv1beta1 "kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/upload/v1beta1" +) + +type Interface interface { + Discovery() discovery.DiscoveryInterface + CdiV1beta1() cdiv1beta1.CdiV1beta1Interface + UploadV1beta1() uploadv1beta1.UploadV1beta1Interface +} + +// Clientset contains the clients for groups. Each group has exactly one +// version included in a Clientset. +type Clientset struct { + *discovery.DiscoveryClient + cdiV1beta1 *cdiv1beta1.CdiV1beta1Client + uploadV1beta1 *uploadv1beta1.UploadV1beta1Client +} + +// CdiV1beta1 retrieves the CdiV1beta1Client +func (c *Clientset) CdiV1beta1() cdiv1beta1.CdiV1beta1Interface { + return c.cdiV1beta1 +} + +// UploadV1beta1 retrieves the UploadV1beta1Client +func (c *Clientset) UploadV1beta1() uploadv1beta1.UploadV1beta1Interface { + return c.uploadV1beta1 +} + +// Discovery retrieves the DiscoveryClient +func (c *Clientset) Discovery() discovery.DiscoveryInterface { + if c == nil { + return nil + } + return c.DiscoveryClient +} + +// NewForConfig creates a new Clientset for the given config. +// If config's RateLimiter is not set and QPS and Burst are acceptable, +// NewForConfig will generate a rate-limiter in configShallowCopy. +func NewForConfig(c *rest.Config) (*Clientset, error) { + configShallowCopy := *c + if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 { + if configShallowCopy.Burst <= 0 { + return nil, fmt.Errorf("burst is required to be greater than 0 when RateLimiter is not set and QPS is set to greater than 0") + } + configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst) + } + var cs Clientset + var err error + cs.cdiV1beta1, err = cdiv1beta1.NewForConfig(&configShallowCopy) + if err != nil { + return nil, err + } + cs.uploadV1beta1, err = uploadv1beta1.NewForConfig(&configShallowCopy) + if err != nil { + return nil, err + } + + cs.DiscoveryClient, err = discovery.NewDiscoveryClientForConfig(&configShallowCopy) + if err != nil { + return nil, err + } + return &cs, nil +} + +// NewForConfigOrDie creates a new Clientset for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *Clientset { + var cs Clientset + cs.cdiV1beta1 = cdiv1beta1.NewForConfigOrDie(c) + cs.uploadV1beta1 = uploadv1beta1.NewForConfigOrDie(c) + + cs.DiscoveryClient = discovery.NewDiscoveryClientForConfigOrDie(c) + return &cs +} + +// New creates a new Clientset for the given RESTClient. +func New(c rest.Interface) *Clientset { + var cs Clientset + cs.cdiV1beta1 = cdiv1beta1.New(c) + cs.uploadV1beta1 = uploadv1beta1.New(c) + + cs.DiscoveryClient = discovery.NewDiscoveryClient(c) + return &cs +} diff --git a/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/doc.go b/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/doc.go new file mode 100644 index 000000000000..755a91d8b8a1 --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +// This package has the automatically generated clientset. +package versioned diff --git a/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/fake/BUILD.bazel b/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/fake/BUILD.bazel new file mode 100644 index 000000000000..cb42cb454818 --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/fake/BUILD.bazel @@ -0,0 +1,30 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = [ + "clientset_generated.go", + "doc.go", + "register.go", + ], + importpath = "kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/fake", + visibility = ["//visibility:public"], + deps = [ + "//staging/src/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned:go_default_library", + "//staging/src/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/core/v1beta1:go_default_library", + "//staging/src/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/core/v1beta1/fake:go_default_library", + "//staging/src/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/upload/v1beta1:go_default_library", + "//staging/src/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/upload/v1beta1/fake:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/util/runtime:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", + "//vendor/k8s.io/client-go/discovery:go_default_library", + "//vendor/k8s.io/client-go/discovery/fake:go_default_library", + "//vendor/k8s.io/client-go/testing:go_default_library", + "//vendor/kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1:go_default_library", + "//vendor/kubevirt.io/containerized-data-importer-api/pkg/apis/upload/v1beta1:go_default_library", + ], +) diff --git a/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/fake/clientset_generated.go b/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/fake/clientset_generated.go new file mode 100644 index 000000000000..3129efb50d85 --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/fake/clientset_generated.go @@ -0,0 +1,90 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/watch" + "k8s.io/client-go/discovery" + fakediscovery "k8s.io/client-go/discovery/fake" + "k8s.io/client-go/testing" + + clientset "kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned" + cdiv1beta1 "kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/core/v1beta1" + fakecdiv1beta1 "kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/core/v1beta1/fake" + uploadv1beta1 "kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/upload/v1beta1" + fakeuploadv1beta1 "kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/upload/v1beta1/fake" +) + +// NewSimpleClientset returns a clientset that will respond with the provided objects. +// It's backed by a very simple object tracker that processes creates, updates and deletions as-is, +// without applying any validations and/or defaults. It shouldn't be considered a replacement +// for a real clientset and is mostly useful in simple unit tests. +func NewSimpleClientset(objects ...runtime.Object) *Clientset { + o := testing.NewObjectTracker(scheme, codecs.UniversalDecoder()) + for _, obj := range objects { + if err := o.Add(obj); err != nil { + panic(err) + } + } + + cs := &Clientset{tracker: o} + cs.discovery = &fakediscovery.FakeDiscovery{Fake: &cs.Fake} + cs.AddReactor("*", "*", testing.ObjectReaction(o)) + cs.AddWatchReactor("*", func(action testing.Action) (handled bool, ret watch.Interface, err error) { + gvr := action.GetResource() + ns := action.GetNamespace() + watch, err := o.Watch(gvr, ns) + if err != nil { + return false, nil, err + } + return true, watch, nil + }) + + return cs +} + +// Clientset implements clientset.Interface. Meant to be embedded into a +// struct to get a default implementation. This makes faking out just the method +// you want to test easier. +type Clientset struct { + testing.Fake + discovery *fakediscovery.FakeDiscovery + tracker testing.ObjectTracker +} + +func (c *Clientset) Discovery() discovery.DiscoveryInterface { + return c.discovery +} + +func (c *Clientset) Tracker() testing.ObjectTracker { + return c.tracker +} + +var _ clientset.Interface = &Clientset{} + +// CdiV1beta1 retrieves the CdiV1beta1Client +func (c *Clientset) CdiV1beta1() cdiv1beta1.CdiV1beta1Interface { + return &fakecdiv1beta1.FakeCdiV1beta1{Fake: &c.Fake} +} + +// UploadV1beta1 retrieves the UploadV1beta1Client +func (c *Clientset) UploadV1beta1() uploadv1beta1.UploadV1beta1Interface { + return &fakeuploadv1beta1.FakeUploadV1beta1{Fake: &c.Fake} +} diff --git a/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/fake/doc.go b/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/fake/doc.go new file mode 100644 index 000000000000..303a21d3b1dc --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/fake/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +// This package has the automatically generated fake clientset. +package fake diff --git a/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/fake/register.go b/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/fake/register.go new file mode 100644 index 000000000000..80451463b771 --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/fake/register.go @@ -0,0 +1,59 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + schema "k8s.io/apimachinery/pkg/runtime/schema" + serializer "k8s.io/apimachinery/pkg/runtime/serializer" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" + + cdiv1beta1 "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1" + uploadv1beta1 "kubevirt.io/containerized-data-importer-api/pkg/apis/upload/v1beta1" +) + +var scheme = runtime.NewScheme() +var codecs = serializer.NewCodecFactory(scheme) + +var localSchemeBuilder = runtime.SchemeBuilder{ + cdiv1beta1.AddToScheme, + uploadv1beta1.AddToScheme, +} + +// AddToScheme adds all types of this clientset into the given scheme. This allows composition +// of clientsets, like in: +// +// import ( +// "k8s.io/client-go/kubernetes" +// clientsetscheme "k8s.io/client-go/kubernetes/scheme" +// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" +// ) +// +// kclientset, _ := kubernetes.NewForConfig(c) +// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) +// +// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types +// correctly. +var AddToScheme = localSchemeBuilder.AddToScheme + +func init() { + v1.AddToGroupVersion(scheme, schema.GroupVersion{Version: "v1"}) + utilruntime.Must(AddToScheme(scheme)) +} diff --git a/vendor/k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme/BUILD.bazel b/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/scheme/BUILD.bazel similarity index 60% rename from vendor/k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme/BUILD.bazel rename to vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/scheme/BUILD.bazel index edf05b560b0a..43e10a562e1c 100644 --- a/vendor/k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme/BUILD.bazel +++ b/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/scheme/BUILD.bazel @@ -6,8 +6,7 @@ go_library( "doc.go", "register.go", ], - importmap = "kubevirt.io/kubevirt/vendor/k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme", - importpath = "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme", + importpath = "kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/scheme", visibility = ["//visibility:public"], deps = [ "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", @@ -15,7 +14,7 @@ go_library( "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", "//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", "//vendor/k8s.io/apimachinery/pkg/util/runtime:go_default_library", - "//vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/v1:go_default_library", - "//vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1:go_default_library", + "//vendor/kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1:go_default_library", + "//vendor/kubevirt.io/containerized-data-importer-api/pkg/apis/upload/v1beta1:go_default_library", ], ) diff --git a/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/scheme/doc.go b/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/scheme/doc.go new file mode 100644 index 000000000000..e6c48e24db86 --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/scheme/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +// This package contains the scheme of the automatically generated clientset. +package scheme diff --git a/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/scheme/register.go b/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/scheme/register.go new file mode 100644 index 000000000000..981a95bbffa4 --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/scheme/register.go @@ -0,0 +1,59 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package scheme + +import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + schema "k8s.io/apimachinery/pkg/runtime/schema" + serializer "k8s.io/apimachinery/pkg/runtime/serializer" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" + + cdiv1beta1 "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1" + uploadv1beta1 "kubevirt.io/containerized-data-importer-api/pkg/apis/upload/v1beta1" +) + +var Scheme = runtime.NewScheme() +var Codecs = serializer.NewCodecFactory(Scheme) +var ParameterCodec = runtime.NewParameterCodec(Scheme) +var localSchemeBuilder = runtime.SchemeBuilder{ + cdiv1beta1.AddToScheme, + uploadv1beta1.AddToScheme, +} + +// AddToScheme adds all types of this clientset into the given scheme. This allows composition +// of clientsets, like in: +// +// import ( +// "k8s.io/client-go/kubernetes" +// clientsetscheme "k8s.io/client-go/kubernetes/scheme" +// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" +// ) +// +// kclientset, _ := kubernetes.NewForConfig(c) +// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) +// +// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types +// correctly. +var AddToScheme = localSchemeBuilder.AddToScheme + +func init() { + v1.AddToGroupVersion(Scheme, schema.GroupVersion{Version: "v1"}) + utilruntime.Must(AddToScheme(Scheme)) +} diff --git a/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/core/v1beta1/BUILD.bazel b/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/core/v1beta1/BUILD.bazel new file mode 100644 index 000000000000..87d9d553b0b7 --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/core/v1beta1/BUILD.bazel @@ -0,0 +1,27 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = [ + "cdi.go", + "cdiconfig.go", + "core_client.go", + "dataimportcron.go", + "datasource.go", + "datavolume.go", + "doc.go", + "generated_expansion.go", + "objecttransfer.go", + "storageprofile.go", + ], + importpath = "kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/core/v1beta1", + visibility = ["//visibility:public"], + deps = [ + "//staging/src/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/scheme:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", + "//vendor/k8s.io/client-go/rest:go_default_library", + "//vendor/kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1:go_default_library", + ], +) diff --git a/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/core/v1beta1/cdi.go b/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/core/v1beta1/cdi.go new file mode 100644 index 000000000000..f760ce95cd54 --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/core/v1beta1/cdi.go @@ -0,0 +1,185 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1beta1 + +import ( + "context" + "time" + + 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" + + scheme "kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/scheme" + v1beta1 "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1" +) + +// CDIsGetter has a method to return a CDIInterface. +// A group's client should implement this interface. +type CDIsGetter interface { + CDIs() CDIInterface +} + +// CDIInterface has methods to work with CDI resources. +type CDIInterface interface { + Create(ctx context.Context, cDI *v1beta1.CDI, opts v1.CreateOptions) (*v1beta1.CDI, error) + Update(ctx context.Context, cDI *v1beta1.CDI, opts v1.UpdateOptions) (*v1beta1.CDI, error) + UpdateStatus(ctx context.Context, cDI *v1beta1.CDI, opts v1.UpdateOptions) (*v1beta1.CDI, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.CDI, error) + List(ctx context.Context, opts v1.ListOptions) (*v1beta1.CDIList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.CDI, err error) + CDIExpansion +} + +// cDIs implements CDIInterface +type cDIs struct { + client rest.Interface +} + +// newCDIs returns a CDIs +func newCDIs(c *CdiV1beta1Client) *cDIs { + return &cDIs{ + client: c.RESTClient(), + } +} + +// Get takes name of the cDI, and returns the corresponding cDI object, and an error if there is any. +func (c *cDIs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.CDI, err error) { + result = &v1beta1.CDI{} + err = c.client.Get(). + Resource("cdis"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of CDIs that match those selectors. +func (c *cDIs) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.CDIList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1beta1.CDIList{} + err = c.client.Get(). + Resource("cdis"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested cDIs. +func (c *cDIs) Watch(ctx context.Context, 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("cdis"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a cDI and creates it. Returns the server's representation of the cDI, and an error, if there is any. +func (c *cDIs) Create(ctx context.Context, cDI *v1beta1.CDI, opts v1.CreateOptions) (result *v1beta1.CDI, err error) { + result = &v1beta1.CDI{} + err = c.client.Post(). + Resource("cdis"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(cDI). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a cDI and updates it. Returns the server's representation of the cDI, and an error, if there is any. +func (c *cDIs) Update(ctx context.Context, cDI *v1beta1.CDI, opts v1.UpdateOptions) (result *v1beta1.CDI, err error) { + result = &v1beta1.CDI{} + err = c.client.Put(). + Resource("cdis"). + Name(cDI.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(cDI). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *cDIs) UpdateStatus(ctx context.Context, cDI *v1beta1.CDI, opts v1.UpdateOptions) (result *v1beta1.CDI, err error) { + result = &v1beta1.CDI{} + err = c.client.Put(). + Resource("cdis"). + Name(cDI.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(cDI). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the cDI and deletes it. Returns an error if one occurs. +func (c *cDIs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + return c.client.Delete(). + Resource("cdis"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *cDIs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Resource("cdis"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched cDI. +func (c *cDIs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.CDI, err error) { + result = &v1beta1.CDI{} + err = c.client.Patch(pt). + Resource("cdis"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/core/v1beta1/cdiconfig.go b/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/core/v1beta1/cdiconfig.go new file mode 100644 index 000000000000..e3585dceff5e --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/core/v1beta1/cdiconfig.go @@ -0,0 +1,185 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1beta1 + +import ( + "context" + "time" + + 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" + + scheme "kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/scheme" + v1beta1 "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1" +) + +// CDIConfigsGetter has a method to return a CDIConfigInterface. +// A group's client should implement this interface. +type CDIConfigsGetter interface { + CDIConfigs() CDIConfigInterface +} + +// CDIConfigInterface has methods to work with CDIConfig resources. +type CDIConfigInterface interface { + Create(ctx context.Context, cDIConfig *v1beta1.CDIConfig, opts v1.CreateOptions) (*v1beta1.CDIConfig, error) + Update(ctx context.Context, cDIConfig *v1beta1.CDIConfig, opts v1.UpdateOptions) (*v1beta1.CDIConfig, error) + UpdateStatus(ctx context.Context, cDIConfig *v1beta1.CDIConfig, opts v1.UpdateOptions) (*v1beta1.CDIConfig, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.CDIConfig, error) + List(ctx context.Context, opts v1.ListOptions) (*v1beta1.CDIConfigList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.CDIConfig, err error) + CDIConfigExpansion +} + +// cDIConfigs implements CDIConfigInterface +type cDIConfigs struct { + client rest.Interface +} + +// newCDIConfigs returns a CDIConfigs +func newCDIConfigs(c *CdiV1beta1Client) *cDIConfigs { + return &cDIConfigs{ + client: c.RESTClient(), + } +} + +// Get takes name of the cDIConfig, and returns the corresponding cDIConfig object, and an error if there is any. +func (c *cDIConfigs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.CDIConfig, err error) { + result = &v1beta1.CDIConfig{} + err = c.client.Get(). + Resource("cdiconfigs"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of CDIConfigs that match those selectors. +func (c *cDIConfigs) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.CDIConfigList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1beta1.CDIConfigList{} + err = c.client.Get(). + Resource("cdiconfigs"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested cDIConfigs. +func (c *cDIConfigs) Watch(ctx context.Context, 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("cdiconfigs"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a cDIConfig and creates it. Returns the server's representation of the cDIConfig, and an error, if there is any. +func (c *cDIConfigs) Create(ctx context.Context, cDIConfig *v1beta1.CDIConfig, opts v1.CreateOptions) (result *v1beta1.CDIConfig, err error) { + result = &v1beta1.CDIConfig{} + err = c.client.Post(). + Resource("cdiconfigs"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(cDIConfig). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a cDIConfig and updates it. Returns the server's representation of the cDIConfig, and an error, if there is any. +func (c *cDIConfigs) Update(ctx context.Context, cDIConfig *v1beta1.CDIConfig, opts v1.UpdateOptions) (result *v1beta1.CDIConfig, err error) { + result = &v1beta1.CDIConfig{} + err = c.client.Put(). + Resource("cdiconfigs"). + Name(cDIConfig.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(cDIConfig). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *cDIConfigs) UpdateStatus(ctx context.Context, cDIConfig *v1beta1.CDIConfig, opts v1.UpdateOptions) (result *v1beta1.CDIConfig, err error) { + result = &v1beta1.CDIConfig{} + err = c.client.Put(). + Resource("cdiconfigs"). + Name(cDIConfig.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(cDIConfig). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the cDIConfig and deletes it. Returns an error if one occurs. +func (c *cDIConfigs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + return c.client.Delete(). + Resource("cdiconfigs"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *cDIConfigs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Resource("cdiconfigs"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched cDIConfig. +func (c *cDIConfigs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.CDIConfig, err error) { + result = &v1beta1.CDIConfig{} + err = c.client.Patch(pt). + Resource("cdiconfigs"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/core/v1beta1/core_client.go b/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/core/v1beta1/core_client.go new file mode 100644 index 000000000000..f6bfdbf92ab1 --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/core/v1beta1/core_client.go @@ -0,0 +1,120 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1beta1 + +import ( + rest "k8s.io/client-go/rest" + + "kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/scheme" + v1beta1 "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1" +) + +type CdiV1beta1Interface interface { + RESTClient() rest.Interface + CDIsGetter + CDIConfigsGetter + DataImportCronsGetter + DataSourcesGetter + DataVolumesGetter + ObjectTransfersGetter + StorageProfilesGetter +} + +// CdiV1beta1Client is used to interact with features provided by the cdi.kubevirt.io group. +type CdiV1beta1Client struct { + restClient rest.Interface +} + +func (c *CdiV1beta1Client) CDIs() CDIInterface { + return newCDIs(c) +} + +func (c *CdiV1beta1Client) CDIConfigs() CDIConfigInterface { + return newCDIConfigs(c) +} + +func (c *CdiV1beta1Client) DataImportCrons(namespace string) DataImportCronInterface { + return newDataImportCrons(c, namespace) +} + +func (c *CdiV1beta1Client) DataSources(namespace string) DataSourceInterface { + return newDataSources(c, namespace) +} + +func (c *CdiV1beta1Client) DataVolumes(namespace string) DataVolumeInterface { + return newDataVolumes(c, namespace) +} + +func (c *CdiV1beta1Client) ObjectTransfers() ObjectTransferInterface { + return newObjectTransfers(c) +} + +func (c *CdiV1beta1Client) StorageProfiles() StorageProfileInterface { + return newStorageProfiles(c) +} + +// NewForConfig creates a new CdiV1beta1Client for the given config. +func NewForConfig(c *rest.Config) (*CdiV1beta1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + client, err := rest.RESTClientFor(&config) + if err != nil { + return nil, err + } + return &CdiV1beta1Client{client}, nil +} + +// NewForConfigOrDie creates a new CdiV1beta1Client for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *CdiV1beta1Client { + client, err := NewForConfig(c) + if err != nil { + panic(err) + } + return client +} + +// New creates a new CdiV1beta1Client for the given RESTClient. +func New(c rest.Interface) *CdiV1beta1Client { + return &CdiV1beta1Client{c} +} + +func setConfigDefaults(config *rest.Config) error { + gv := v1beta1.SchemeGroupVersion + config.GroupVersion = &gv + config.APIPath = "/apis" + config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() + + 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 *CdiV1beta1Client) RESTClient() rest.Interface { + if c == nil { + return nil + } + return c.restClient +} diff --git a/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/core/v1beta1/dataimportcron.go b/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/core/v1beta1/dataimportcron.go new file mode 100644 index 000000000000..779e4d726495 --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/core/v1beta1/dataimportcron.go @@ -0,0 +1,196 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1beta1 + +import ( + "context" + "time" + + 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" + + scheme "kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/scheme" + v1beta1 "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1" +) + +// DataImportCronsGetter has a method to return a DataImportCronInterface. +// A group's client should implement this interface. +type DataImportCronsGetter interface { + DataImportCrons(namespace string) DataImportCronInterface +} + +// DataImportCronInterface has methods to work with DataImportCron resources. +type DataImportCronInterface interface { + Create(ctx context.Context, dataImportCron *v1beta1.DataImportCron, opts v1.CreateOptions) (*v1beta1.DataImportCron, error) + Update(ctx context.Context, dataImportCron *v1beta1.DataImportCron, opts v1.UpdateOptions) (*v1beta1.DataImportCron, error) + UpdateStatus(ctx context.Context, dataImportCron *v1beta1.DataImportCron, opts v1.UpdateOptions) (*v1beta1.DataImportCron, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.DataImportCron, error) + List(ctx context.Context, opts v1.ListOptions) (*v1beta1.DataImportCronList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.DataImportCron, err error) + DataImportCronExpansion +} + +// dataImportCrons implements DataImportCronInterface +type dataImportCrons struct { + client rest.Interface + ns string +} + +// newDataImportCrons returns a DataImportCrons +func newDataImportCrons(c *CdiV1beta1Client, namespace string) *dataImportCrons { + return &dataImportCrons{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Get takes name of the dataImportCron, and returns the corresponding dataImportCron object, and an error if there is any. +func (c *dataImportCrons) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.DataImportCron, err error) { + result = &v1beta1.DataImportCron{} + err = c.client.Get(). + Namespace(c.ns). + Resource("dataimportcrons"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of DataImportCrons that match those selectors. +func (c *dataImportCrons) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.DataImportCronList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1beta1.DataImportCronList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("dataimportcrons"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested dataImportCrons. +func (c *dataImportCrons) Watch(ctx context.Context, 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(). + Namespace(c.ns). + Resource("dataimportcrons"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a dataImportCron and creates it. Returns the server's representation of the dataImportCron, and an error, if there is any. +func (c *dataImportCrons) Create(ctx context.Context, dataImportCron *v1beta1.DataImportCron, opts v1.CreateOptions) (result *v1beta1.DataImportCron, err error) { + result = &v1beta1.DataImportCron{} + err = c.client.Post(). + Namespace(c.ns). + Resource("dataimportcrons"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(dataImportCron). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a dataImportCron and updates it. Returns the server's representation of the dataImportCron, and an error, if there is any. +func (c *dataImportCrons) Update(ctx context.Context, dataImportCron *v1beta1.DataImportCron, opts v1.UpdateOptions) (result *v1beta1.DataImportCron, err error) { + result = &v1beta1.DataImportCron{} + err = c.client.Put(). + Namespace(c.ns). + Resource("dataimportcrons"). + Name(dataImportCron.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(dataImportCron). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *dataImportCrons) UpdateStatus(ctx context.Context, dataImportCron *v1beta1.DataImportCron, opts v1.UpdateOptions) (result *v1beta1.DataImportCron, err error) { + result = &v1beta1.DataImportCron{} + err = c.client.Put(). + Namespace(c.ns). + Resource("dataimportcrons"). + Name(dataImportCron.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(dataImportCron). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the dataImportCron and deletes it. Returns an error if one occurs. +func (c *dataImportCrons) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("dataimportcrons"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *dataImportCrons) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Namespace(c.ns). + Resource("dataimportcrons"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched dataImportCron. +func (c *dataImportCrons) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.DataImportCron, err error) { + result = &v1beta1.DataImportCron{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("dataimportcrons"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/core/v1beta1/datasource.go b/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/core/v1beta1/datasource.go new file mode 100644 index 000000000000..5ec2fd5ad392 --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/core/v1beta1/datasource.go @@ -0,0 +1,196 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1beta1 + +import ( + "context" + "time" + + 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" + + scheme "kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/scheme" + v1beta1 "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1" +) + +// DataSourcesGetter has a method to return a DataSourceInterface. +// A group's client should implement this interface. +type DataSourcesGetter interface { + DataSources(namespace string) DataSourceInterface +} + +// DataSourceInterface has methods to work with DataSource resources. +type DataSourceInterface interface { + Create(ctx context.Context, dataSource *v1beta1.DataSource, opts v1.CreateOptions) (*v1beta1.DataSource, error) + Update(ctx context.Context, dataSource *v1beta1.DataSource, opts v1.UpdateOptions) (*v1beta1.DataSource, error) + UpdateStatus(ctx context.Context, dataSource *v1beta1.DataSource, opts v1.UpdateOptions) (*v1beta1.DataSource, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.DataSource, error) + List(ctx context.Context, opts v1.ListOptions) (*v1beta1.DataSourceList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.DataSource, err error) + DataSourceExpansion +} + +// dataSources implements DataSourceInterface +type dataSources struct { + client rest.Interface + ns string +} + +// newDataSources returns a DataSources +func newDataSources(c *CdiV1beta1Client, namespace string) *dataSources { + return &dataSources{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Get takes name of the dataSource, and returns the corresponding dataSource object, and an error if there is any. +func (c *dataSources) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.DataSource, err error) { + result = &v1beta1.DataSource{} + err = c.client.Get(). + Namespace(c.ns). + Resource("datasources"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of DataSources that match those selectors. +func (c *dataSources) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.DataSourceList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1beta1.DataSourceList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("datasources"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested dataSources. +func (c *dataSources) Watch(ctx context.Context, 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(). + Namespace(c.ns). + Resource("datasources"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a dataSource and creates it. Returns the server's representation of the dataSource, and an error, if there is any. +func (c *dataSources) Create(ctx context.Context, dataSource *v1beta1.DataSource, opts v1.CreateOptions) (result *v1beta1.DataSource, err error) { + result = &v1beta1.DataSource{} + err = c.client.Post(). + Namespace(c.ns). + Resource("datasources"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(dataSource). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a dataSource and updates it. Returns the server's representation of the dataSource, and an error, if there is any. +func (c *dataSources) Update(ctx context.Context, dataSource *v1beta1.DataSource, opts v1.UpdateOptions) (result *v1beta1.DataSource, err error) { + result = &v1beta1.DataSource{} + err = c.client.Put(). + Namespace(c.ns). + Resource("datasources"). + Name(dataSource.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(dataSource). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *dataSources) UpdateStatus(ctx context.Context, dataSource *v1beta1.DataSource, opts v1.UpdateOptions) (result *v1beta1.DataSource, err error) { + result = &v1beta1.DataSource{} + err = c.client.Put(). + Namespace(c.ns). + Resource("datasources"). + Name(dataSource.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(dataSource). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the dataSource and deletes it. Returns an error if one occurs. +func (c *dataSources) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("datasources"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *dataSources) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Namespace(c.ns). + Resource("datasources"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched dataSource. +func (c *dataSources) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.DataSource, err error) { + result = &v1beta1.DataSource{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("datasources"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/core/v1beta1/datavolume.go b/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/core/v1beta1/datavolume.go new file mode 100644 index 000000000000..71045b6a2cb1 --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/core/v1beta1/datavolume.go @@ -0,0 +1,196 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1beta1 + +import ( + "context" + "time" + + 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" + + scheme "kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/scheme" + v1beta1 "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1" +) + +// DataVolumesGetter has a method to return a DataVolumeInterface. +// A group's client should implement this interface. +type DataVolumesGetter interface { + DataVolumes(namespace string) DataVolumeInterface +} + +// DataVolumeInterface has methods to work with DataVolume resources. +type DataVolumeInterface interface { + Create(ctx context.Context, dataVolume *v1beta1.DataVolume, opts v1.CreateOptions) (*v1beta1.DataVolume, error) + Update(ctx context.Context, dataVolume *v1beta1.DataVolume, opts v1.UpdateOptions) (*v1beta1.DataVolume, error) + UpdateStatus(ctx context.Context, dataVolume *v1beta1.DataVolume, opts v1.UpdateOptions) (*v1beta1.DataVolume, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.DataVolume, error) + List(ctx context.Context, opts v1.ListOptions) (*v1beta1.DataVolumeList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.DataVolume, err error) + DataVolumeExpansion +} + +// dataVolumes implements DataVolumeInterface +type dataVolumes struct { + client rest.Interface + ns string +} + +// newDataVolumes returns a DataVolumes +func newDataVolumes(c *CdiV1beta1Client, namespace string) *dataVolumes { + return &dataVolumes{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Get takes name of the dataVolume, and returns the corresponding dataVolume object, and an error if there is any. +func (c *dataVolumes) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.DataVolume, err error) { + result = &v1beta1.DataVolume{} + err = c.client.Get(). + Namespace(c.ns). + Resource("datavolumes"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of DataVolumes that match those selectors. +func (c *dataVolumes) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.DataVolumeList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1beta1.DataVolumeList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("datavolumes"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested dataVolumes. +func (c *dataVolumes) Watch(ctx context.Context, 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(). + Namespace(c.ns). + Resource("datavolumes"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a dataVolume and creates it. Returns the server's representation of the dataVolume, and an error, if there is any. +func (c *dataVolumes) Create(ctx context.Context, dataVolume *v1beta1.DataVolume, opts v1.CreateOptions) (result *v1beta1.DataVolume, err error) { + result = &v1beta1.DataVolume{} + err = c.client.Post(). + Namespace(c.ns). + Resource("datavolumes"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(dataVolume). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a dataVolume and updates it. Returns the server's representation of the dataVolume, and an error, if there is any. +func (c *dataVolumes) Update(ctx context.Context, dataVolume *v1beta1.DataVolume, opts v1.UpdateOptions) (result *v1beta1.DataVolume, err error) { + result = &v1beta1.DataVolume{} + err = c.client.Put(). + Namespace(c.ns). + Resource("datavolumes"). + Name(dataVolume.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(dataVolume). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *dataVolumes) UpdateStatus(ctx context.Context, dataVolume *v1beta1.DataVolume, opts v1.UpdateOptions) (result *v1beta1.DataVolume, err error) { + result = &v1beta1.DataVolume{} + err = c.client.Put(). + Namespace(c.ns). + Resource("datavolumes"). + Name(dataVolume.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(dataVolume). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the dataVolume and deletes it. Returns an error if one occurs. +func (c *dataVolumes) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("datavolumes"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *dataVolumes) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Namespace(c.ns). + Resource("datavolumes"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched dataVolume. +func (c *dataVolumes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.DataVolume, err error) { + result = &v1beta1.DataVolume{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("datavolumes"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/core/v1beta1/doc.go b/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/core/v1beta1/doc.go new file mode 100644 index 000000000000..4326722ede1a --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/core/v1beta1/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +// This package has the automatically generated typed clients. +package v1beta1 diff --git a/vendor/k8s.io/client-go/kubernetes/typed/scheduling/v1beta1/fake/BUILD.bazel b/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/core/v1beta1/fake/BUILD.bazel similarity index 55% rename from vendor/k8s.io/client-go/kubernetes/typed/scheduling/v1beta1/fake/BUILD.bazel rename to vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/core/v1beta1/fake/BUILD.bazel index 820ee289143c..bb7705e9f08c 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/scheduling/v1beta1/fake/BUILD.bazel +++ b/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/core/v1beta1/fake/BUILD.bazel @@ -4,22 +4,26 @@ go_library( name = "go_default_library", srcs = [ "doc.go", - "fake_priorityclass.go", - "fake_scheduling_client.go", + "fake_cdi.go", + "fake_cdiconfig.go", + "fake_core_client.go", + "fake_dataimportcron.go", + "fake_datasource.go", + "fake_datavolume.go", + "fake_objecttransfer.go", + "fake_storageprofile.go", ], - importmap = "kubevirt.io/kubevirt/vendor/k8s.io/client-go/kubernetes/typed/scheduling/v1beta1/fake", - importpath = "k8s.io/client-go/kubernetes/typed/scheduling/v1beta1/fake", + importpath = "kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/core/v1beta1/fake", visibility = ["//visibility:public"], deps = [ - "//vendor/k8s.io/api/scheduling/v1beta1:go_default_library", + "//staging/src/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/core/v1beta1:go_default_library", "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/applyconfigurations/scheduling/v1beta1:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/scheduling/v1beta1:go_default_library", "//vendor/k8s.io/client-go/rest:go_default_library", "//vendor/k8s.io/client-go/testing:go_default_library", + "//vendor/kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1:go_default_library", ], ) diff --git a/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/core/v1beta1/fake/doc.go b/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/core/v1beta1/fake/doc.go new file mode 100644 index 000000000000..853f43b09c4e --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/core/v1beta1/fake/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +// Package fake has the automatically generated clients. +package fake diff --git a/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/core/v1beta1/fake/fake_cdi.go b/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/core/v1beta1/fake/fake_cdi.go new file mode 100644 index 000000000000..c9495f993242 --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/core/v1beta1/fake/fake_cdi.go @@ -0,0 +1,134 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + + 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" + + v1beta1 "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1" +) + +// FakeCDIs implements CDIInterface +type FakeCDIs struct { + Fake *FakeCdiV1beta1 +} + +var cdisResource = schema.GroupVersionResource{Group: "cdi.kubevirt.io", Version: "v1beta1", Resource: "cdis"} + +var cdisKind = schema.GroupVersionKind{Group: "cdi.kubevirt.io", Version: "v1beta1", Kind: "CDI"} + +// Get takes name of the cDI, and returns the corresponding cDI object, and an error if there is any. +func (c *FakeCDIs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.CDI, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootGetAction(cdisResource, name), &v1beta1.CDI{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.CDI), err +} + +// List takes label and field selectors, and returns the list of CDIs that match those selectors. +func (c *FakeCDIs) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.CDIList, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootListAction(cdisResource, cdisKind, opts), &v1beta1.CDIList{}) + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1beta1.CDIList{ListMeta: obj.(*v1beta1.CDIList).ListMeta} + for _, item := range obj.(*v1beta1.CDIList).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 cDIs. +func (c *FakeCDIs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewRootWatchAction(cdisResource, opts)) +} + +// Create takes the representation of a cDI and creates it. Returns the server's representation of the cDI, and an error, if there is any. +func (c *FakeCDIs) Create(ctx context.Context, cDI *v1beta1.CDI, opts v1.CreateOptions) (result *v1beta1.CDI, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootCreateAction(cdisResource, cDI), &v1beta1.CDI{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.CDI), err +} + +// Update takes the representation of a cDI and updates it. Returns the server's representation of the cDI, and an error, if there is any. +func (c *FakeCDIs) Update(ctx context.Context, cDI *v1beta1.CDI, opts v1.UpdateOptions) (result *v1beta1.CDI, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateAction(cdisResource, cDI), &v1beta1.CDI{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.CDI), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeCDIs) UpdateStatus(ctx context.Context, cDI *v1beta1.CDI, opts v1.UpdateOptions) (*v1beta1.CDI, error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateSubresourceAction(cdisResource, "status", cDI), &v1beta1.CDI{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.CDI), err +} + +// Delete takes name of the cDI and deletes it. Returns an error if one occurs. +func (c *FakeCDIs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewRootDeleteAction(cdisResource, name), &v1beta1.CDI{}) + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeCDIs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(cdisResource, listOpts) + + _, err := c.Fake.Invokes(action, &v1beta1.CDIList{}) + return err +} + +// Patch applies the patch and returns the patched cDI. +func (c *FakeCDIs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.CDI, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(cdisResource, name, pt, data, subresources...), &v1beta1.CDI{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.CDI), err +} diff --git a/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/core/v1beta1/fake/fake_cdiconfig.go b/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/core/v1beta1/fake/fake_cdiconfig.go new file mode 100644 index 000000000000..8d5d837875a1 --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/core/v1beta1/fake/fake_cdiconfig.go @@ -0,0 +1,134 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + + 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" + + v1beta1 "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1" +) + +// FakeCDIConfigs implements CDIConfigInterface +type FakeCDIConfigs struct { + Fake *FakeCdiV1beta1 +} + +var cdiconfigsResource = schema.GroupVersionResource{Group: "cdi.kubevirt.io", Version: "v1beta1", Resource: "cdiconfigs"} + +var cdiconfigsKind = schema.GroupVersionKind{Group: "cdi.kubevirt.io", Version: "v1beta1", Kind: "CDIConfig"} + +// Get takes name of the cDIConfig, and returns the corresponding cDIConfig object, and an error if there is any. +func (c *FakeCDIConfigs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.CDIConfig, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootGetAction(cdiconfigsResource, name), &v1beta1.CDIConfig{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.CDIConfig), err +} + +// List takes label and field selectors, and returns the list of CDIConfigs that match those selectors. +func (c *FakeCDIConfigs) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.CDIConfigList, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootListAction(cdiconfigsResource, cdiconfigsKind, opts), &v1beta1.CDIConfigList{}) + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1beta1.CDIConfigList{ListMeta: obj.(*v1beta1.CDIConfigList).ListMeta} + for _, item := range obj.(*v1beta1.CDIConfigList).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 cDIConfigs. +func (c *FakeCDIConfigs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewRootWatchAction(cdiconfigsResource, opts)) +} + +// Create takes the representation of a cDIConfig and creates it. Returns the server's representation of the cDIConfig, and an error, if there is any. +func (c *FakeCDIConfigs) Create(ctx context.Context, cDIConfig *v1beta1.CDIConfig, opts v1.CreateOptions) (result *v1beta1.CDIConfig, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootCreateAction(cdiconfigsResource, cDIConfig), &v1beta1.CDIConfig{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.CDIConfig), err +} + +// Update takes the representation of a cDIConfig and updates it. Returns the server's representation of the cDIConfig, and an error, if there is any. +func (c *FakeCDIConfigs) Update(ctx context.Context, cDIConfig *v1beta1.CDIConfig, opts v1.UpdateOptions) (result *v1beta1.CDIConfig, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateAction(cdiconfigsResource, cDIConfig), &v1beta1.CDIConfig{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.CDIConfig), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeCDIConfigs) UpdateStatus(ctx context.Context, cDIConfig *v1beta1.CDIConfig, opts v1.UpdateOptions) (*v1beta1.CDIConfig, error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateSubresourceAction(cdiconfigsResource, "status", cDIConfig), &v1beta1.CDIConfig{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.CDIConfig), err +} + +// Delete takes name of the cDIConfig and deletes it. Returns an error if one occurs. +func (c *FakeCDIConfigs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewRootDeleteAction(cdiconfigsResource, name), &v1beta1.CDIConfig{}) + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeCDIConfigs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(cdiconfigsResource, listOpts) + + _, err := c.Fake.Invokes(action, &v1beta1.CDIConfigList{}) + return err +} + +// Patch applies the patch and returns the patched cDIConfig. +func (c *FakeCDIConfigs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.CDIConfig, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(cdiconfigsResource, name, pt, data, subresources...), &v1beta1.CDIConfig{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.CDIConfig), err +} diff --git a/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/core/v1beta1/fake/fake_core_client.go b/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/core/v1beta1/fake/fake_core_client.go new file mode 100644 index 000000000000..3b2a8a99f91d --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/core/v1beta1/fake/fake_core_client.go @@ -0,0 +1,65 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + rest "k8s.io/client-go/rest" + testing "k8s.io/client-go/testing" + + v1beta1 "kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/core/v1beta1" +) + +type FakeCdiV1beta1 struct { + *testing.Fake +} + +func (c *FakeCdiV1beta1) CDIs() v1beta1.CDIInterface { + return &FakeCDIs{c} +} + +func (c *FakeCdiV1beta1) CDIConfigs() v1beta1.CDIConfigInterface { + return &FakeCDIConfigs{c} +} + +func (c *FakeCdiV1beta1) DataImportCrons(namespace string) v1beta1.DataImportCronInterface { + return &FakeDataImportCrons{c, namespace} +} + +func (c *FakeCdiV1beta1) DataSources(namespace string) v1beta1.DataSourceInterface { + return &FakeDataSources{c, namespace} +} + +func (c *FakeCdiV1beta1) DataVolumes(namespace string) v1beta1.DataVolumeInterface { + return &FakeDataVolumes{c, namespace} +} + +func (c *FakeCdiV1beta1) ObjectTransfers() v1beta1.ObjectTransferInterface { + return &FakeObjectTransfers{c} +} + +func (c *FakeCdiV1beta1) StorageProfiles() v1beta1.StorageProfileInterface { + return &FakeStorageProfiles{c} +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *FakeCdiV1beta1) RESTClient() rest.Interface { + var ret *rest.RESTClient + return ret +} diff --git a/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/core/v1beta1/fake/fake_dataimportcron.go b/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/core/v1beta1/fake/fake_dataimportcron.go new file mode 100644 index 000000000000..3b50a7023cb6 --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/core/v1beta1/fake/fake_dataimportcron.go @@ -0,0 +1,143 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + + 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" + + v1beta1 "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1" +) + +// FakeDataImportCrons implements DataImportCronInterface +type FakeDataImportCrons struct { + Fake *FakeCdiV1beta1 + ns string +} + +var dataimportcronsResource = schema.GroupVersionResource{Group: "cdi.kubevirt.io", Version: "v1beta1", Resource: "dataimportcrons"} + +var dataimportcronsKind = schema.GroupVersionKind{Group: "cdi.kubevirt.io", Version: "v1beta1", Kind: "DataImportCron"} + +// Get takes name of the dataImportCron, and returns the corresponding dataImportCron object, and an error if there is any. +func (c *FakeDataImportCrons) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.DataImportCron, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(dataimportcronsResource, c.ns, name), &v1beta1.DataImportCron{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.DataImportCron), err +} + +// List takes label and field selectors, and returns the list of DataImportCrons that match those selectors. +func (c *FakeDataImportCrons) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.DataImportCronList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(dataimportcronsResource, dataimportcronsKind, c.ns, opts), &v1beta1.DataImportCronList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1beta1.DataImportCronList{ListMeta: obj.(*v1beta1.DataImportCronList).ListMeta} + for _, item := range obj.(*v1beta1.DataImportCronList).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 dataImportCrons. +func (c *FakeDataImportCrons) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(dataimportcronsResource, c.ns, opts)) + +} + +// Create takes the representation of a dataImportCron and creates it. Returns the server's representation of the dataImportCron, and an error, if there is any. +func (c *FakeDataImportCrons) Create(ctx context.Context, dataImportCron *v1beta1.DataImportCron, opts v1.CreateOptions) (result *v1beta1.DataImportCron, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(dataimportcronsResource, c.ns, dataImportCron), &v1beta1.DataImportCron{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.DataImportCron), err +} + +// Update takes the representation of a dataImportCron and updates it. Returns the server's representation of the dataImportCron, and an error, if there is any. +func (c *FakeDataImportCrons) Update(ctx context.Context, dataImportCron *v1beta1.DataImportCron, opts v1.UpdateOptions) (result *v1beta1.DataImportCron, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(dataimportcronsResource, c.ns, dataImportCron), &v1beta1.DataImportCron{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.DataImportCron), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeDataImportCrons) UpdateStatus(ctx context.Context, dataImportCron *v1beta1.DataImportCron, opts v1.UpdateOptions) (*v1beta1.DataImportCron, error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceAction(dataimportcronsResource, "status", c.ns, dataImportCron), &v1beta1.DataImportCron{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.DataImportCron), err +} + +// Delete takes name of the dataImportCron and deletes it. Returns an error if one occurs. +func (c *FakeDataImportCrons) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteAction(dataimportcronsResource, c.ns, name), &v1beta1.DataImportCron{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeDataImportCrons) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(dataimportcronsResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &v1beta1.DataImportCronList{}) + return err +} + +// Patch applies the patch and returns the patched dataImportCron. +func (c *FakeDataImportCrons) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.DataImportCron, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(dataimportcronsResource, c.ns, name, pt, data, subresources...), &v1beta1.DataImportCron{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.DataImportCron), err +} diff --git a/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/core/v1beta1/fake/fake_datasource.go b/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/core/v1beta1/fake/fake_datasource.go new file mode 100644 index 000000000000..4b4382752bb4 --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/core/v1beta1/fake/fake_datasource.go @@ -0,0 +1,143 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + + 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" + + v1beta1 "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1" +) + +// FakeDataSources implements DataSourceInterface +type FakeDataSources struct { + Fake *FakeCdiV1beta1 + ns string +} + +var datasourcesResource = schema.GroupVersionResource{Group: "cdi.kubevirt.io", Version: "v1beta1", Resource: "datasources"} + +var datasourcesKind = schema.GroupVersionKind{Group: "cdi.kubevirt.io", Version: "v1beta1", Kind: "DataSource"} + +// Get takes name of the dataSource, and returns the corresponding dataSource object, and an error if there is any. +func (c *FakeDataSources) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.DataSource, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(datasourcesResource, c.ns, name), &v1beta1.DataSource{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.DataSource), err +} + +// List takes label and field selectors, and returns the list of DataSources that match those selectors. +func (c *FakeDataSources) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.DataSourceList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(datasourcesResource, datasourcesKind, c.ns, opts), &v1beta1.DataSourceList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1beta1.DataSourceList{ListMeta: obj.(*v1beta1.DataSourceList).ListMeta} + for _, item := range obj.(*v1beta1.DataSourceList).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 dataSources. +func (c *FakeDataSources) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(datasourcesResource, c.ns, opts)) + +} + +// Create takes the representation of a dataSource and creates it. Returns the server's representation of the dataSource, and an error, if there is any. +func (c *FakeDataSources) Create(ctx context.Context, dataSource *v1beta1.DataSource, opts v1.CreateOptions) (result *v1beta1.DataSource, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(datasourcesResource, c.ns, dataSource), &v1beta1.DataSource{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.DataSource), err +} + +// Update takes the representation of a dataSource and updates it. Returns the server's representation of the dataSource, and an error, if there is any. +func (c *FakeDataSources) Update(ctx context.Context, dataSource *v1beta1.DataSource, opts v1.UpdateOptions) (result *v1beta1.DataSource, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(datasourcesResource, c.ns, dataSource), &v1beta1.DataSource{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.DataSource), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeDataSources) UpdateStatus(ctx context.Context, dataSource *v1beta1.DataSource, opts v1.UpdateOptions) (*v1beta1.DataSource, error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceAction(datasourcesResource, "status", c.ns, dataSource), &v1beta1.DataSource{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.DataSource), err +} + +// Delete takes name of the dataSource and deletes it. Returns an error if one occurs. +func (c *FakeDataSources) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteAction(datasourcesResource, c.ns, name), &v1beta1.DataSource{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeDataSources) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(datasourcesResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &v1beta1.DataSourceList{}) + return err +} + +// Patch applies the patch and returns the patched dataSource. +func (c *FakeDataSources) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.DataSource, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(datasourcesResource, c.ns, name, pt, data, subresources...), &v1beta1.DataSource{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.DataSource), err +} diff --git a/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/core/v1beta1/fake/fake_datavolume.go b/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/core/v1beta1/fake/fake_datavolume.go new file mode 100644 index 000000000000..8bbed58be734 --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/core/v1beta1/fake/fake_datavolume.go @@ -0,0 +1,143 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + + 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" + + v1beta1 "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1" +) + +// FakeDataVolumes implements DataVolumeInterface +type FakeDataVolumes struct { + Fake *FakeCdiV1beta1 + ns string +} + +var datavolumesResource = schema.GroupVersionResource{Group: "cdi.kubevirt.io", Version: "v1beta1", Resource: "datavolumes"} + +var datavolumesKind = schema.GroupVersionKind{Group: "cdi.kubevirt.io", Version: "v1beta1", Kind: "DataVolume"} + +// Get takes name of the dataVolume, and returns the corresponding dataVolume object, and an error if there is any. +func (c *FakeDataVolumes) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.DataVolume, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(datavolumesResource, c.ns, name), &v1beta1.DataVolume{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.DataVolume), err +} + +// List takes label and field selectors, and returns the list of DataVolumes that match those selectors. +func (c *FakeDataVolumes) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.DataVolumeList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(datavolumesResource, datavolumesKind, c.ns, opts), &v1beta1.DataVolumeList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1beta1.DataVolumeList{ListMeta: obj.(*v1beta1.DataVolumeList).ListMeta} + for _, item := range obj.(*v1beta1.DataVolumeList).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 dataVolumes. +func (c *FakeDataVolumes) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(datavolumesResource, c.ns, opts)) + +} + +// Create takes the representation of a dataVolume and creates it. Returns the server's representation of the dataVolume, and an error, if there is any. +func (c *FakeDataVolumes) Create(ctx context.Context, dataVolume *v1beta1.DataVolume, opts v1.CreateOptions) (result *v1beta1.DataVolume, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(datavolumesResource, c.ns, dataVolume), &v1beta1.DataVolume{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.DataVolume), err +} + +// Update takes the representation of a dataVolume and updates it. Returns the server's representation of the dataVolume, and an error, if there is any. +func (c *FakeDataVolumes) Update(ctx context.Context, dataVolume *v1beta1.DataVolume, opts v1.UpdateOptions) (result *v1beta1.DataVolume, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(datavolumesResource, c.ns, dataVolume), &v1beta1.DataVolume{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.DataVolume), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeDataVolumes) UpdateStatus(ctx context.Context, dataVolume *v1beta1.DataVolume, opts v1.UpdateOptions) (*v1beta1.DataVolume, error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceAction(datavolumesResource, "status", c.ns, dataVolume), &v1beta1.DataVolume{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.DataVolume), err +} + +// Delete takes name of the dataVolume and deletes it. Returns an error if one occurs. +func (c *FakeDataVolumes) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteAction(datavolumesResource, c.ns, name), &v1beta1.DataVolume{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeDataVolumes) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(datavolumesResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &v1beta1.DataVolumeList{}) + return err +} + +// Patch applies the patch and returns the patched dataVolume. +func (c *FakeDataVolumes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.DataVolume, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(datavolumesResource, c.ns, name, pt, data, subresources...), &v1beta1.DataVolume{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.DataVolume), err +} diff --git a/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/core/v1beta1/fake/fake_objecttransfer.go b/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/core/v1beta1/fake/fake_objecttransfer.go new file mode 100644 index 000000000000..3dbf5ef7144b --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/core/v1beta1/fake/fake_objecttransfer.go @@ -0,0 +1,134 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + + 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" + + v1beta1 "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1" +) + +// FakeObjectTransfers implements ObjectTransferInterface +type FakeObjectTransfers struct { + Fake *FakeCdiV1beta1 +} + +var objecttransfersResource = schema.GroupVersionResource{Group: "cdi.kubevirt.io", Version: "v1beta1", Resource: "objecttransfers"} + +var objecttransfersKind = schema.GroupVersionKind{Group: "cdi.kubevirt.io", Version: "v1beta1", Kind: "ObjectTransfer"} + +// Get takes name of the objectTransfer, and returns the corresponding objectTransfer object, and an error if there is any. +func (c *FakeObjectTransfers) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.ObjectTransfer, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootGetAction(objecttransfersResource, name), &v1beta1.ObjectTransfer{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.ObjectTransfer), err +} + +// List takes label and field selectors, and returns the list of ObjectTransfers that match those selectors. +func (c *FakeObjectTransfers) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.ObjectTransferList, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootListAction(objecttransfersResource, objecttransfersKind, opts), &v1beta1.ObjectTransferList{}) + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1beta1.ObjectTransferList{ListMeta: obj.(*v1beta1.ObjectTransferList).ListMeta} + for _, item := range obj.(*v1beta1.ObjectTransferList).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 objectTransfers. +func (c *FakeObjectTransfers) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewRootWatchAction(objecttransfersResource, opts)) +} + +// Create takes the representation of a objectTransfer and creates it. Returns the server's representation of the objectTransfer, and an error, if there is any. +func (c *FakeObjectTransfers) Create(ctx context.Context, objectTransfer *v1beta1.ObjectTransfer, opts v1.CreateOptions) (result *v1beta1.ObjectTransfer, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootCreateAction(objecttransfersResource, objectTransfer), &v1beta1.ObjectTransfer{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.ObjectTransfer), err +} + +// Update takes the representation of a objectTransfer and updates it. Returns the server's representation of the objectTransfer, and an error, if there is any. +func (c *FakeObjectTransfers) Update(ctx context.Context, objectTransfer *v1beta1.ObjectTransfer, opts v1.UpdateOptions) (result *v1beta1.ObjectTransfer, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateAction(objecttransfersResource, objectTransfer), &v1beta1.ObjectTransfer{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.ObjectTransfer), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeObjectTransfers) UpdateStatus(ctx context.Context, objectTransfer *v1beta1.ObjectTransfer, opts v1.UpdateOptions) (*v1beta1.ObjectTransfer, error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateSubresourceAction(objecttransfersResource, "status", objectTransfer), &v1beta1.ObjectTransfer{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.ObjectTransfer), err +} + +// Delete takes name of the objectTransfer and deletes it. Returns an error if one occurs. +func (c *FakeObjectTransfers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewRootDeleteAction(objecttransfersResource, name), &v1beta1.ObjectTransfer{}) + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeObjectTransfers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(objecttransfersResource, listOpts) + + _, err := c.Fake.Invokes(action, &v1beta1.ObjectTransferList{}) + return err +} + +// Patch applies the patch and returns the patched objectTransfer. +func (c *FakeObjectTransfers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.ObjectTransfer, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(objecttransfersResource, name, pt, data, subresources...), &v1beta1.ObjectTransfer{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.ObjectTransfer), err +} diff --git a/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/core/v1beta1/fake/fake_storageprofile.go b/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/core/v1beta1/fake/fake_storageprofile.go new file mode 100644 index 000000000000..88d21ff762b6 --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/core/v1beta1/fake/fake_storageprofile.go @@ -0,0 +1,134 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + + 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" + + v1beta1 "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1" +) + +// FakeStorageProfiles implements StorageProfileInterface +type FakeStorageProfiles struct { + Fake *FakeCdiV1beta1 +} + +var storageprofilesResource = schema.GroupVersionResource{Group: "cdi.kubevirt.io", Version: "v1beta1", Resource: "storageprofiles"} + +var storageprofilesKind = schema.GroupVersionKind{Group: "cdi.kubevirt.io", Version: "v1beta1", Kind: "StorageProfile"} + +// Get takes name of the storageProfile, and returns the corresponding storageProfile object, and an error if there is any. +func (c *FakeStorageProfiles) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.StorageProfile, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootGetAction(storageprofilesResource, name), &v1beta1.StorageProfile{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.StorageProfile), err +} + +// List takes label and field selectors, and returns the list of StorageProfiles that match those selectors. +func (c *FakeStorageProfiles) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.StorageProfileList, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootListAction(storageprofilesResource, storageprofilesKind, opts), &v1beta1.StorageProfileList{}) + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1beta1.StorageProfileList{ListMeta: obj.(*v1beta1.StorageProfileList).ListMeta} + for _, item := range obj.(*v1beta1.StorageProfileList).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 storageProfiles. +func (c *FakeStorageProfiles) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewRootWatchAction(storageprofilesResource, opts)) +} + +// Create takes the representation of a storageProfile and creates it. Returns the server's representation of the storageProfile, and an error, if there is any. +func (c *FakeStorageProfiles) Create(ctx context.Context, storageProfile *v1beta1.StorageProfile, opts v1.CreateOptions) (result *v1beta1.StorageProfile, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootCreateAction(storageprofilesResource, storageProfile), &v1beta1.StorageProfile{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.StorageProfile), err +} + +// Update takes the representation of a storageProfile and updates it. Returns the server's representation of the storageProfile, and an error, if there is any. +func (c *FakeStorageProfiles) Update(ctx context.Context, storageProfile *v1beta1.StorageProfile, opts v1.UpdateOptions) (result *v1beta1.StorageProfile, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateAction(storageprofilesResource, storageProfile), &v1beta1.StorageProfile{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.StorageProfile), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeStorageProfiles) UpdateStatus(ctx context.Context, storageProfile *v1beta1.StorageProfile, opts v1.UpdateOptions) (*v1beta1.StorageProfile, error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateSubresourceAction(storageprofilesResource, "status", storageProfile), &v1beta1.StorageProfile{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.StorageProfile), err +} + +// Delete takes name of the storageProfile and deletes it. Returns an error if one occurs. +func (c *FakeStorageProfiles) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewRootDeleteAction(storageprofilesResource, name), &v1beta1.StorageProfile{}) + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeStorageProfiles) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(storageprofilesResource, listOpts) + + _, err := c.Fake.Invokes(action, &v1beta1.StorageProfileList{}) + return err +} + +// Patch applies the patch and returns the patched storageProfile. +func (c *FakeStorageProfiles) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.StorageProfile, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(storageprofilesResource, name, pt, data, subresources...), &v1beta1.StorageProfile{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.StorageProfile), err +} diff --git a/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/core/v1beta1/generated_expansion.go b/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/core/v1beta1/generated_expansion.go new file mode 100644 index 000000000000..dd8847c3b519 --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/core/v1beta1/generated_expansion.go @@ -0,0 +1,33 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1beta1 + +type CDIExpansion interface{} + +type CDIConfigExpansion interface{} + +type DataImportCronExpansion interface{} + +type DataSourceExpansion interface{} + +type DataVolumeExpansion interface{} + +type ObjectTransferExpansion interface{} + +type StorageProfileExpansion interface{} diff --git a/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/core/v1beta1/objecttransfer.go b/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/core/v1beta1/objecttransfer.go new file mode 100644 index 000000000000..6d526237df59 --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/core/v1beta1/objecttransfer.go @@ -0,0 +1,185 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1beta1 + +import ( + "context" + "time" + + 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" + + scheme "kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/scheme" + v1beta1 "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1" +) + +// ObjectTransfersGetter has a method to return a ObjectTransferInterface. +// A group's client should implement this interface. +type ObjectTransfersGetter interface { + ObjectTransfers() ObjectTransferInterface +} + +// ObjectTransferInterface has methods to work with ObjectTransfer resources. +type ObjectTransferInterface interface { + Create(ctx context.Context, objectTransfer *v1beta1.ObjectTransfer, opts v1.CreateOptions) (*v1beta1.ObjectTransfer, error) + Update(ctx context.Context, objectTransfer *v1beta1.ObjectTransfer, opts v1.UpdateOptions) (*v1beta1.ObjectTransfer, error) + UpdateStatus(ctx context.Context, objectTransfer *v1beta1.ObjectTransfer, opts v1.UpdateOptions) (*v1beta1.ObjectTransfer, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.ObjectTransfer, error) + List(ctx context.Context, opts v1.ListOptions) (*v1beta1.ObjectTransferList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.ObjectTransfer, err error) + ObjectTransferExpansion +} + +// objectTransfers implements ObjectTransferInterface +type objectTransfers struct { + client rest.Interface +} + +// newObjectTransfers returns a ObjectTransfers +func newObjectTransfers(c *CdiV1beta1Client) *objectTransfers { + return &objectTransfers{ + client: c.RESTClient(), + } +} + +// Get takes name of the objectTransfer, and returns the corresponding objectTransfer object, and an error if there is any. +func (c *objectTransfers) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.ObjectTransfer, err error) { + result = &v1beta1.ObjectTransfer{} + err = c.client.Get(). + Resource("objecttransfers"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of ObjectTransfers that match those selectors. +func (c *objectTransfers) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.ObjectTransferList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1beta1.ObjectTransferList{} + err = c.client.Get(). + Resource("objecttransfers"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested objectTransfers. +func (c *objectTransfers) Watch(ctx context.Context, 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("objecttransfers"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a objectTransfer and creates it. Returns the server's representation of the objectTransfer, and an error, if there is any. +func (c *objectTransfers) Create(ctx context.Context, objectTransfer *v1beta1.ObjectTransfer, opts v1.CreateOptions) (result *v1beta1.ObjectTransfer, err error) { + result = &v1beta1.ObjectTransfer{} + err = c.client.Post(). + Resource("objecttransfers"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(objectTransfer). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a objectTransfer and updates it. Returns the server's representation of the objectTransfer, and an error, if there is any. +func (c *objectTransfers) Update(ctx context.Context, objectTransfer *v1beta1.ObjectTransfer, opts v1.UpdateOptions) (result *v1beta1.ObjectTransfer, err error) { + result = &v1beta1.ObjectTransfer{} + err = c.client.Put(). + Resource("objecttransfers"). + Name(objectTransfer.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(objectTransfer). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *objectTransfers) UpdateStatus(ctx context.Context, objectTransfer *v1beta1.ObjectTransfer, opts v1.UpdateOptions) (result *v1beta1.ObjectTransfer, err error) { + result = &v1beta1.ObjectTransfer{} + err = c.client.Put(). + Resource("objecttransfers"). + Name(objectTransfer.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(objectTransfer). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the objectTransfer and deletes it. Returns an error if one occurs. +func (c *objectTransfers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + return c.client.Delete(). + Resource("objecttransfers"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *objectTransfers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Resource("objecttransfers"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched objectTransfer. +func (c *objectTransfers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.ObjectTransfer, err error) { + result = &v1beta1.ObjectTransfer{} + err = c.client.Patch(pt). + Resource("objecttransfers"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/core/v1beta1/storageprofile.go b/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/core/v1beta1/storageprofile.go new file mode 100644 index 000000000000..164f86871495 --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/core/v1beta1/storageprofile.go @@ -0,0 +1,185 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1beta1 + +import ( + "context" + "time" + + 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" + + scheme "kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/scheme" + v1beta1 "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1" +) + +// StorageProfilesGetter has a method to return a StorageProfileInterface. +// A group's client should implement this interface. +type StorageProfilesGetter interface { + StorageProfiles() StorageProfileInterface +} + +// StorageProfileInterface has methods to work with StorageProfile resources. +type StorageProfileInterface interface { + Create(ctx context.Context, storageProfile *v1beta1.StorageProfile, opts v1.CreateOptions) (*v1beta1.StorageProfile, error) + Update(ctx context.Context, storageProfile *v1beta1.StorageProfile, opts v1.UpdateOptions) (*v1beta1.StorageProfile, error) + UpdateStatus(ctx context.Context, storageProfile *v1beta1.StorageProfile, opts v1.UpdateOptions) (*v1beta1.StorageProfile, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.StorageProfile, error) + List(ctx context.Context, opts v1.ListOptions) (*v1beta1.StorageProfileList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.StorageProfile, err error) + StorageProfileExpansion +} + +// storageProfiles implements StorageProfileInterface +type storageProfiles struct { + client rest.Interface +} + +// newStorageProfiles returns a StorageProfiles +func newStorageProfiles(c *CdiV1beta1Client) *storageProfiles { + return &storageProfiles{ + client: c.RESTClient(), + } +} + +// Get takes name of the storageProfile, and returns the corresponding storageProfile object, and an error if there is any. +func (c *storageProfiles) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.StorageProfile, err error) { + result = &v1beta1.StorageProfile{} + err = c.client.Get(). + Resource("storageprofiles"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of StorageProfiles that match those selectors. +func (c *storageProfiles) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.StorageProfileList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1beta1.StorageProfileList{} + err = c.client.Get(). + Resource("storageprofiles"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested storageProfiles. +func (c *storageProfiles) Watch(ctx context.Context, 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("storageprofiles"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a storageProfile and creates it. Returns the server's representation of the storageProfile, and an error, if there is any. +func (c *storageProfiles) Create(ctx context.Context, storageProfile *v1beta1.StorageProfile, opts v1.CreateOptions) (result *v1beta1.StorageProfile, err error) { + result = &v1beta1.StorageProfile{} + err = c.client.Post(). + Resource("storageprofiles"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(storageProfile). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a storageProfile and updates it. Returns the server's representation of the storageProfile, and an error, if there is any. +func (c *storageProfiles) Update(ctx context.Context, storageProfile *v1beta1.StorageProfile, opts v1.UpdateOptions) (result *v1beta1.StorageProfile, err error) { + result = &v1beta1.StorageProfile{} + err = c.client.Put(). + Resource("storageprofiles"). + Name(storageProfile.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(storageProfile). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *storageProfiles) UpdateStatus(ctx context.Context, storageProfile *v1beta1.StorageProfile, opts v1.UpdateOptions) (result *v1beta1.StorageProfile, err error) { + result = &v1beta1.StorageProfile{} + err = c.client.Put(). + Resource("storageprofiles"). + Name(storageProfile.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(storageProfile). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the storageProfile and deletes it. Returns an error if one occurs. +func (c *storageProfiles) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + return c.client.Delete(). + Resource("storageprofiles"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *storageProfiles) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Resource("storageprofiles"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched storageProfile. +func (c *storageProfiles) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.StorageProfile, err error) { + result = &v1beta1.StorageProfile{} + err = c.client.Patch(pt). + Resource("storageprofiles"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/events/v1/BUILD.bazel b/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/upload/v1beta1/BUILD.bazel similarity index 54% rename from vendor/k8s.io/client-go/kubernetes/typed/events/v1/BUILD.bazel rename to vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/upload/v1beta1/BUILD.bazel index 2ca7e84bbd89..cc29696fe699 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/events/v1/BUILD.bazel +++ b/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/upload/v1beta1/BUILD.bazel @@ -4,20 +4,18 @@ go_library( name = "go_default_library", srcs = [ "doc.go", - "event.go", - "events_client.go", "generated_expansion.go", + "upload_client.go", + "uploadtokenrequest.go", ], - importmap = "kubevirt.io/kubevirt/vendor/k8s.io/client-go/kubernetes/typed/events/v1", - importpath = "k8s.io/client-go/kubernetes/typed/events/v1", + importpath = "kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/upload/v1beta1", visibility = ["//visibility:public"], deps = [ - "//vendor/k8s.io/api/events/v1:go_default_library", + "//staging/src/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/scheme:go_default_library", "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/applyconfigurations/events/v1:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/scheme:go_default_library", "//vendor/k8s.io/client-go/rest:go_default_library", + "//vendor/kubevirt.io/containerized-data-importer-api/pkg/apis/upload/v1beta1:go_default_library", ], ) diff --git a/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/upload/v1beta1/doc.go b/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/upload/v1beta1/doc.go new file mode 100644 index 000000000000..4326722ede1a --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/upload/v1beta1/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +// This package has the automatically generated typed clients. +package v1beta1 diff --git a/vendor/k8s.io/client-go/kubernetes/typed/node/v1/fake/BUILD.bazel b/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/upload/v1beta1/fake/BUILD.bazel similarity index 62% rename from vendor/k8s.io/client-go/kubernetes/typed/node/v1/fake/BUILD.bazel rename to vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/upload/v1beta1/fake/BUILD.bazel index 6041e67fb1f2..a14a1eacc5ad 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/node/v1/fake/BUILD.bazel +++ b/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/upload/v1beta1/fake/BUILD.bazel @@ -4,22 +4,20 @@ go_library( name = "go_default_library", srcs = [ "doc.go", - "fake_node_client.go", - "fake_runtimeclass.go", + "fake_upload_client.go", + "fake_uploadtokenrequest.go", ], - importmap = "kubevirt.io/kubevirt/vendor/k8s.io/client-go/kubernetes/typed/node/v1/fake", - importpath = "k8s.io/client-go/kubernetes/typed/node/v1/fake", + importpath = "kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/upload/v1beta1/fake", visibility = ["//visibility:public"], deps = [ - "//vendor/k8s.io/api/node/v1:go_default_library", + "//staging/src/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/upload/v1beta1:go_default_library", "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/applyconfigurations/node/v1:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/node/v1:go_default_library", "//vendor/k8s.io/client-go/rest:go_default_library", "//vendor/k8s.io/client-go/testing:go_default_library", + "//vendor/kubevirt.io/containerized-data-importer-api/pkg/apis/upload/v1beta1:go_default_library", ], ) diff --git a/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/upload/v1beta1/fake/doc.go b/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/upload/v1beta1/fake/doc.go new file mode 100644 index 000000000000..853f43b09c4e --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/upload/v1beta1/fake/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +// Package fake has the automatically generated clients. +package fake diff --git a/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/upload/v1beta1/fake/fake_upload_client.go b/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/upload/v1beta1/fake/fake_upload_client.go new file mode 100644 index 000000000000..8c9fab899d1a --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/upload/v1beta1/fake/fake_upload_client.go @@ -0,0 +1,41 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + rest "k8s.io/client-go/rest" + testing "k8s.io/client-go/testing" + + v1beta1 "kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/upload/v1beta1" +) + +type FakeUploadV1beta1 struct { + *testing.Fake +} + +func (c *FakeUploadV1beta1) UploadTokenRequests(namespace string) v1beta1.UploadTokenRequestInterface { + return &FakeUploadTokenRequests{c, namespace} +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *FakeUploadV1beta1) RESTClient() rest.Interface { + var ret *rest.RESTClient + return ret +} diff --git a/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/upload/v1beta1/fake/fake_uploadtokenrequest.go b/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/upload/v1beta1/fake/fake_uploadtokenrequest.go new file mode 100644 index 000000000000..044db362fb33 --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/upload/v1beta1/fake/fake_uploadtokenrequest.go @@ -0,0 +1,143 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + + 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" + + v1beta1 "kubevirt.io/containerized-data-importer-api/pkg/apis/upload/v1beta1" +) + +// FakeUploadTokenRequests implements UploadTokenRequestInterface +type FakeUploadTokenRequests struct { + Fake *FakeUploadV1beta1 + ns string +} + +var uploadtokenrequestsResource = schema.GroupVersionResource{Group: "upload.cdi.kubevirt.io", Version: "v1beta1", Resource: "uploadtokenrequests"} + +var uploadtokenrequestsKind = schema.GroupVersionKind{Group: "upload.cdi.kubevirt.io", Version: "v1beta1", Kind: "UploadTokenRequest"} + +// Get takes name of the uploadTokenRequest, and returns the corresponding uploadTokenRequest object, and an error if there is any. +func (c *FakeUploadTokenRequests) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.UploadTokenRequest, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(uploadtokenrequestsResource, c.ns, name), &v1beta1.UploadTokenRequest{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.UploadTokenRequest), err +} + +// List takes label and field selectors, and returns the list of UploadTokenRequests that match those selectors. +func (c *FakeUploadTokenRequests) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.UploadTokenRequestList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(uploadtokenrequestsResource, uploadtokenrequestsKind, c.ns, opts), &v1beta1.UploadTokenRequestList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1beta1.UploadTokenRequestList{ListMeta: obj.(*v1beta1.UploadTokenRequestList).ListMeta} + for _, item := range obj.(*v1beta1.UploadTokenRequestList).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 uploadTokenRequests. +func (c *FakeUploadTokenRequests) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(uploadtokenrequestsResource, c.ns, opts)) + +} + +// Create takes the representation of a uploadTokenRequest and creates it. Returns the server's representation of the uploadTokenRequest, and an error, if there is any. +func (c *FakeUploadTokenRequests) Create(ctx context.Context, uploadTokenRequest *v1beta1.UploadTokenRequest, opts v1.CreateOptions) (result *v1beta1.UploadTokenRequest, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(uploadtokenrequestsResource, c.ns, uploadTokenRequest), &v1beta1.UploadTokenRequest{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.UploadTokenRequest), err +} + +// Update takes the representation of a uploadTokenRequest and updates it. Returns the server's representation of the uploadTokenRequest, and an error, if there is any. +func (c *FakeUploadTokenRequests) Update(ctx context.Context, uploadTokenRequest *v1beta1.UploadTokenRequest, opts v1.UpdateOptions) (result *v1beta1.UploadTokenRequest, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(uploadtokenrequestsResource, c.ns, uploadTokenRequest), &v1beta1.UploadTokenRequest{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.UploadTokenRequest), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeUploadTokenRequests) UpdateStatus(ctx context.Context, uploadTokenRequest *v1beta1.UploadTokenRequest, opts v1.UpdateOptions) (*v1beta1.UploadTokenRequest, error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceAction(uploadtokenrequestsResource, "status", c.ns, uploadTokenRequest), &v1beta1.UploadTokenRequest{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.UploadTokenRequest), err +} + +// Delete takes name of the uploadTokenRequest and deletes it. Returns an error if one occurs. +func (c *FakeUploadTokenRequests) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteAction(uploadtokenrequestsResource, c.ns, name), &v1beta1.UploadTokenRequest{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeUploadTokenRequests) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(uploadtokenrequestsResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &v1beta1.UploadTokenRequestList{}) + return err +} + +// Patch applies the patch and returns the patched uploadTokenRequest. +func (c *FakeUploadTokenRequests) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.UploadTokenRequest, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(uploadtokenrequestsResource, c.ns, name, pt, data, subresources...), &v1beta1.UploadTokenRequest{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.UploadTokenRequest), err +} diff --git a/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/upload/v1beta1/generated_expansion.go b/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/upload/v1beta1/generated_expansion.go new file mode 100644 index 000000000000..7fea39eca4f5 --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/upload/v1beta1/generated_expansion.go @@ -0,0 +1,21 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1beta1 + +type UploadTokenRequestExpansion interface{} diff --git a/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/upload/v1beta1/upload_client.go b/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/upload/v1beta1/upload_client.go new file mode 100644 index 000000000000..d931f519a955 --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/upload/v1beta1/upload_client.go @@ -0,0 +1,90 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1beta1 + +import ( + rest "k8s.io/client-go/rest" + + "kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/scheme" + v1beta1 "kubevirt.io/containerized-data-importer-api/pkg/apis/upload/v1beta1" +) + +type UploadV1beta1Interface interface { + RESTClient() rest.Interface + UploadTokenRequestsGetter +} + +// UploadV1beta1Client is used to interact with features provided by the upload.cdi.kubevirt.io group. +type UploadV1beta1Client struct { + restClient rest.Interface +} + +func (c *UploadV1beta1Client) UploadTokenRequests(namespace string) UploadTokenRequestInterface { + return newUploadTokenRequests(c, namespace) +} + +// NewForConfig creates a new UploadV1beta1Client for the given config. +func NewForConfig(c *rest.Config) (*UploadV1beta1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + client, err := rest.RESTClientFor(&config) + if err != nil { + return nil, err + } + return &UploadV1beta1Client{client}, nil +} + +// NewForConfigOrDie creates a new UploadV1beta1Client for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *UploadV1beta1Client { + client, err := NewForConfig(c) + if err != nil { + panic(err) + } + return client +} + +// New creates a new UploadV1beta1Client for the given RESTClient. +func New(c rest.Interface) *UploadV1beta1Client { + return &UploadV1beta1Client{c} +} + +func setConfigDefaults(config *rest.Config) error { + gv := v1beta1.SchemeGroupVersion + config.GroupVersion = &gv + config.APIPath = "/apis" + config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() + + 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 *UploadV1beta1Client) RESTClient() rest.Interface { + if c == nil { + return nil + } + return c.restClient +} diff --git a/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/upload/v1beta1/uploadtokenrequest.go b/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/upload/v1beta1/uploadtokenrequest.go new file mode 100644 index 000000000000..e1815ef0cc2e --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/typed/upload/v1beta1/uploadtokenrequest.go @@ -0,0 +1,196 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1beta1 + +import ( + "context" + "time" + + 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" + + scheme "kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned/scheme" + v1beta1 "kubevirt.io/containerized-data-importer-api/pkg/apis/upload/v1beta1" +) + +// UploadTokenRequestsGetter has a method to return a UploadTokenRequestInterface. +// A group's client should implement this interface. +type UploadTokenRequestsGetter interface { + UploadTokenRequests(namespace string) UploadTokenRequestInterface +} + +// UploadTokenRequestInterface has methods to work with UploadTokenRequest resources. +type UploadTokenRequestInterface interface { + Create(ctx context.Context, uploadTokenRequest *v1beta1.UploadTokenRequest, opts v1.CreateOptions) (*v1beta1.UploadTokenRequest, error) + Update(ctx context.Context, uploadTokenRequest *v1beta1.UploadTokenRequest, opts v1.UpdateOptions) (*v1beta1.UploadTokenRequest, error) + UpdateStatus(ctx context.Context, uploadTokenRequest *v1beta1.UploadTokenRequest, opts v1.UpdateOptions) (*v1beta1.UploadTokenRequest, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.UploadTokenRequest, error) + List(ctx context.Context, opts v1.ListOptions) (*v1beta1.UploadTokenRequestList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.UploadTokenRequest, err error) + UploadTokenRequestExpansion +} + +// uploadTokenRequests implements UploadTokenRequestInterface +type uploadTokenRequests struct { + client rest.Interface + ns string +} + +// newUploadTokenRequests returns a UploadTokenRequests +func newUploadTokenRequests(c *UploadV1beta1Client, namespace string) *uploadTokenRequests { + return &uploadTokenRequests{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Get takes name of the uploadTokenRequest, and returns the corresponding uploadTokenRequest object, and an error if there is any. +func (c *uploadTokenRequests) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.UploadTokenRequest, err error) { + result = &v1beta1.UploadTokenRequest{} + err = c.client.Get(). + Namespace(c.ns). + Resource("uploadtokenrequests"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of UploadTokenRequests that match those selectors. +func (c *uploadTokenRequests) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.UploadTokenRequestList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1beta1.UploadTokenRequestList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("uploadtokenrequests"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested uploadTokenRequests. +func (c *uploadTokenRequests) Watch(ctx context.Context, 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(). + Namespace(c.ns). + Resource("uploadtokenrequests"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a uploadTokenRequest and creates it. Returns the server's representation of the uploadTokenRequest, and an error, if there is any. +func (c *uploadTokenRequests) Create(ctx context.Context, uploadTokenRequest *v1beta1.UploadTokenRequest, opts v1.CreateOptions) (result *v1beta1.UploadTokenRequest, err error) { + result = &v1beta1.UploadTokenRequest{} + err = c.client.Post(). + Namespace(c.ns). + Resource("uploadtokenrequests"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(uploadTokenRequest). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a uploadTokenRequest and updates it. Returns the server's representation of the uploadTokenRequest, and an error, if there is any. +func (c *uploadTokenRequests) Update(ctx context.Context, uploadTokenRequest *v1beta1.UploadTokenRequest, opts v1.UpdateOptions) (result *v1beta1.UploadTokenRequest, err error) { + result = &v1beta1.UploadTokenRequest{} + err = c.client.Put(). + Namespace(c.ns). + Resource("uploadtokenrequests"). + Name(uploadTokenRequest.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(uploadTokenRequest). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *uploadTokenRequests) UpdateStatus(ctx context.Context, uploadTokenRequest *v1beta1.UploadTokenRequest, opts v1.UpdateOptions) (result *v1beta1.UploadTokenRequest, err error) { + result = &v1beta1.UploadTokenRequest{} + err = c.client.Put(). + Namespace(c.ns). + Resource("uploadtokenrequests"). + Name(uploadTokenRequest.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(uploadTokenRequest). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the uploadTokenRequest and deletes it. Returns an error if one occurs. +func (c *uploadTokenRequests) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("uploadtokenrequests"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *uploadTokenRequests) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Namespace(c.ns). + Resource("uploadtokenrequests"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched uploadTokenRequest. +func (c *uploadTokenRequests) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.UploadTokenRequest, err error) { + result = &v1beta1.UploadTokenRequest{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("uploadtokenrequests"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned/BUILD.bazel b/vendor/kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned/BUILD.bazel new file mode 100644 index 000000000000..b4feae830ee4 --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned/BUILD.bazel @@ -0,0 +1,17 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = [ + "clientset.go", + "doc.go", + ], + importpath = "kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned", + visibility = ["//visibility:public"], + deps = [ + "//staging/src/kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned/typed/volumesnapshot/v1:go_default_library", + "//vendor/k8s.io/client-go/discovery:go_default_library", + "//vendor/k8s.io/client-go/rest:go_default_library", + "//vendor/k8s.io/client-go/util/flowcontrol:go_default_library", + ], +) diff --git a/vendor/kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned/clientset.go b/vendor/kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned/clientset.go new file mode 100644 index 000000000000..7cc8238c848f --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned/clientset.go @@ -0,0 +1,98 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package versioned + +import ( + "fmt" + + discovery "k8s.io/client-go/discovery" + rest "k8s.io/client-go/rest" + flowcontrol "k8s.io/client-go/util/flowcontrol" + + snapshotv1 "kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned/typed/volumesnapshot/v1" +) + +type Interface interface { + Discovery() discovery.DiscoveryInterface + SnapshotV1() snapshotv1.SnapshotV1Interface +} + +// Clientset contains the clients for groups. Each group has exactly one +// version included in a Clientset. +type Clientset struct { + *discovery.DiscoveryClient + snapshotV1 *snapshotv1.SnapshotV1Client +} + +// SnapshotV1 retrieves the SnapshotV1Client +func (c *Clientset) SnapshotV1() snapshotv1.SnapshotV1Interface { + return c.snapshotV1 +} + +// Discovery retrieves the DiscoveryClient +func (c *Clientset) Discovery() discovery.DiscoveryInterface { + if c == nil { + return nil + } + return c.DiscoveryClient +} + +// NewForConfig creates a new Clientset for the given config. +// If config's RateLimiter is not set and QPS and Burst are acceptable, +// NewForConfig will generate a rate-limiter in configShallowCopy. +func NewForConfig(c *rest.Config) (*Clientset, error) { + configShallowCopy := *c + if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 { + if configShallowCopy.Burst <= 0 { + return nil, fmt.Errorf("burst is required to be greater than 0 when RateLimiter is not set and QPS is set to greater than 0") + } + configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst) + } + var cs Clientset + var err error + cs.snapshotV1, err = snapshotv1.NewForConfig(&configShallowCopy) + if err != nil { + return nil, err + } + + cs.DiscoveryClient, err = discovery.NewDiscoveryClientForConfig(&configShallowCopy) + if err != nil { + return nil, err + } + return &cs, nil +} + +// NewForConfigOrDie creates a new Clientset for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *Clientset { + var cs Clientset + cs.snapshotV1 = snapshotv1.NewForConfigOrDie(c) + + cs.DiscoveryClient = discovery.NewDiscoveryClientForConfigOrDie(c) + return &cs +} + +// New creates a new Clientset for the given RESTClient. +func New(c rest.Interface) *Clientset { + var cs Clientset + cs.snapshotV1 = snapshotv1.New(c) + + cs.DiscoveryClient = discovery.NewDiscoveryClient(c) + return &cs +} diff --git a/vendor/kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned/doc.go b/vendor/kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned/doc.go new file mode 100644 index 000000000000..755a91d8b8a1 --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +// This package has the automatically generated clientset. +package versioned diff --git a/vendor/kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned/fake/BUILD.bazel b/vendor/kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned/fake/BUILD.bazel new file mode 100644 index 000000000000..e2d4e78b9743 --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned/fake/BUILD.bazel @@ -0,0 +1,27 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = [ + "clientset_generated.go", + "doc.go", + "register.go", + ], + importpath = "kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned/fake", + visibility = ["//visibility:public"], + deps = [ + "//staging/src/kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned:go_default_library", + "//staging/src/kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned/typed/volumesnapshot/v1:go_default_library", + "//staging/src/kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned/typed/volumesnapshot/v1/fake:go_default_library", + "//vendor/github.com/kubernetes-csi/external-snapshotter/client/v4/apis/volumesnapshot/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/util/runtime:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", + "//vendor/k8s.io/client-go/discovery:go_default_library", + "//vendor/k8s.io/client-go/discovery/fake:go_default_library", + "//vendor/k8s.io/client-go/testing:go_default_library", + ], +) diff --git a/vendor/kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned/fake/clientset_generated.go b/vendor/kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned/fake/clientset_generated.go new file mode 100644 index 000000000000..a39718ea83c9 --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned/fake/clientset_generated.go @@ -0,0 +1,83 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/watch" + "k8s.io/client-go/discovery" + fakediscovery "k8s.io/client-go/discovery/fake" + "k8s.io/client-go/testing" + + clientset "kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned" + snapshotv1 "kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned/typed/volumesnapshot/v1" + fakesnapshotv1 "kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned/typed/volumesnapshot/v1/fake" +) + +// NewSimpleClientset returns a clientset that will respond with the provided objects. +// It's backed by a very simple object tracker that processes creates, updates and deletions as-is, +// without applying any validations and/or defaults. It shouldn't be considered a replacement +// for a real clientset and is mostly useful in simple unit tests. +func NewSimpleClientset(objects ...runtime.Object) *Clientset { + o := testing.NewObjectTracker(scheme, codecs.UniversalDecoder()) + for _, obj := range objects { + if err := o.Add(obj); err != nil { + panic(err) + } + } + + cs := &Clientset{tracker: o} + cs.discovery = &fakediscovery.FakeDiscovery{Fake: &cs.Fake} + cs.AddReactor("*", "*", testing.ObjectReaction(o)) + cs.AddWatchReactor("*", func(action testing.Action) (handled bool, ret watch.Interface, err error) { + gvr := action.GetResource() + ns := action.GetNamespace() + watch, err := o.Watch(gvr, ns) + if err != nil { + return false, nil, err + } + return true, watch, nil + }) + + return cs +} + +// Clientset implements clientset.Interface. Meant to be embedded into a +// struct to get a default implementation. This makes faking out just the method +// you want to test easier. +type Clientset struct { + testing.Fake + discovery *fakediscovery.FakeDiscovery + tracker testing.ObjectTracker +} + +func (c *Clientset) Discovery() discovery.DiscoveryInterface { + return c.discovery +} + +func (c *Clientset) Tracker() testing.ObjectTracker { + return c.tracker +} + +var _ clientset.Interface = &Clientset{} + +// SnapshotV1 retrieves the SnapshotV1Client +func (c *Clientset) SnapshotV1() snapshotv1.SnapshotV1Interface { + return &fakesnapshotv1.FakeSnapshotV1{Fake: &c.Fake} +} diff --git a/vendor/kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned/fake/doc.go b/vendor/kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned/fake/doc.go new file mode 100644 index 000000000000..303a21d3b1dc --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned/fake/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +// This package has the automatically generated fake clientset. +package fake diff --git a/vendor/kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned/fake/register.go b/vendor/kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned/fake/register.go new file mode 100644 index 000000000000..8a18f0dc37f2 --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned/fake/register.go @@ -0,0 +1,56 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + snapshotv1 "github.com/kubernetes-csi/external-snapshotter/client/v4/apis/volumesnapshot/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + schema "k8s.io/apimachinery/pkg/runtime/schema" + serializer "k8s.io/apimachinery/pkg/runtime/serializer" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" +) + +var scheme = runtime.NewScheme() +var codecs = serializer.NewCodecFactory(scheme) + +var localSchemeBuilder = runtime.SchemeBuilder{ + snapshotv1.AddToScheme, +} + +// AddToScheme adds all types of this clientset into the given scheme. This allows composition +// of clientsets, like in: +// +// import ( +// "k8s.io/client-go/kubernetes" +// clientsetscheme "k8s.io/client-go/kubernetes/scheme" +// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" +// ) +// +// kclientset, _ := kubernetes.NewForConfig(c) +// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) +// +// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types +// correctly. +var AddToScheme = localSchemeBuilder.AddToScheme + +func init() { + v1.AddToGroupVersion(scheme, schema.GroupVersion{Version: "v1"}) + utilruntime.Must(AddToScheme(scheme)) +} diff --git a/vendor/github.com/openshift/client-go/security/clientset/versioned/scheme/BUILD.bazel b/vendor/kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned/scheme/BUILD.bazel similarity index 68% rename from vendor/github.com/openshift/client-go/security/clientset/versioned/scheme/BUILD.bazel rename to vendor/kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned/scheme/BUILD.bazel index 28ad8de1211d..6d65b3c3bc66 100644 --- a/vendor/github.com/openshift/client-go/security/clientset/versioned/scheme/BUILD.bazel +++ b/vendor/kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned/scheme/BUILD.bazel @@ -6,11 +6,10 @@ go_library( "doc.go", "register.go", ], - importmap = "kubevirt.io/kubevirt/vendor/github.com/openshift/client-go/security/clientset/versioned/scheme", - importpath = "github.com/openshift/client-go/security/clientset/versioned/scheme", + importpath = "kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned/scheme", visibility = ["//visibility:public"], deps = [ - "//vendor/github.com/openshift/api/security/v1:go_default_library", + "//vendor/github.com/kubernetes-csi/external-snapshotter/client/v4/apis/volumesnapshot/v1:go_default_library", "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", diff --git a/vendor/kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned/scheme/doc.go b/vendor/kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned/scheme/doc.go new file mode 100644 index 000000000000..e6c48e24db86 --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned/scheme/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +// This package contains the scheme of the automatically generated clientset. +package scheme diff --git a/vendor/kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned/scheme/register.go b/vendor/kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned/scheme/register.go new file mode 100644 index 000000000000..2ebb94bf7233 --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned/scheme/register.go @@ -0,0 +1,56 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package scheme + +import ( + snapshotv1 "github.com/kubernetes-csi/external-snapshotter/client/v4/apis/volumesnapshot/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + schema "k8s.io/apimachinery/pkg/runtime/schema" + serializer "k8s.io/apimachinery/pkg/runtime/serializer" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" +) + +var Scheme = runtime.NewScheme() +var Codecs = serializer.NewCodecFactory(Scheme) +var ParameterCodec = runtime.NewParameterCodec(Scheme) +var localSchemeBuilder = runtime.SchemeBuilder{ + snapshotv1.AddToScheme, +} + +// AddToScheme adds all types of this clientset into the given scheme. This allows composition +// of clientsets, like in: +// +// import ( +// "k8s.io/client-go/kubernetes" +// clientsetscheme "k8s.io/client-go/kubernetes/scheme" +// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" +// ) +// +// kclientset, _ := kubernetes.NewForConfig(c) +// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) +// +// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types +// correctly. +var AddToScheme = localSchemeBuilder.AddToScheme + +func init() { + v1.AddToGroupVersion(Scheme, schema.GroupVersion{Version: "v1"}) + utilruntime.Must(AddToScheme(Scheme)) +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/BUILD.bazel b/vendor/kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned/typed/volumesnapshot/v1/BUILD.bazel similarity index 50% rename from vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/BUILD.bazel rename to vendor/kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned/typed/volumesnapshot/v1/BUILD.bazel index affb5d9ee99c..f7445b0f1a3f 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/BUILD.bazel +++ b/vendor/kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned/typed/volumesnapshot/v1/BUILD.bazel @@ -3,21 +3,21 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library") go_library( name = "go_default_library", srcs = [ - "autoscaling_client.go", "doc.go", "generated_expansion.go", - "horizontalpodautoscaler.go", + "volumesnapshot.go", + "volumesnapshot_client.go", + "volumesnapshotclass.go", + "volumesnapshotcontent.go", ], - importmap = "kubevirt.io/kubevirt/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1", - importpath = "k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1", + importpath = "kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned/typed/volumesnapshot/v1", visibility = ["//visibility:public"], deps = [ - "//vendor/k8s.io/api/autoscaling/v2beta1:go_default_library", + "//staging/src/kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned/scheme:go_default_library", + "//vendor/github.com/kubernetes-csi/external-snapshotter/client/v4/apis/volumesnapshot/v1:go_default_library", "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/applyconfigurations/autoscaling/v2beta1:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/scheme:go_default_library", "//vendor/k8s.io/client-go/rest:go_default_library", ], ) diff --git a/vendor/kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned/typed/volumesnapshot/v1/doc.go b/vendor/kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned/typed/volumesnapshot/v1/doc.go new file mode 100644 index 000000000000..948c7fb38c98 --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned/typed/volumesnapshot/v1/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +// This package has the automatically generated typed clients. +package v1 diff --git a/vendor/k8s.io/client-go/kubernetes/typed/apiserverinternal/v1alpha1/fake/BUILD.bazel b/vendor/kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned/typed/volumesnapshot/v1/fake/BUILD.bazel similarity index 56% rename from vendor/k8s.io/client-go/kubernetes/typed/apiserverinternal/v1alpha1/fake/BUILD.bazel rename to vendor/kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned/typed/volumesnapshot/v1/fake/BUILD.bazel index 6d83001db029..ca1bdf7b8e44 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/apiserverinternal/v1alpha1/fake/BUILD.bazel +++ b/vendor/kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned/typed/volumesnapshot/v1/fake/BUILD.bazel @@ -4,21 +4,21 @@ go_library( name = "go_default_library", srcs = [ "doc.go", - "fake_apiserverinternal_client.go", - "fake_storageversion.go", + "fake_volumesnapshot.go", + "fake_volumesnapshot_client.go", + "fake_volumesnapshotclass.go", + "fake_volumesnapshotcontent.go", ], - importmap = "kubevirt.io/kubevirt/vendor/k8s.io/client-go/kubernetes/typed/apiserverinternal/v1alpha1/fake", - importpath = "k8s.io/client-go/kubernetes/typed/apiserverinternal/v1alpha1/fake", + importpath = "kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned/typed/volumesnapshot/v1/fake", visibility = ["//visibility:public"], deps = [ - "//vendor/k8s.io/api/apiserverinternal/v1alpha1:go_default_library", + "//staging/src/kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned/typed/volumesnapshot/v1:go_default_library", + "//vendor/github.com/kubernetes-csi/external-snapshotter/client/v4/apis/volumesnapshot/v1:go_default_library", "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/applyconfigurations/apiserverinternal/v1alpha1:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/apiserverinternal/v1alpha1:go_default_library", "//vendor/k8s.io/client-go/rest:go_default_library", "//vendor/k8s.io/client-go/testing:go_default_library", ], diff --git a/vendor/kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned/typed/volumesnapshot/v1/fake/doc.go b/vendor/kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned/typed/volumesnapshot/v1/fake/doc.go new file mode 100644 index 000000000000..853f43b09c4e --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned/typed/volumesnapshot/v1/fake/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +// Package fake has the automatically generated clients. +package fake diff --git a/vendor/kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned/typed/volumesnapshot/v1/fake/fake_volumesnapshot.go b/vendor/kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned/typed/volumesnapshot/v1/fake/fake_volumesnapshot.go new file mode 100644 index 000000000000..64492a20f1a6 --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned/typed/volumesnapshot/v1/fake/fake_volumesnapshot.go @@ -0,0 +1,142 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + + volumesnapshotv1 "github.com/kubernetes-csi/external-snapshotter/client/v4/apis/volumesnapshot/v1" + 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" +) + +// FakeVolumeSnapshots implements VolumeSnapshotInterface +type FakeVolumeSnapshots struct { + Fake *FakeSnapshotV1 + ns string +} + +var volumesnapshotsResource = schema.GroupVersionResource{Group: "snapshot.storage.k8s.io", Version: "v1", Resource: "volumesnapshots"} + +var volumesnapshotsKind = schema.GroupVersionKind{Group: "snapshot.storage.k8s.io", Version: "v1", Kind: "VolumeSnapshot"} + +// Get takes name of the volumeSnapshot, and returns the corresponding volumeSnapshot object, and an error if there is any. +func (c *FakeVolumeSnapshots) Get(ctx context.Context, name string, options v1.GetOptions) (result *volumesnapshotv1.VolumeSnapshot, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(volumesnapshotsResource, c.ns, name), &volumesnapshotv1.VolumeSnapshot{}) + + if obj == nil { + return nil, err + } + return obj.(*volumesnapshotv1.VolumeSnapshot), err +} + +// List takes label and field selectors, and returns the list of VolumeSnapshots that match those selectors. +func (c *FakeVolumeSnapshots) List(ctx context.Context, opts v1.ListOptions) (result *volumesnapshotv1.VolumeSnapshotList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(volumesnapshotsResource, volumesnapshotsKind, c.ns, opts), &volumesnapshotv1.VolumeSnapshotList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &volumesnapshotv1.VolumeSnapshotList{ListMeta: obj.(*volumesnapshotv1.VolumeSnapshotList).ListMeta} + for _, item := range obj.(*volumesnapshotv1.VolumeSnapshotList).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 volumeSnapshots. +func (c *FakeVolumeSnapshots) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(volumesnapshotsResource, c.ns, opts)) + +} + +// Create takes the representation of a volumeSnapshot and creates it. Returns the server's representation of the volumeSnapshot, and an error, if there is any. +func (c *FakeVolumeSnapshots) Create(ctx context.Context, volumeSnapshot *volumesnapshotv1.VolumeSnapshot, opts v1.CreateOptions) (result *volumesnapshotv1.VolumeSnapshot, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(volumesnapshotsResource, c.ns, volumeSnapshot), &volumesnapshotv1.VolumeSnapshot{}) + + if obj == nil { + return nil, err + } + return obj.(*volumesnapshotv1.VolumeSnapshot), err +} + +// Update takes the representation of a volumeSnapshot and updates it. Returns the server's representation of the volumeSnapshot, and an error, if there is any. +func (c *FakeVolumeSnapshots) Update(ctx context.Context, volumeSnapshot *volumesnapshotv1.VolumeSnapshot, opts v1.UpdateOptions) (result *volumesnapshotv1.VolumeSnapshot, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(volumesnapshotsResource, c.ns, volumeSnapshot), &volumesnapshotv1.VolumeSnapshot{}) + + if obj == nil { + return nil, err + } + return obj.(*volumesnapshotv1.VolumeSnapshot), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeVolumeSnapshots) UpdateStatus(ctx context.Context, volumeSnapshot *volumesnapshotv1.VolumeSnapshot, opts v1.UpdateOptions) (*volumesnapshotv1.VolumeSnapshot, error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceAction(volumesnapshotsResource, "status", c.ns, volumeSnapshot), &volumesnapshotv1.VolumeSnapshot{}) + + if obj == nil { + return nil, err + } + return obj.(*volumesnapshotv1.VolumeSnapshot), err +} + +// Delete takes name of the volumeSnapshot and deletes it. Returns an error if one occurs. +func (c *FakeVolumeSnapshots) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteAction(volumesnapshotsResource, c.ns, name), &volumesnapshotv1.VolumeSnapshot{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeVolumeSnapshots) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(volumesnapshotsResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &volumesnapshotv1.VolumeSnapshotList{}) + return err +} + +// Patch applies the patch and returns the patched volumeSnapshot. +func (c *FakeVolumeSnapshots) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *volumesnapshotv1.VolumeSnapshot, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(volumesnapshotsResource, c.ns, name, pt, data, subresources...), &volumesnapshotv1.VolumeSnapshot{}) + + if obj == nil { + return nil, err + } + return obj.(*volumesnapshotv1.VolumeSnapshot), err +} diff --git a/vendor/kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned/typed/volumesnapshot/v1/fake/fake_volumesnapshot_client.go b/vendor/kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned/typed/volumesnapshot/v1/fake/fake_volumesnapshot_client.go new file mode 100644 index 000000000000..89a54d04d8e5 --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned/typed/volumesnapshot/v1/fake/fake_volumesnapshot_client.go @@ -0,0 +1,49 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + rest "k8s.io/client-go/rest" + testing "k8s.io/client-go/testing" + + v1 "kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned/typed/volumesnapshot/v1" +) + +type FakeSnapshotV1 struct { + *testing.Fake +} + +func (c *FakeSnapshotV1) VolumeSnapshots(namespace string) v1.VolumeSnapshotInterface { + return &FakeVolumeSnapshots{c, namespace} +} + +func (c *FakeSnapshotV1) VolumeSnapshotClasses() v1.VolumeSnapshotClassInterface { + return &FakeVolumeSnapshotClasses{c} +} + +func (c *FakeSnapshotV1) VolumeSnapshotContents() v1.VolumeSnapshotContentInterface { + return &FakeVolumeSnapshotContents{c} +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *FakeSnapshotV1) RESTClient() rest.Interface { + var ret *rest.RESTClient + return ret +} diff --git a/vendor/kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned/typed/volumesnapshot/v1/fake/fake_volumesnapshotclass.go b/vendor/kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned/typed/volumesnapshot/v1/fake/fake_volumesnapshotclass.go new file mode 100644 index 000000000000..38711ae509ea --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned/typed/volumesnapshot/v1/fake/fake_volumesnapshotclass.go @@ -0,0 +1,122 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + + volumesnapshotv1 "github.com/kubernetes-csi/external-snapshotter/client/v4/apis/volumesnapshot/v1" + 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" +) + +// FakeVolumeSnapshotClasses implements VolumeSnapshotClassInterface +type FakeVolumeSnapshotClasses struct { + Fake *FakeSnapshotV1 +} + +var volumesnapshotclassesResource = schema.GroupVersionResource{Group: "snapshot.storage.k8s.io", Version: "v1", Resource: "volumesnapshotclasses"} + +var volumesnapshotclassesKind = schema.GroupVersionKind{Group: "snapshot.storage.k8s.io", Version: "v1", Kind: "VolumeSnapshotClass"} + +// Get takes name of the volumeSnapshotClass, and returns the corresponding volumeSnapshotClass object, and an error if there is any. +func (c *FakeVolumeSnapshotClasses) Get(ctx context.Context, name string, options v1.GetOptions) (result *volumesnapshotv1.VolumeSnapshotClass, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootGetAction(volumesnapshotclassesResource, name), &volumesnapshotv1.VolumeSnapshotClass{}) + if obj == nil { + return nil, err + } + return obj.(*volumesnapshotv1.VolumeSnapshotClass), err +} + +// List takes label and field selectors, and returns the list of VolumeSnapshotClasses that match those selectors. +func (c *FakeVolumeSnapshotClasses) List(ctx context.Context, opts v1.ListOptions) (result *volumesnapshotv1.VolumeSnapshotClassList, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootListAction(volumesnapshotclassesResource, volumesnapshotclassesKind, opts), &volumesnapshotv1.VolumeSnapshotClassList{}) + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &volumesnapshotv1.VolumeSnapshotClassList{ListMeta: obj.(*volumesnapshotv1.VolumeSnapshotClassList).ListMeta} + for _, item := range obj.(*volumesnapshotv1.VolumeSnapshotClassList).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 volumeSnapshotClasses. +func (c *FakeVolumeSnapshotClasses) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewRootWatchAction(volumesnapshotclassesResource, opts)) +} + +// Create takes the representation of a volumeSnapshotClass and creates it. Returns the server's representation of the volumeSnapshotClass, and an error, if there is any. +func (c *FakeVolumeSnapshotClasses) Create(ctx context.Context, volumeSnapshotClass *volumesnapshotv1.VolumeSnapshotClass, opts v1.CreateOptions) (result *volumesnapshotv1.VolumeSnapshotClass, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootCreateAction(volumesnapshotclassesResource, volumeSnapshotClass), &volumesnapshotv1.VolumeSnapshotClass{}) + if obj == nil { + return nil, err + } + return obj.(*volumesnapshotv1.VolumeSnapshotClass), err +} + +// Update takes the representation of a volumeSnapshotClass and updates it. Returns the server's representation of the volumeSnapshotClass, and an error, if there is any. +func (c *FakeVolumeSnapshotClasses) Update(ctx context.Context, volumeSnapshotClass *volumesnapshotv1.VolumeSnapshotClass, opts v1.UpdateOptions) (result *volumesnapshotv1.VolumeSnapshotClass, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateAction(volumesnapshotclassesResource, volumeSnapshotClass), &volumesnapshotv1.VolumeSnapshotClass{}) + if obj == nil { + return nil, err + } + return obj.(*volumesnapshotv1.VolumeSnapshotClass), err +} + +// Delete takes name of the volumeSnapshotClass and deletes it. Returns an error if one occurs. +func (c *FakeVolumeSnapshotClasses) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewRootDeleteAction(volumesnapshotclassesResource, name), &volumesnapshotv1.VolumeSnapshotClass{}) + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeVolumeSnapshotClasses) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(volumesnapshotclassesResource, listOpts) + + _, err := c.Fake.Invokes(action, &volumesnapshotv1.VolumeSnapshotClassList{}) + return err +} + +// Patch applies the patch and returns the patched volumeSnapshotClass. +func (c *FakeVolumeSnapshotClasses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *volumesnapshotv1.VolumeSnapshotClass, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(volumesnapshotclassesResource, name, pt, data, subresources...), &volumesnapshotv1.VolumeSnapshotClass{}) + if obj == nil { + return nil, err + } + return obj.(*volumesnapshotv1.VolumeSnapshotClass), err +} diff --git a/vendor/kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned/typed/volumesnapshot/v1/fake/fake_volumesnapshotcontent.go b/vendor/kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned/typed/volumesnapshot/v1/fake/fake_volumesnapshotcontent.go new file mode 100644 index 000000000000..8d8c6af9fb25 --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned/typed/volumesnapshot/v1/fake/fake_volumesnapshotcontent.go @@ -0,0 +1,133 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + + volumesnapshotv1 "github.com/kubernetes-csi/external-snapshotter/client/v4/apis/volumesnapshot/v1" + 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" +) + +// FakeVolumeSnapshotContents implements VolumeSnapshotContentInterface +type FakeVolumeSnapshotContents struct { + Fake *FakeSnapshotV1 +} + +var volumesnapshotcontentsResource = schema.GroupVersionResource{Group: "snapshot.storage.k8s.io", Version: "v1", Resource: "volumesnapshotcontents"} + +var volumesnapshotcontentsKind = schema.GroupVersionKind{Group: "snapshot.storage.k8s.io", Version: "v1", Kind: "VolumeSnapshotContent"} + +// Get takes name of the volumeSnapshotContent, and returns the corresponding volumeSnapshotContent object, and an error if there is any. +func (c *FakeVolumeSnapshotContents) Get(ctx context.Context, name string, options v1.GetOptions) (result *volumesnapshotv1.VolumeSnapshotContent, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootGetAction(volumesnapshotcontentsResource, name), &volumesnapshotv1.VolumeSnapshotContent{}) + if obj == nil { + return nil, err + } + return obj.(*volumesnapshotv1.VolumeSnapshotContent), err +} + +// List takes label and field selectors, and returns the list of VolumeSnapshotContents that match those selectors. +func (c *FakeVolumeSnapshotContents) List(ctx context.Context, opts v1.ListOptions) (result *volumesnapshotv1.VolumeSnapshotContentList, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootListAction(volumesnapshotcontentsResource, volumesnapshotcontentsKind, opts), &volumesnapshotv1.VolumeSnapshotContentList{}) + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &volumesnapshotv1.VolumeSnapshotContentList{ListMeta: obj.(*volumesnapshotv1.VolumeSnapshotContentList).ListMeta} + for _, item := range obj.(*volumesnapshotv1.VolumeSnapshotContentList).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 volumeSnapshotContents. +func (c *FakeVolumeSnapshotContents) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewRootWatchAction(volumesnapshotcontentsResource, opts)) +} + +// Create takes the representation of a volumeSnapshotContent and creates it. Returns the server's representation of the volumeSnapshotContent, and an error, if there is any. +func (c *FakeVolumeSnapshotContents) Create(ctx context.Context, volumeSnapshotContent *volumesnapshotv1.VolumeSnapshotContent, opts v1.CreateOptions) (result *volumesnapshotv1.VolumeSnapshotContent, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootCreateAction(volumesnapshotcontentsResource, volumeSnapshotContent), &volumesnapshotv1.VolumeSnapshotContent{}) + if obj == nil { + return nil, err + } + return obj.(*volumesnapshotv1.VolumeSnapshotContent), err +} + +// Update takes the representation of a volumeSnapshotContent and updates it. Returns the server's representation of the volumeSnapshotContent, and an error, if there is any. +func (c *FakeVolumeSnapshotContents) Update(ctx context.Context, volumeSnapshotContent *volumesnapshotv1.VolumeSnapshotContent, opts v1.UpdateOptions) (result *volumesnapshotv1.VolumeSnapshotContent, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateAction(volumesnapshotcontentsResource, volumeSnapshotContent), &volumesnapshotv1.VolumeSnapshotContent{}) + if obj == nil { + return nil, err + } + return obj.(*volumesnapshotv1.VolumeSnapshotContent), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeVolumeSnapshotContents) UpdateStatus(ctx context.Context, volumeSnapshotContent *volumesnapshotv1.VolumeSnapshotContent, opts v1.UpdateOptions) (*volumesnapshotv1.VolumeSnapshotContent, error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateSubresourceAction(volumesnapshotcontentsResource, "status", volumeSnapshotContent), &volumesnapshotv1.VolumeSnapshotContent{}) + if obj == nil { + return nil, err + } + return obj.(*volumesnapshotv1.VolumeSnapshotContent), err +} + +// Delete takes name of the volumeSnapshotContent and deletes it. Returns an error if one occurs. +func (c *FakeVolumeSnapshotContents) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewRootDeleteAction(volumesnapshotcontentsResource, name), &volumesnapshotv1.VolumeSnapshotContent{}) + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeVolumeSnapshotContents) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(volumesnapshotcontentsResource, listOpts) + + _, err := c.Fake.Invokes(action, &volumesnapshotv1.VolumeSnapshotContentList{}) + return err +} + +// Patch applies the patch and returns the patched volumeSnapshotContent. +func (c *FakeVolumeSnapshotContents) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *volumesnapshotv1.VolumeSnapshotContent, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(volumesnapshotcontentsResource, name, pt, data, subresources...), &volumesnapshotv1.VolumeSnapshotContent{}) + if obj == nil { + return nil, err + } + return obj.(*volumesnapshotv1.VolumeSnapshotContent), err +} diff --git a/vendor/kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned/typed/volumesnapshot/v1/generated_expansion.go b/vendor/kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned/typed/volumesnapshot/v1/generated_expansion.go new file mode 100644 index 000000000000..a4d87ac5243e --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned/typed/volumesnapshot/v1/generated_expansion.go @@ -0,0 +1,25 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +type VolumeSnapshotExpansion interface{} + +type VolumeSnapshotClassExpansion interface{} + +type VolumeSnapshotContentExpansion interface{} diff --git a/vendor/kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned/typed/volumesnapshot/v1/volumesnapshot.go b/vendor/kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned/typed/volumesnapshot/v1/volumesnapshot.go new file mode 100644 index 000000000000..1f606659dc4d --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned/typed/volumesnapshot/v1/volumesnapshot.go @@ -0,0 +1,196 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + "context" + "time" + + v1 "github.com/kubernetes-csi/external-snapshotter/client/v4/apis/volumesnapshot/v1" + metav1 "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" + + scheme "kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned/scheme" +) + +// VolumeSnapshotsGetter has a method to return a VolumeSnapshotInterface. +// A group's client should implement this interface. +type VolumeSnapshotsGetter interface { + VolumeSnapshots(namespace string) VolumeSnapshotInterface +} + +// VolumeSnapshotInterface has methods to work with VolumeSnapshot resources. +type VolumeSnapshotInterface interface { + Create(ctx context.Context, volumeSnapshot *v1.VolumeSnapshot, opts metav1.CreateOptions) (*v1.VolumeSnapshot, error) + Update(ctx context.Context, volumeSnapshot *v1.VolumeSnapshot, opts metav1.UpdateOptions) (*v1.VolumeSnapshot, error) + UpdateStatus(ctx context.Context, volumeSnapshot *v1.VolumeSnapshot, opts metav1.UpdateOptions) (*v1.VolumeSnapshot, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.VolumeSnapshot, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.VolumeSnapshotList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.VolumeSnapshot, err error) + VolumeSnapshotExpansion +} + +// volumeSnapshots implements VolumeSnapshotInterface +type volumeSnapshots struct { + client rest.Interface + ns string +} + +// newVolumeSnapshots returns a VolumeSnapshots +func newVolumeSnapshots(c *SnapshotV1Client, namespace string) *volumeSnapshots { + return &volumeSnapshots{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Get takes name of the volumeSnapshot, and returns the corresponding volumeSnapshot object, and an error if there is any. +func (c *volumeSnapshots) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.VolumeSnapshot, err error) { + result = &v1.VolumeSnapshot{} + err = c.client.Get(). + Namespace(c.ns). + Resource("volumesnapshots"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of VolumeSnapshots that match those selectors. +func (c *volumeSnapshots) List(ctx context.Context, opts metav1.ListOptions) (result *v1.VolumeSnapshotList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1.VolumeSnapshotList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("volumesnapshots"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested volumeSnapshots. +func (c *volumeSnapshots) Watch(ctx context.Context, opts metav1.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(). + Namespace(c.ns). + Resource("volumesnapshots"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a volumeSnapshot and creates it. Returns the server's representation of the volumeSnapshot, and an error, if there is any. +func (c *volumeSnapshots) Create(ctx context.Context, volumeSnapshot *v1.VolumeSnapshot, opts metav1.CreateOptions) (result *v1.VolumeSnapshot, err error) { + result = &v1.VolumeSnapshot{} + err = c.client.Post(). + Namespace(c.ns). + Resource("volumesnapshots"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(volumeSnapshot). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a volumeSnapshot and updates it. Returns the server's representation of the volumeSnapshot, and an error, if there is any. +func (c *volumeSnapshots) Update(ctx context.Context, volumeSnapshot *v1.VolumeSnapshot, opts metav1.UpdateOptions) (result *v1.VolumeSnapshot, err error) { + result = &v1.VolumeSnapshot{} + err = c.client.Put(). + Namespace(c.ns). + Resource("volumesnapshots"). + Name(volumeSnapshot.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(volumeSnapshot). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *volumeSnapshots) UpdateStatus(ctx context.Context, volumeSnapshot *v1.VolumeSnapshot, opts metav1.UpdateOptions) (result *v1.VolumeSnapshot, err error) { + result = &v1.VolumeSnapshot{} + err = c.client.Put(). + Namespace(c.ns). + Resource("volumesnapshots"). + Name(volumeSnapshot.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(volumeSnapshot). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the volumeSnapshot and deletes it. Returns an error if one occurs. +func (c *volumeSnapshots) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("volumesnapshots"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *volumeSnapshots) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Namespace(c.ns). + Resource("volumesnapshots"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched volumeSnapshot. +func (c *volumeSnapshots) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.VolumeSnapshot, err error) { + result = &v1.VolumeSnapshot{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("volumesnapshots"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned/typed/volumesnapshot/v1/volumesnapshot_client.go b/vendor/kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned/typed/volumesnapshot/v1/volumesnapshot_client.go new file mode 100644 index 000000000000..6ca7881e0888 --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned/typed/volumesnapshot/v1/volumesnapshot_client.go @@ -0,0 +1,100 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + v1 "github.com/kubernetes-csi/external-snapshotter/client/v4/apis/volumesnapshot/v1" + rest "k8s.io/client-go/rest" + + "kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned/scheme" +) + +type SnapshotV1Interface interface { + RESTClient() rest.Interface + VolumeSnapshotsGetter + VolumeSnapshotClassesGetter + VolumeSnapshotContentsGetter +} + +// SnapshotV1Client is used to interact with features provided by the snapshot.storage.k8s.io group. +type SnapshotV1Client struct { + restClient rest.Interface +} + +func (c *SnapshotV1Client) VolumeSnapshots(namespace string) VolumeSnapshotInterface { + return newVolumeSnapshots(c, namespace) +} + +func (c *SnapshotV1Client) VolumeSnapshotClasses() VolumeSnapshotClassInterface { + return newVolumeSnapshotClasses(c) +} + +func (c *SnapshotV1Client) VolumeSnapshotContents() VolumeSnapshotContentInterface { + return newVolumeSnapshotContents(c) +} + +// NewForConfig creates a new SnapshotV1Client for the given config. +func NewForConfig(c *rest.Config) (*SnapshotV1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + client, err := rest.RESTClientFor(&config) + if err != nil { + return nil, err + } + return &SnapshotV1Client{client}, nil +} + +// NewForConfigOrDie creates a new SnapshotV1Client for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *SnapshotV1Client { + client, err := NewForConfig(c) + if err != nil { + panic(err) + } + return client +} + +// New creates a new SnapshotV1Client for the given RESTClient. +func New(c rest.Interface) *SnapshotV1Client { + return &SnapshotV1Client{c} +} + +func setConfigDefaults(config *rest.Config) error { + gv := v1.SchemeGroupVersion + config.GroupVersion = &gv + config.APIPath = "/apis" + config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() + + 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 *SnapshotV1Client) RESTClient() rest.Interface { + if c == nil { + return nil + } + return c.restClient +} diff --git a/vendor/kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned/typed/volumesnapshot/v1/volumesnapshotclass.go b/vendor/kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned/typed/volumesnapshot/v1/volumesnapshotclass.go new file mode 100644 index 000000000000..0498ebb21350 --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned/typed/volumesnapshot/v1/volumesnapshotclass.go @@ -0,0 +1,169 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + "context" + "time" + + v1 "github.com/kubernetes-csi/external-snapshotter/client/v4/apis/volumesnapshot/v1" + metav1 "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" + + scheme "kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned/scheme" +) + +// VolumeSnapshotClassesGetter has a method to return a VolumeSnapshotClassInterface. +// A group's client should implement this interface. +type VolumeSnapshotClassesGetter interface { + VolumeSnapshotClasses() VolumeSnapshotClassInterface +} + +// VolumeSnapshotClassInterface has methods to work with VolumeSnapshotClass resources. +type VolumeSnapshotClassInterface interface { + Create(ctx context.Context, volumeSnapshotClass *v1.VolumeSnapshotClass, opts metav1.CreateOptions) (*v1.VolumeSnapshotClass, error) + Update(ctx context.Context, volumeSnapshotClass *v1.VolumeSnapshotClass, opts metav1.UpdateOptions) (*v1.VolumeSnapshotClass, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.VolumeSnapshotClass, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.VolumeSnapshotClassList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.VolumeSnapshotClass, err error) + VolumeSnapshotClassExpansion +} + +// volumeSnapshotClasses implements VolumeSnapshotClassInterface +type volumeSnapshotClasses struct { + client rest.Interface +} + +// newVolumeSnapshotClasses returns a VolumeSnapshotClasses +func newVolumeSnapshotClasses(c *SnapshotV1Client) *volumeSnapshotClasses { + return &volumeSnapshotClasses{ + client: c.RESTClient(), + } +} + +// Get takes name of the volumeSnapshotClass, and returns the corresponding volumeSnapshotClass object, and an error if there is any. +func (c *volumeSnapshotClasses) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.VolumeSnapshotClass, err error) { + result = &v1.VolumeSnapshotClass{} + err = c.client.Get(). + Resource("volumesnapshotclasses"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of VolumeSnapshotClasses that match those selectors. +func (c *volumeSnapshotClasses) List(ctx context.Context, opts metav1.ListOptions) (result *v1.VolumeSnapshotClassList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1.VolumeSnapshotClassList{} + err = c.client.Get(). + Resource("volumesnapshotclasses"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested volumeSnapshotClasses. +func (c *volumeSnapshotClasses) Watch(ctx context.Context, opts metav1.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("volumesnapshotclasses"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a volumeSnapshotClass and creates it. Returns the server's representation of the volumeSnapshotClass, and an error, if there is any. +func (c *volumeSnapshotClasses) Create(ctx context.Context, volumeSnapshotClass *v1.VolumeSnapshotClass, opts metav1.CreateOptions) (result *v1.VolumeSnapshotClass, err error) { + result = &v1.VolumeSnapshotClass{} + err = c.client.Post(). + Resource("volumesnapshotclasses"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(volumeSnapshotClass). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a volumeSnapshotClass and updates it. Returns the server's representation of the volumeSnapshotClass, and an error, if there is any. +func (c *volumeSnapshotClasses) Update(ctx context.Context, volumeSnapshotClass *v1.VolumeSnapshotClass, opts metav1.UpdateOptions) (result *v1.VolumeSnapshotClass, err error) { + result = &v1.VolumeSnapshotClass{} + err = c.client.Put(). + Resource("volumesnapshotclasses"). + Name(volumeSnapshotClass.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(volumeSnapshotClass). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the volumeSnapshotClass and deletes it. Returns an error if one occurs. +func (c *volumeSnapshotClasses) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { + return c.client.Delete(). + Resource("volumesnapshotclasses"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *volumeSnapshotClasses) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Resource("volumesnapshotclasses"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched volumeSnapshotClass. +func (c *volumeSnapshotClasses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.VolumeSnapshotClass, err error) { + result = &v1.VolumeSnapshotClass{} + err = c.client.Patch(pt). + Resource("volumesnapshotclasses"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned/typed/volumesnapshot/v1/volumesnapshotcontent.go b/vendor/kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned/typed/volumesnapshot/v1/volumesnapshotcontent.go new file mode 100644 index 000000000000..c7341089c1bc --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned/typed/volumesnapshot/v1/volumesnapshotcontent.go @@ -0,0 +1,185 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + "context" + "time" + + v1 "github.com/kubernetes-csi/external-snapshotter/client/v4/apis/volumesnapshot/v1" + metav1 "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" + + scheme "kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned/scheme" +) + +// VolumeSnapshotContentsGetter has a method to return a VolumeSnapshotContentInterface. +// A group's client should implement this interface. +type VolumeSnapshotContentsGetter interface { + VolumeSnapshotContents() VolumeSnapshotContentInterface +} + +// VolumeSnapshotContentInterface has methods to work with VolumeSnapshotContent resources. +type VolumeSnapshotContentInterface interface { + Create(ctx context.Context, volumeSnapshotContent *v1.VolumeSnapshotContent, opts metav1.CreateOptions) (*v1.VolumeSnapshotContent, error) + Update(ctx context.Context, volumeSnapshotContent *v1.VolumeSnapshotContent, opts metav1.UpdateOptions) (*v1.VolumeSnapshotContent, error) + UpdateStatus(ctx context.Context, volumeSnapshotContent *v1.VolumeSnapshotContent, opts metav1.UpdateOptions) (*v1.VolumeSnapshotContent, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.VolumeSnapshotContent, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.VolumeSnapshotContentList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.VolumeSnapshotContent, err error) + VolumeSnapshotContentExpansion +} + +// volumeSnapshotContents implements VolumeSnapshotContentInterface +type volumeSnapshotContents struct { + client rest.Interface +} + +// newVolumeSnapshotContents returns a VolumeSnapshotContents +func newVolumeSnapshotContents(c *SnapshotV1Client) *volumeSnapshotContents { + return &volumeSnapshotContents{ + client: c.RESTClient(), + } +} + +// Get takes name of the volumeSnapshotContent, and returns the corresponding volumeSnapshotContent object, and an error if there is any. +func (c *volumeSnapshotContents) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.VolumeSnapshotContent, err error) { + result = &v1.VolumeSnapshotContent{} + err = c.client.Get(). + Resource("volumesnapshotcontents"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of VolumeSnapshotContents that match those selectors. +func (c *volumeSnapshotContents) List(ctx context.Context, opts metav1.ListOptions) (result *v1.VolumeSnapshotContentList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1.VolumeSnapshotContentList{} + err = c.client.Get(). + Resource("volumesnapshotcontents"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested volumeSnapshotContents. +func (c *volumeSnapshotContents) Watch(ctx context.Context, opts metav1.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("volumesnapshotcontents"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a volumeSnapshotContent and creates it. Returns the server's representation of the volumeSnapshotContent, and an error, if there is any. +func (c *volumeSnapshotContents) Create(ctx context.Context, volumeSnapshotContent *v1.VolumeSnapshotContent, opts metav1.CreateOptions) (result *v1.VolumeSnapshotContent, err error) { + result = &v1.VolumeSnapshotContent{} + err = c.client.Post(). + Resource("volumesnapshotcontents"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(volumeSnapshotContent). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a volumeSnapshotContent and updates it. Returns the server's representation of the volumeSnapshotContent, and an error, if there is any. +func (c *volumeSnapshotContents) Update(ctx context.Context, volumeSnapshotContent *v1.VolumeSnapshotContent, opts metav1.UpdateOptions) (result *v1.VolumeSnapshotContent, err error) { + result = &v1.VolumeSnapshotContent{} + err = c.client.Put(). + Resource("volumesnapshotcontents"). + Name(volumeSnapshotContent.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(volumeSnapshotContent). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *volumeSnapshotContents) UpdateStatus(ctx context.Context, volumeSnapshotContent *v1.VolumeSnapshotContent, opts metav1.UpdateOptions) (result *v1.VolumeSnapshotContent, err error) { + result = &v1.VolumeSnapshotContent{} + err = c.client.Put(). + Resource("volumesnapshotcontents"). + Name(volumeSnapshotContent.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(volumeSnapshotContent). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the volumeSnapshotContent and deletes it. Returns an error if one occurs. +func (c *volumeSnapshotContents) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { + return c.client.Delete(). + Resource("volumesnapshotcontents"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *volumeSnapshotContents) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Resource("volumesnapshotcontents"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched volumeSnapshotContent. +func (c *volumeSnapshotContents) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.VolumeSnapshotContent, err error) { + result = &v1.VolumeSnapshotContent{} + err = c.client.Patch(pt). + Resource("volumesnapshotcontents"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/BUILD.bazel b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/BUILD.bazel new file mode 100644 index 000000000000..06a754f1eb3f --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/BUILD.bazel @@ -0,0 +1,20 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = [ + "clientset.go", + "doc.go", + ], + importpath = "kubevirt.io/client-go/generated/kubevirt/clientset/versioned", + visibility = ["//visibility:public"], + deps = [ + "//staging/src/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/flavor/v1alpha1:go_default_library", + "//staging/src/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/migrations/v1alpha1:go_default_library", + "//staging/src/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/pool/v1alpha1:go_default_library", + "//staging/src/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/snapshot/v1alpha1:go_default_library", + "//vendor/k8s.io/client-go/discovery:go_default_library", + "//vendor/k8s.io/client-go/rest:go_default_library", + "//vendor/k8s.io/client-go/util/flowcontrol:go_default_library", + ], +) diff --git a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/clientset.go b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/clientset.go new file mode 100644 index 000000000000..be4713b088fb --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/clientset.go @@ -0,0 +1,140 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package versioned + +import ( + "fmt" + + discovery "k8s.io/client-go/discovery" + rest "k8s.io/client-go/rest" + flowcontrol "k8s.io/client-go/util/flowcontrol" + + flavorv1alpha1 "kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/flavor/v1alpha1" + migrationsv1alpha1 "kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/migrations/v1alpha1" + poolv1alpha1 "kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/pool/v1alpha1" + snapshotv1alpha1 "kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/snapshot/v1alpha1" +) + +type Interface interface { + Discovery() discovery.DiscoveryInterface + FlavorV1alpha1() flavorv1alpha1.FlavorV1alpha1Interface + MigrationsV1alpha1() migrationsv1alpha1.MigrationsV1alpha1Interface + PoolV1alpha1() poolv1alpha1.PoolV1alpha1Interface + SnapshotV1alpha1() snapshotv1alpha1.SnapshotV1alpha1Interface +} + +// Clientset contains the clients for groups. Each group has exactly one +// version included in a Clientset. +type Clientset struct { + *discovery.DiscoveryClient + flavorV1alpha1 *flavorv1alpha1.FlavorV1alpha1Client + migrationsV1alpha1 *migrationsv1alpha1.MigrationsV1alpha1Client + poolV1alpha1 *poolv1alpha1.PoolV1alpha1Client + snapshotV1alpha1 *snapshotv1alpha1.SnapshotV1alpha1Client +} + +// FlavorV1alpha1 retrieves the FlavorV1alpha1Client +func (c *Clientset) FlavorV1alpha1() flavorv1alpha1.FlavorV1alpha1Interface { + return c.flavorV1alpha1 +} + +// MigrationsV1alpha1 retrieves the MigrationsV1alpha1Client +func (c *Clientset) MigrationsV1alpha1() migrationsv1alpha1.MigrationsV1alpha1Interface { + return c.migrationsV1alpha1 +} + +// PoolV1alpha1 retrieves the PoolV1alpha1Client +func (c *Clientset) PoolV1alpha1() poolv1alpha1.PoolV1alpha1Interface { + return c.poolV1alpha1 +} + +// SnapshotV1alpha1 retrieves the SnapshotV1alpha1Client +func (c *Clientset) SnapshotV1alpha1() snapshotv1alpha1.SnapshotV1alpha1Interface { + return c.snapshotV1alpha1 +} + +// Discovery retrieves the DiscoveryClient +func (c *Clientset) Discovery() discovery.DiscoveryInterface { + if c == nil { + return nil + } + return c.DiscoveryClient +} + +// NewForConfig creates a new Clientset for the given config. +// If config's RateLimiter is not set and QPS and Burst are acceptable, +// NewForConfig will generate a rate-limiter in configShallowCopy. +func NewForConfig(c *rest.Config) (*Clientset, error) { + configShallowCopy := *c + if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 { + if configShallowCopy.Burst <= 0 { + return nil, fmt.Errorf("burst is required to be greater than 0 when RateLimiter is not set and QPS is set to greater than 0") + } + configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst) + } + var cs Clientset + var err error + cs.flavorV1alpha1, err = flavorv1alpha1.NewForConfig(&configShallowCopy) + if err != nil { + return nil, err + } + cs.migrationsV1alpha1, err = migrationsv1alpha1.NewForConfig(&configShallowCopy) + if err != nil { + return nil, err + } + cs.poolV1alpha1, err = poolv1alpha1.NewForConfig(&configShallowCopy) + if err != nil { + return nil, err + } + cs.snapshotV1alpha1, err = snapshotv1alpha1.NewForConfig(&configShallowCopy) + if err != nil { + return nil, err + } + + cs.DiscoveryClient, err = discovery.NewDiscoveryClientForConfig(&configShallowCopy) + if err != nil { + return nil, err + } + return &cs, nil +} + +// NewForConfigOrDie creates a new Clientset for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *Clientset { + var cs Clientset + cs.flavorV1alpha1 = flavorv1alpha1.NewForConfigOrDie(c) + cs.migrationsV1alpha1 = migrationsv1alpha1.NewForConfigOrDie(c) + cs.poolV1alpha1 = poolv1alpha1.NewForConfigOrDie(c) + cs.snapshotV1alpha1 = snapshotv1alpha1.NewForConfigOrDie(c) + + cs.DiscoveryClient = discovery.NewDiscoveryClientForConfigOrDie(c) + return &cs +} + +// New creates a new Clientset for the given RESTClient. +func New(c rest.Interface) *Clientset { + var cs Clientset + cs.flavorV1alpha1 = flavorv1alpha1.New(c) + cs.migrationsV1alpha1 = migrationsv1alpha1.New(c) + cs.poolV1alpha1 = poolv1alpha1.New(c) + cs.snapshotV1alpha1 = snapshotv1alpha1.New(c) + + cs.DiscoveryClient = discovery.NewDiscoveryClient(c) + return &cs +} diff --git a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/doc.go b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/doc.go new file mode 100644 index 000000000000..755a91d8b8a1 --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +// This package has the automatically generated clientset. +package versioned diff --git a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/fake/BUILD.bazel b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/fake/BUILD.bazel new file mode 100644 index 000000000000..abccc8375d69 --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/fake/BUILD.bazel @@ -0,0 +1,36 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = [ + "clientset_generated.go", + "doc.go", + "register.go", + ], + importpath = "kubevirt.io/client-go/generated/kubevirt/clientset/versioned/fake", + visibility = ["//visibility:public"], + deps = [ + "//staging/src/kubevirt.io/api/flavor/v1alpha1:go_default_library", + "//staging/src/kubevirt.io/api/migrations/v1alpha1:go_default_library", + "//staging/src/kubevirt.io/api/pool/v1alpha1:go_default_library", + "//staging/src/kubevirt.io/api/snapshot/v1alpha1:go_default_library", + "//staging/src/kubevirt.io/client-go/generated/kubevirt/clientset/versioned:go_default_library", + "//staging/src/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/flavor/v1alpha1:go_default_library", + "//staging/src/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/flavor/v1alpha1/fake:go_default_library", + "//staging/src/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/migrations/v1alpha1:go_default_library", + "//staging/src/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/migrations/v1alpha1/fake:go_default_library", + "//staging/src/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/pool/v1alpha1:go_default_library", + "//staging/src/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/pool/v1alpha1/fake:go_default_library", + "//staging/src/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/snapshot/v1alpha1:go_default_library", + "//staging/src/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/snapshot/v1alpha1/fake:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/util/runtime:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", + "//vendor/k8s.io/client-go/discovery:go_default_library", + "//vendor/k8s.io/client-go/discovery/fake:go_default_library", + "//vendor/k8s.io/client-go/testing:go_default_library", + ], +) diff --git a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/fake/clientset_generated.go b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/fake/clientset_generated.go new file mode 100644 index 000000000000..20a95a4bfd86 --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/fake/clientset_generated.go @@ -0,0 +1,104 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/watch" + "k8s.io/client-go/discovery" + fakediscovery "k8s.io/client-go/discovery/fake" + "k8s.io/client-go/testing" + + clientset "kubevirt.io/client-go/generated/kubevirt/clientset/versioned" + flavorv1alpha1 "kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/flavor/v1alpha1" + fakeflavorv1alpha1 "kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/flavor/v1alpha1/fake" + migrationsv1alpha1 "kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/migrations/v1alpha1" + fakemigrationsv1alpha1 "kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/migrations/v1alpha1/fake" + poolv1alpha1 "kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/pool/v1alpha1" + fakepoolv1alpha1 "kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/pool/v1alpha1/fake" + snapshotv1alpha1 "kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/snapshot/v1alpha1" + fakesnapshotv1alpha1 "kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/snapshot/v1alpha1/fake" +) + +// NewSimpleClientset returns a clientset that will respond with the provided objects. +// It's backed by a very simple object tracker that processes creates, updates and deletions as-is, +// without applying any validations and/or defaults. It shouldn't be considered a replacement +// for a real clientset and is mostly useful in simple unit tests. +func NewSimpleClientset(objects ...runtime.Object) *Clientset { + o := testing.NewObjectTracker(scheme, codecs.UniversalDecoder()) + for _, obj := range objects { + if err := o.Add(obj); err != nil { + panic(err) + } + } + + cs := &Clientset{tracker: o} + cs.discovery = &fakediscovery.FakeDiscovery{Fake: &cs.Fake} + cs.AddReactor("*", "*", testing.ObjectReaction(o)) + cs.AddWatchReactor("*", func(action testing.Action) (handled bool, ret watch.Interface, err error) { + gvr := action.GetResource() + ns := action.GetNamespace() + watch, err := o.Watch(gvr, ns) + if err != nil { + return false, nil, err + } + return true, watch, nil + }) + + return cs +} + +// Clientset implements clientset.Interface. Meant to be embedded into a +// struct to get a default implementation. This makes faking out just the method +// you want to test easier. +type Clientset struct { + testing.Fake + discovery *fakediscovery.FakeDiscovery + tracker testing.ObjectTracker +} + +func (c *Clientset) Discovery() discovery.DiscoveryInterface { + return c.discovery +} + +func (c *Clientset) Tracker() testing.ObjectTracker { + return c.tracker +} + +var _ clientset.Interface = &Clientset{} + +// FlavorV1alpha1 retrieves the FlavorV1alpha1Client +func (c *Clientset) FlavorV1alpha1() flavorv1alpha1.FlavorV1alpha1Interface { + return &fakeflavorv1alpha1.FakeFlavorV1alpha1{Fake: &c.Fake} +} + +// MigrationsV1alpha1 retrieves the MigrationsV1alpha1Client +func (c *Clientset) MigrationsV1alpha1() migrationsv1alpha1.MigrationsV1alpha1Interface { + return &fakemigrationsv1alpha1.FakeMigrationsV1alpha1{Fake: &c.Fake} +} + +// PoolV1alpha1 retrieves the PoolV1alpha1Client +func (c *Clientset) PoolV1alpha1() poolv1alpha1.PoolV1alpha1Interface { + return &fakepoolv1alpha1.FakePoolV1alpha1{Fake: &c.Fake} +} + +// SnapshotV1alpha1 retrieves the SnapshotV1alpha1Client +func (c *Clientset) SnapshotV1alpha1() snapshotv1alpha1.SnapshotV1alpha1Interface { + return &fakesnapshotv1alpha1.FakeSnapshotV1alpha1{Fake: &c.Fake} +} diff --git a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/fake/doc.go b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/fake/doc.go new file mode 100644 index 000000000000..303a21d3b1dc --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/fake/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +// This package has the automatically generated fake clientset. +package fake diff --git a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/fake/register.go b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/fake/register.go new file mode 100644 index 000000000000..441f84ca1c36 --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/fake/register.go @@ -0,0 +1,63 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + schema "k8s.io/apimachinery/pkg/runtime/schema" + serializer "k8s.io/apimachinery/pkg/runtime/serializer" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" + + flavorv1alpha1 "kubevirt.io/api/flavor/v1alpha1" + migrationsv1alpha1 "kubevirt.io/api/migrations/v1alpha1" + poolv1alpha1 "kubevirt.io/api/pool/v1alpha1" + snapshotv1alpha1 "kubevirt.io/api/snapshot/v1alpha1" +) + +var scheme = runtime.NewScheme() +var codecs = serializer.NewCodecFactory(scheme) + +var localSchemeBuilder = runtime.SchemeBuilder{ + flavorv1alpha1.AddToScheme, + migrationsv1alpha1.AddToScheme, + poolv1alpha1.AddToScheme, + snapshotv1alpha1.AddToScheme, +} + +// AddToScheme adds all types of this clientset into the given scheme. This allows composition +// of clientsets, like in: +// +// import ( +// "k8s.io/client-go/kubernetes" +// clientsetscheme "k8s.io/client-go/kubernetes/scheme" +// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" +// ) +// +// kclientset, _ := kubernetes.NewForConfig(c) +// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) +// +// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types +// correctly. +var AddToScheme = localSchemeBuilder.AddToScheme + +func init() { + v1.AddToGroupVersion(scheme, schema.GroupVersion{Version: "v1"}) + utilruntime.Must(AddToScheme(scheme)) +} diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/scheme/BUILD.bazel b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/scheme/BUILD.bazel similarity index 60% rename from vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/scheme/BUILD.bazel rename to vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/scheme/BUILD.bazel index 809011db33f4..0c8b66a41601 100644 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/scheme/BUILD.bazel +++ b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/scheme/BUILD.bazel @@ -6,12 +6,13 @@ go_library( "doc.go", "register.go", ], - importmap = "kubevirt.io/kubevirt/vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/scheme", - importpath = "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/scheme", + importpath = "kubevirt.io/client-go/generated/kubevirt/clientset/versioned/scheme", visibility = ["//visibility:public"], deps = [ - "//vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1:go_default_library", - "//vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1:go_default_library", + "//staging/src/kubevirt.io/api/flavor/v1alpha1:go_default_library", + "//staging/src/kubevirt.io/api/migrations/v1alpha1:go_default_library", + "//staging/src/kubevirt.io/api/pool/v1alpha1:go_default_library", + "//staging/src/kubevirt.io/api/snapshot/v1alpha1:go_default_library", "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", diff --git a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/scheme/doc.go b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/scheme/doc.go new file mode 100644 index 000000000000..e6c48e24db86 --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/scheme/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +// This package contains the scheme of the automatically generated clientset. +package scheme diff --git a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/scheme/register.go b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/scheme/register.go new file mode 100644 index 000000000000..883dfa6460d8 --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/scheme/register.go @@ -0,0 +1,63 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package scheme + +import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + schema "k8s.io/apimachinery/pkg/runtime/schema" + serializer "k8s.io/apimachinery/pkg/runtime/serializer" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" + + flavorv1alpha1 "kubevirt.io/api/flavor/v1alpha1" + migrationsv1alpha1 "kubevirt.io/api/migrations/v1alpha1" + poolv1alpha1 "kubevirt.io/api/pool/v1alpha1" + snapshotv1alpha1 "kubevirt.io/api/snapshot/v1alpha1" +) + +var Scheme = runtime.NewScheme() +var Codecs = serializer.NewCodecFactory(Scheme) +var ParameterCodec = runtime.NewParameterCodec(Scheme) +var localSchemeBuilder = runtime.SchemeBuilder{ + flavorv1alpha1.AddToScheme, + migrationsv1alpha1.AddToScheme, + poolv1alpha1.AddToScheme, + snapshotv1alpha1.AddToScheme, +} + +// AddToScheme adds all types of this clientset into the given scheme. This allows composition +// of clientsets, like in: +// +// import ( +// "k8s.io/client-go/kubernetes" +// clientsetscheme "k8s.io/client-go/kubernetes/scheme" +// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" +// ) +// +// kclientset, _ := kubernetes.NewForConfig(c) +// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) +// +// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types +// correctly. +var AddToScheme = localSchemeBuilder.AddToScheme + +func init() { + v1.AddToGroupVersion(Scheme, schema.GroupVersion{Version: "v1"}) + utilruntime.Must(AddToScheme(Scheme)) +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/batch/v1/BUILD.bazel b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/flavor/v1alpha1/BUILD.bazel similarity index 53% rename from vendor/k8s.io/client-go/kubernetes/typed/batch/v1/BUILD.bazel rename to vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/flavor/v1alpha1/BUILD.bazel index bb59361c2377..d56c7ae6e5d8 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/batch/v1/BUILD.bazel +++ b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/flavor/v1alpha1/BUILD.bazel @@ -3,22 +3,20 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library") go_library( name = "go_default_library", srcs = [ - "batch_client.go", - "cronjob.go", "doc.go", + "flavor_client.go", "generated_expansion.go", - "job.go", + "virtualmachineclusterflavor.go", + "virtualmachineflavor.go", ], - importmap = "kubevirt.io/kubevirt/vendor/k8s.io/client-go/kubernetes/typed/batch/v1", - importpath = "k8s.io/client-go/kubernetes/typed/batch/v1", + importpath = "kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/flavor/v1alpha1", visibility = ["//visibility:public"], deps = [ - "//vendor/k8s.io/api/batch/v1:go_default_library", + "//staging/src/kubevirt.io/api/flavor/v1alpha1:go_default_library", + "//staging/src/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/scheme:go_default_library", "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/applyconfigurations/batch/v1:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/scheme:go_default_library", "//vendor/k8s.io/client-go/rest:go_default_library", ], ) diff --git a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/flavor/v1alpha1/doc.go b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/flavor/v1alpha1/doc.go new file mode 100644 index 000000000000..5e11a467bea1 --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/flavor/v1alpha1/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +// This package has the automatically generated typed clients. +package v1alpha1 diff --git a/vendor/k8s.io/client-go/kubernetes/typed/events/v1/fake/BUILD.bazel b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/flavor/v1alpha1/fake/BUILD.bazel similarity index 60% rename from vendor/k8s.io/client-go/kubernetes/typed/events/v1/fake/BUILD.bazel rename to vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/flavor/v1alpha1/fake/BUILD.bazel index 6a1b18544da3..a77b1a342f48 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/events/v1/fake/BUILD.bazel +++ b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/flavor/v1alpha1/fake/BUILD.bazel @@ -4,21 +4,20 @@ go_library( name = "go_default_library", srcs = [ "doc.go", - "fake_event.go", - "fake_events_client.go", + "fake_flavor_client.go", + "fake_virtualmachineclusterflavor.go", + "fake_virtualmachineflavor.go", ], - importmap = "kubevirt.io/kubevirt/vendor/k8s.io/client-go/kubernetes/typed/events/v1/fake", - importpath = "k8s.io/client-go/kubernetes/typed/events/v1/fake", + importpath = "kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/flavor/v1alpha1/fake", visibility = ["//visibility:public"], deps = [ - "//vendor/k8s.io/api/events/v1:go_default_library", + "//staging/src/kubevirt.io/api/flavor/v1alpha1:go_default_library", + "//staging/src/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/flavor/v1alpha1:go_default_library", "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/applyconfigurations/events/v1:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/events/v1:go_default_library", "//vendor/k8s.io/client-go/rest:go_default_library", "//vendor/k8s.io/client-go/testing:go_default_library", ], diff --git a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/flavor/v1alpha1/fake/doc.go b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/flavor/v1alpha1/fake/doc.go new file mode 100644 index 000000000000..853f43b09c4e --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/flavor/v1alpha1/fake/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +// Package fake has the automatically generated clients. +package fake diff --git a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/flavor/v1alpha1/fake/fake_flavor_client.go b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/flavor/v1alpha1/fake/fake_flavor_client.go new file mode 100644 index 000000000000..10c98d8e8a86 --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/flavor/v1alpha1/fake/fake_flavor_client.go @@ -0,0 +1,45 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + rest "k8s.io/client-go/rest" + testing "k8s.io/client-go/testing" + + v1alpha1 "kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/flavor/v1alpha1" +) + +type FakeFlavorV1alpha1 struct { + *testing.Fake +} + +func (c *FakeFlavorV1alpha1) VirtualMachineClusterFlavors() v1alpha1.VirtualMachineClusterFlavorInterface { + return &FakeVirtualMachineClusterFlavors{c} +} + +func (c *FakeFlavorV1alpha1) VirtualMachineFlavors(namespace string) v1alpha1.VirtualMachineFlavorInterface { + return &FakeVirtualMachineFlavors{c, namespace} +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *FakeFlavorV1alpha1) RESTClient() rest.Interface { + var ret *rest.RESTClient + return ret +} diff --git a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/flavor/v1alpha1/fake/fake_virtualmachineclusterflavor.go b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/flavor/v1alpha1/fake/fake_virtualmachineclusterflavor.go new file mode 100644 index 000000000000..2ae860c8648e --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/flavor/v1alpha1/fake/fake_virtualmachineclusterflavor.go @@ -0,0 +1,123 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + + 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" + + v1alpha1 "kubevirt.io/api/flavor/v1alpha1" +) + +// FakeVirtualMachineClusterFlavors implements VirtualMachineClusterFlavorInterface +type FakeVirtualMachineClusterFlavors struct { + Fake *FakeFlavorV1alpha1 +} + +var virtualmachineclusterflavorsResource = schema.GroupVersionResource{Group: "flavor.kubevirt.io", Version: "v1alpha1", Resource: "virtualmachineclusterflavors"} + +var virtualmachineclusterflavorsKind = schema.GroupVersionKind{Group: "flavor.kubevirt.io", Version: "v1alpha1", Kind: "VirtualMachineClusterFlavor"} + +// Get takes name of the virtualMachineClusterFlavor, and returns the corresponding virtualMachineClusterFlavor object, and an error if there is any. +func (c *FakeVirtualMachineClusterFlavors) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.VirtualMachineClusterFlavor, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootGetAction(virtualmachineclusterflavorsResource, name), &v1alpha1.VirtualMachineClusterFlavor{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.VirtualMachineClusterFlavor), err +} + +// List takes label and field selectors, and returns the list of VirtualMachineClusterFlavors that match those selectors. +func (c *FakeVirtualMachineClusterFlavors) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.VirtualMachineClusterFlavorList, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootListAction(virtualmachineclusterflavorsResource, virtualmachineclusterflavorsKind, opts), &v1alpha1.VirtualMachineClusterFlavorList{}) + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1alpha1.VirtualMachineClusterFlavorList{ListMeta: obj.(*v1alpha1.VirtualMachineClusterFlavorList).ListMeta} + for _, item := range obj.(*v1alpha1.VirtualMachineClusterFlavorList).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 virtualMachineClusterFlavors. +func (c *FakeVirtualMachineClusterFlavors) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewRootWatchAction(virtualmachineclusterflavorsResource, opts)) +} + +// Create takes the representation of a virtualMachineClusterFlavor and creates it. Returns the server's representation of the virtualMachineClusterFlavor, and an error, if there is any. +func (c *FakeVirtualMachineClusterFlavors) Create(ctx context.Context, virtualMachineClusterFlavor *v1alpha1.VirtualMachineClusterFlavor, opts v1.CreateOptions) (result *v1alpha1.VirtualMachineClusterFlavor, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootCreateAction(virtualmachineclusterflavorsResource, virtualMachineClusterFlavor), &v1alpha1.VirtualMachineClusterFlavor{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.VirtualMachineClusterFlavor), err +} + +// Update takes the representation of a virtualMachineClusterFlavor and updates it. Returns the server's representation of the virtualMachineClusterFlavor, and an error, if there is any. +func (c *FakeVirtualMachineClusterFlavors) Update(ctx context.Context, virtualMachineClusterFlavor *v1alpha1.VirtualMachineClusterFlavor, opts v1.UpdateOptions) (result *v1alpha1.VirtualMachineClusterFlavor, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateAction(virtualmachineclusterflavorsResource, virtualMachineClusterFlavor), &v1alpha1.VirtualMachineClusterFlavor{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.VirtualMachineClusterFlavor), err +} + +// Delete takes name of the virtualMachineClusterFlavor and deletes it. Returns an error if one occurs. +func (c *FakeVirtualMachineClusterFlavors) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewRootDeleteAction(virtualmachineclusterflavorsResource, name), &v1alpha1.VirtualMachineClusterFlavor{}) + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeVirtualMachineClusterFlavors) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(virtualmachineclusterflavorsResource, listOpts) + + _, err := c.Fake.Invokes(action, &v1alpha1.VirtualMachineClusterFlavorList{}) + return err +} + +// Patch applies the patch and returns the patched virtualMachineClusterFlavor. +func (c *FakeVirtualMachineClusterFlavors) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.VirtualMachineClusterFlavor, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(virtualmachineclusterflavorsResource, name, pt, data, subresources...), &v1alpha1.VirtualMachineClusterFlavor{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.VirtualMachineClusterFlavor), err +} diff --git a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/flavor/v1alpha1/fake/fake_virtualmachineflavor.go b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/flavor/v1alpha1/fake/fake_virtualmachineflavor.go new file mode 100644 index 000000000000..f0d97c10774e --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/flavor/v1alpha1/fake/fake_virtualmachineflavor.go @@ -0,0 +1,131 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + + 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" + + v1alpha1 "kubevirt.io/api/flavor/v1alpha1" +) + +// FakeVirtualMachineFlavors implements VirtualMachineFlavorInterface +type FakeVirtualMachineFlavors struct { + Fake *FakeFlavorV1alpha1 + ns string +} + +var virtualmachineflavorsResource = schema.GroupVersionResource{Group: "flavor.kubevirt.io", Version: "v1alpha1", Resource: "virtualmachineflavors"} + +var virtualmachineflavorsKind = schema.GroupVersionKind{Group: "flavor.kubevirt.io", Version: "v1alpha1", Kind: "VirtualMachineFlavor"} + +// Get takes name of the virtualMachineFlavor, and returns the corresponding virtualMachineFlavor object, and an error if there is any. +func (c *FakeVirtualMachineFlavors) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.VirtualMachineFlavor, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(virtualmachineflavorsResource, c.ns, name), &v1alpha1.VirtualMachineFlavor{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.VirtualMachineFlavor), err +} + +// List takes label and field selectors, and returns the list of VirtualMachineFlavors that match those selectors. +func (c *FakeVirtualMachineFlavors) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.VirtualMachineFlavorList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(virtualmachineflavorsResource, virtualmachineflavorsKind, c.ns, opts), &v1alpha1.VirtualMachineFlavorList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1alpha1.VirtualMachineFlavorList{ListMeta: obj.(*v1alpha1.VirtualMachineFlavorList).ListMeta} + for _, item := range obj.(*v1alpha1.VirtualMachineFlavorList).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 virtualMachineFlavors. +func (c *FakeVirtualMachineFlavors) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(virtualmachineflavorsResource, c.ns, opts)) + +} + +// Create takes the representation of a virtualMachineFlavor and creates it. Returns the server's representation of the virtualMachineFlavor, and an error, if there is any. +func (c *FakeVirtualMachineFlavors) Create(ctx context.Context, virtualMachineFlavor *v1alpha1.VirtualMachineFlavor, opts v1.CreateOptions) (result *v1alpha1.VirtualMachineFlavor, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(virtualmachineflavorsResource, c.ns, virtualMachineFlavor), &v1alpha1.VirtualMachineFlavor{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.VirtualMachineFlavor), err +} + +// Update takes the representation of a virtualMachineFlavor and updates it. Returns the server's representation of the virtualMachineFlavor, and an error, if there is any. +func (c *FakeVirtualMachineFlavors) Update(ctx context.Context, virtualMachineFlavor *v1alpha1.VirtualMachineFlavor, opts v1.UpdateOptions) (result *v1alpha1.VirtualMachineFlavor, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(virtualmachineflavorsResource, c.ns, virtualMachineFlavor), &v1alpha1.VirtualMachineFlavor{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.VirtualMachineFlavor), err +} + +// Delete takes name of the virtualMachineFlavor and deletes it. Returns an error if one occurs. +func (c *FakeVirtualMachineFlavors) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteAction(virtualmachineflavorsResource, c.ns, name), &v1alpha1.VirtualMachineFlavor{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeVirtualMachineFlavors) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(virtualmachineflavorsResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &v1alpha1.VirtualMachineFlavorList{}) + return err +} + +// Patch applies the patch and returns the patched virtualMachineFlavor. +func (c *FakeVirtualMachineFlavors) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.VirtualMachineFlavor, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(virtualmachineflavorsResource, c.ns, name, pt, data, subresources...), &v1alpha1.VirtualMachineFlavor{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.VirtualMachineFlavor), err +} diff --git a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/flavor/v1alpha1/flavor_client.go b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/flavor/v1alpha1/flavor_client.go new file mode 100644 index 000000000000..840386b1b5cc --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/flavor/v1alpha1/flavor_client.go @@ -0,0 +1,95 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + rest "k8s.io/client-go/rest" + + v1alpha1 "kubevirt.io/api/flavor/v1alpha1" + "kubevirt.io/client-go/generated/kubevirt/clientset/versioned/scheme" +) + +type FlavorV1alpha1Interface interface { + RESTClient() rest.Interface + VirtualMachineClusterFlavorsGetter + VirtualMachineFlavorsGetter +} + +// FlavorV1alpha1Client is used to interact with features provided by the flavor.kubevirt.io group. +type FlavorV1alpha1Client struct { + restClient rest.Interface +} + +func (c *FlavorV1alpha1Client) VirtualMachineClusterFlavors() VirtualMachineClusterFlavorInterface { + return newVirtualMachineClusterFlavors(c) +} + +func (c *FlavorV1alpha1Client) VirtualMachineFlavors(namespace string) VirtualMachineFlavorInterface { + return newVirtualMachineFlavors(c, namespace) +} + +// NewForConfig creates a new FlavorV1alpha1Client for the given config. +func NewForConfig(c *rest.Config) (*FlavorV1alpha1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + client, err := rest.RESTClientFor(&config) + if err != nil { + return nil, err + } + return &FlavorV1alpha1Client{client}, nil +} + +// NewForConfigOrDie creates a new FlavorV1alpha1Client for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *FlavorV1alpha1Client { + client, err := NewForConfig(c) + if err != nil { + panic(err) + } + return client +} + +// New creates a new FlavorV1alpha1Client for the given RESTClient. +func New(c rest.Interface) *FlavorV1alpha1Client { + return &FlavorV1alpha1Client{c} +} + +func setConfigDefaults(config *rest.Config) error { + gv := v1alpha1.SchemeGroupVersion + config.GroupVersion = &gv + config.APIPath = "/apis" + config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() + + 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 *FlavorV1alpha1Client) RESTClient() rest.Interface { + if c == nil { + return nil + } + return c.restClient +} diff --git a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/flavor/v1alpha1/generated_expansion.go b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/flavor/v1alpha1/generated_expansion.go new file mode 100644 index 000000000000..15b296d952d7 --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/flavor/v1alpha1/generated_expansion.go @@ -0,0 +1,23 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +type VirtualMachineClusterFlavorExpansion interface{} + +type VirtualMachineFlavorExpansion interface{} diff --git a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/flavor/v1alpha1/virtualmachineclusterflavor.go b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/flavor/v1alpha1/virtualmachineclusterflavor.go new file mode 100644 index 000000000000..d5b86a0c313e --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/flavor/v1alpha1/virtualmachineclusterflavor.go @@ -0,0 +1,169 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "context" + "time" + + 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" + + v1alpha1 "kubevirt.io/api/flavor/v1alpha1" + scheme "kubevirt.io/client-go/generated/kubevirt/clientset/versioned/scheme" +) + +// VirtualMachineClusterFlavorsGetter has a method to return a VirtualMachineClusterFlavorInterface. +// A group's client should implement this interface. +type VirtualMachineClusterFlavorsGetter interface { + VirtualMachineClusterFlavors() VirtualMachineClusterFlavorInterface +} + +// VirtualMachineClusterFlavorInterface has methods to work with VirtualMachineClusterFlavor resources. +type VirtualMachineClusterFlavorInterface interface { + Create(ctx context.Context, virtualMachineClusterFlavor *v1alpha1.VirtualMachineClusterFlavor, opts v1.CreateOptions) (*v1alpha1.VirtualMachineClusterFlavor, error) + Update(ctx context.Context, virtualMachineClusterFlavor *v1alpha1.VirtualMachineClusterFlavor, opts v1.UpdateOptions) (*v1alpha1.VirtualMachineClusterFlavor, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.VirtualMachineClusterFlavor, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.VirtualMachineClusterFlavorList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.VirtualMachineClusterFlavor, err error) + VirtualMachineClusterFlavorExpansion +} + +// virtualMachineClusterFlavors implements VirtualMachineClusterFlavorInterface +type virtualMachineClusterFlavors struct { + client rest.Interface +} + +// newVirtualMachineClusterFlavors returns a VirtualMachineClusterFlavors +func newVirtualMachineClusterFlavors(c *FlavorV1alpha1Client) *virtualMachineClusterFlavors { + return &virtualMachineClusterFlavors{ + client: c.RESTClient(), + } +} + +// Get takes name of the virtualMachineClusterFlavor, and returns the corresponding virtualMachineClusterFlavor object, and an error if there is any. +func (c *virtualMachineClusterFlavors) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.VirtualMachineClusterFlavor, err error) { + result = &v1alpha1.VirtualMachineClusterFlavor{} + err = c.client.Get(). + Resource("virtualmachineclusterflavors"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of VirtualMachineClusterFlavors that match those selectors. +func (c *virtualMachineClusterFlavors) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.VirtualMachineClusterFlavorList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1alpha1.VirtualMachineClusterFlavorList{} + err = c.client.Get(). + Resource("virtualmachineclusterflavors"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested virtualMachineClusterFlavors. +func (c *virtualMachineClusterFlavors) Watch(ctx context.Context, 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("virtualmachineclusterflavors"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a virtualMachineClusterFlavor and creates it. Returns the server's representation of the virtualMachineClusterFlavor, and an error, if there is any. +func (c *virtualMachineClusterFlavors) Create(ctx context.Context, virtualMachineClusterFlavor *v1alpha1.VirtualMachineClusterFlavor, opts v1.CreateOptions) (result *v1alpha1.VirtualMachineClusterFlavor, err error) { + result = &v1alpha1.VirtualMachineClusterFlavor{} + err = c.client.Post(). + Resource("virtualmachineclusterflavors"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(virtualMachineClusterFlavor). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a virtualMachineClusterFlavor and updates it. Returns the server's representation of the virtualMachineClusterFlavor, and an error, if there is any. +func (c *virtualMachineClusterFlavors) Update(ctx context.Context, virtualMachineClusterFlavor *v1alpha1.VirtualMachineClusterFlavor, opts v1.UpdateOptions) (result *v1alpha1.VirtualMachineClusterFlavor, err error) { + result = &v1alpha1.VirtualMachineClusterFlavor{} + err = c.client.Put(). + Resource("virtualmachineclusterflavors"). + Name(virtualMachineClusterFlavor.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(virtualMachineClusterFlavor). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the virtualMachineClusterFlavor and deletes it. Returns an error if one occurs. +func (c *virtualMachineClusterFlavors) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + return c.client.Delete(). + Resource("virtualmachineclusterflavors"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *virtualMachineClusterFlavors) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Resource("virtualmachineclusterflavors"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched virtualMachineClusterFlavor. +func (c *virtualMachineClusterFlavors) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.VirtualMachineClusterFlavor, err error) { + result = &v1alpha1.VirtualMachineClusterFlavor{} + err = c.client.Patch(pt). + Resource("virtualmachineclusterflavors"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/flavor/v1alpha1/virtualmachineflavor.go b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/flavor/v1alpha1/virtualmachineflavor.go new file mode 100644 index 000000000000..bc83e7138570 --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/flavor/v1alpha1/virtualmachineflavor.go @@ -0,0 +1,179 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "context" + "time" + + 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" + + v1alpha1 "kubevirt.io/api/flavor/v1alpha1" + scheme "kubevirt.io/client-go/generated/kubevirt/clientset/versioned/scheme" +) + +// VirtualMachineFlavorsGetter has a method to return a VirtualMachineFlavorInterface. +// A group's client should implement this interface. +type VirtualMachineFlavorsGetter interface { + VirtualMachineFlavors(namespace string) VirtualMachineFlavorInterface +} + +// VirtualMachineFlavorInterface has methods to work with VirtualMachineFlavor resources. +type VirtualMachineFlavorInterface interface { + Create(ctx context.Context, virtualMachineFlavor *v1alpha1.VirtualMachineFlavor, opts v1.CreateOptions) (*v1alpha1.VirtualMachineFlavor, error) + Update(ctx context.Context, virtualMachineFlavor *v1alpha1.VirtualMachineFlavor, opts v1.UpdateOptions) (*v1alpha1.VirtualMachineFlavor, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.VirtualMachineFlavor, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.VirtualMachineFlavorList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.VirtualMachineFlavor, err error) + VirtualMachineFlavorExpansion +} + +// virtualMachineFlavors implements VirtualMachineFlavorInterface +type virtualMachineFlavors struct { + client rest.Interface + ns string +} + +// newVirtualMachineFlavors returns a VirtualMachineFlavors +func newVirtualMachineFlavors(c *FlavorV1alpha1Client, namespace string) *virtualMachineFlavors { + return &virtualMachineFlavors{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Get takes name of the virtualMachineFlavor, and returns the corresponding virtualMachineFlavor object, and an error if there is any. +func (c *virtualMachineFlavors) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.VirtualMachineFlavor, err error) { + result = &v1alpha1.VirtualMachineFlavor{} + err = c.client.Get(). + Namespace(c.ns). + Resource("virtualmachineflavors"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of VirtualMachineFlavors that match those selectors. +func (c *virtualMachineFlavors) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.VirtualMachineFlavorList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1alpha1.VirtualMachineFlavorList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("virtualmachineflavors"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested virtualMachineFlavors. +func (c *virtualMachineFlavors) Watch(ctx context.Context, 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(). + Namespace(c.ns). + Resource("virtualmachineflavors"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a virtualMachineFlavor and creates it. Returns the server's representation of the virtualMachineFlavor, and an error, if there is any. +func (c *virtualMachineFlavors) Create(ctx context.Context, virtualMachineFlavor *v1alpha1.VirtualMachineFlavor, opts v1.CreateOptions) (result *v1alpha1.VirtualMachineFlavor, err error) { + result = &v1alpha1.VirtualMachineFlavor{} + err = c.client.Post(). + Namespace(c.ns). + Resource("virtualmachineflavors"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(virtualMachineFlavor). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a virtualMachineFlavor and updates it. Returns the server's representation of the virtualMachineFlavor, and an error, if there is any. +func (c *virtualMachineFlavors) Update(ctx context.Context, virtualMachineFlavor *v1alpha1.VirtualMachineFlavor, opts v1.UpdateOptions) (result *v1alpha1.VirtualMachineFlavor, err error) { + result = &v1alpha1.VirtualMachineFlavor{} + err = c.client.Put(). + Namespace(c.ns). + Resource("virtualmachineflavors"). + Name(virtualMachineFlavor.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(virtualMachineFlavor). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the virtualMachineFlavor and deletes it. Returns an error if one occurs. +func (c *virtualMachineFlavors) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("virtualmachineflavors"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *virtualMachineFlavors) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Namespace(c.ns). + Resource("virtualmachineflavors"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched virtualMachineFlavor. +func (c *virtualMachineFlavors) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.VirtualMachineFlavor, err error) { + result = &v1alpha1.VirtualMachineFlavor{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("virtualmachineflavors"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/batch/v1beta1/BUILD.bazel b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/migrations/v1alpha1/BUILD.bazel similarity index 53% rename from vendor/k8s.io/client-go/kubernetes/typed/batch/v1beta1/BUILD.bazel rename to vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/migrations/v1alpha1/BUILD.bazel index ad01c2b18075..3233a1fe1d77 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/batch/v1beta1/BUILD.bazel +++ b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/migrations/v1alpha1/BUILD.bazel @@ -3,21 +3,19 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library") go_library( name = "go_default_library", srcs = [ - "batch_client.go", - "cronjob.go", "doc.go", "generated_expansion.go", + "migrationpolicy.go", + "migrations_client.go", ], - importmap = "kubevirt.io/kubevirt/vendor/k8s.io/client-go/kubernetes/typed/batch/v1beta1", - importpath = "k8s.io/client-go/kubernetes/typed/batch/v1beta1", + importpath = "kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/migrations/v1alpha1", visibility = ["//visibility:public"], deps = [ - "//vendor/k8s.io/api/batch/v1beta1:go_default_library", + "//staging/src/kubevirt.io/api/migrations/v1alpha1:go_default_library", + "//staging/src/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/scheme:go_default_library", "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/applyconfigurations/batch/v1beta1:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/scheme:go_default_library", "//vendor/k8s.io/client-go/rest:go_default_library", ], ) diff --git a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/migrations/v1alpha1/doc.go b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/migrations/v1alpha1/doc.go new file mode 100644 index 000000000000..5e11a467bea1 --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/migrations/v1alpha1/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +// This package has the automatically generated typed clients. +package v1alpha1 diff --git a/vendor/k8s.io/client-go/kubernetes/typed/batch/v1/fake/BUILD.bazel b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/migrations/v1alpha1/fake/BUILD.bazel similarity index 59% rename from vendor/k8s.io/client-go/kubernetes/typed/batch/v1/fake/BUILD.bazel rename to vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/migrations/v1alpha1/fake/BUILD.bazel index 046f0e5ea053..6907221580d7 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/batch/v1/fake/BUILD.bazel +++ b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/migrations/v1alpha1/fake/BUILD.bazel @@ -4,22 +4,19 @@ go_library( name = "go_default_library", srcs = [ "doc.go", - "fake_batch_client.go", - "fake_cronjob.go", - "fake_job.go", + "fake_migrationpolicy.go", + "fake_migrations_client.go", ], - importmap = "kubevirt.io/kubevirt/vendor/k8s.io/client-go/kubernetes/typed/batch/v1/fake", - importpath = "k8s.io/client-go/kubernetes/typed/batch/v1/fake", + importpath = "kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/migrations/v1alpha1/fake", visibility = ["//visibility:public"], deps = [ - "//vendor/k8s.io/api/batch/v1:go_default_library", + "//staging/src/kubevirt.io/api/migrations/v1alpha1:go_default_library", + "//staging/src/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/migrations/v1alpha1:go_default_library", "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/applyconfigurations/batch/v1:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/batch/v1:go_default_library", "//vendor/k8s.io/client-go/rest:go_default_library", "//vendor/k8s.io/client-go/testing:go_default_library", ], diff --git a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/migrations/v1alpha1/fake/doc.go b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/migrations/v1alpha1/fake/doc.go new file mode 100644 index 000000000000..853f43b09c4e --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/migrations/v1alpha1/fake/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +// Package fake has the automatically generated clients. +package fake diff --git a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/migrations/v1alpha1/fake/fake_migrationpolicy.go b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/migrations/v1alpha1/fake/fake_migrationpolicy.go new file mode 100644 index 000000000000..4bdc40affb0d --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/migrations/v1alpha1/fake/fake_migrationpolicy.go @@ -0,0 +1,134 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + + 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" + + v1alpha1 "kubevirt.io/api/migrations/v1alpha1" +) + +// FakeMigrationPolicies implements MigrationPolicyInterface +type FakeMigrationPolicies struct { + Fake *FakeMigrationsV1alpha1 +} + +var migrationpoliciesResource = schema.GroupVersionResource{Group: "migrations.kubevirt.io", Version: "v1alpha1", Resource: "migrationpolicies"} + +var migrationpoliciesKind = schema.GroupVersionKind{Group: "migrations.kubevirt.io", Version: "v1alpha1", Kind: "MigrationPolicy"} + +// Get takes name of the migrationPolicy, and returns the corresponding migrationPolicy object, and an error if there is any. +func (c *FakeMigrationPolicies) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.MigrationPolicy, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootGetAction(migrationpoliciesResource, name), &v1alpha1.MigrationPolicy{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.MigrationPolicy), err +} + +// List takes label and field selectors, and returns the list of MigrationPolicies that match those selectors. +func (c *FakeMigrationPolicies) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.MigrationPolicyList, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootListAction(migrationpoliciesResource, migrationpoliciesKind, opts), &v1alpha1.MigrationPolicyList{}) + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1alpha1.MigrationPolicyList{ListMeta: obj.(*v1alpha1.MigrationPolicyList).ListMeta} + for _, item := range obj.(*v1alpha1.MigrationPolicyList).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 migrationPolicies. +func (c *FakeMigrationPolicies) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewRootWatchAction(migrationpoliciesResource, opts)) +} + +// Create takes the representation of a migrationPolicy and creates it. Returns the server's representation of the migrationPolicy, and an error, if there is any. +func (c *FakeMigrationPolicies) Create(ctx context.Context, migrationPolicy *v1alpha1.MigrationPolicy, opts v1.CreateOptions) (result *v1alpha1.MigrationPolicy, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootCreateAction(migrationpoliciesResource, migrationPolicy), &v1alpha1.MigrationPolicy{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.MigrationPolicy), err +} + +// Update takes the representation of a migrationPolicy and updates it. Returns the server's representation of the migrationPolicy, and an error, if there is any. +func (c *FakeMigrationPolicies) Update(ctx context.Context, migrationPolicy *v1alpha1.MigrationPolicy, opts v1.UpdateOptions) (result *v1alpha1.MigrationPolicy, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateAction(migrationpoliciesResource, migrationPolicy), &v1alpha1.MigrationPolicy{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.MigrationPolicy), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeMigrationPolicies) UpdateStatus(ctx context.Context, migrationPolicy *v1alpha1.MigrationPolicy, opts v1.UpdateOptions) (*v1alpha1.MigrationPolicy, error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateSubresourceAction(migrationpoliciesResource, "status", migrationPolicy), &v1alpha1.MigrationPolicy{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.MigrationPolicy), err +} + +// Delete takes name of the migrationPolicy and deletes it. Returns an error if one occurs. +func (c *FakeMigrationPolicies) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewRootDeleteAction(migrationpoliciesResource, name), &v1alpha1.MigrationPolicy{}) + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeMigrationPolicies) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(migrationpoliciesResource, listOpts) + + _, err := c.Fake.Invokes(action, &v1alpha1.MigrationPolicyList{}) + return err +} + +// Patch applies the patch and returns the patched migrationPolicy. +func (c *FakeMigrationPolicies) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.MigrationPolicy, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(migrationpoliciesResource, name, pt, data, subresources...), &v1alpha1.MigrationPolicy{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.MigrationPolicy), err +} diff --git a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/migrations/v1alpha1/fake/fake_migrations_client.go b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/migrations/v1alpha1/fake/fake_migrations_client.go new file mode 100644 index 000000000000..d2ba95d8e8be --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/migrations/v1alpha1/fake/fake_migrations_client.go @@ -0,0 +1,41 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + rest "k8s.io/client-go/rest" + testing "k8s.io/client-go/testing" + + v1alpha1 "kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/migrations/v1alpha1" +) + +type FakeMigrationsV1alpha1 struct { + *testing.Fake +} + +func (c *FakeMigrationsV1alpha1) MigrationPolicies() v1alpha1.MigrationPolicyInterface { + return &FakeMigrationPolicies{c} +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *FakeMigrationsV1alpha1) RESTClient() rest.Interface { + var ret *rest.RESTClient + return ret +} diff --git a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/migrations/v1alpha1/generated_expansion.go b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/migrations/v1alpha1/generated_expansion.go new file mode 100644 index 000000000000..9cf08e074b3e --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/migrations/v1alpha1/generated_expansion.go @@ -0,0 +1,21 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +type MigrationPolicyExpansion interface{} diff --git a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/migrations/v1alpha1/migrationpolicy.go b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/migrations/v1alpha1/migrationpolicy.go new file mode 100644 index 000000000000..4ae8f1d0d83a --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/migrations/v1alpha1/migrationpolicy.go @@ -0,0 +1,185 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "context" + "time" + + 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" + + v1alpha1 "kubevirt.io/api/migrations/v1alpha1" + scheme "kubevirt.io/client-go/generated/kubevirt/clientset/versioned/scheme" +) + +// MigrationPoliciesGetter has a method to return a MigrationPolicyInterface. +// A group's client should implement this interface. +type MigrationPoliciesGetter interface { + MigrationPolicies() MigrationPolicyInterface +} + +// MigrationPolicyInterface has methods to work with MigrationPolicy resources. +type MigrationPolicyInterface interface { + Create(ctx context.Context, migrationPolicy *v1alpha1.MigrationPolicy, opts v1.CreateOptions) (*v1alpha1.MigrationPolicy, error) + Update(ctx context.Context, migrationPolicy *v1alpha1.MigrationPolicy, opts v1.UpdateOptions) (*v1alpha1.MigrationPolicy, error) + UpdateStatus(ctx context.Context, migrationPolicy *v1alpha1.MigrationPolicy, opts v1.UpdateOptions) (*v1alpha1.MigrationPolicy, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.MigrationPolicy, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.MigrationPolicyList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.MigrationPolicy, err error) + MigrationPolicyExpansion +} + +// migrationPolicies implements MigrationPolicyInterface +type migrationPolicies struct { + client rest.Interface +} + +// newMigrationPolicies returns a MigrationPolicies +func newMigrationPolicies(c *MigrationsV1alpha1Client) *migrationPolicies { + return &migrationPolicies{ + client: c.RESTClient(), + } +} + +// Get takes name of the migrationPolicy, and returns the corresponding migrationPolicy object, and an error if there is any. +func (c *migrationPolicies) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.MigrationPolicy, err error) { + result = &v1alpha1.MigrationPolicy{} + err = c.client.Get(). + Resource("migrationpolicies"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of MigrationPolicies that match those selectors. +func (c *migrationPolicies) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.MigrationPolicyList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1alpha1.MigrationPolicyList{} + err = c.client.Get(). + Resource("migrationpolicies"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested migrationPolicies. +func (c *migrationPolicies) Watch(ctx context.Context, 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("migrationpolicies"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a migrationPolicy and creates it. Returns the server's representation of the migrationPolicy, and an error, if there is any. +func (c *migrationPolicies) Create(ctx context.Context, migrationPolicy *v1alpha1.MigrationPolicy, opts v1.CreateOptions) (result *v1alpha1.MigrationPolicy, err error) { + result = &v1alpha1.MigrationPolicy{} + err = c.client.Post(). + Resource("migrationpolicies"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(migrationPolicy). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a migrationPolicy and updates it. Returns the server's representation of the migrationPolicy, and an error, if there is any. +func (c *migrationPolicies) Update(ctx context.Context, migrationPolicy *v1alpha1.MigrationPolicy, opts v1.UpdateOptions) (result *v1alpha1.MigrationPolicy, err error) { + result = &v1alpha1.MigrationPolicy{} + err = c.client.Put(). + Resource("migrationpolicies"). + Name(migrationPolicy.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(migrationPolicy). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *migrationPolicies) UpdateStatus(ctx context.Context, migrationPolicy *v1alpha1.MigrationPolicy, opts v1.UpdateOptions) (result *v1alpha1.MigrationPolicy, err error) { + result = &v1alpha1.MigrationPolicy{} + err = c.client.Put(). + Resource("migrationpolicies"). + Name(migrationPolicy.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(migrationPolicy). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the migrationPolicy and deletes it. Returns an error if one occurs. +func (c *migrationPolicies) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + return c.client.Delete(). + Resource("migrationpolicies"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *migrationPolicies) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Resource("migrationpolicies"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched migrationPolicy. +func (c *migrationPolicies) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.MigrationPolicy, err error) { + result = &v1alpha1.MigrationPolicy{} + err = c.client.Patch(pt). + Resource("migrationpolicies"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/migrations/v1alpha1/migrations_client.go b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/migrations/v1alpha1/migrations_client.go new file mode 100644 index 000000000000..cf5d9e102111 --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/migrations/v1alpha1/migrations_client.go @@ -0,0 +1,90 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + rest "k8s.io/client-go/rest" + + v1alpha1 "kubevirt.io/api/migrations/v1alpha1" + "kubevirt.io/client-go/generated/kubevirt/clientset/versioned/scheme" +) + +type MigrationsV1alpha1Interface interface { + RESTClient() rest.Interface + MigrationPoliciesGetter +} + +// MigrationsV1alpha1Client is used to interact with features provided by the migrations.kubevirt.io group. +type MigrationsV1alpha1Client struct { + restClient rest.Interface +} + +func (c *MigrationsV1alpha1Client) MigrationPolicies() MigrationPolicyInterface { + return newMigrationPolicies(c) +} + +// NewForConfig creates a new MigrationsV1alpha1Client for the given config. +func NewForConfig(c *rest.Config) (*MigrationsV1alpha1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + client, err := rest.RESTClientFor(&config) + if err != nil { + return nil, err + } + return &MigrationsV1alpha1Client{client}, nil +} + +// NewForConfigOrDie creates a new MigrationsV1alpha1Client for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *MigrationsV1alpha1Client { + client, err := NewForConfig(c) + if err != nil { + panic(err) + } + return client +} + +// New creates a new MigrationsV1alpha1Client for the given RESTClient. +func New(c rest.Interface) *MigrationsV1alpha1Client { + return &MigrationsV1alpha1Client{c} +} + +func setConfigDefaults(config *rest.Config) error { + gv := v1alpha1.SchemeGroupVersion + config.GroupVersion = &gv + config.APIPath = "/apis" + config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() + + 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 *MigrationsV1alpha1Client) RESTClient() rest.Interface { + if c == nil { + return nil + } + return c.restClient +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/node/v1/BUILD.bazel b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/pool/v1alpha1/BUILD.bazel similarity index 55% rename from vendor/k8s.io/client-go/kubernetes/typed/node/v1/BUILD.bazel rename to vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/pool/v1alpha1/BUILD.bazel index 9f1f7eb5ca27..549ac51d53e5 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/node/v1/BUILD.bazel +++ b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/pool/v1alpha1/BUILD.bazel @@ -5,19 +5,17 @@ go_library( srcs = [ "doc.go", "generated_expansion.go", - "node_client.go", - "runtimeclass.go", + "pool_client.go", + "virtualmachinepool.go", ], - importmap = "kubevirt.io/kubevirt/vendor/k8s.io/client-go/kubernetes/typed/node/v1", - importpath = "k8s.io/client-go/kubernetes/typed/node/v1", + importpath = "kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/pool/v1alpha1", visibility = ["//visibility:public"], deps = [ - "//vendor/k8s.io/api/node/v1:go_default_library", + "//staging/src/kubevirt.io/api/pool/v1alpha1:go_default_library", + "//staging/src/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/scheme:go_default_library", "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/applyconfigurations/node/v1:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/scheme:go_default_library", "//vendor/k8s.io/client-go/rest:go_default_library", ], ) diff --git a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/pool/v1alpha1/doc.go b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/pool/v1alpha1/doc.go new file mode 100644 index 000000000000..5e11a467bea1 --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/pool/v1alpha1/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +// This package has the automatically generated typed clients. +package v1alpha1 diff --git a/vendor/k8s.io/client-go/kubernetes/typed/node/v1beta1/fake/BUILD.bazel b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/pool/v1alpha1/fake/BUILD.bazel similarity index 59% rename from vendor/k8s.io/client-go/kubernetes/typed/node/v1beta1/fake/BUILD.bazel rename to vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/pool/v1alpha1/fake/BUILD.bazel index 498634732b86..1fd2198afbd0 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/node/v1beta1/fake/BUILD.bazel +++ b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/pool/v1alpha1/fake/BUILD.bazel @@ -4,21 +4,19 @@ go_library( name = "go_default_library", srcs = [ "doc.go", - "fake_node_client.go", - "fake_runtimeclass.go", + "fake_pool_client.go", + "fake_virtualmachinepool.go", ], - importmap = "kubevirt.io/kubevirt/vendor/k8s.io/client-go/kubernetes/typed/node/v1beta1/fake", - importpath = "k8s.io/client-go/kubernetes/typed/node/v1beta1/fake", + importpath = "kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/pool/v1alpha1/fake", visibility = ["//visibility:public"], deps = [ - "//vendor/k8s.io/api/node/v1beta1:go_default_library", + "//staging/src/kubevirt.io/api/pool/v1alpha1:go_default_library", + "//staging/src/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/pool/v1alpha1:go_default_library", "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/applyconfigurations/node/v1beta1:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/node/v1beta1:go_default_library", "//vendor/k8s.io/client-go/rest:go_default_library", "//vendor/k8s.io/client-go/testing:go_default_library", ], diff --git a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/pool/v1alpha1/fake/doc.go b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/pool/v1alpha1/fake/doc.go new file mode 100644 index 000000000000..853f43b09c4e --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/pool/v1alpha1/fake/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +// Package fake has the automatically generated clients. +package fake diff --git a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/pool/v1alpha1/fake/fake_pool_client.go b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/pool/v1alpha1/fake/fake_pool_client.go new file mode 100644 index 000000000000..943d10c8e95e --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/pool/v1alpha1/fake/fake_pool_client.go @@ -0,0 +1,41 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + rest "k8s.io/client-go/rest" + testing "k8s.io/client-go/testing" + + v1alpha1 "kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/pool/v1alpha1" +) + +type FakePoolV1alpha1 struct { + *testing.Fake +} + +func (c *FakePoolV1alpha1) VirtualMachinePools(namespace string) v1alpha1.VirtualMachinePoolInterface { + return &FakeVirtualMachinePools{c, namespace} +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *FakePoolV1alpha1) RESTClient() rest.Interface { + var ret *rest.RESTClient + return ret +} diff --git a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/pool/v1alpha1/fake/fake_virtualmachinepool.go b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/pool/v1alpha1/fake/fake_virtualmachinepool.go new file mode 100644 index 000000000000..f478a9c97ea5 --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/pool/v1alpha1/fake/fake_virtualmachinepool.go @@ -0,0 +1,143 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + + 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" + + v1alpha1 "kubevirt.io/api/pool/v1alpha1" +) + +// FakeVirtualMachinePools implements VirtualMachinePoolInterface +type FakeVirtualMachinePools struct { + Fake *FakePoolV1alpha1 + ns string +} + +var virtualmachinepoolsResource = schema.GroupVersionResource{Group: "pool.kubevirt.io", Version: "v1alpha1", Resource: "virtualmachinepools"} + +var virtualmachinepoolsKind = schema.GroupVersionKind{Group: "pool.kubevirt.io", Version: "v1alpha1", Kind: "VirtualMachinePool"} + +// Get takes name of the virtualMachinePool, and returns the corresponding virtualMachinePool object, and an error if there is any. +func (c *FakeVirtualMachinePools) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.VirtualMachinePool, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(virtualmachinepoolsResource, c.ns, name), &v1alpha1.VirtualMachinePool{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.VirtualMachinePool), err +} + +// List takes label and field selectors, and returns the list of VirtualMachinePools that match those selectors. +func (c *FakeVirtualMachinePools) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.VirtualMachinePoolList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(virtualmachinepoolsResource, virtualmachinepoolsKind, c.ns, opts), &v1alpha1.VirtualMachinePoolList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1alpha1.VirtualMachinePoolList{ListMeta: obj.(*v1alpha1.VirtualMachinePoolList).ListMeta} + for _, item := range obj.(*v1alpha1.VirtualMachinePoolList).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 virtualMachinePools. +func (c *FakeVirtualMachinePools) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(virtualmachinepoolsResource, c.ns, opts)) + +} + +// Create takes the representation of a virtualMachinePool and creates it. Returns the server's representation of the virtualMachinePool, and an error, if there is any. +func (c *FakeVirtualMachinePools) Create(ctx context.Context, virtualMachinePool *v1alpha1.VirtualMachinePool, opts v1.CreateOptions) (result *v1alpha1.VirtualMachinePool, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(virtualmachinepoolsResource, c.ns, virtualMachinePool), &v1alpha1.VirtualMachinePool{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.VirtualMachinePool), err +} + +// Update takes the representation of a virtualMachinePool and updates it. Returns the server's representation of the virtualMachinePool, and an error, if there is any. +func (c *FakeVirtualMachinePools) Update(ctx context.Context, virtualMachinePool *v1alpha1.VirtualMachinePool, opts v1.UpdateOptions) (result *v1alpha1.VirtualMachinePool, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(virtualmachinepoolsResource, c.ns, virtualMachinePool), &v1alpha1.VirtualMachinePool{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.VirtualMachinePool), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeVirtualMachinePools) UpdateStatus(ctx context.Context, virtualMachinePool *v1alpha1.VirtualMachinePool, opts v1.UpdateOptions) (*v1alpha1.VirtualMachinePool, error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceAction(virtualmachinepoolsResource, "status", c.ns, virtualMachinePool), &v1alpha1.VirtualMachinePool{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.VirtualMachinePool), err +} + +// Delete takes name of the virtualMachinePool and deletes it. Returns an error if one occurs. +func (c *FakeVirtualMachinePools) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteAction(virtualmachinepoolsResource, c.ns, name), &v1alpha1.VirtualMachinePool{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeVirtualMachinePools) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(virtualmachinepoolsResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &v1alpha1.VirtualMachinePoolList{}) + return err +} + +// Patch applies the patch and returns the patched virtualMachinePool. +func (c *FakeVirtualMachinePools) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.VirtualMachinePool, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(virtualmachinepoolsResource, c.ns, name, pt, data, subresources...), &v1alpha1.VirtualMachinePool{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.VirtualMachinePool), err +} diff --git a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/pool/v1alpha1/generated_expansion.go b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/pool/v1alpha1/generated_expansion.go new file mode 100644 index 000000000000..5bb6fc32dec1 --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/pool/v1alpha1/generated_expansion.go @@ -0,0 +1,21 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +type VirtualMachinePoolExpansion interface{} diff --git a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/pool/v1alpha1/pool_client.go b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/pool/v1alpha1/pool_client.go new file mode 100644 index 000000000000..82346301ef79 --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/pool/v1alpha1/pool_client.go @@ -0,0 +1,90 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + rest "k8s.io/client-go/rest" + + v1alpha1 "kubevirt.io/api/pool/v1alpha1" + "kubevirt.io/client-go/generated/kubevirt/clientset/versioned/scheme" +) + +type PoolV1alpha1Interface interface { + RESTClient() rest.Interface + VirtualMachinePoolsGetter +} + +// PoolV1alpha1Client is used to interact with features provided by the pool.kubevirt.io group. +type PoolV1alpha1Client struct { + restClient rest.Interface +} + +func (c *PoolV1alpha1Client) VirtualMachinePools(namespace string) VirtualMachinePoolInterface { + return newVirtualMachinePools(c, namespace) +} + +// NewForConfig creates a new PoolV1alpha1Client for the given config. +func NewForConfig(c *rest.Config) (*PoolV1alpha1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + client, err := rest.RESTClientFor(&config) + if err != nil { + return nil, err + } + return &PoolV1alpha1Client{client}, nil +} + +// NewForConfigOrDie creates a new PoolV1alpha1Client for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *PoolV1alpha1Client { + client, err := NewForConfig(c) + if err != nil { + panic(err) + } + return client +} + +// New creates a new PoolV1alpha1Client for the given RESTClient. +func New(c rest.Interface) *PoolV1alpha1Client { + return &PoolV1alpha1Client{c} +} + +func setConfigDefaults(config *rest.Config) error { + gv := v1alpha1.SchemeGroupVersion + config.GroupVersion = &gv + config.APIPath = "/apis" + config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() + + 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 *PoolV1alpha1Client) RESTClient() rest.Interface { + if c == nil { + return nil + } + return c.restClient +} diff --git a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/pool/v1alpha1/virtualmachinepool.go b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/pool/v1alpha1/virtualmachinepool.go new file mode 100644 index 000000000000..333bcec09280 --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/pool/v1alpha1/virtualmachinepool.go @@ -0,0 +1,196 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "context" + "time" + + 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" + + v1alpha1 "kubevirt.io/api/pool/v1alpha1" + scheme "kubevirt.io/client-go/generated/kubevirt/clientset/versioned/scheme" +) + +// VirtualMachinePoolsGetter has a method to return a VirtualMachinePoolInterface. +// A group's client should implement this interface. +type VirtualMachinePoolsGetter interface { + VirtualMachinePools(namespace string) VirtualMachinePoolInterface +} + +// VirtualMachinePoolInterface has methods to work with VirtualMachinePool resources. +type VirtualMachinePoolInterface interface { + Create(ctx context.Context, virtualMachinePool *v1alpha1.VirtualMachinePool, opts v1.CreateOptions) (*v1alpha1.VirtualMachinePool, error) + Update(ctx context.Context, virtualMachinePool *v1alpha1.VirtualMachinePool, opts v1.UpdateOptions) (*v1alpha1.VirtualMachinePool, error) + UpdateStatus(ctx context.Context, virtualMachinePool *v1alpha1.VirtualMachinePool, opts v1.UpdateOptions) (*v1alpha1.VirtualMachinePool, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.VirtualMachinePool, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.VirtualMachinePoolList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.VirtualMachinePool, err error) + VirtualMachinePoolExpansion +} + +// virtualMachinePools implements VirtualMachinePoolInterface +type virtualMachinePools struct { + client rest.Interface + ns string +} + +// newVirtualMachinePools returns a VirtualMachinePools +func newVirtualMachinePools(c *PoolV1alpha1Client, namespace string) *virtualMachinePools { + return &virtualMachinePools{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Get takes name of the virtualMachinePool, and returns the corresponding virtualMachinePool object, and an error if there is any. +func (c *virtualMachinePools) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.VirtualMachinePool, err error) { + result = &v1alpha1.VirtualMachinePool{} + err = c.client.Get(). + Namespace(c.ns). + Resource("virtualmachinepools"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of VirtualMachinePools that match those selectors. +func (c *virtualMachinePools) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.VirtualMachinePoolList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1alpha1.VirtualMachinePoolList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("virtualmachinepools"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested virtualMachinePools. +func (c *virtualMachinePools) Watch(ctx context.Context, 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(). + Namespace(c.ns). + Resource("virtualmachinepools"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a virtualMachinePool and creates it. Returns the server's representation of the virtualMachinePool, and an error, if there is any. +func (c *virtualMachinePools) Create(ctx context.Context, virtualMachinePool *v1alpha1.VirtualMachinePool, opts v1.CreateOptions) (result *v1alpha1.VirtualMachinePool, err error) { + result = &v1alpha1.VirtualMachinePool{} + err = c.client.Post(). + Namespace(c.ns). + Resource("virtualmachinepools"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(virtualMachinePool). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a virtualMachinePool and updates it. Returns the server's representation of the virtualMachinePool, and an error, if there is any. +func (c *virtualMachinePools) Update(ctx context.Context, virtualMachinePool *v1alpha1.VirtualMachinePool, opts v1.UpdateOptions) (result *v1alpha1.VirtualMachinePool, err error) { + result = &v1alpha1.VirtualMachinePool{} + err = c.client.Put(). + Namespace(c.ns). + Resource("virtualmachinepools"). + Name(virtualMachinePool.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(virtualMachinePool). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *virtualMachinePools) UpdateStatus(ctx context.Context, virtualMachinePool *v1alpha1.VirtualMachinePool, opts v1.UpdateOptions) (result *v1alpha1.VirtualMachinePool, err error) { + result = &v1alpha1.VirtualMachinePool{} + err = c.client.Put(). + Namespace(c.ns). + Resource("virtualmachinepools"). + Name(virtualMachinePool.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(virtualMachinePool). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the virtualMachinePool and deletes it. Returns an error if one occurs. +func (c *virtualMachinePools) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("virtualmachinepools"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *virtualMachinePools) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Namespace(c.ns). + Resource("virtualmachinepools"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched virtualMachinePool. +func (c *virtualMachinePools) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.VirtualMachinePool, err error) { + result = &v1alpha1.VirtualMachinePool{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("virtualmachinepools"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/snapshot/v1alpha1/BUILD.bazel b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/snapshot/v1alpha1/BUILD.bazel new file mode 100644 index 000000000000..a94a3b725e70 --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/snapshot/v1alpha1/BUILD.bazel @@ -0,0 +1,23 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = [ + "doc.go", + "generated_expansion.go", + "snapshot_client.go", + "virtualmachinerestore.go", + "virtualmachinesnapshot.go", + "virtualmachinesnapshotcontent.go", + ], + importpath = "kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/snapshot/v1alpha1", + visibility = ["//visibility:public"], + deps = [ + "//staging/src/kubevirt.io/api/snapshot/v1alpha1:go_default_library", + "//staging/src/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/scheme:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", + "//vendor/k8s.io/client-go/rest:go_default_library", + ], +) diff --git a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/snapshot/v1alpha1/doc.go b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/snapshot/v1alpha1/doc.go new file mode 100644 index 000000000000..5e11a467bea1 --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/snapshot/v1alpha1/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +// This package has the automatically generated typed clients. +package v1alpha1 diff --git a/vendor/k8s.io/client-go/kubernetes/typed/discovery/v1/fake/BUILD.bazel b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/snapshot/v1alpha1/fake/BUILD.bazel similarity index 58% rename from vendor/k8s.io/client-go/kubernetes/typed/discovery/v1/fake/BUILD.bazel rename to vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/snapshot/v1alpha1/fake/BUILD.bazel index eb32c50d7ce1..cb1cb724fd8e 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/discovery/v1/fake/BUILD.bazel +++ b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/snapshot/v1alpha1/fake/BUILD.bazel @@ -4,21 +4,21 @@ go_library( name = "go_default_library", srcs = [ "doc.go", - "fake_discovery_client.go", - "fake_endpointslice.go", + "fake_snapshot_client.go", + "fake_virtualmachinerestore.go", + "fake_virtualmachinesnapshot.go", + "fake_virtualmachinesnapshotcontent.go", ], - importmap = "kubevirt.io/kubevirt/vendor/k8s.io/client-go/kubernetes/typed/discovery/v1/fake", - importpath = "k8s.io/client-go/kubernetes/typed/discovery/v1/fake", + importpath = "kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/snapshot/v1alpha1/fake", visibility = ["//visibility:public"], deps = [ - "//vendor/k8s.io/api/discovery/v1:go_default_library", + "//staging/src/kubevirt.io/api/snapshot/v1alpha1:go_default_library", + "//staging/src/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/snapshot/v1alpha1:go_default_library", "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/applyconfigurations/discovery/v1:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/discovery/v1:go_default_library", "//vendor/k8s.io/client-go/rest:go_default_library", "//vendor/k8s.io/client-go/testing:go_default_library", ], diff --git a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/snapshot/v1alpha1/fake/doc.go b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/snapshot/v1alpha1/fake/doc.go new file mode 100644 index 000000000000..853f43b09c4e --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/snapshot/v1alpha1/fake/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +// Package fake has the automatically generated clients. +package fake diff --git a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/snapshot/v1alpha1/fake/fake_snapshot_client.go b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/snapshot/v1alpha1/fake/fake_snapshot_client.go new file mode 100644 index 000000000000..0c2584d6e3d3 --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/snapshot/v1alpha1/fake/fake_snapshot_client.go @@ -0,0 +1,49 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + rest "k8s.io/client-go/rest" + testing "k8s.io/client-go/testing" + + v1alpha1 "kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/snapshot/v1alpha1" +) + +type FakeSnapshotV1alpha1 struct { + *testing.Fake +} + +func (c *FakeSnapshotV1alpha1) VirtualMachineRestores(namespace string) v1alpha1.VirtualMachineRestoreInterface { + return &FakeVirtualMachineRestores{c, namespace} +} + +func (c *FakeSnapshotV1alpha1) VirtualMachineSnapshots(namespace string) v1alpha1.VirtualMachineSnapshotInterface { + return &FakeVirtualMachineSnapshots{c, namespace} +} + +func (c *FakeSnapshotV1alpha1) VirtualMachineSnapshotContents(namespace string) v1alpha1.VirtualMachineSnapshotContentInterface { + return &FakeVirtualMachineSnapshotContents{c, namespace} +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *FakeSnapshotV1alpha1) RESTClient() rest.Interface { + var ret *rest.RESTClient + return ret +} diff --git a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/snapshot/v1alpha1/fake/fake_virtualmachinerestore.go b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/snapshot/v1alpha1/fake/fake_virtualmachinerestore.go new file mode 100644 index 000000000000..332ac757ed5f --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/snapshot/v1alpha1/fake/fake_virtualmachinerestore.go @@ -0,0 +1,143 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + + 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" + + v1alpha1 "kubevirt.io/api/snapshot/v1alpha1" +) + +// FakeVirtualMachineRestores implements VirtualMachineRestoreInterface +type FakeVirtualMachineRestores struct { + Fake *FakeSnapshotV1alpha1 + ns string +} + +var virtualmachinerestoresResource = schema.GroupVersionResource{Group: "snapshot.kubevirt.io", Version: "v1alpha1", Resource: "virtualmachinerestores"} + +var virtualmachinerestoresKind = schema.GroupVersionKind{Group: "snapshot.kubevirt.io", Version: "v1alpha1", Kind: "VirtualMachineRestore"} + +// Get takes name of the virtualMachineRestore, and returns the corresponding virtualMachineRestore object, and an error if there is any. +func (c *FakeVirtualMachineRestores) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.VirtualMachineRestore, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(virtualmachinerestoresResource, c.ns, name), &v1alpha1.VirtualMachineRestore{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.VirtualMachineRestore), err +} + +// List takes label and field selectors, and returns the list of VirtualMachineRestores that match those selectors. +func (c *FakeVirtualMachineRestores) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.VirtualMachineRestoreList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(virtualmachinerestoresResource, virtualmachinerestoresKind, c.ns, opts), &v1alpha1.VirtualMachineRestoreList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1alpha1.VirtualMachineRestoreList{ListMeta: obj.(*v1alpha1.VirtualMachineRestoreList).ListMeta} + for _, item := range obj.(*v1alpha1.VirtualMachineRestoreList).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 virtualMachineRestores. +func (c *FakeVirtualMachineRestores) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(virtualmachinerestoresResource, c.ns, opts)) + +} + +// Create takes the representation of a virtualMachineRestore and creates it. Returns the server's representation of the virtualMachineRestore, and an error, if there is any. +func (c *FakeVirtualMachineRestores) Create(ctx context.Context, virtualMachineRestore *v1alpha1.VirtualMachineRestore, opts v1.CreateOptions) (result *v1alpha1.VirtualMachineRestore, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(virtualmachinerestoresResource, c.ns, virtualMachineRestore), &v1alpha1.VirtualMachineRestore{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.VirtualMachineRestore), err +} + +// Update takes the representation of a virtualMachineRestore and updates it. Returns the server's representation of the virtualMachineRestore, and an error, if there is any. +func (c *FakeVirtualMachineRestores) Update(ctx context.Context, virtualMachineRestore *v1alpha1.VirtualMachineRestore, opts v1.UpdateOptions) (result *v1alpha1.VirtualMachineRestore, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(virtualmachinerestoresResource, c.ns, virtualMachineRestore), &v1alpha1.VirtualMachineRestore{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.VirtualMachineRestore), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeVirtualMachineRestores) UpdateStatus(ctx context.Context, virtualMachineRestore *v1alpha1.VirtualMachineRestore, opts v1.UpdateOptions) (*v1alpha1.VirtualMachineRestore, error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceAction(virtualmachinerestoresResource, "status", c.ns, virtualMachineRestore), &v1alpha1.VirtualMachineRestore{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.VirtualMachineRestore), err +} + +// Delete takes name of the virtualMachineRestore and deletes it. Returns an error if one occurs. +func (c *FakeVirtualMachineRestores) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteAction(virtualmachinerestoresResource, c.ns, name), &v1alpha1.VirtualMachineRestore{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeVirtualMachineRestores) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(virtualmachinerestoresResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &v1alpha1.VirtualMachineRestoreList{}) + return err +} + +// Patch applies the patch and returns the patched virtualMachineRestore. +func (c *FakeVirtualMachineRestores) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.VirtualMachineRestore, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(virtualmachinerestoresResource, c.ns, name, pt, data, subresources...), &v1alpha1.VirtualMachineRestore{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.VirtualMachineRestore), err +} diff --git a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/snapshot/v1alpha1/fake/fake_virtualmachinesnapshot.go b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/snapshot/v1alpha1/fake/fake_virtualmachinesnapshot.go new file mode 100644 index 000000000000..35ab64f2e846 --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/snapshot/v1alpha1/fake/fake_virtualmachinesnapshot.go @@ -0,0 +1,143 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + + 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" + + v1alpha1 "kubevirt.io/api/snapshot/v1alpha1" +) + +// FakeVirtualMachineSnapshots implements VirtualMachineSnapshotInterface +type FakeVirtualMachineSnapshots struct { + Fake *FakeSnapshotV1alpha1 + ns string +} + +var virtualmachinesnapshotsResource = schema.GroupVersionResource{Group: "snapshot.kubevirt.io", Version: "v1alpha1", Resource: "virtualmachinesnapshots"} + +var virtualmachinesnapshotsKind = schema.GroupVersionKind{Group: "snapshot.kubevirt.io", Version: "v1alpha1", Kind: "VirtualMachineSnapshot"} + +// Get takes name of the virtualMachineSnapshot, and returns the corresponding virtualMachineSnapshot object, and an error if there is any. +func (c *FakeVirtualMachineSnapshots) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.VirtualMachineSnapshot, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(virtualmachinesnapshotsResource, c.ns, name), &v1alpha1.VirtualMachineSnapshot{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.VirtualMachineSnapshot), err +} + +// List takes label and field selectors, and returns the list of VirtualMachineSnapshots that match those selectors. +func (c *FakeVirtualMachineSnapshots) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.VirtualMachineSnapshotList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(virtualmachinesnapshotsResource, virtualmachinesnapshotsKind, c.ns, opts), &v1alpha1.VirtualMachineSnapshotList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1alpha1.VirtualMachineSnapshotList{ListMeta: obj.(*v1alpha1.VirtualMachineSnapshotList).ListMeta} + for _, item := range obj.(*v1alpha1.VirtualMachineSnapshotList).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 virtualMachineSnapshots. +func (c *FakeVirtualMachineSnapshots) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(virtualmachinesnapshotsResource, c.ns, opts)) + +} + +// Create takes the representation of a virtualMachineSnapshot and creates it. Returns the server's representation of the virtualMachineSnapshot, and an error, if there is any. +func (c *FakeVirtualMachineSnapshots) Create(ctx context.Context, virtualMachineSnapshot *v1alpha1.VirtualMachineSnapshot, opts v1.CreateOptions) (result *v1alpha1.VirtualMachineSnapshot, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(virtualmachinesnapshotsResource, c.ns, virtualMachineSnapshot), &v1alpha1.VirtualMachineSnapshot{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.VirtualMachineSnapshot), err +} + +// Update takes the representation of a virtualMachineSnapshot and updates it. Returns the server's representation of the virtualMachineSnapshot, and an error, if there is any. +func (c *FakeVirtualMachineSnapshots) Update(ctx context.Context, virtualMachineSnapshot *v1alpha1.VirtualMachineSnapshot, opts v1.UpdateOptions) (result *v1alpha1.VirtualMachineSnapshot, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(virtualmachinesnapshotsResource, c.ns, virtualMachineSnapshot), &v1alpha1.VirtualMachineSnapshot{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.VirtualMachineSnapshot), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeVirtualMachineSnapshots) UpdateStatus(ctx context.Context, virtualMachineSnapshot *v1alpha1.VirtualMachineSnapshot, opts v1.UpdateOptions) (*v1alpha1.VirtualMachineSnapshot, error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceAction(virtualmachinesnapshotsResource, "status", c.ns, virtualMachineSnapshot), &v1alpha1.VirtualMachineSnapshot{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.VirtualMachineSnapshot), err +} + +// Delete takes name of the virtualMachineSnapshot and deletes it. Returns an error if one occurs. +func (c *FakeVirtualMachineSnapshots) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteAction(virtualmachinesnapshotsResource, c.ns, name), &v1alpha1.VirtualMachineSnapshot{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeVirtualMachineSnapshots) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(virtualmachinesnapshotsResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &v1alpha1.VirtualMachineSnapshotList{}) + return err +} + +// Patch applies the patch and returns the patched virtualMachineSnapshot. +func (c *FakeVirtualMachineSnapshots) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.VirtualMachineSnapshot, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(virtualmachinesnapshotsResource, c.ns, name, pt, data, subresources...), &v1alpha1.VirtualMachineSnapshot{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.VirtualMachineSnapshot), err +} diff --git a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/snapshot/v1alpha1/fake/fake_virtualmachinesnapshotcontent.go b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/snapshot/v1alpha1/fake/fake_virtualmachinesnapshotcontent.go new file mode 100644 index 000000000000..3defccc7ad08 --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/snapshot/v1alpha1/fake/fake_virtualmachinesnapshotcontent.go @@ -0,0 +1,143 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + + 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" + + v1alpha1 "kubevirt.io/api/snapshot/v1alpha1" +) + +// FakeVirtualMachineSnapshotContents implements VirtualMachineSnapshotContentInterface +type FakeVirtualMachineSnapshotContents struct { + Fake *FakeSnapshotV1alpha1 + ns string +} + +var virtualmachinesnapshotcontentsResource = schema.GroupVersionResource{Group: "snapshot.kubevirt.io", Version: "v1alpha1", Resource: "virtualmachinesnapshotcontents"} + +var virtualmachinesnapshotcontentsKind = schema.GroupVersionKind{Group: "snapshot.kubevirt.io", Version: "v1alpha1", Kind: "VirtualMachineSnapshotContent"} + +// Get takes name of the virtualMachineSnapshotContent, and returns the corresponding virtualMachineSnapshotContent object, and an error if there is any. +func (c *FakeVirtualMachineSnapshotContents) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.VirtualMachineSnapshotContent, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(virtualmachinesnapshotcontentsResource, c.ns, name), &v1alpha1.VirtualMachineSnapshotContent{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.VirtualMachineSnapshotContent), err +} + +// List takes label and field selectors, and returns the list of VirtualMachineSnapshotContents that match those selectors. +func (c *FakeVirtualMachineSnapshotContents) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.VirtualMachineSnapshotContentList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(virtualmachinesnapshotcontentsResource, virtualmachinesnapshotcontentsKind, c.ns, opts), &v1alpha1.VirtualMachineSnapshotContentList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1alpha1.VirtualMachineSnapshotContentList{ListMeta: obj.(*v1alpha1.VirtualMachineSnapshotContentList).ListMeta} + for _, item := range obj.(*v1alpha1.VirtualMachineSnapshotContentList).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 virtualMachineSnapshotContents. +func (c *FakeVirtualMachineSnapshotContents) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(virtualmachinesnapshotcontentsResource, c.ns, opts)) + +} + +// Create takes the representation of a virtualMachineSnapshotContent and creates it. Returns the server's representation of the virtualMachineSnapshotContent, and an error, if there is any. +func (c *FakeVirtualMachineSnapshotContents) Create(ctx context.Context, virtualMachineSnapshotContent *v1alpha1.VirtualMachineSnapshotContent, opts v1.CreateOptions) (result *v1alpha1.VirtualMachineSnapshotContent, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(virtualmachinesnapshotcontentsResource, c.ns, virtualMachineSnapshotContent), &v1alpha1.VirtualMachineSnapshotContent{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.VirtualMachineSnapshotContent), err +} + +// Update takes the representation of a virtualMachineSnapshotContent and updates it. Returns the server's representation of the virtualMachineSnapshotContent, and an error, if there is any. +func (c *FakeVirtualMachineSnapshotContents) Update(ctx context.Context, virtualMachineSnapshotContent *v1alpha1.VirtualMachineSnapshotContent, opts v1.UpdateOptions) (result *v1alpha1.VirtualMachineSnapshotContent, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(virtualmachinesnapshotcontentsResource, c.ns, virtualMachineSnapshotContent), &v1alpha1.VirtualMachineSnapshotContent{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.VirtualMachineSnapshotContent), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeVirtualMachineSnapshotContents) UpdateStatus(ctx context.Context, virtualMachineSnapshotContent *v1alpha1.VirtualMachineSnapshotContent, opts v1.UpdateOptions) (*v1alpha1.VirtualMachineSnapshotContent, error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceAction(virtualmachinesnapshotcontentsResource, "status", c.ns, virtualMachineSnapshotContent), &v1alpha1.VirtualMachineSnapshotContent{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.VirtualMachineSnapshotContent), err +} + +// Delete takes name of the virtualMachineSnapshotContent and deletes it. Returns an error if one occurs. +func (c *FakeVirtualMachineSnapshotContents) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteAction(virtualmachinesnapshotcontentsResource, c.ns, name), &v1alpha1.VirtualMachineSnapshotContent{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeVirtualMachineSnapshotContents) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(virtualmachinesnapshotcontentsResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &v1alpha1.VirtualMachineSnapshotContentList{}) + return err +} + +// Patch applies the patch and returns the patched virtualMachineSnapshotContent. +func (c *FakeVirtualMachineSnapshotContents) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.VirtualMachineSnapshotContent, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(virtualmachinesnapshotcontentsResource, c.ns, name, pt, data, subresources...), &v1alpha1.VirtualMachineSnapshotContent{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.VirtualMachineSnapshotContent), err +} diff --git a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/snapshot/v1alpha1/generated_expansion.go b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/snapshot/v1alpha1/generated_expansion.go new file mode 100644 index 000000000000..07ae9a345973 --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/snapshot/v1alpha1/generated_expansion.go @@ -0,0 +1,25 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +type VirtualMachineRestoreExpansion interface{} + +type VirtualMachineSnapshotExpansion interface{} + +type VirtualMachineSnapshotContentExpansion interface{} diff --git a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/snapshot/v1alpha1/snapshot_client.go b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/snapshot/v1alpha1/snapshot_client.go new file mode 100644 index 000000000000..b3c18eed774d --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/snapshot/v1alpha1/snapshot_client.go @@ -0,0 +1,100 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + rest "k8s.io/client-go/rest" + + v1alpha1 "kubevirt.io/api/snapshot/v1alpha1" + "kubevirt.io/client-go/generated/kubevirt/clientset/versioned/scheme" +) + +type SnapshotV1alpha1Interface interface { + RESTClient() rest.Interface + VirtualMachineRestoresGetter + VirtualMachineSnapshotsGetter + VirtualMachineSnapshotContentsGetter +} + +// SnapshotV1alpha1Client is used to interact with features provided by the snapshot.kubevirt.io group. +type SnapshotV1alpha1Client struct { + restClient rest.Interface +} + +func (c *SnapshotV1alpha1Client) VirtualMachineRestores(namespace string) VirtualMachineRestoreInterface { + return newVirtualMachineRestores(c, namespace) +} + +func (c *SnapshotV1alpha1Client) VirtualMachineSnapshots(namespace string) VirtualMachineSnapshotInterface { + return newVirtualMachineSnapshots(c, namespace) +} + +func (c *SnapshotV1alpha1Client) VirtualMachineSnapshotContents(namespace string) VirtualMachineSnapshotContentInterface { + return newVirtualMachineSnapshotContents(c, namespace) +} + +// NewForConfig creates a new SnapshotV1alpha1Client for the given config. +func NewForConfig(c *rest.Config) (*SnapshotV1alpha1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + client, err := rest.RESTClientFor(&config) + if err != nil { + return nil, err + } + return &SnapshotV1alpha1Client{client}, nil +} + +// NewForConfigOrDie creates a new SnapshotV1alpha1Client for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *SnapshotV1alpha1Client { + client, err := NewForConfig(c) + if err != nil { + panic(err) + } + return client +} + +// New creates a new SnapshotV1alpha1Client for the given RESTClient. +func New(c rest.Interface) *SnapshotV1alpha1Client { + return &SnapshotV1alpha1Client{c} +} + +func setConfigDefaults(config *rest.Config) error { + gv := v1alpha1.SchemeGroupVersion + config.GroupVersion = &gv + config.APIPath = "/apis" + config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() + + 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 *SnapshotV1alpha1Client) RESTClient() rest.Interface { + if c == nil { + return nil + } + return c.restClient +} diff --git a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/snapshot/v1alpha1/virtualmachinerestore.go b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/snapshot/v1alpha1/virtualmachinerestore.go new file mode 100644 index 000000000000..85e838ebdf81 --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/snapshot/v1alpha1/virtualmachinerestore.go @@ -0,0 +1,196 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "context" + "time" + + 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" + + v1alpha1 "kubevirt.io/api/snapshot/v1alpha1" + scheme "kubevirt.io/client-go/generated/kubevirt/clientset/versioned/scheme" +) + +// VirtualMachineRestoresGetter has a method to return a VirtualMachineRestoreInterface. +// A group's client should implement this interface. +type VirtualMachineRestoresGetter interface { + VirtualMachineRestores(namespace string) VirtualMachineRestoreInterface +} + +// VirtualMachineRestoreInterface has methods to work with VirtualMachineRestore resources. +type VirtualMachineRestoreInterface interface { + Create(ctx context.Context, virtualMachineRestore *v1alpha1.VirtualMachineRestore, opts v1.CreateOptions) (*v1alpha1.VirtualMachineRestore, error) + Update(ctx context.Context, virtualMachineRestore *v1alpha1.VirtualMachineRestore, opts v1.UpdateOptions) (*v1alpha1.VirtualMachineRestore, error) + UpdateStatus(ctx context.Context, virtualMachineRestore *v1alpha1.VirtualMachineRestore, opts v1.UpdateOptions) (*v1alpha1.VirtualMachineRestore, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.VirtualMachineRestore, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.VirtualMachineRestoreList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.VirtualMachineRestore, err error) + VirtualMachineRestoreExpansion +} + +// virtualMachineRestores implements VirtualMachineRestoreInterface +type virtualMachineRestores struct { + client rest.Interface + ns string +} + +// newVirtualMachineRestores returns a VirtualMachineRestores +func newVirtualMachineRestores(c *SnapshotV1alpha1Client, namespace string) *virtualMachineRestores { + return &virtualMachineRestores{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Get takes name of the virtualMachineRestore, and returns the corresponding virtualMachineRestore object, and an error if there is any. +func (c *virtualMachineRestores) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.VirtualMachineRestore, err error) { + result = &v1alpha1.VirtualMachineRestore{} + err = c.client.Get(). + Namespace(c.ns). + Resource("virtualmachinerestores"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of VirtualMachineRestores that match those selectors. +func (c *virtualMachineRestores) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.VirtualMachineRestoreList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1alpha1.VirtualMachineRestoreList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("virtualmachinerestores"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested virtualMachineRestores. +func (c *virtualMachineRestores) Watch(ctx context.Context, 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(). + Namespace(c.ns). + Resource("virtualmachinerestores"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a virtualMachineRestore and creates it. Returns the server's representation of the virtualMachineRestore, and an error, if there is any. +func (c *virtualMachineRestores) Create(ctx context.Context, virtualMachineRestore *v1alpha1.VirtualMachineRestore, opts v1.CreateOptions) (result *v1alpha1.VirtualMachineRestore, err error) { + result = &v1alpha1.VirtualMachineRestore{} + err = c.client.Post(). + Namespace(c.ns). + Resource("virtualmachinerestores"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(virtualMachineRestore). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a virtualMachineRestore and updates it. Returns the server's representation of the virtualMachineRestore, and an error, if there is any. +func (c *virtualMachineRestores) Update(ctx context.Context, virtualMachineRestore *v1alpha1.VirtualMachineRestore, opts v1.UpdateOptions) (result *v1alpha1.VirtualMachineRestore, err error) { + result = &v1alpha1.VirtualMachineRestore{} + err = c.client.Put(). + Namespace(c.ns). + Resource("virtualmachinerestores"). + Name(virtualMachineRestore.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(virtualMachineRestore). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *virtualMachineRestores) UpdateStatus(ctx context.Context, virtualMachineRestore *v1alpha1.VirtualMachineRestore, opts v1.UpdateOptions) (result *v1alpha1.VirtualMachineRestore, err error) { + result = &v1alpha1.VirtualMachineRestore{} + err = c.client.Put(). + Namespace(c.ns). + Resource("virtualmachinerestores"). + Name(virtualMachineRestore.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(virtualMachineRestore). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the virtualMachineRestore and deletes it. Returns an error if one occurs. +func (c *virtualMachineRestores) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("virtualmachinerestores"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *virtualMachineRestores) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Namespace(c.ns). + Resource("virtualmachinerestores"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched virtualMachineRestore. +func (c *virtualMachineRestores) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.VirtualMachineRestore, err error) { + result = &v1alpha1.VirtualMachineRestore{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("virtualmachinerestores"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/snapshot/v1alpha1/virtualmachinesnapshot.go b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/snapshot/v1alpha1/virtualmachinesnapshot.go new file mode 100644 index 000000000000..6820933c8c5b --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/snapshot/v1alpha1/virtualmachinesnapshot.go @@ -0,0 +1,196 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "context" + "time" + + 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" + + v1alpha1 "kubevirt.io/api/snapshot/v1alpha1" + scheme "kubevirt.io/client-go/generated/kubevirt/clientset/versioned/scheme" +) + +// VirtualMachineSnapshotsGetter has a method to return a VirtualMachineSnapshotInterface. +// A group's client should implement this interface. +type VirtualMachineSnapshotsGetter interface { + VirtualMachineSnapshots(namespace string) VirtualMachineSnapshotInterface +} + +// VirtualMachineSnapshotInterface has methods to work with VirtualMachineSnapshot resources. +type VirtualMachineSnapshotInterface interface { + Create(ctx context.Context, virtualMachineSnapshot *v1alpha1.VirtualMachineSnapshot, opts v1.CreateOptions) (*v1alpha1.VirtualMachineSnapshot, error) + Update(ctx context.Context, virtualMachineSnapshot *v1alpha1.VirtualMachineSnapshot, opts v1.UpdateOptions) (*v1alpha1.VirtualMachineSnapshot, error) + UpdateStatus(ctx context.Context, virtualMachineSnapshot *v1alpha1.VirtualMachineSnapshot, opts v1.UpdateOptions) (*v1alpha1.VirtualMachineSnapshot, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.VirtualMachineSnapshot, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.VirtualMachineSnapshotList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.VirtualMachineSnapshot, err error) + VirtualMachineSnapshotExpansion +} + +// virtualMachineSnapshots implements VirtualMachineSnapshotInterface +type virtualMachineSnapshots struct { + client rest.Interface + ns string +} + +// newVirtualMachineSnapshots returns a VirtualMachineSnapshots +func newVirtualMachineSnapshots(c *SnapshotV1alpha1Client, namespace string) *virtualMachineSnapshots { + return &virtualMachineSnapshots{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Get takes name of the virtualMachineSnapshot, and returns the corresponding virtualMachineSnapshot object, and an error if there is any. +func (c *virtualMachineSnapshots) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.VirtualMachineSnapshot, err error) { + result = &v1alpha1.VirtualMachineSnapshot{} + err = c.client.Get(). + Namespace(c.ns). + Resource("virtualmachinesnapshots"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of VirtualMachineSnapshots that match those selectors. +func (c *virtualMachineSnapshots) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.VirtualMachineSnapshotList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1alpha1.VirtualMachineSnapshotList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("virtualmachinesnapshots"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested virtualMachineSnapshots. +func (c *virtualMachineSnapshots) Watch(ctx context.Context, 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(). + Namespace(c.ns). + Resource("virtualmachinesnapshots"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a virtualMachineSnapshot and creates it. Returns the server's representation of the virtualMachineSnapshot, and an error, if there is any. +func (c *virtualMachineSnapshots) Create(ctx context.Context, virtualMachineSnapshot *v1alpha1.VirtualMachineSnapshot, opts v1.CreateOptions) (result *v1alpha1.VirtualMachineSnapshot, err error) { + result = &v1alpha1.VirtualMachineSnapshot{} + err = c.client.Post(). + Namespace(c.ns). + Resource("virtualmachinesnapshots"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(virtualMachineSnapshot). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a virtualMachineSnapshot and updates it. Returns the server's representation of the virtualMachineSnapshot, and an error, if there is any. +func (c *virtualMachineSnapshots) Update(ctx context.Context, virtualMachineSnapshot *v1alpha1.VirtualMachineSnapshot, opts v1.UpdateOptions) (result *v1alpha1.VirtualMachineSnapshot, err error) { + result = &v1alpha1.VirtualMachineSnapshot{} + err = c.client.Put(). + Namespace(c.ns). + Resource("virtualmachinesnapshots"). + Name(virtualMachineSnapshot.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(virtualMachineSnapshot). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *virtualMachineSnapshots) UpdateStatus(ctx context.Context, virtualMachineSnapshot *v1alpha1.VirtualMachineSnapshot, opts v1.UpdateOptions) (result *v1alpha1.VirtualMachineSnapshot, err error) { + result = &v1alpha1.VirtualMachineSnapshot{} + err = c.client.Put(). + Namespace(c.ns). + Resource("virtualmachinesnapshots"). + Name(virtualMachineSnapshot.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(virtualMachineSnapshot). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the virtualMachineSnapshot and deletes it. Returns an error if one occurs. +func (c *virtualMachineSnapshots) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("virtualmachinesnapshots"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *virtualMachineSnapshots) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Namespace(c.ns). + Resource("virtualmachinesnapshots"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched virtualMachineSnapshot. +func (c *virtualMachineSnapshots) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.VirtualMachineSnapshot, err error) { + result = &v1alpha1.VirtualMachineSnapshot{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("virtualmachinesnapshots"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/snapshot/v1alpha1/virtualmachinesnapshotcontent.go b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/snapshot/v1alpha1/virtualmachinesnapshotcontent.go new file mode 100644 index 000000000000..2dfccc2acddd --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/snapshot/v1alpha1/virtualmachinesnapshotcontent.go @@ -0,0 +1,196 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "context" + "time" + + 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" + + v1alpha1 "kubevirt.io/api/snapshot/v1alpha1" + scheme "kubevirt.io/client-go/generated/kubevirt/clientset/versioned/scheme" +) + +// VirtualMachineSnapshotContentsGetter has a method to return a VirtualMachineSnapshotContentInterface. +// A group's client should implement this interface. +type VirtualMachineSnapshotContentsGetter interface { + VirtualMachineSnapshotContents(namespace string) VirtualMachineSnapshotContentInterface +} + +// VirtualMachineSnapshotContentInterface has methods to work with VirtualMachineSnapshotContent resources. +type VirtualMachineSnapshotContentInterface interface { + Create(ctx context.Context, virtualMachineSnapshotContent *v1alpha1.VirtualMachineSnapshotContent, opts v1.CreateOptions) (*v1alpha1.VirtualMachineSnapshotContent, error) + Update(ctx context.Context, virtualMachineSnapshotContent *v1alpha1.VirtualMachineSnapshotContent, opts v1.UpdateOptions) (*v1alpha1.VirtualMachineSnapshotContent, error) + UpdateStatus(ctx context.Context, virtualMachineSnapshotContent *v1alpha1.VirtualMachineSnapshotContent, opts v1.UpdateOptions) (*v1alpha1.VirtualMachineSnapshotContent, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.VirtualMachineSnapshotContent, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.VirtualMachineSnapshotContentList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.VirtualMachineSnapshotContent, err error) + VirtualMachineSnapshotContentExpansion +} + +// virtualMachineSnapshotContents implements VirtualMachineSnapshotContentInterface +type virtualMachineSnapshotContents struct { + client rest.Interface + ns string +} + +// newVirtualMachineSnapshotContents returns a VirtualMachineSnapshotContents +func newVirtualMachineSnapshotContents(c *SnapshotV1alpha1Client, namespace string) *virtualMachineSnapshotContents { + return &virtualMachineSnapshotContents{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Get takes name of the virtualMachineSnapshotContent, and returns the corresponding virtualMachineSnapshotContent object, and an error if there is any. +func (c *virtualMachineSnapshotContents) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.VirtualMachineSnapshotContent, err error) { + result = &v1alpha1.VirtualMachineSnapshotContent{} + err = c.client.Get(). + Namespace(c.ns). + Resource("virtualmachinesnapshotcontents"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of VirtualMachineSnapshotContents that match those selectors. +func (c *virtualMachineSnapshotContents) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.VirtualMachineSnapshotContentList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1alpha1.VirtualMachineSnapshotContentList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("virtualmachinesnapshotcontents"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested virtualMachineSnapshotContents. +func (c *virtualMachineSnapshotContents) Watch(ctx context.Context, 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(). + Namespace(c.ns). + Resource("virtualmachinesnapshotcontents"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a virtualMachineSnapshotContent and creates it. Returns the server's representation of the virtualMachineSnapshotContent, and an error, if there is any. +func (c *virtualMachineSnapshotContents) Create(ctx context.Context, virtualMachineSnapshotContent *v1alpha1.VirtualMachineSnapshotContent, opts v1.CreateOptions) (result *v1alpha1.VirtualMachineSnapshotContent, err error) { + result = &v1alpha1.VirtualMachineSnapshotContent{} + err = c.client.Post(). + Namespace(c.ns). + Resource("virtualmachinesnapshotcontents"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(virtualMachineSnapshotContent). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a virtualMachineSnapshotContent and updates it. Returns the server's representation of the virtualMachineSnapshotContent, and an error, if there is any. +func (c *virtualMachineSnapshotContents) Update(ctx context.Context, virtualMachineSnapshotContent *v1alpha1.VirtualMachineSnapshotContent, opts v1.UpdateOptions) (result *v1alpha1.VirtualMachineSnapshotContent, err error) { + result = &v1alpha1.VirtualMachineSnapshotContent{} + err = c.client.Put(). + Namespace(c.ns). + Resource("virtualmachinesnapshotcontents"). + Name(virtualMachineSnapshotContent.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(virtualMachineSnapshotContent). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *virtualMachineSnapshotContents) UpdateStatus(ctx context.Context, virtualMachineSnapshotContent *v1alpha1.VirtualMachineSnapshotContent, opts v1.UpdateOptions) (result *v1alpha1.VirtualMachineSnapshotContent, err error) { + result = &v1alpha1.VirtualMachineSnapshotContent{} + err = c.client.Put(). + Namespace(c.ns). + Resource("virtualmachinesnapshotcontents"). + Name(virtualMachineSnapshotContent.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(virtualMachineSnapshotContent). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the virtualMachineSnapshotContent and deletes it. Returns an error if one occurs. +func (c *virtualMachineSnapshotContents) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("virtualmachinesnapshotcontents"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *virtualMachineSnapshotContents) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Namespace(c.ns). + Resource("virtualmachinesnapshotcontents"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched virtualMachineSnapshotContent. +func (c *virtualMachineSnapshotContents) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.VirtualMachineSnapshotContent, err error) { + result = &v1alpha1.VirtualMachineSnapshotContent{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("virtualmachinesnapshotcontents"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/kubevirt.io/client-go/generated/network-attachment-definition-client/clientset/versioned/BUILD.bazel b/vendor/kubevirt.io/client-go/generated/network-attachment-definition-client/clientset/versioned/BUILD.bazel new file mode 100644 index 000000000000..24b21a96453b --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/network-attachment-definition-client/clientset/versioned/BUILD.bazel @@ -0,0 +1,17 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = [ + "clientset.go", + "doc.go", + ], + importpath = "kubevirt.io/client-go/generated/network-attachment-definition-client/clientset/versioned", + visibility = ["//visibility:public"], + deps = [ + "//staging/src/kubevirt.io/client-go/generated/network-attachment-definition-client/clientset/versioned/typed/k8s.cni.cncf.io/v1:go_default_library", + "//vendor/k8s.io/client-go/discovery:go_default_library", + "//vendor/k8s.io/client-go/rest:go_default_library", + "//vendor/k8s.io/client-go/util/flowcontrol:go_default_library", + ], +) diff --git a/vendor/kubevirt.io/client-go/generated/network-attachment-definition-client/clientset/versioned/clientset.go b/vendor/kubevirt.io/client-go/generated/network-attachment-definition-client/clientset/versioned/clientset.go new file mode 100644 index 000000000000..f76e07af542d --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/network-attachment-definition-client/clientset/versioned/clientset.go @@ -0,0 +1,98 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package versioned + +import ( + "fmt" + + discovery "k8s.io/client-go/discovery" + rest "k8s.io/client-go/rest" + flowcontrol "k8s.io/client-go/util/flowcontrol" + + k8scnicncfiov1 "kubevirt.io/client-go/generated/network-attachment-definition-client/clientset/versioned/typed/k8s.cni.cncf.io/v1" +) + +type Interface interface { + Discovery() discovery.DiscoveryInterface + K8sCniCncfIoV1() k8scnicncfiov1.K8sCniCncfIoV1Interface +} + +// Clientset contains the clients for groups. Each group has exactly one +// version included in a Clientset. +type Clientset struct { + *discovery.DiscoveryClient + k8sCniCncfIoV1 *k8scnicncfiov1.K8sCniCncfIoV1Client +} + +// K8sCniCncfIoV1 retrieves the K8sCniCncfIoV1Client +func (c *Clientset) K8sCniCncfIoV1() k8scnicncfiov1.K8sCniCncfIoV1Interface { + return c.k8sCniCncfIoV1 +} + +// Discovery retrieves the DiscoveryClient +func (c *Clientset) Discovery() discovery.DiscoveryInterface { + if c == nil { + return nil + } + return c.DiscoveryClient +} + +// NewForConfig creates a new Clientset for the given config. +// If config's RateLimiter is not set and QPS and Burst are acceptable, +// NewForConfig will generate a rate-limiter in configShallowCopy. +func NewForConfig(c *rest.Config) (*Clientset, error) { + configShallowCopy := *c + if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 { + if configShallowCopy.Burst <= 0 { + return nil, fmt.Errorf("burst is required to be greater than 0 when RateLimiter is not set and QPS is set to greater than 0") + } + configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst) + } + var cs Clientset + var err error + cs.k8sCniCncfIoV1, err = k8scnicncfiov1.NewForConfig(&configShallowCopy) + if err != nil { + return nil, err + } + + cs.DiscoveryClient, err = discovery.NewDiscoveryClientForConfig(&configShallowCopy) + if err != nil { + return nil, err + } + return &cs, nil +} + +// NewForConfigOrDie creates a new Clientset for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *Clientset { + var cs Clientset + cs.k8sCniCncfIoV1 = k8scnicncfiov1.NewForConfigOrDie(c) + + cs.DiscoveryClient = discovery.NewDiscoveryClientForConfigOrDie(c) + return &cs +} + +// New creates a new Clientset for the given RESTClient. +func New(c rest.Interface) *Clientset { + var cs Clientset + cs.k8sCniCncfIoV1 = k8scnicncfiov1.New(c) + + cs.DiscoveryClient = discovery.NewDiscoveryClient(c) + return &cs +} diff --git a/vendor/kubevirt.io/client-go/generated/network-attachment-definition-client/clientset/versioned/doc.go b/vendor/kubevirt.io/client-go/generated/network-attachment-definition-client/clientset/versioned/doc.go new file mode 100644 index 000000000000..755a91d8b8a1 --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/network-attachment-definition-client/clientset/versioned/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +// This package has the automatically generated clientset. +package versioned diff --git a/vendor/kubevirt.io/client-go/generated/network-attachment-definition-client/clientset/versioned/fake/BUILD.bazel b/vendor/kubevirt.io/client-go/generated/network-attachment-definition-client/clientset/versioned/fake/BUILD.bazel new file mode 100644 index 000000000000..bdf604cdf3f6 --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/network-attachment-definition-client/clientset/versioned/fake/BUILD.bazel @@ -0,0 +1,27 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = [ + "clientset_generated.go", + "doc.go", + "register.go", + ], + importpath = "kubevirt.io/client-go/generated/network-attachment-definition-client/clientset/versioned/fake", + visibility = ["//visibility:public"], + deps = [ + "//staging/src/kubevirt.io/client-go/generated/network-attachment-definition-client/clientset/versioned:go_default_library", + "//staging/src/kubevirt.io/client-go/generated/network-attachment-definition-client/clientset/versioned/typed/k8s.cni.cncf.io/v1:go_default_library", + "//staging/src/kubevirt.io/client-go/generated/network-attachment-definition-client/clientset/versioned/typed/k8s.cni.cncf.io/v1/fake:go_default_library", + "//vendor/github.com/k8snetworkplumbingwg/network-attachment-definition-client/pkg/apis/k8s.cni.cncf.io/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/util/runtime:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", + "//vendor/k8s.io/client-go/discovery:go_default_library", + "//vendor/k8s.io/client-go/discovery/fake:go_default_library", + "//vendor/k8s.io/client-go/testing:go_default_library", + ], +) diff --git a/vendor/kubevirt.io/client-go/generated/network-attachment-definition-client/clientset/versioned/fake/clientset_generated.go b/vendor/kubevirt.io/client-go/generated/network-attachment-definition-client/clientset/versioned/fake/clientset_generated.go new file mode 100644 index 000000000000..e041916960a2 --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/network-attachment-definition-client/clientset/versioned/fake/clientset_generated.go @@ -0,0 +1,83 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/watch" + "k8s.io/client-go/discovery" + fakediscovery "k8s.io/client-go/discovery/fake" + "k8s.io/client-go/testing" + + clientset "kubevirt.io/client-go/generated/network-attachment-definition-client/clientset/versioned" + k8scnicncfiov1 "kubevirt.io/client-go/generated/network-attachment-definition-client/clientset/versioned/typed/k8s.cni.cncf.io/v1" + fakek8scnicncfiov1 "kubevirt.io/client-go/generated/network-attachment-definition-client/clientset/versioned/typed/k8s.cni.cncf.io/v1/fake" +) + +// NewSimpleClientset returns a clientset that will respond with the provided objects. +// It's backed by a very simple object tracker that processes creates, updates and deletions as-is, +// without applying any validations and/or defaults. It shouldn't be considered a replacement +// for a real clientset and is mostly useful in simple unit tests. +func NewSimpleClientset(objects ...runtime.Object) *Clientset { + o := testing.NewObjectTracker(scheme, codecs.UniversalDecoder()) + for _, obj := range objects { + if err := o.Add(obj); err != nil { + panic(err) + } + } + + cs := &Clientset{tracker: o} + cs.discovery = &fakediscovery.FakeDiscovery{Fake: &cs.Fake} + cs.AddReactor("*", "*", testing.ObjectReaction(o)) + cs.AddWatchReactor("*", func(action testing.Action) (handled bool, ret watch.Interface, err error) { + gvr := action.GetResource() + ns := action.GetNamespace() + watch, err := o.Watch(gvr, ns) + if err != nil { + return false, nil, err + } + return true, watch, nil + }) + + return cs +} + +// Clientset implements clientset.Interface. Meant to be embedded into a +// struct to get a default implementation. This makes faking out just the method +// you want to test easier. +type Clientset struct { + testing.Fake + discovery *fakediscovery.FakeDiscovery + tracker testing.ObjectTracker +} + +func (c *Clientset) Discovery() discovery.DiscoveryInterface { + return c.discovery +} + +func (c *Clientset) Tracker() testing.ObjectTracker { + return c.tracker +} + +var _ clientset.Interface = &Clientset{} + +// K8sCniCncfIoV1 retrieves the K8sCniCncfIoV1Client +func (c *Clientset) K8sCniCncfIoV1() k8scnicncfiov1.K8sCniCncfIoV1Interface { + return &fakek8scnicncfiov1.FakeK8sCniCncfIoV1{Fake: &c.Fake} +} diff --git a/vendor/kubevirt.io/client-go/generated/network-attachment-definition-client/clientset/versioned/fake/doc.go b/vendor/kubevirt.io/client-go/generated/network-attachment-definition-client/clientset/versioned/fake/doc.go new file mode 100644 index 000000000000..303a21d3b1dc --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/network-attachment-definition-client/clientset/versioned/fake/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +// This package has the automatically generated fake clientset. +package fake diff --git a/vendor/kubevirt.io/client-go/generated/network-attachment-definition-client/clientset/versioned/fake/register.go b/vendor/kubevirt.io/client-go/generated/network-attachment-definition-client/clientset/versioned/fake/register.go new file mode 100644 index 000000000000..8f8c72692194 --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/network-attachment-definition-client/clientset/versioned/fake/register.go @@ -0,0 +1,56 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + k8scnicncfiov1 "github.com/k8snetworkplumbingwg/network-attachment-definition-client/pkg/apis/k8s.cni.cncf.io/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + schema "k8s.io/apimachinery/pkg/runtime/schema" + serializer "k8s.io/apimachinery/pkg/runtime/serializer" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" +) + +var scheme = runtime.NewScheme() +var codecs = serializer.NewCodecFactory(scheme) + +var localSchemeBuilder = runtime.SchemeBuilder{ + k8scnicncfiov1.AddToScheme, +} + +// AddToScheme adds all types of this clientset into the given scheme. This allows composition +// of clientsets, like in: +// +// import ( +// "k8s.io/client-go/kubernetes" +// clientsetscheme "k8s.io/client-go/kubernetes/scheme" +// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" +// ) +// +// kclientset, _ := kubernetes.NewForConfig(c) +// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) +// +// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types +// correctly. +var AddToScheme = localSchemeBuilder.AddToScheme + +func init() { + v1.AddToGroupVersion(scheme, schema.GroupVersion{Version: "v1"}) + utilruntime.Must(AddToScheme(scheme)) +} diff --git a/vendor/github.com/k8snetworkplumbingwg/network-attachment-definition-client/pkg/apis/k8s.cni.cncf.io/v1/BUILD.bazel b/vendor/kubevirt.io/client-go/generated/network-attachment-definition-client/clientset/versioned/scheme/BUILD.bazel similarity index 57% rename from vendor/github.com/k8snetworkplumbingwg/network-attachment-definition-client/pkg/apis/k8s.cni.cncf.io/v1/BUILD.bazel rename to vendor/kubevirt.io/client-go/generated/network-attachment-definition-client/clientset/versioned/scheme/BUILD.bazel index d5ca74571cb7..db556da2ffd2 100644 --- a/vendor/github.com/k8snetworkplumbingwg/network-attachment-definition-client/pkg/apis/k8s.cni.cncf.io/v1/BUILD.bazel +++ b/vendor/kubevirt.io/client-go/generated/network-attachment-definition-client/clientset/versioned/scheme/BUILD.bazel @@ -5,16 +5,15 @@ go_library( srcs = [ "doc.go", "register.go", - "types.go", - "zz_generated.deepcopy.go", ], - importmap = "kubevirt.io/kubevirt/vendor/github.com/k8snetworkplumbingwg/network-attachment-definition-client/pkg/apis/k8s.cni.cncf.io/v1", - importpath = "github.com/k8snetworkplumbingwg/network-attachment-definition-client/pkg/apis/k8s.cni.cncf.io/v1", + importpath = "kubevirt.io/client-go/generated/network-attachment-definition-client/clientset/versioned/scheme", visibility = ["//visibility:public"], deps = [ - "//vendor/github.com/k8snetworkplumbingwg/network-attachment-definition-client/pkg/apis/k8s.cni.cncf.io:go_default_library", + "//vendor/github.com/k8snetworkplumbingwg/network-attachment-definition-client/pkg/apis/k8s.cni.cncf.io/v1:go_default_library", "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/util/runtime:go_default_library", ], ) diff --git a/vendor/kubevirt.io/client-go/generated/network-attachment-definition-client/clientset/versioned/scheme/doc.go b/vendor/kubevirt.io/client-go/generated/network-attachment-definition-client/clientset/versioned/scheme/doc.go new file mode 100644 index 000000000000..e6c48e24db86 --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/network-attachment-definition-client/clientset/versioned/scheme/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +// This package contains the scheme of the automatically generated clientset. +package scheme diff --git a/vendor/kubevirt.io/client-go/generated/network-attachment-definition-client/clientset/versioned/scheme/register.go b/vendor/kubevirt.io/client-go/generated/network-attachment-definition-client/clientset/versioned/scheme/register.go new file mode 100644 index 000000000000..38fc70eb9185 --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/network-attachment-definition-client/clientset/versioned/scheme/register.go @@ -0,0 +1,56 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package scheme + +import ( + k8scnicncfiov1 "github.com/k8snetworkplumbingwg/network-attachment-definition-client/pkg/apis/k8s.cni.cncf.io/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + schema "k8s.io/apimachinery/pkg/runtime/schema" + serializer "k8s.io/apimachinery/pkg/runtime/serializer" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" +) + +var Scheme = runtime.NewScheme() +var Codecs = serializer.NewCodecFactory(Scheme) +var ParameterCodec = runtime.NewParameterCodec(Scheme) +var localSchemeBuilder = runtime.SchemeBuilder{ + k8scnicncfiov1.AddToScheme, +} + +// AddToScheme adds all types of this clientset into the given scheme. This allows composition +// of clientsets, like in: +// +// import ( +// "k8s.io/client-go/kubernetes" +// clientsetscheme "k8s.io/client-go/kubernetes/scheme" +// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" +// ) +// +// kclientset, _ := kubernetes.NewForConfig(c) +// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) +// +// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types +// correctly. +var AddToScheme = localSchemeBuilder.AddToScheme + +func init() { + v1.AddToGroupVersion(Scheme, schema.GroupVersion{Version: "v1"}) + utilruntime.Must(AddToScheme(Scheme)) +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/certificates/v1/BUILD.bazel b/vendor/kubevirt.io/client-go/generated/network-attachment-definition-client/clientset/versioned/typed/k8s.cni.cncf.io/v1/BUILD.bazel similarity index 51% rename from vendor/k8s.io/client-go/kubernetes/typed/certificates/v1/BUILD.bazel rename to vendor/kubevirt.io/client-go/generated/network-attachment-definition-client/clientset/versioned/typed/k8s.cni.cncf.io/v1/BUILD.bazel index 3cabd9b500e9..ca29c8129039 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/certificates/v1/BUILD.bazel +++ b/vendor/kubevirt.io/client-go/generated/network-attachment-definition-client/clientset/versioned/typed/k8s.cni.cncf.io/v1/BUILD.bazel @@ -3,21 +3,19 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library") go_library( name = "go_default_library", srcs = [ - "certificates_client.go", - "certificatesigningrequest.go", "doc.go", "generated_expansion.go", + "k8s.cni.cncf.io_client.go", + "networkattachmentdefinition.go", ], - importmap = "kubevirt.io/kubevirt/vendor/k8s.io/client-go/kubernetes/typed/certificates/v1", - importpath = "k8s.io/client-go/kubernetes/typed/certificates/v1", + importpath = "kubevirt.io/client-go/generated/network-attachment-definition-client/clientset/versioned/typed/k8s.cni.cncf.io/v1", visibility = ["//visibility:public"], deps = [ - "//vendor/k8s.io/api/certificates/v1:go_default_library", + "//staging/src/kubevirt.io/client-go/generated/network-attachment-definition-client/clientset/versioned/scheme:go_default_library", + "//vendor/github.com/k8snetworkplumbingwg/network-attachment-definition-client/pkg/apis/k8s.cni.cncf.io/v1:go_default_library", "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/applyconfigurations/certificates/v1:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/scheme:go_default_library", "//vendor/k8s.io/client-go/rest:go_default_library", ], ) diff --git a/vendor/kubevirt.io/client-go/generated/network-attachment-definition-client/clientset/versioned/typed/k8s.cni.cncf.io/v1/doc.go b/vendor/kubevirt.io/client-go/generated/network-attachment-definition-client/clientset/versioned/typed/k8s.cni.cncf.io/v1/doc.go new file mode 100644 index 000000000000..948c7fb38c98 --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/network-attachment-definition-client/clientset/versioned/typed/k8s.cni.cncf.io/v1/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +// This package has the automatically generated typed clients. +package v1 diff --git a/vendor/k8s.io/client-go/kubernetes/typed/certificates/v1/fake/BUILD.bazel b/vendor/kubevirt.io/client-go/generated/network-attachment-definition-client/clientset/versioned/typed/k8s.cni.cncf.io/v1/fake/BUILD.bazel similarity index 57% rename from vendor/k8s.io/client-go/kubernetes/typed/certificates/v1/fake/BUILD.bazel rename to vendor/kubevirt.io/client-go/generated/network-attachment-definition-client/clientset/versioned/typed/k8s.cni.cncf.io/v1/fake/BUILD.bazel index dcc73e13c865..7e121c301fa9 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/certificates/v1/fake/BUILD.bazel +++ b/vendor/kubevirt.io/client-go/generated/network-attachment-definition-client/clientset/versioned/typed/k8s.cni.cncf.io/v1/fake/BUILD.bazel @@ -4,21 +4,19 @@ go_library( name = "go_default_library", srcs = [ "doc.go", - "fake_certificates_client.go", - "fake_certificatesigningrequest.go", + "fake_k8s.cni.cncf.io_client.go", + "fake_networkattachmentdefinition.go", ], - importmap = "kubevirt.io/kubevirt/vendor/k8s.io/client-go/kubernetes/typed/certificates/v1/fake", - importpath = "k8s.io/client-go/kubernetes/typed/certificates/v1/fake", + importpath = "kubevirt.io/client-go/generated/network-attachment-definition-client/clientset/versioned/typed/k8s.cni.cncf.io/v1/fake", visibility = ["//visibility:public"], deps = [ - "//vendor/k8s.io/api/certificates/v1:go_default_library", + "//staging/src/kubevirt.io/client-go/generated/network-attachment-definition-client/clientset/versioned/typed/k8s.cni.cncf.io/v1:go_default_library", + "//vendor/github.com/k8snetworkplumbingwg/network-attachment-definition-client/pkg/apis/k8s.cni.cncf.io/v1:go_default_library", "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/applyconfigurations/certificates/v1:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/certificates/v1:go_default_library", "//vendor/k8s.io/client-go/rest:go_default_library", "//vendor/k8s.io/client-go/testing:go_default_library", ], diff --git a/vendor/kubevirt.io/client-go/generated/network-attachment-definition-client/clientset/versioned/typed/k8s.cni.cncf.io/v1/fake/doc.go b/vendor/kubevirt.io/client-go/generated/network-attachment-definition-client/clientset/versioned/typed/k8s.cni.cncf.io/v1/fake/doc.go new file mode 100644 index 000000000000..853f43b09c4e --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/network-attachment-definition-client/clientset/versioned/typed/k8s.cni.cncf.io/v1/fake/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +// Package fake has the automatically generated clients. +package fake diff --git a/vendor/kubevirt.io/client-go/generated/network-attachment-definition-client/clientset/versioned/typed/k8s.cni.cncf.io/v1/fake/fake_k8s.cni.cncf.io_client.go b/vendor/kubevirt.io/client-go/generated/network-attachment-definition-client/clientset/versioned/typed/k8s.cni.cncf.io/v1/fake/fake_k8s.cni.cncf.io_client.go new file mode 100644 index 000000000000..cb9c2390308b --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/network-attachment-definition-client/clientset/versioned/typed/k8s.cni.cncf.io/v1/fake/fake_k8s.cni.cncf.io_client.go @@ -0,0 +1,41 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + rest "k8s.io/client-go/rest" + testing "k8s.io/client-go/testing" + + v1 "kubevirt.io/client-go/generated/network-attachment-definition-client/clientset/versioned/typed/k8s.cni.cncf.io/v1" +) + +type FakeK8sCniCncfIoV1 struct { + *testing.Fake +} + +func (c *FakeK8sCniCncfIoV1) NetworkAttachmentDefinitions(namespace string) v1.NetworkAttachmentDefinitionInterface { + return &FakeNetworkAttachmentDefinitions{c, namespace} +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *FakeK8sCniCncfIoV1) RESTClient() rest.Interface { + var ret *rest.RESTClient + return ret +} diff --git a/vendor/kubevirt.io/client-go/generated/network-attachment-definition-client/clientset/versioned/typed/k8s.cni.cncf.io/v1/fake/fake_networkattachmentdefinition.go b/vendor/kubevirt.io/client-go/generated/network-attachment-definition-client/clientset/versioned/typed/k8s.cni.cncf.io/v1/fake/fake_networkattachmentdefinition.go new file mode 100644 index 000000000000..9762a6d83221 --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/network-attachment-definition-client/clientset/versioned/typed/k8s.cni.cncf.io/v1/fake/fake_networkattachmentdefinition.go @@ -0,0 +1,130 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + + k8scnicncfiov1 "github.com/k8snetworkplumbingwg/network-attachment-definition-client/pkg/apis/k8s.cni.cncf.io/v1" + 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" +) + +// FakeNetworkAttachmentDefinitions implements NetworkAttachmentDefinitionInterface +type FakeNetworkAttachmentDefinitions struct { + Fake *FakeK8sCniCncfIoV1 + ns string +} + +var networkattachmentdefinitionsResource = schema.GroupVersionResource{Group: "k8s.cni.cncf.io", Version: "v1", Resource: "network-attachment-definitions"} + +var networkattachmentdefinitionsKind = schema.GroupVersionKind{Group: "k8s.cni.cncf.io", Version: "v1", Kind: "NetworkAttachmentDefinition"} + +// Get takes name of the networkAttachmentDefinition, and returns the corresponding networkAttachmentDefinition object, and an error if there is any. +func (c *FakeNetworkAttachmentDefinitions) Get(ctx context.Context, name string, options v1.GetOptions) (result *k8scnicncfiov1.NetworkAttachmentDefinition, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(networkattachmentdefinitionsResource, c.ns, name), &k8scnicncfiov1.NetworkAttachmentDefinition{}) + + if obj == nil { + return nil, err + } + return obj.(*k8scnicncfiov1.NetworkAttachmentDefinition), err +} + +// List takes label and field selectors, and returns the list of NetworkAttachmentDefinitions that match those selectors. +func (c *FakeNetworkAttachmentDefinitions) List(ctx context.Context, opts v1.ListOptions) (result *k8scnicncfiov1.NetworkAttachmentDefinitionList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(networkattachmentdefinitionsResource, networkattachmentdefinitionsKind, c.ns, opts), &k8scnicncfiov1.NetworkAttachmentDefinitionList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &k8scnicncfiov1.NetworkAttachmentDefinitionList{ListMeta: obj.(*k8scnicncfiov1.NetworkAttachmentDefinitionList).ListMeta} + for _, item := range obj.(*k8scnicncfiov1.NetworkAttachmentDefinitionList).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 networkAttachmentDefinitions. +func (c *FakeNetworkAttachmentDefinitions) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(networkattachmentdefinitionsResource, c.ns, opts)) + +} + +// Create takes the representation of a networkAttachmentDefinition and creates it. Returns the server's representation of the networkAttachmentDefinition, and an error, if there is any. +func (c *FakeNetworkAttachmentDefinitions) Create(ctx context.Context, networkAttachmentDefinition *k8scnicncfiov1.NetworkAttachmentDefinition, opts v1.CreateOptions) (result *k8scnicncfiov1.NetworkAttachmentDefinition, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(networkattachmentdefinitionsResource, c.ns, networkAttachmentDefinition), &k8scnicncfiov1.NetworkAttachmentDefinition{}) + + if obj == nil { + return nil, err + } + return obj.(*k8scnicncfiov1.NetworkAttachmentDefinition), err +} + +// Update takes the representation of a networkAttachmentDefinition and updates it. Returns the server's representation of the networkAttachmentDefinition, and an error, if there is any. +func (c *FakeNetworkAttachmentDefinitions) Update(ctx context.Context, networkAttachmentDefinition *k8scnicncfiov1.NetworkAttachmentDefinition, opts v1.UpdateOptions) (result *k8scnicncfiov1.NetworkAttachmentDefinition, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(networkattachmentdefinitionsResource, c.ns, networkAttachmentDefinition), &k8scnicncfiov1.NetworkAttachmentDefinition{}) + + if obj == nil { + return nil, err + } + return obj.(*k8scnicncfiov1.NetworkAttachmentDefinition), err +} + +// Delete takes name of the networkAttachmentDefinition and deletes it. Returns an error if one occurs. +func (c *FakeNetworkAttachmentDefinitions) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteAction(networkattachmentdefinitionsResource, c.ns, name), &k8scnicncfiov1.NetworkAttachmentDefinition{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeNetworkAttachmentDefinitions) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(networkattachmentdefinitionsResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &k8scnicncfiov1.NetworkAttachmentDefinitionList{}) + return err +} + +// Patch applies the patch and returns the patched networkAttachmentDefinition. +func (c *FakeNetworkAttachmentDefinitions) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *k8scnicncfiov1.NetworkAttachmentDefinition, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(networkattachmentdefinitionsResource, c.ns, name, pt, data, subresources...), &k8scnicncfiov1.NetworkAttachmentDefinition{}) + + if obj == nil { + return nil, err + } + return obj.(*k8scnicncfiov1.NetworkAttachmentDefinition), err +} diff --git a/vendor/kubevirt.io/client-go/generated/network-attachment-definition-client/clientset/versioned/typed/k8s.cni.cncf.io/v1/generated_expansion.go b/vendor/kubevirt.io/client-go/generated/network-attachment-definition-client/clientset/versioned/typed/k8s.cni.cncf.io/v1/generated_expansion.go new file mode 100644 index 000000000000..f6872682467e --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/network-attachment-definition-client/clientset/versioned/typed/k8s.cni.cncf.io/v1/generated_expansion.go @@ -0,0 +1,21 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +type NetworkAttachmentDefinitionExpansion interface{} diff --git a/vendor/kubevirt.io/client-go/generated/network-attachment-definition-client/clientset/versioned/typed/k8s.cni.cncf.io/v1/k8s.cni.cncf.io_client.go b/vendor/kubevirt.io/client-go/generated/network-attachment-definition-client/clientset/versioned/typed/k8s.cni.cncf.io/v1/k8s.cni.cncf.io_client.go new file mode 100644 index 000000000000..2b016363670b --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/network-attachment-definition-client/clientset/versioned/typed/k8s.cni.cncf.io/v1/k8s.cni.cncf.io_client.go @@ -0,0 +1,90 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + v1 "github.com/k8snetworkplumbingwg/network-attachment-definition-client/pkg/apis/k8s.cni.cncf.io/v1" + rest "k8s.io/client-go/rest" + + "kubevirt.io/client-go/generated/network-attachment-definition-client/clientset/versioned/scheme" +) + +type K8sCniCncfIoV1Interface interface { + RESTClient() rest.Interface + NetworkAttachmentDefinitionsGetter +} + +// K8sCniCncfIoV1Client is used to interact with features provided by the k8s.cni.cncf.io group. +type K8sCniCncfIoV1Client struct { + restClient rest.Interface +} + +func (c *K8sCniCncfIoV1Client) NetworkAttachmentDefinitions(namespace string) NetworkAttachmentDefinitionInterface { + return newNetworkAttachmentDefinitions(c, namespace) +} + +// NewForConfig creates a new K8sCniCncfIoV1Client for the given config. +func NewForConfig(c *rest.Config) (*K8sCniCncfIoV1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + client, err := rest.RESTClientFor(&config) + if err != nil { + return nil, err + } + return &K8sCniCncfIoV1Client{client}, nil +} + +// NewForConfigOrDie creates a new K8sCniCncfIoV1Client for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *K8sCniCncfIoV1Client { + client, err := NewForConfig(c) + if err != nil { + panic(err) + } + return client +} + +// New creates a new K8sCniCncfIoV1Client for the given RESTClient. +func New(c rest.Interface) *K8sCniCncfIoV1Client { + return &K8sCniCncfIoV1Client{c} +} + +func setConfigDefaults(config *rest.Config) error { + gv := v1.SchemeGroupVersion + config.GroupVersion = &gv + config.APIPath = "/apis" + config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() + + 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 *K8sCniCncfIoV1Client) RESTClient() rest.Interface { + if c == nil { + return nil + } + return c.restClient +} diff --git a/vendor/kubevirt.io/client-go/generated/network-attachment-definition-client/clientset/versioned/typed/k8s.cni.cncf.io/v1/networkattachmentdefinition.go b/vendor/kubevirt.io/client-go/generated/network-attachment-definition-client/clientset/versioned/typed/k8s.cni.cncf.io/v1/networkattachmentdefinition.go new file mode 100644 index 000000000000..3ea2b6a189ca --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/network-attachment-definition-client/clientset/versioned/typed/k8s.cni.cncf.io/v1/networkattachmentdefinition.go @@ -0,0 +1,179 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + "context" + "time" + + v1 "github.com/k8snetworkplumbingwg/network-attachment-definition-client/pkg/apis/k8s.cni.cncf.io/v1" + metav1 "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" + + scheme "kubevirt.io/client-go/generated/network-attachment-definition-client/clientset/versioned/scheme" +) + +// NetworkAttachmentDefinitionsGetter has a method to return a NetworkAttachmentDefinitionInterface. +// A group's client should implement this interface. +type NetworkAttachmentDefinitionsGetter interface { + NetworkAttachmentDefinitions(namespace string) NetworkAttachmentDefinitionInterface +} + +// NetworkAttachmentDefinitionInterface has methods to work with NetworkAttachmentDefinition resources. +type NetworkAttachmentDefinitionInterface interface { + Create(ctx context.Context, networkAttachmentDefinition *v1.NetworkAttachmentDefinition, opts metav1.CreateOptions) (*v1.NetworkAttachmentDefinition, error) + Update(ctx context.Context, networkAttachmentDefinition *v1.NetworkAttachmentDefinition, opts metav1.UpdateOptions) (*v1.NetworkAttachmentDefinition, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.NetworkAttachmentDefinition, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.NetworkAttachmentDefinitionList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.NetworkAttachmentDefinition, err error) + NetworkAttachmentDefinitionExpansion +} + +// networkAttachmentDefinitions implements NetworkAttachmentDefinitionInterface +type networkAttachmentDefinitions struct { + client rest.Interface + ns string +} + +// newNetworkAttachmentDefinitions returns a NetworkAttachmentDefinitions +func newNetworkAttachmentDefinitions(c *K8sCniCncfIoV1Client, namespace string) *networkAttachmentDefinitions { + return &networkAttachmentDefinitions{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Get takes name of the networkAttachmentDefinition, and returns the corresponding networkAttachmentDefinition object, and an error if there is any. +func (c *networkAttachmentDefinitions) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.NetworkAttachmentDefinition, err error) { + result = &v1.NetworkAttachmentDefinition{} + err = c.client.Get(). + Namespace(c.ns). + Resource("network-attachment-definitions"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of NetworkAttachmentDefinitions that match those selectors. +func (c *networkAttachmentDefinitions) List(ctx context.Context, opts metav1.ListOptions) (result *v1.NetworkAttachmentDefinitionList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1.NetworkAttachmentDefinitionList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("network-attachment-definitions"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested networkAttachmentDefinitions. +func (c *networkAttachmentDefinitions) Watch(ctx context.Context, opts metav1.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(). + Namespace(c.ns). + Resource("network-attachment-definitions"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a networkAttachmentDefinition and creates it. Returns the server's representation of the networkAttachmentDefinition, and an error, if there is any. +func (c *networkAttachmentDefinitions) Create(ctx context.Context, networkAttachmentDefinition *v1.NetworkAttachmentDefinition, opts metav1.CreateOptions) (result *v1.NetworkAttachmentDefinition, err error) { + result = &v1.NetworkAttachmentDefinition{} + err = c.client.Post(). + Namespace(c.ns). + Resource("network-attachment-definitions"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(networkAttachmentDefinition). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a networkAttachmentDefinition and updates it. Returns the server's representation of the networkAttachmentDefinition, and an error, if there is any. +func (c *networkAttachmentDefinitions) Update(ctx context.Context, networkAttachmentDefinition *v1.NetworkAttachmentDefinition, opts metav1.UpdateOptions) (result *v1.NetworkAttachmentDefinition, err error) { + result = &v1.NetworkAttachmentDefinition{} + err = c.client.Put(). + Namespace(c.ns). + Resource("network-attachment-definitions"). + Name(networkAttachmentDefinition.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(networkAttachmentDefinition). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the networkAttachmentDefinition and deletes it. Returns an error if one occurs. +func (c *networkAttachmentDefinitions) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("network-attachment-definitions"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *networkAttachmentDefinitions) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Namespace(c.ns). + Resource("network-attachment-definitions"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched networkAttachmentDefinition. +func (c *networkAttachmentDefinitions) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.NetworkAttachmentDefinition, err error) { + result = &v1.NetworkAttachmentDefinition{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("network-attachment-definitions"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/BUILD.bazel b/vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/BUILD.bazel new file mode 100644 index 000000000000..b4b0d68196ba --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/BUILD.bazel @@ -0,0 +1,17 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = [ + "clientset.go", + "doc.go", + ], + importpath = "kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned", + visibility = ["//visibility:public"], + deps = [ + "//staging/src/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/typed/monitoring/v1:go_default_library", + "//vendor/k8s.io/client-go/discovery:go_default_library", + "//vendor/k8s.io/client-go/rest:go_default_library", + "//vendor/k8s.io/client-go/util/flowcontrol:go_default_library", + ], +) diff --git a/vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/clientset.go b/vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/clientset.go new file mode 100644 index 000000000000..5c90a7cfc044 --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/clientset.go @@ -0,0 +1,98 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package versioned + +import ( + "fmt" + + discovery "k8s.io/client-go/discovery" + rest "k8s.io/client-go/rest" + flowcontrol "k8s.io/client-go/util/flowcontrol" + + monitoringv1 "kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/typed/monitoring/v1" +) + +type Interface interface { + Discovery() discovery.DiscoveryInterface + MonitoringV1() monitoringv1.MonitoringV1Interface +} + +// Clientset contains the clients for groups. Each group has exactly one +// version included in a Clientset. +type Clientset struct { + *discovery.DiscoveryClient + monitoringV1 *monitoringv1.MonitoringV1Client +} + +// MonitoringV1 retrieves the MonitoringV1Client +func (c *Clientset) MonitoringV1() monitoringv1.MonitoringV1Interface { + return c.monitoringV1 +} + +// Discovery retrieves the DiscoveryClient +func (c *Clientset) Discovery() discovery.DiscoveryInterface { + if c == nil { + return nil + } + return c.DiscoveryClient +} + +// NewForConfig creates a new Clientset for the given config. +// If config's RateLimiter is not set and QPS and Burst are acceptable, +// NewForConfig will generate a rate-limiter in configShallowCopy. +func NewForConfig(c *rest.Config) (*Clientset, error) { + configShallowCopy := *c + if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 { + if configShallowCopy.Burst <= 0 { + return nil, fmt.Errorf("burst is required to be greater than 0 when RateLimiter is not set and QPS is set to greater than 0") + } + configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst) + } + var cs Clientset + var err error + cs.monitoringV1, err = monitoringv1.NewForConfig(&configShallowCopy) + if err != nil { + return nil, err + } + + cs.DiscoveryClient, err = discovery.NewDiscoveryClientForConfig(&configShallowCopy) + if err != nil { + return nil, err + } + return &cs, nil +} + +// NewForConfigOrDie creates a new Clientset for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *Clientset { + var cs Clientset + cs.monitoringV1 = monitoringv1.NewForConfigOrDie(c) + + cs.DiscoveryClient = discovery.NewDiscoveryClientForConfigOrDie(c) + return &cs +} + +// New creates a new Clientset for the given RESTClient. +func New(c rest.Interface) *Clientset { + var cs Clientset + cs.monitoringV1 = monitoringv1.New(c) + + cs.DiscoveryClient = discovery.NewDiscoveryClient(c) + return &cs +} diff --git a/vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/doc.go b/vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/doc.go new file mode 100644 index 000000000000..755a91d8b8a1 --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +// This package has the automatically generated clientset. +package versioned diff --git a/vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/fake/BUILD.bazel b/vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/fake/BUILD.bazel new file mode 100644 index 000000000000..1bcb15dd11ea --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/fake/BUILD.bazel @@ -0,0 +1,27 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = [ + "clientset_generated.go", + "doc.go", + "register.go", + ], + importpath = "kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/fake", + visibility = ["//visibility:public"], + deps = [ + "//staging/src/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned:go_default_library", + "//staging/src/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/typed/monitoring/v1:go_default_library", + "//staging/src/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/typed/monitoring/v1/fake:go_default_library", + "//vendor/github.com/coreos/prometheus-operator/pkg/apis/monitoring/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/util/runtime:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", + "//vendor/k8s.io/client-go/discovery:go_default_library", + "//vendor/k8s.io/client-go/discovery/fake:go_default_library", + "//vendor/k8s.io/client-go/testing:go_default_library", + ], +) diff --git a/vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/fake/clientset_generated.go b/vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/fake/clientset_generated.go new file mode 100644 index 000000000000..198519e2cb8a --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/fake/clientset_generated.go @@ -0,0 +1,83 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/watch" + "k8s.io/client-go/discovery" + fakediscovery "k8s.io/client-go/discovery/fake" + "k8s.io/client-go/testing" + + clientset "kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned" + monitoringv1 "kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/typed/monitoring/v1" + fakemonitoringv1 "kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/typed/monitoring/v1/fake" +) + +// NewSimpleClientset returns a clientset that will respond with the provided objects. +// It's backed by a very simple object tracker that processes creates, updates and deletions as-is, +// without applying any validations and/or defaults. It shouldn't be considered a replacement +// for a real clientset and is mostly useful in simple unit tests. +func NewSimpleClientset(objects ...runtime.Object) *Clientset { + o := testing.NewObjectTracker(scheme, codecs.UniversalDecoder()) + for _, obj := range objects { + if err := o.Add(obj); err != nil { + panic(err) + } + } + + cs := &Clientset{tracker: o} + cs.discovery = &fakediscovery.FakeDiscovery{Fake: &cs.Fake} + cs.AddReactor("*", "*", testing.ObjectReaction(o)) + cs.AddWatchReactor("*", func(action testing.Action) (handled bool, ret watch.Interface, err error) { + gvr := action.GetResource() + ns := action.GetNamespace() + watch, err := o.Watch(gvr, ns) + if err != nil { + return false, nil, err + } + return true, watch, nil + }) + + return cs +} + +// Clientset implements clientset.Interface. Meant to be embedded into a +// struct to get a default implementation. This makes faking out just the method +// you want to test easier. +type Clientset struct { + testing.Fake + discovery *fakediscovery.FakeDiscovery + tracker testing.ObjectTracker +} + +func (c *Clientset) Discovery() discovery.DiscoveryInterface { + return c.discovery +} + +func (c *Clientset) Tracker() testing.ObjectTracker { + return c.tracker +} + +var _ clientset.Interface = &Clientset{} + +// MonitoringV1 retrieves the MonitoringV1Client +func (c *Clientset) MonitoringV1() monitoringv1.MonitoringV1Interface { + return &fakemonitoringv1.FakeMonitoringV1{Fake: &c.Fake} +} diff --git a/vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/fake/doc.go b/vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/fake/doc.go new file mode 100644 index 000000000000..303a21d3b1dc --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/fake/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +// This package has the automatically generated fake clientset. +package fake diff --git a/vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/fake/register.go b/vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/fake/register.go new file mode 100644 index 000000000000..613f96bb1505 --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/fake/register.go @@ -0,0 +1,56 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + monitoringv1 "github.com/coreos/prometheus-operator/pkg/apis/monitoring/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + schema "k8s.io/apimachinery/pkg/runtime/schema" + serializer "k8s.io/apimachinery/pkg/runtime/serializer" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" +) + +var scheme = runtime.NewScheme() +var codecs = serializer.NewCodecFactory(scheme) + +var localSchemeBuilder = runtime.SchemeBuilder{ + monitoringv1.AddToScheme, +} + +// AddToScheme adds all types of this clientset into the given scheme. This allows composition +// of clientsets, like in: +// +// import ( +// "k8s.io/client-go/kubernetes" +// clientsetscheme "k8s.io/client-go/kubernetes/scheme" +// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" +// ) +// +// kclientset, _ := kubernetes.NewForConfig(c) +// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) +// +// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types +// correctly. +var AddToScheme = localSchemeBuilder.AddToScheme + +func init() { + v1.AddToGroupVersion(scheme, schema.GroupVersion{Version: "v1"}) + utilruntime.Must(AddToScheme(scheme)) +} diff --git a/vendor/k8s.io/api/coordination/v1/BUILD.bazel b/vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/scheme/BUILD.bazel similarity index 55% rename from vendor/k8s.io/api/coordination/v1/BUILD.bazel rename to vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/scheme/BUILD.bazel index 8ddddcbc02eb..c7bea53d55bd 100644 --- a/vendor/k8s.io/api/coordination/v1/BUILD.bazel +++ b/vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/scheme/BUILD.bazel @@ -4,19 +4,16 @@ go_library( name = "go_default_library", srcs = [ "doc.go", - "generated.pb.go", "register.go", - "types.go", - "types_swagger_doc_generated.go", - "zz_generated.deepcopy.go", ], - importmap = "kubevirt.io/kubevirt/vendor/k8s.io/api/coordination/v1", - importpath = "k8s.io/api/coordination/v1", + importpath = "kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/scheme", visibility = ["//visibility:public"], deps = [ - "//vendor/github.com/gogo/protobuf/proto:go_default_library", + "//vendor/github.com/coreos/prometheus-operator/pkg/apis/monitoring/v1:go_default_library", "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/util/runtime:go_default_library", ], ) diff --git a/vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/scheme/doc.go b/vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/scheme/doc.go new file mode 100644 index 000000000000..e6c48e24db86 --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/scheme/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +// This package contains the scheme of the automatically generated clientset. +package scheme diff --git a/vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/scheme/register.go b/vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/scheme/register.go new file mode 100644 index 000000000000..bc062a9f0e06 --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/scheme/register.go @@ -0,0 +1,56 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package scheme + +import ( + monitoringv1 "github.com/coreos/prometheus-operator/pkg/apis/monitoring/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + schema "k8s.io/apimachinery/pkg/runtime/schema" + serializer "k8s.io/apimachinery/pkg/runtime/serializer" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" +) + +var Scheme = runtime.NewScheme() +var Codecs = serializer.NewCodecFactory(Scheme) +var ParameterCodec = runtime.NewParameterCodec(Scheme) +var localSchemeBuilder = runtime.SchemeBuilder{ + monitoringv1.AddToScheme, +} + +// AddToScheme adds all types of this clientset into the given scheme. This allows composition +// of clientsets, like in: +// +// import ( +// "k8s.io/client-go/kubernetes" +// clientsetscheme "k8s.io/client-go/kubernetes/scheme" +// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" +// ) +// +// kclientset, _ := kubernetes.NewForConfig(c) +// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) +// +// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types +// correctly. +var AddToScheme = localSchemeBuilder.AddToScheme + +func init() { + v1.AddToGroupVersion(Scheme, schema.GroupVersion{Version: "v1"}) + utilruntime.Must(AddToScheme(Scheme)) +} diff --git a/vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/typed/monitoring/v1/BUILD.bazel b/vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/typed/monitoring/v1/BUILD.bazel new file mode 100644 index 000000000000..fa9e693ee3fe --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/typed/monitoring/v1/BUILD.bazel @@ -0,0 +1,26 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = [ + "alertmanager.go", + "doc.go", + "generated_expansion.go", + "monitoring_client.go", + "podmonitor.go", + "prometheus.go", + "prometheusrule.go", + "servicemonitor.go", + "thanosruler.go", + ], + importpath = "kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/typed/monitoring/v1", + visibility = ["//visibility:public"], + deps = [ + "//staging/src/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/scheme:go_default_library", + "//vendor/github.com/coreos/prometheus-operator/pkg/apis/monitoring/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", + "//vendor/k8s.io/client-go/rest:go_default_library", + ], +) diff --git a/vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/typed/monitoring/v1/alertmanager.go b/vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/typed/monitoring/v1/alertmanager.go new file mode 100644 index 000000000000..fe9ca1012b9f --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/typed/monitoring/v1/alertmanager.go @@ -0,0 +1,196 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + "context" + "time" + + v1 "github.com/coreos/prometheus-operator/pkg/apis/monitoring/v1" + metav1 "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" + + scheme "kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/scheme" +) + +// AlertmanagersGetter has a method to return a AlertmanagerInterface. +// A group's client should implement this interface. +type AlertmanagersGetter interface { + Alertmanagers(namespace string) AlertmanagerInterface +} + +// AlertmanagerInterface has methods to work with Alertmanager resources. +type AlertmanagerInterface interface { + Create(ctx context.Context, alertmanager *v1.Alertmanager, opts metav1.CreateOptions) (*v1.Alertmanager, error) + Update(ctx context.Context, alertmanager *v1.Alertmanager, opts metav1.UpdateOptions) (*v1.Alertmanager, error) + UpdateStatus(ctx context.Context, alertmanager *v1.Alertmanager, opts metav1.UpdateOptions) (*v1.Alertmanager, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Alertmanager, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.AlertmanagerList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Alertmanager, err error) + AlertmanagerExpansion +} + +// alertmanagers implements AlertmanagerInterface +type alertmanagers struct { + client rest.Interface + ns string +} + +// newAlertmanagers returns a Alertmanagers +func newAlertmanagers(c *MonitoringV1Client, namespace string) *alertmanagers { + return &alertmanagers{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Get takes name of the alertmanager, and returns the corresponding alertmanager object, and an error if there is any. +func (c *alertmanagers) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Alertmanager, err error) { + result = &v1.Alertmanager{} + err = c.client.Get(). + Namespace(c.ns). + Resource("alertmanagers"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of Alertmanagers that match those selectors. +func (c *alertmanagers) List(ctx context.Context, opts metav1.ListOptions) (result *v1.AlertmanagerList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1.AlertmanagerList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("alertmanagers"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested alertmanagers. +func (c *alertmanagers) Watch(ctx context.Context, opts metav1.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(). + Namespace(c.ns). + Resource("alertmanagers"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a alertmanager and creates it. Returns the server's representation of the alertmanager, and an error, if there is any. +func (c *alertmanagers) Create(ctx context.Context, alertmanager *v1.Alertmanager, opts metav1.CreateOptions) (result *v1.Alertmanager, err error) { + result = &v1.Alertmanager{} + err = c.client.Post(). + Namespace(c.ns). + Resource("alertmanagers"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(alertmanager). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a alertmanager and updates it. Returns the server's representation of the alertmanager, and an error, if there is any. +func (c *alertmanagers) Update(ctx context.Context, alertmanager *v1.Alertmanager, opts metav1.UpdateOptions) (result *v1.Alertmanager, err error) { + result = &v1.Alertmanager{} + err = c.client.Put(). + Namespace(c.ns). + Resource("alertmanagers"). + Name(alertmanager.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(alertmanager). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *alertmanagers) UpdateStatus(ctx context.Context, alertmanager *v1.Alertmanager, opts metav1.UpdateOptions) (result *v1.Alertmanager, err error) { + result = &v1.Alertmanager{} + err = c.client.Put(). + Namespace(c.ns). + Resource("alertmanagers"). + Name(alertmanager.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(alertmanager). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the alertmanager and deletes it. Returns an error if one occurs. +func (c *alertmanagers) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("alertmanagers"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *alertmanagers) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Namespace(c.ns). + Resource("alertmanagers"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched alertmanager. +func (c *alertmanagers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Alertmanager, err error) { + result = &v1.Alertmanager{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("alertmanagers"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/typed/monitoring/v1/doc.go b/vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/typed/monitoring/v1/doc.go new file mode 100644 index 000000000000..948c7fb38c98 --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/typed/monitoring/v1/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +// This package has the automatically generated typed clients. +package v1 diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1/fake/BUILD.bazel b/vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/typed/monitoring/v1/fake/BUILD.bazel similarity index 54% rename from vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1/fake/BUILD.bazel rename to vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/typed/monitoring/v1/fake/BUILD.bazel index 8f0050a520d1..f6070c8d6169 100644 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1/fake/BUILD.bazel +++ b/vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/typed/monitoring/v1/fake/BUILD.bazel @@ -4,15 +4,19 @@ go_library( name = "go_default_library", srcs = [ "doc.go", - "fake_apiextensions_client.go", - "fake_customresourcedefinition.go", + "fake_alertmanager.go", + "fake_monitoring_client.go", + "fake_podmonitor.go", + "fake_prometheus.go", + "fake_prometheusrule.go", + "fake_servicemonitor.go", + "fake_thanosruler.go", ], - importmap = "kubevirt.io/kubevirt/vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1/fake", - importpath = "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1/fake", + importpath = "kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/typed/monitoring/v1/fake", visibility = ["//visibility:public"], deps = [ - "//vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1:go_default_library", - "//vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1:go_default_library", + "//staging/src/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/typed/monitoring/v1:go_default_library", + "//vendor/github.com/coreos/prometheus-operator/pkg/apis/monitoring/v1:go_default_library", "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", diff --git a/vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/typed/monitoring/v1/fake/doc.go b/vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/typed/monitoring/v1/fake/doc.go new file mode 100644 index 000000000000..853f43b09c4e --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/typed/monitoring/v1/fake/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +// Package fake has the automatically generated clients. +package fake diff --git a/vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/typed/monitoring/v1/fake/fake_alertmanager.go b/vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/typed/monitoring/v1/fake/fake_alertmanager.go new file mode 100644 index 000000000000..e3d5bfd42c7d --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/typed/monitoring/v1/fake/fake_alertmanager.go @@ -0,0 +1,142 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + + monitoringv1 "github.com/coreos/prometheus-operator/pkg/apis/monitoring/v1" + 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" +) + +// FakeAlertmanagers implements AlertmanagerInterface +type FakeAlertmanagers struct { + Fake *FakeMonitoringV1 + ns string +} + +var alertmanagersResource = schema.GroupVersionResource{Group: "monitoring.coreos.com", Version: "v1", Resource: "alertmanagers"} + +var alertmanagersKind = schema.GroupVersionKind{Group: "monitoring.coreos.com", Version: "v1", Kind: "Alertmanager"} + +// Get takes name of the alertmanager, and returns the corresponding alertmanager object, and an error if there is any. +func (c *FakeAlertmanagers) Get(ctx context.Context, name string, options v1.GetOptions) (result *monitoringv1.Alertmanager, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(alertmanagersResource, c.ns, name), &monitoringv1.Alertmanager{}) + + if obj == nil { + return nil, err + } + return obj.(*monitoringv1.Alertmanager), err +} + +// List takes label and field selectors, and returns the list of Alertmanagers that match those selectors. +func (c *FakeAlertmanagers) List(ctx context.Context, opts v1.ListOptions) (result *monitoringv1.AlertmanagerList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(alertmanagersResource, alertmanagersKind, c.ns, opts), &monitoringv1.AlertmanagerList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &monitoringv1.AlertmanagerList{ListMeta: obj.(*monitoringv1.AlertmanagerList).ListMeta} + for _, item := range obj.(*monitoringv1.AlertmanagerList).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 alertmanagers. +func (c *FakeAlertmanagers) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(alertmanagersResource, c.ns, opts)) + +} + +// Create takes the representation of a alertmanager and creates it. Returns the server's representation of the alertmanager, and an error, if there is any. +func (c *FakeAlertmanagers) Create(ctx context.Context, alertmanager *monitoringv1.Alertmanager, opts v1.CreateOptions) (result *monitoringv1.Alertmanager, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(alertmanagersResource, c.ns, alertmanager), &monitoringv1.Alertmanager{}) + + if obj == nil { + return nil, err + } + return obj.(*monitoringv1.Alertmanager), err +} + +// Update takes the representation of a alertmanager and updates it. Returns the server's representation of the alertmanager, and an error, if there is any. +func (c *FakeAlertmanagers) Update(ctx context.Context, alertmanager *monitoringv1.Alertmanager, opts v1.UpdateOptions) (result *monitoringv1.Alertmanager, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(alertmanagersResource, c.ns, alertmanager), &monitoringv1.Alertmanager{}) + + if obj == nil { + return nil, err + } + return obj.(*monitoringv1.Alertmanager), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeAlertmanagers) UpdateStatus(ctx context.Context, alertmanager *monitoringv1.Alertmanager, opts v1.UpdateOptions) (*monitoringv1.Alertmanager, error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceAction(alertmanagersResource, "status", c.ns, alertmanager), &monitoringv1.Alertmanager{}) + + if obj == nil { + return nil, err + } + return obj.(*monitoringv1.Alertmanager), err +} + +// Delete takes name of the alertmanager and deletes it. Returns an error if one occurs. +func (c *FakeAlertmanagers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteAction(alertmanagersResource, c.ns, name), &monitoringv1.Alertmanager{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeAlertmanagers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(alertmanagersResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &monitoringv1.AlertmanagerList{}) + return err +} + +// Patch applies the patch and returns the patched alertmanager. +func (c *FakeAlertmanagers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *monitoringv1.Alertmanager, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(alertmanagersResource, c.ns, name, pt, data, subresources...), &monitoringv1.Alertmanager{}) + + if obj == nil { + return nil, err + } + return obj.(*monitoringv1.Alertmanager), err +} diff --git a/vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/typed/monitoring/v1/fake/fake_monitoring_client.go b/vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/typed/monitoring/v1/fake/fake_monitoring_client.go new file mode 100644 index 000000000000..89ba31228e2a --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/typed/monitoring/v1/fake/fake_monitoring_client.go @@ -0,0 +1,61 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + rest "k8s.io/client-go/rest" + testing "k8s.io/client-go/testing" + + v1 "kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/typed/monitoring/v1" +) + +type FakeMonitoringV1 struct { + *testing.Fake +} + +func (c *FakeMonitoringV1) Alertmanagers(namespace string) v1.AlertmanagerInterface { + return &FakeAlertmanagers{c, namespace} +} + +func (c *FakeMonitoringV1) PodMonitors(namespace string) v1.PodMonitorInterface { + return &FakePodMonitors{c, namespace} +} + +func (c *FakeMonitoringV1) Prometheuses(namespace string) v1.PrometheusInterface { + return &FakePrometheuses{c, namespace} +} + +func (c *FakeMonitoringV1) PrometheusRules(namespace string) v1.PrometheusRuleInterface { + return &FakePrometheusRules{c, namespace} +} + +func (c *FakeMonitoringV1) ServiceMonitors(namespace string) v1.ServiceMonitorInterface { + return &FakeServiceMonitors{c, namespace} +} + +func (c *FakeMonitoringV1) ThanosRulers(namespace string) v1.ThanosRulerInterface { + return &FakeThanosRulers{c, namespace} +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *FakeMonitoringV1) RESTClient() rest.Interface { + var ret *rest.RESTClient + return ret +} diff --git a/vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/typed/monitoring/v1/fake/fake_podmonitor.go b/vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/typed/monitoring/v1/fake/fake_podmonitor.go new file mode 100644 index 000000000000..b11ce703e09e --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/typed/monitoring/v1/fake/fake_podmonitor.go @@ -0,0 +1,130 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + + monitoringv1 "github.com/coreos/prometheus-operator/pkg/apis/monitoring/v1" + 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" +) + +// FakePodMonitors implements PodMonitorInterface +type FakePodMonitors struct { + Fake *FakeMonitoringV1 + ns string +} + +var podmonitorsResource = schema.GroupVersionResource{Group: "monitoring.coreos.com", Version: "v1", Resource: "podmonitors"} + +var podmonitorsKind = schema.GroupVersionKind{Group: "monitoring.coreos.com", Version: "v1", Kind: "PodMonitor"} + +// Get takes name of the podMonitor, and returns the corresponding podMonitor object, and an error if there is any. +func (c *FakePodMonitors) Get(ctx context.Context, name string, options v1.GetOptions) (result *monitoringv1.PodMonitor, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(podmonitorsResource, c.ns, name), &monitoringv1.PodMonitor{}) + + if obj == nil { + return nil, err + } + return obj.(*monitoringv1.PodMonitor), err +} + +// List takes label and field selectors, and returns the list of PodMonitors that match those selectors. +func (c *FakePodMonitors) List(ctx context.Context, opts v1.ListOptions) (result *monitoringv1.PodMonitorList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(podmonitorsResource, podmonitorsKind, c.ns, opts), &monitoringv1.PodMonitorList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &monitoringv1.PodMonitorList{ListMeta: obj.(*monitoringv1.PodMonitorList).ListMeta} + for _, item := range obj.(*monitoringv1.PodMonitorList).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 podMonitors. +func (c *FakePodMonitors) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(podmonitorsResource, c.ns, opts)) + +} + +// Create takes the representation of a podMonitor and creates it. Returns the server's representation of the podMonitor, and an error, if there is any. +func (c *FakePodMonitors) Create(ctx context.Context, podMonitor *monitoringv1.PodMonitor, opts v1.CreateOptions) (result *monitoringv1.PodMonitor, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(podmonitorsResource, c.ns, podMonitor), &monitoringv1.PodMonitor{}) + + if obj == nil { + return nil, err + } + return obj.(*monitoringv1.PodMonitor), err +} + +// Update takes the representation of a podMonitor and updates it. Returns the server's representation of the podMonitor, and an error, if there is any. +func (c *FakePodMonitors) Update(ctx context.Context, podMonitor *monitoringv1.PodMonitor, opts v1.UpdateOptions) (result *monitoringv1.PodMonitor, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(podmonitorsResource, c.ns, podMonitor), &monitoringv1.PodMonitor{}) + + if obj == nil { + return nil, err + } + return obj.(*monitoringv1.PodMonitor), err +} + +// Delete takes name of the podMonitor and deletes it. Returns an error if one occurs. +func (c *FakePodMonitors) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteAction(podmonitorsResource, c.ns, name), &monitoringv1.PodMonitor{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakePodMonitors) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(podmonitorsResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &monitoringv1.PodMonitorList{}) + return err +} + +// Patch applies the patch and returns the patched podMonitor. +func (c *FakePodMonitors) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *monitoringv1.PodMonitor, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(podmonitorsResource, c.ns, name, pt, data, subresources...), &monitoringv1.PodMonitor{}) + + if obj == nil { + return nil, err + } + return obj.(*monitoringv1.PodMonitor), err +} diff --git a/vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/typed/monitoring/v1/fake/fake_prometheus.go b/vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/typed/monitoring/v1/fake/fake_prometheus.go new file mode 100644 index 000000000000..ac42df8e880b --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/typed/monitoring/v1/fake/fake_prometheus.go @@ -0,0 +1,142 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + + monitoringv1 "github.com/coreos/prometheus-operator/pkg/apis/monitoring/v1" + 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" +) + +// FakePrometheuses implements PrometheusInterface +type FakePrometheuses struct { + Fake *FakeMonitoringV1 + ns string +} + +var prometheusesResource = schema.GroupVersionResource{Group: "monitoring.coreos.com", Version: "v1", Resource: "prometheuses"} + +var prometheusesKind = schema.GroupVersionKind{Group: "monitoring.coreos.com", Version: "v1", Kind: "Prometheus"} + +// Get takes name of the prometheus, and returns the corresponding prometheus object, and an error if there is any. +func (c *FakePrometheuses) Get(ctx context.Context, name string, options v1.GetOptions) (result *monitoringv1.Prometheus, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(prometheusesResource, c.ns, name), &monitoringv1.Prometheus{}) + + if obj == nil { + return nil, err + } + return obj.(*monitoringv1.Prometheus), err +} + +// List takes label and field selectors, and returns the list of Prometheuses that match those selectors. +func (c *FakePrometheuses) List(ctx context.Context, opts v1.ListOptions) (result *monitoringv1.PrometheusList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(prometheusesResource, prometheusesKind, c.ns, opts), &monitoringv1.PrometheusList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &monitoringv1.PrometheusList{ListMeta: obj.(*monitoringv1.PrometheusList).ListMeta} + for _, item := range obj.(*monitoringv1.PrometheusList).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 prometheuses. +func (c *FakePrometheuses) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(prometheusesResource, c.ns, opts)) + +} + +// Create takes the representation of a prometheus and creates it. Returns the server's representation of the prometheus, and an error, if there is any. +func (c *FakePrometheuses) Create(ctx context.Context, prometheus *monitoringv1.Prometheus, opts v1.CreateOptions) (result *monitoringv1.Prometheus, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(prometheusesResource, c.ns, prometheus), &monitoringv1.Prometheus{}) + + if obj == nil { + return nil, err + } + return obj.(*monitoringv1.Prometheus), err +} + +// Update takes the representation of a prometheus and updates it. Returns the server's representation of the prometheus, and an error, if there is any. +func (c *FakePrometheuses) Update(ctx context.Context, prometheus *monitoringv1.Prometheus, opts v1.UpdateOptions) (result *monitoringv1.Prometheus, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(prometheusesResource, c.ns, prometheus), &monitoringv1.Prometheus{}) + + if obj == nil { + return nil, err + } + return obj.(*monitoringv1.Prometheus), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakePrometheuses) UpdateStatus(ctx context.Context, prometheus *monitoringv1.Prometheus, opts v1.UpdateOptions) (*monitoringv1.Prometheus, error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceAction(prometheusesResource, "status", c.ns, prometheus), &monitoringv1.Prometheus{}) + + if obj == nil { + return nil, err + } + return obj.(*monitoringv1.Prometheus), err +} + +// Delete takes name of the prometheus and deletes it. Returns an error if one occurs. +func (c *FakePrometheuses) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteAction(prometheusesResource, c.ns, name), &monitoringv1.Prometheus{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakePrometheuses) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(prometheusesResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &monitoringv1.PrometheusList{}) + return err +} + +// Patch applies the patch and returns the patched prometheus. +func (c *FakePrometheuses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *monitoringv1.Prometheus, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(prometheusesResource, c.ns, name, pt, data, subresources...), &monitoringv1.Prometheus{}) + + if obj == nil { + return nil, err + } + return obj.(*monitoringv1.Prometheus), err +} diff --git a/vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/typed/monitoring/v1/fake/fake_prometheusrule.go b/vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/typed/monitoring/v1/fake/fake_prometheusrule.go new file mode 100644 index 000000000000..8963c451b38d --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/typed/monitoring/v1/fake/fake_prometheusrule.go @@ -0,0 +1,130 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + + monitoringv1 "github.com/coreos/prometheus-operator/pkg/apis/monitoring/v1" + 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" +) + +// FakePrometheusRules implements PrometheusRuleInterface +type FakePrometheusRules struct { + Fake *FakeMonitoringV1 + ns string +} + +var prometheusrulesResource = schema.GroupVersionResource{Group: "monitoring.coreos.com", Version: "v1", Resource: "prometheusrules"} + +var prometheusrulesKind = schema.GroupVersionKind{Group: "monitoring.coreos.com", Version: "v1", Kind: "PrometheusRule"} + +// Get takes name of the prometheusRule, and returns the corresponding prometheusRule object, and an error if there is any. +func (c *FakePrometheusRules) Get(ctx context.Context, name string, options v1.GetOptions) (result *monitoringv1.PrometheusRule, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(prometheusrulesResource, c.ns, name), &monitoringv1.PrometheusRule{}) + + if obj == nil { + return nil, err + } + return obj.(*monitoringv1.PrometheusRule), err +} + +// List takes label and field selectors, and returns the list of PrometheusRules that match those selectors. +func (c *FakePrometheusRules) List(ctx context.Context, opts v1.ListOptions) (result *monitoringv1.PrometheusRuleList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(prometheusrulesResource, prometheusrulesKind, c.ns, opts), &monitoringv1.PrometheusRuleList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &monitoringv1.PrometheusRuleList{ListMeta: obj.(*monitoringv1.PrometheusRuleList).ListMeta} + for _, item := range obj.(*monitoringv1.PrometheusRuleList).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 prometheusRules. +func (c *FakePrometheusRules) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(prometheusrulesResource, c.ns, opts)) + +} + +// Create takes the representation of a prometheusRule and creates it. Returns the server's representation of the prometheusRule, and an error, if there is any. +func (c *FakePrometheusRules) Create(ctx context.Context, prometheusRule *monitoringv1.PrometheusRule, opts v1.CreateOptions) (result *monitoringv1.PrometheusRule, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(prometheusrulesResource, c.ns, prometheusRule), &monitoringv1.PrometheusRule{}) + + if obj == nil { + return nil, err + } + return obj.(*monitoringv1.PrometheusRule), err +} + +// Update takes the representation of a prometheusRule and updates it. Returns the server's representation of the prometheusRule, and an error, if there is any. +func (c *FakePrometheusRules) Update(ctx context.Context, prometheusRule *monitoringv1.PrometheusRule, opts v1.UpdateOptions) (result *monitoringv1.PrometheusRule, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(prometheusrulesResource, c.ns, prometheusRule), &monitoringv1.PrometheusRule{}) + + if obj == nil { + return nil, err + } + return obj.(*monitoringv1.PrometheusRule), err +} + +// Delete takes name of the prometheusRule and deletes it. Returns an error if one occurs. +func (c *FakePrometheusRules) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteAction(prometheusrulesResource, c.ns, name), &monitoringv1.PrometheusRule{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakePrometheusRules) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(prometheusrulesResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &monitoringv1.PrometheusRuleList{}) + return err +} + +// Patch applies the patch and returns the patched prometheusRule. +func (c *FakePrometheusRules) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *monitoringv1.PrometheusRule, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(prometheusrulesResource, c.ns, name, pt, data, subresources...), &monitoringv1.PrometheusRule{}) + + if obj == nil { + return nil, err + } + return obj.(*monitoringv1.PrometheusRule), err +} diff --git a/vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/typed/monitoring/v1/fake/fake_servicemonitor.go b/vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/typed/monitoring/v1/fake/fake_servicemonitor.go new file mode 100644 index 000000000000..9a566db6179b --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/typed/monitoring/v1/fake/fake_servicemonitor.go @@ -0,0 +1,130 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + + monitoringv1 "github.com/coreos/prometheus-operator/pkg/apis/monitoring/v1" + 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" +) + +// FakeServiceMonitors implements ServiceMonitorInterface +type FakeServiceMonitors struct { + Fake *FakeMonitoringV1 + ns string +} + +var servicemonitorsResource = schema.GroupVersionResource{Group: "monitoring.coreos.com", Version: "v1", Resource: "servicemonitors"} + +var servicemonitorsKind = schema.GroupVersionKind{Group: "monitoring.coreos.com", Version: "v1", Kind: "ServiceMonitor"} + +// Get takes name of the serviceMonitor, and returns the corresponding serviceMonitor object, and an error if there is any. +func (c *FakeServiceMonitors) Get(ctx context.Context, name string, options v1.GetOptions) (result *monitoringv1.ServiceMonitor, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(servicemonitorsResource, c.ns, name), &monitoringv1.ServiceMonitor{}) + + if obj == nil { + return nil, err + } + return obj.(*monitoringv1.ServiceMonitor), err +} + +// List takes label and field selectors, and returns the list of ServiceMonitors that match those selectors. +func (c *FakeServiceMonitors) List(ctx context.Context, opts v1.ListOptions) (result *monitoringv1.ServiceMonitorList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(servicemonitorsResource, servicemonitorsKind, c.ns, opts), &monitoringv1.ServiceMonitorList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &monitoringv1.ServiceMonitorList{ListMeta: obj.(*monitoringv1.ServiceMonitorList).ListMeta} + for _, item := range obj.(*monitoringv1.ServiceMonitorList).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 serviceMonitors. +func (c *FakeServiceMonitors) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(servicemonitorsResource, c.ns, opts)) + +} + +// Create takes the representation of a serviceMonitor and creates it. Returns the server's representation of the serviceMonitor, and an error, if there is any. +func (c *FakeServiceMonitors) Create(ctx context.Context, serviceMonitor *monitoringv1.ServiceMonitor, opts v1.CreateOptions) (result *monitoringv1.ServiceMonitor, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(servicemonitorsResource, c.ns, serviceMonitor), &monitoringv1.ServiceMonitor{}) + + if obj == nil { + return nil, err + } + return obj.(*monitoringv1.ServiceMonitor), err +} + +// Update takes the representation of a serviceMonitor and updates it. Returns the server's representation of the serviceMonitor, and an error, if there is any. +func (c *FakeServiceMonitors) Update(ctx context.Context, serviceMonitor *monitoringv1.ServiceMonitor, opts v1.UpdateOptions) (result *monitoringv1.ServiceMonitor, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(servicemonitorsResource, c.ns, serviceMonitor), &monitoringv1.ServiceMonitor{}) + + if obj == nil { + return nil, err + } + return obj.(*monitoringv1.ServiceMonitor), err +} + +// Delete takes name of the serviceMonitor and deletes it. Returns an error if one occurs. +func (c *FakeServiceMonitors) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteAction(servicemonitorsResource, c.ns, name), &monitoringv1.ServiceMonitor{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeServiceMonitors) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(servicemonitorsResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &monitoringv1.ServiceMonitorList{}) + return err +} + +// Patch applies the patch and returns the patched serviceMonitor. +func (c *FakeServiceMonitors) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *monitoringv1.ServiceMonitor, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(servicemonitorsResource, c.ns, name, pt, data, subresources...), &monitoringv1.ServiceMonitor{}) + + if obj == nil { + return nil, err + } + return obj.(*monitoringv1.ServiceMonitor), err +} diff --git a/vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/typed/monitoring/v1/fake/fake_thanosruler.go b/vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/typed/monitoring/v1/fake/fake_thanosruler.go new file mode 100644 index 000000000000..72c45059516d --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/typed/monitoring/v1/fake/fake_thanosruler.go @@ -0,0 +1,142 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + + monitoringv1 "github.com/coreos/prometheus-operator/pkg/apis/monitoring/v1" + 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" +) + +// FakeThanosRulers implements ThanosRulerInterface +type FakeThanosRulers struct { + Fake *FakeMonitoringV1 + ns string +} + +var thanosrulersResource = schema.GroupVersionResource{Group: "monitoring.coreos.com", Version: "v1", Resource: "thanosrulers"} + +var thanosrulersKind = schema.GroupVersionKind{Group: "monitoring.coreos.com", Version: "v1", Kind: "ThanosRuler"} + +// Get takes name of the thanosRuler, and returns the corresponding thanosRuler object, and an error if there is any. +func (c *FakeThanosRulers) Get(ctx context.Context, name string, options v1.GetOptions) (result *monitoringv1.ThanosRuler, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(thanosrulersResource, c.ns, name), &monitoringv1.ThanosRuler{}) + + if obj == nil { + return nil, err + } + return obj.(*monitoringv1.ThanosRuler), err +} + +// List takes label and field selectors, and returns the list of ThanosRulers that match those selectors. +func (c *FakeThanosRulers) List(ctx context.Context, opts v1.ListOptions) (result *monitoringv1.ThanosRulerList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(thanosrulersResource, thanosrulersKind, c.ns, opts), &monitoringv1.ThanosRulerList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &monitoringv1.ThanosRulerList{ListMeta: obj.(*monitoringv1.ThanosRulerList).ListMeta} + for _, item := range obj.(*monitoringv1.ThanosRulerList).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 thanosRulers. +func (c *FakeThanosRulers) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(thanosrulersResource, c.ns, opts)) + +} + +// Create takes the representation of a thanosRuler and creates it. Returns the server's representation of the thanosRuler, and an error, if there is any. +func (c *FakeThanosRulers) Create(ctx context.Context, thanosRuler *monitoringv1.ThanosRuler, opts v1.CreateOptions) (result *monitoringv1.ThanosRuler, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(thanosrulersResource, c.ns, thanosRuler), &monitoringv1.ThanosRuler{}) + + if obj == nil { + return nil, err + } + return obj.(*monitoringv1.ThanosRuler), err +} + +// Update takes the representation of a thanosRuler and updates it. Returns the server's representation of the thanosRuler, and an error, if there is any. +func (c *FakeThanosRulers) Update(ctx context.Context, thanosRuler *monitoringv1.ThanosRuler, opts v1.UpdateOptions) (result *monitoringv1.ThanosRuler, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(thanosrulersResource, c.ns, thanosRuler), &monitoringv1.ThanosRuler{}) + + if obj == nil { + return nil, err + } + return obj.(*monitoringv1.ThanosRuler), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeThanosRulers) UpdateStatus(ctx context.Context, thanosRuler *monitoringv1.ThanosRuler, opts v1.UpdateOptions) (*monitoringv1.ThanosRuler, error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceAction(thanosrulersResource, "status", c.ns, thanosRuler), &monitoringv1.ThanosRuler{}) + + if obj == nil { + return nil, err + } + return obj.(*monitoringv1.ThanosRuler), err +} + +// Delete takes name of the thanosRuler and deletes it. Returns an error if one occurs. +func (c *FakeThanosRulers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteAction(thanosrulersResource, c.ns, name), &monitoringv1.ThanosRuler{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeThanosRulers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(thanosrulersResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &monitoringv1.ThanosRulerList{}) + return err +} + +// Patch applies the patch and returns the patched thanosRuler. +func (c *FakeThanosRulers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *monitoringv1.ThanosRuler, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(thanosrulersResource, c.ns, name, pt, data, subresources...), &monitoringv1.ThanosRuler{}) + + if obj == nil { + return nil, err + } + return obj.(*monitoringv1.ThanosRuler), err +} diff --git a/vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/typed/monitoring/v1/generated_expansion.go b/vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/typed/monitoring/v1/generated_expansion.go new file mode 100644 index 000000000000..41959fbff1a6 --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/typed/monitoring/v1/generated_expansion.go @@ -0,0 +1,31 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +type AlertmanagerExpansion interface{} + +type PodMonitorExpansion interface{} + +type PrometheusExpansion interface{} + +type PrometheusRuleExpansion interface{} + +type ServiceMonitorExpansion interface{} + +type ThanosRulerExpansion interface{} diff --git a/vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/typed/monitoring/v1/monitoring_client.go b/vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/typed/monitoring/v1/monitoring_client.go new file mode 100644 index 000000000000..c0771f585007 --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/typed/monitoring/v1/monitoring_client.go @@ -0,0 +1,115 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + v1 "github.com/coreos/prometheus-operator/pkg/apis/monitoring/v1" + rest "k8s.io/client-go/rest" + + "kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/scheme" +) + +type MonitoringV1Interface interface { + RESTClient() rest.Interface + AlertmanagersGetter + PodMonitorsGetter + PrometheusesGetter + PrometheusRulesGetter + ServiceMonitorsGetter + ThanosRulersGetter +} + +// MonitoringV1Client is used to interact with features provided by the monitoring.coreos.com group. +type MonitoringV1Client struct { + restClient rest.Interface +} + +func (c *MonitoringV1Client) Alertmanagers(namespace string) AlertmanagerInterface { + return newAlertmanagers(c, namespace) +} + +func (c *MonitoringV1Client) PodMonitors(namespace string) PodMonitorInterface { + return newPodMonitors(c, namespace) +} + +func (c *MonitoringV1Client) Prometheuses(namespace string) PrometheusInterface { + return newPrometheuses(c, namespace) +} + +func (c *MonitoringV1Client) PrometheusRules(namespace string) PrometheusRuleInterface { + return newPrometheusRules(c, namespace) +} + +func (c *MonitoringV1Client) ServiceMonitors(namespace string) ServiceMonitorInterface { + return newServiceMonitors(c, namespace) +} + +func (c *MonitoringV1Client) ThanosRulers(namespace string) ThanosRulerInterface { + return newThanosRulers(c, namespace) +} + +// NewForConfig creates a new MonitoringV1Client for the given config. +func NewForConfig(c *rest.Config) (*MonitoringV1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + client, err := rest.RESTClientFor(&config) + if err != nil { + return nil, err + } + return &MonitoringV1Client{client}, nil +} + +// NewForConfigOrDie creates a new MonitoringV1Client for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *MonitoringV1Client { + client, err := NewForConfig(c) + if err != nil { + panic(err) + } + return client +} + +// New creates a new MonitoringV1Client for the given RESTClient. +func New(c rest.Interface) *MonitoringV1Client { + return &MonitoringV1Client{c} +} + +func setConfigDefaults(config *rest.Config) error { + gv := v1.SchemeGroupVersion + config.GroupVersion = &gv + config.APIPath = "/apis" + config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() + + 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 *MonitoringV1Client) RESTClient() rest.Interface { + if c == nil { + return nil + } + return c.restClient +} diff --git a/vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/typed/monitoring/v1/podmonitor.go b/vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/typed/monitoring/v1/podmonitor.go new file mode 100644 index 000000000000..8b4c926fdf97 --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/typed/monitoring/v1/podmonitor.go @@ -0,0 +1,179 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + "context" + "time" + + v1 "github.com/coreos/prometheus-operator/pkg/apis/monitoring/v1" + metav1 "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" + + scheme "kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/scheme" +) + +// PodMonitorsGetter has a method to return a PodMonitorInterface. +// A group's client should implement this interface. +type PodMonitorsGetter interface { + PodMonitors(namespace string) PodMonitorInterface +} + +// PodMonitorInterface has methods to work with PodMonitor resources. +type PodMonitorInterface interface { + Create(ctx context.Context, podMonitor *v1.PodMonitor, opts metav1.CreateOptions) (*v1.PodMonitor, error) + Update(ctx context.Context, podMonitor *v1.PodMonitor, opts metav1.UpdateOptions) (*v1.PodMonitor, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.PodMonitor, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.PodMonitorList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.PodMonitor, err error) + PodMonitorExpansion +} + +// podMonitors implements PodMonitorInterface +type podMonitors struct { + client rest.Interface + ns string +} + +// newPodMonitors returns a PodMonitors +func newPodMonitors(c *MonitoringV1Client, namespace string) *podMonitors { + return &podMonitors{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Get takes name of the podMonitor, and returns the corresponding podMonitor object, and an error if there is any. +func (c *podMonitors) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.PodMonitor, err error) { + result = &v1.PodMonitor{} + err = c.client.Get(). + Namespace(c.ns). + Resource("podmonitors"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of PodMonitors that match those selectors. +func (c *podMonitors) List(ctx context.Context, opts metav1.ListOptions) (result *v1.PodMonitorList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1.PodMonitorList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("podmonitors"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested podMonitors. +func (c *podMonitors) Watch(ctx context.Context, opts metav1.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(). + Namespace(c.ns). + Resource("podmonitors"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a podMonitor and creates it. Returns the server's representation of the podMonitor, and an error, if there is any. +func (c *podMonitors) Create(ctx context.Context, podMonitor *v1.PodMonitor, opts metav1.CreateOptions) (result *v1.PodMonitor, err error) { + result = &v1.PodMonitor{} + err = c.client.Post(). + Namespace(c.ns). + Resource("podmonitors"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(podMonitor). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a podMonitor and updates it. Returns the server's representation of the podMonitor, and an error, if there is any. +func (c *podMonitors) Update(ctx context.Context, podMonitor *v1.PodMonitor, opts metav1.UpdateOptions) (result *v1.PodMonitor, err error) { + result = &v1.PodMonitor{} + err = c.client.Put(). + Namespace(c.ns). + Resource("podmonitors"). + Name(podMonitor.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(podMonitor). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the podMonitor and deletes it. Returns an error if one occurs. +func (c *podMonitors) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("podmonitors"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *podMonitors) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Namespace(c.ns). + Resource("podmonitors"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched podMonitor. +func (c *podMonitors) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.PodMonitor, err error) { + result = &v1.PodMonitor{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("podmonitors"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/typed/monitoring/v1/prometheus.go b/vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/typed/monitoring/v1/prometheus.go new file mode 100644 index 000000000000..0075c5fddd42 --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/typed/monitoring/v1/prometheus.go @@ -0,0 +1,196 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + "context" + "time" + + v1 "github.com/coreos/prometheus-operator/pkg/apis/monitoring/v1" + metav1 "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" + + scheme "kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/scheme" +) + +// PrometheusesGetter has a method to return a PrometheusInterface. +// A group's client should implement this interface. +type PrometheusesGetter interface { + Prometheuses(namespace string) PrometheusInterface +} + +// PrometheusInterface has methods to work with Prometheus resources. +type PrometheusInterface interface { + Create(ctx context.Context, prometheus *v1.Prometheus, opts metav1.CreateOptions) (*v1.Prometheus, error) + Update(ctx context.Context, prometheus *v1.Prometheus, opts metav1.UpdateOptions) (*v1.Prometheus, error) + UpdateStatus(ctx context.Context, prometheus *v1.Prometheus, opts metav1.UpdateOptions) (*v1.Prometheus, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Prometheus, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.PrometheusList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Prometheus, err error) + PrometheusExpansion +} + +// prometheuses implements PrometheusInterface +type prometheuses struct { + client rest.Interface + ns string +} + +// newPrometheuses returns a Prometheuses +func newPrometheuses(c *MonitoringV1Client, namespace string) *prometheuses { + return &prometheuses{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Get takes name of the prometheus, and returns the corresponding prometheus object, and an error if there is any. +func (c *prometheuses) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Prometheus, err error) { + result = &v1.Prometheus{} + err = c.client.Get(). + Namespace(c.ns). + Resource("prometheuses"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of Prometheuses that match those selectors. +func (c *prometheuses) List(ctx context.Context, opts metav1.ListOptions) (result *v1.PrometheusList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1.PrometheusList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("prometheuses"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested prometheuses. +func (c *prometheuses) Watch(ctx context.Context, opts metav1.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(). + Namespace(c.ns). + Resource("prometheuses"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a prometheus and creates it. Returns the server's representation of the prometheus, and an error, if there is any. +func (c *prometheuses) Create(ctx context.Context, prometheus *v1.Prometheus, opts metav1.CreateOptions) (result *v1.Prometheus, err error) { + result = &v1.Prometheus{} + err = c.client.Post(). + Namespace(c.ns). + Resource("prometheuses"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(prometheus). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a prometheus and updates it. Returns the server's representation of the prometheus, and an error, if there is any. +func (c *prometheuses) Update(ctx context.Context, prometheus *v1.Prometheus, opts metav1.UpdateOptions) (result *v1.Prometheus, err error) { + result = &v1.Prometheus{} + err = c.client.Put(). + Namespace(c.ns). + Resource("prometheuses"). + Name(prometheus.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(prometheus). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *prometheuses) UpdateStatus(ctx context.Context, prometheus *v1.Prometheus, opts metav1.UpdateOptions) (result *v1.Prometheus, err error) { + result = &v1.Prometheus{} + err = c.client.Put(). + Namespace(c.ns). + Resource("prometheuses"). + Name(prometheus.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(prometheus). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the prometheus and deletes it. Returns an error if one occurs. +func (c *prometheuses) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("prometheuses"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *prometheuses) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Namespace(c.ns). + Resource("prometheuses"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched prometheus. +func (c *prometheuses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Prometheus, err error) { + result = &v1.Prometheus{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("prometheuses"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/typed/monitoring/v1/prometheusrule.go b/vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/typed/monitoring/v1/prometheusrule.go new file mode 100644 index 000000000000..bdb35616feaa --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/typed/monitoring/v1/prometheusrule.go @@ -0,0 +1,179 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + "context" + "time" + + v1 "github.com/coreos/prometheus-operator/pkg/apis/monitoring/v1" + metav1 "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" + + scheme "kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/scheme" +) + +// PrometheusRulesGetter has a method to return a PrometheusRuleInterface. +// A group's client should implement this interface. +type PrometheusRulesGetter interface { + PrometheusRules(namespace string) PrometheusRuleInterface +} + +// PrometheusRuleInterface has methods to work with PrometheusRule resources. +type PrometheusRuleInterface interface { + Create(ctx context.Context, prometheusRule *v1.PrometheusRule, opts metav1.CreateOptions) (*v1.PrometheusRule, error) + Update(ctx context.Context, prometheusRule *v1.PrometheusRule, opts metav1.UpdateOptions) (*v1.PrometheusRule, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.PrometheusRule, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.PrometheusRuleList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.PrometheusRule, err error) + PrometheusRuleExpansion +} + +// prometheusRules implements PrometheusRuleInterface +type prometheusRules struct { + client rest.Interface + ns string +} + +// newPrometheusRules returns a PrometheusRules +func newPrometheusRules(c *MonitoringV1Client, namespace string) *prometheusRules { + return &prometheusRules{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Get takes name of the prometheusRule, and returns the corresponding prometheusRule object, and an error if there is any. +func (c *prometheusRules) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.PrometheusRule, err error) { + result = &v1.PrometheusRule{} + err = c.client.Get(). + Namespace(c.ns). + Resource("prometheusrules"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of PrometheusRules that match those selectors. +func (c *prometheusRules) List(ctx context.Context, opts metav1.ListOptions) (result *v1.PrometheusRuleList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1.PrometheusRuleList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("prometheusrules"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested prometheusRules. +func (c *prometheusRules) Watch(ctx context.Context, opts metav1.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(). + Namespace(c.ns). + Resource("prometheusrules"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a prometheusRule and creates it. Returns the server's representation of the prometheusRule, and an error, if there is any. +func (c *prometheusRules) Create(ctx context.Context, prometheusRule *v1.PrometheusRule, opts metav1.CreateOptions) (result *v1.PrometheusRule, err error) { + result = &v1.PrometheusRule{} + err = c.client.Post(). + Namespace(c.ns). + Resource("prometheusrules"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(prometheusRule). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a prometheusRule and updates it. Returns the server's representation of the prometheusRule, and an error, if there is any. +func (c *prometheusRules) Update(ctx context.Context, prometheusRule *v1.PrometheusRule, opts metav1.UpdateOptions) (result *v1.PrometheusRule, err error) { + result = &v1.PrometheusRule{} + err = c.client.Put(). + Namespace(c.ns). + Resource("prometheusrules"). + Name(prometheusRule.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(prometheusRule). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the prometheusRule and deletes it. Returns an error if one occurs. +func (c *prometheusRules) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("prometheusrules"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *prometheusRules) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Namespace(c.ns). + Resource("prometheusrules"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched prometheusRule. +func (c *prometheusRules) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.PrometheusRule, err error) { + result = &v1.PrometheusRule{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("prometheusrules"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/typed/monitoring/v1/servicemonitor.go b/vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/typed/monitoring/v1/servicemonitor.go new file mode 100644 index 000000000000..6240a29b9c36 --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/typed/monitoring/v1/servicemonitor.go @@ -0,0 +1,179 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + "context" + "time" + + v1 "github.com/coreos/prometheus-operator/pkg/apis/monitoring/v1" + metav1 "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" + + scheme "kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/scheme" +) + +// ServiceMonitorsGetter has a method to return a ServiceMonitorInterface. +// A group's client should implement this interface. +type ServiceMonitorsGetter interface { + ServiceMonitors(namespace string) ServiceMonitorInterface +} + +// ServiceMonitorInterface has methods to work with ServiceMonitor resources. +type ServiceMonitorInterface interface { + Create(ctx context.Context, serviceMonitor *v1.ServiceMonitor, opts metav1.CreateOptions) (*v1.ServiceMonitor, error) + Update(ctx context.Context, serviceMonitor *v1.ServiceMonitor, opts metav1.UpdateOptions) (*v1.ServiceMonitor, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.ServiceMonitor, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.ServiceMonitorList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ServiceMonitor, err error) + ServiceMonitorExpansion +} + +// serviceMonitors implements ServiceMonitorInterface +type serviceMonitors struct { + client rest.Interface + ns string +} + +// newServiceMonitors returns a ServiceMonitors +func newServiceMonitors(c *MonitoringV1Client, namespace string) *serviceMonitors { + return &serviceMonitors{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Get takes name of the serviceMonitor, and returns the corresponding serviceMonitor object, and an error if there is any. +func (c *serviceMonitors) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ServiceMonitor, err error) { + result = &v1.ServiceMonitor{} + err = c.client.Get(). + Namespace(c.ns). + Resource("servicemonitors"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of ServiceMonitors that match those selectors. +func (c *serviceMonitors) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ServiceMonitorList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1.ServiceMonitorList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("servicemonitors"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested serviceMonitors. +func (c *serviceMonitors) Watch(ctx context.Context, opts metav1.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(). + Namespace(c.ns). + Resource("servicemonitors"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a serviceMonitor and creates it. Returns the server's representation of the serviceMonitor, and an error, if there is any. +func (c *serviceMonitors) Create(ctx context.Context, serviceMonitor *v1.ServiceMonitor, opts metav1.CreateOptions) (result *v1.ServiceMonitor, err error) { + result = &v1.ServiceMonitor{} + err = c.client.Post(). + Namespace(c.ns). + Resource("servicemonitors"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(serviceMonitor). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a serviceMonitor and updates it. Returns the server's representation of the serviceMonitor, and an error, if there is any. +func (c *serviceMonitors) Update(ctx context.Context, serviceMonitor *v1.ServiceMonitor, opts metav1.UpdateOptions) (result *v1.ServiceMonitor, err error) { + result = &v1.ServiceMonitor{} + err = c.client.Put(). + Namespace(c.ns). + Resource("servicemonitors"). + Name(serviceMonitor.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(serviceMonitor). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the serviceMonitor and deletes it. Returns an error if one occurs. +func (c *serviceMonitors) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("servicemonitors"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *serviceMonitors) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Namespace(c.ns). + Resource("servicemonitors"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched serviceMonitor. +func (c *serviceMonitors) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ServiceMonitor, err error) { + result = &v1.ServiceMonitor{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("servicemonitors"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/typed/monitoring/v1/thanosruler.go b/vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/typed/monitoring/v1/thanosruler.go new file mode 100644 index 000000000000..83a36e602244 --- /dev/null +++ b/vendor/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/typed/monitoring/v1/thanosruler.go @@ -0,0 +1,196 @@ +/* +Copyright 2022 The KubeVirt Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + "context" + "time" + + v1 "github.com/coreos/prometheus-operator/pkg/apis/monitoring/v1" + metav1 "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" + + scheme "kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned/scheme" +) + +// ThanosRulersGetter has a method to return a ThanosRulerInterface. +// A group's client should implement this interface. +type ThanosRulersGetter interface { + ThanosRulers(namespace string) ThanosRulerInterface +} + +// ThanosRulerInterface has methods to work with ThanosRuler resources. +type ThanosRulerInterface interface { + Create(ctx context.Context, thanosRuler *v1.ThanosRuler, opts metav1.CreateOptions) (*v1.ThanosRuler, error) + Update(ctx context.Context, thanosRuler *v1.ThanosRuler, opts metav1.UpdateOptions) (*v1.ThanosRuler, error) + UpdateStatus(ctx context.Context, thanosRuler *v1.ThanosRuler, opts metav1.UpdateOptions) (*v1.ThanosRuler, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.ThanosRuler, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.ThanosRulerList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ThanosRuler, err error) + ThanosRulerExpansion +} + +// thanosRulers implements ThanosRulerInterface +type thanosRulers struct { + client rest.Interface + ns string +} + +// newThanosRulers returns a ThanosRulers +func newThanosRulers(c *MonitoringV1Client, namespace string) *thanosRulers { + return &thanosRulers{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Get takes name of the thanosRuler, and returns the corresponding thanosRuler object, and an error if there is any. +func (c *thanosRulers) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ThanosRuler, err error) { + result = &v1.ThanosRuler{} + err = c.client.Get(). + Namespace(c.ns). + Resource("thanosrulers"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of ThanosRulers that match those selectors. +func (c *thanosRulers) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ThanosRulerList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1.ThanosRulerList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("thanosrulers"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested thanosRulers. +func (c *thanosRulers) Watch(ctx context.Context, opts metav1.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(). + Namespace(c.ns). + Resource("thanosrulers"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a thanosRuler and creates it. Returns the server's representation of the thanosRuler, and an error, if there is any. +func (c *thanosRulers) Create(ctx context.Context, thanosRuler *v1.ThanosRuler, opts metav1.CreateOptions) (result *v1.ThanosRuler, err error) { + result = &v1.ThanosRuler{} + err = c.client.Post(). + Namespace(c.ns). + Resource("thanosrulers"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(thanosRuler). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a thanosRuler and updates it. Returns the server's representation of the thanosRuler, and an error, if there is any. +func (c *thanosRulers) Update(ctx context.Context, thanosRuler *v1.ThanosRuler, opts metav1.UpdateOptions) (result *v1.ThanosRuler, err error) { + result = &v1.ThanosRuler{} + err = c.client.Put(). + Namespace(c.ns). + Resource("thanosrulers"). + Name(thanosRuler.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(thanosRuler). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *thanosRulers) UpdateStatus(ctx context.Context, thanosRuler *v1.ThanosRuler, opts metav1.UpdateOptions) (result *v1.ThanosRuler, err error) { + result = &v1.ThanosRuler{} + err = c.client.Put(). + Namespace(c.ns). + Resource("thanosrulers"). + Name(thanosRuler.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(thanosRuler). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the thanosRuler and deletes it. Returns an error if one occurs. +func (c *thanosRulers) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("thanosrulers"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *thanosRulers) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Namespace(c.ns). + Resource("thanosrulers"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched thanosRuler. +func (c *thanosRulers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ThanosRuler, err error) { + result = &v1.ThanosRuler{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("thanosrulers"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/kubevirt.io/client-go/kubecli/BUILD.bazel b/vendor/kubevirt.io/client-go/kubecli/BUILD.bazel new file mode 100644 index 000000000000..2056692d7165 --- /dev/null +++ b/vendor/kubevirt.io/client-go/kubecli/BUILD.bazel @@ -0,0 +1,147 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") + +go_library( + name = "go_default_library", + srcs = [ + "async.go", + "generated_mock_kubevirt.go", + "guestfs.go", + "handler.go", + "kubecli.go", + "kubevirt.go", + "kubevirt_test_utils.go", + "kv.go", + "migration.go", + "profiler.go", + "replicaset.go", + "streamer.go", + "version.go", + "vm.go", + "vmi.go", + "vmipreset.go", + "websocket.go", + ], + importpath = "kubevirt.io/client-go/kubecli", + visibility = ["//visibility:public"], + deps = [ + "//staging/src/kubevirt.io/api/core:go_default_library", + "//staging/src/kubevirt.io/api/core/v1:go_default_library", + "//staging/src/kubevirt.io/api/migrations/v1alpha1:go_default_library", + "//staging/src/kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned:go_default_library", + "//staging/src/kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned:go_default_library", + "//staging/src/kubevirt.io/client-go/generated/kubevirt/clientset/versioned:go_default_library", + "//staging/src/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/flavor/v1alpha1:go_default_library", + "//staging/src/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/migrations/v1alpha1:go_default_library", + "//staging/src/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/pool/v1alpha1:go_default_library", + "//staging/src/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/snapshot/v1alpha1:go_default_library", + "//staging/src/kubevirt.io/client-go/generated/network-attachment-definition-client/clientset/versioned:go_default_library", + "//staging/src/kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned:go_default_library", + "//staging/src/kubevirt.io/client-go/log:go_default_library", + "//staging/src/kubevirt.io/client-go/subresources:go_default_library", + "//staging/src/kubevirt.io/client-go/util:go_default_library", + "//staging/src/kubevirt.io/client-go/version:go_default_library", + "//vendor/github.com/golang/mock/gomock:go_default_library", + "//vendor/github.com/gorilla/websocket:go_default_library", + "//vendor/github.com/openshift/client-go/security/clientset/versioned/typed/security/v1:go_default_library", + "//vendor/github.com/spf13/pflag:go_default_library", + "//vendor/k8s.io/api/autoscaling/v1:go_default_library", + "//vendor/k8s.io/api/core/v1:go_default_library", + "//vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/fields:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", + "//vendor/k8s.io/client-go/discovery:go_default_library", + "//vendor/k8s.io/client-go/dynamic:go_default_library", + "//vendor/k8s.io/client-go/kubernetes:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/scheme:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/typed/apiserverinternal/v1alpha1:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/typed/apps/v1:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/typed/authentication/v1:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/typed/authentication/v1beta1:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/typed/authorization/v1:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v1:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta2:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/typed/batch/v1:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/typed/batch/v1beta1:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/typed/certificates/v1:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/typed/certificates/v1beta1:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/typed/coordination/v1:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/typed/coordination/v1beta1:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/typed/core/v1:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/typed/discovery/v1:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/typed/discovery/v1beta1:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/typed/events/v1:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/typed/events/v1beta1:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta1:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta2:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/typed/networking/v1:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/typed/networking/v1beta1:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/typed/node/v1:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/typed/node/v1alpha1:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/typed/node/v1beta1:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/typed/policy/v1:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/typed/rbac/v1:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/typed/scheduling/v1:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/typed/scheduling/v1beta1:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/typed/storage/v1:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/typed/storage/v1alpha1:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1:go_default_library", + "//vendor/k8s.io/client-go/rest:go_default_library", + "//vendor/k8s.io/client-go/tools/clientcmd:go_default_library", + "//vendor/k8s.io/utils/net:go_default_library", + ], +) + +go_test( + name = "go_default_test", + srcs = [ + "kubecli_suite_test.go", + "kv_test.go", + "migration_test.go", + "migrationpolicy_test.go", + "replicaset_test.go", + "version_test.go", + "vm_test.go", + "vmi_test.go", + "vmipreset_test.go", + "websocket_test.go", + ], + embed = [":go_default_library"], + deps = [ + "//staging/src/kubevirt.io/api/core/v1:go_default_library", + "//staging/src/kubevirt.io/api/migrations/v1alpha1:go_default_library", + "//staging/src/kubevirt.io/client-go/api:go_default_library", + "//staging/src/kubevirt.io/client-go/testutils:go_default_library", + "//staging/src/kubevirt.io/client-go/version:go_default_library", + "//vendor/github.com/gorilla/websocket:go_default_library", + "//vendor/github.com/onsi/ginkgo/v2:go_default_library", + "//vendor/github.com/onsi/gomega:go_default_library", + "//vendor/github.com/onsi/gomega/ghttp:go_default_library", + "//vendor/k8s.io/api/autoscaling/v1:go_default_library", + "//vendor/k8s.io/api/core/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/util/rand:go_default_library", + ], +) diff --git a/vendor/kubevirt.io/client-go/kubecli/async.go b/vendor/kubevirt.io/client-go/kubecli/async.go new file mode 100644 index 000000000000..135a04a2a911 --- /dev/null +++ b/vendor/kubevirt.io/client-go/kubecli/async.go @@ -0,0 +1,84 @@ +package kubecli + +import ( + "fmt" + "net/http" + + "github.com/gorilla/websocket" + rest "k8s.io/client-go/rest" +) + +type AsyncSubresourceError struct { + err string + StatusCode int +} + +func (a *AsyncSubresourceError) Error() string { + return a.err +} + +func (a *AsyncSubresourceError) GetStatusCode() int { + return a.StatusCode +} + +func asyncSubresourceHelper(config *rest.Config, resource, namespace, name string, subresource string) (StreamInterface, error) { + + done := make(chan struct{}) + + aws := &asyncWSRoundTripper{ + Connection: make(chan *websocket.Conn), + Done: done, + } + // Create a round tripper with all necessary kubernetes security details + wrappedRoundTripper, err := roundTripperFromConfig(config, aws.WebsocketCallback) + if err != nil { + return nil, fmt.Errorf("unable to create round tripper for remote execution: %v", err) + } + + // Create a request out of config and the query parameters + req, err := RequestFromConfig(config, resource, name, namespace, subresource) + if err != nil { + return nil, fmt.Errorf("unable to create request for remote execution: %v", err) + } + + errChan := make(chan error, 1) + + go func() { + // Send the request and let the callback do its work + response, err := wrappedRoundTripper.RoundTrip(req) + + if err != nil { + statusCode := 0 + if response != nil { + statusCode = response.StatusCode + } + errChan <- &AsyncSubresourceError{err: err.Error(), StatusCode: statusCode} + return + } + + if response != nil { + switch response.StatusCode { + case http.StatusOK: + case http.StatusNotFound: + err = &AsyncSubresourceError{err: "Virtual Machine not found.", StatusCode: response.StatusCode} + case http.StatusInternalServerError: + err = &AsyncSubresourceError{err: "Websocket failed due to internal server error.", StatusCode: response.StatusCode} + default: + err = &AsyncSubresourceError{err: fmt.Sprintf("Websocket failed with http status: %s", response.Status), StatusCode: response.StatusCode} + } + } else { + err = &AsyncSubresourceError{err: "no response received"} + } + errChan <- err + }() + + select { + case err = <-errChan: + return nil, err + case ws := <-aws.Connection: + return &wsStreamer{ + conn: ws, + done: done, + }, nil + } +} diff --git a/vendor/kubevirt.io/client-go/kubecli/generated_mock_kubevirt.go b/vendor/kubevirt.io/client-go/kubecli/generated_mock_kubevirt.go new file mode 100644 index 000000000000..53bcb76406c3 --- /dev/null +++ b/vendor/kubevirt.io/client-go/kubecli/generated_mock_kubevirt.go @@ -0,0 +1,1816 @@ +// Automatically generated by MockGen. DO NOT EDIT! +// Source: kubevirt.go + +package kubecli + +import ( + net "net" + time "time" + + gomock "github.com/golang/mock/gomock" + v1 "github.com/openshift/client-go/security/clientset/versioned/typed/security/v1" + v10 "k8s.io/api/autoscaling/v1" + clientset "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset" + v11 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + discovery "k8s.io/client-go/discovery" + dynamic "k8s.io/client-go/dynamic" + v12 "k8s.io/client-go/kubernetes/typed/admissionregistration/v1" + v1beta1 "k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1" + v1alpha1 "k8s.io/client-go/kubernetes/typed/apiserverinternal/v1alpha1" + v13 "k8s.io/client-go/kubernetes/typed/apps/v1" + v1beta10 "k8s.io/client-go/kubernetes/typed/apps/v1beta1" + v1beta2 "k8s.io/client-go/kubernetes/typed/apps/v1beta2" + v14 "k8s.io/client-go/kubernetes/typed/authentication/v1" + v1beta11 "k8s.io/client-go/kubernetes/typed/authentication/v1beta1" + v15 "k8s.io/client-go/kubernetes/typed/authorization/v1" + v1beta12 "k8s.io/client-go/kubernetes/typed/authorization/v1beta1" + v16 "k8s.io/client-go/kubernetes/typed/autoscaling/v1" + v2 "k8s.io/client-go/kubernetes/typed/autoscaling/v2" + v2beta1 "k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1" + v2beta2 "k8s.io/client-go/kubernetes/typed/autoscaling/v2beta2" + v17 "k8s.io/client-go/kubernetes/typed/batch/v1" + v1beta13 "k8s.io/client-go/kubernetes/typed/batch/v1beta1" + v18 "k8s.io/client-go/kubernetes/typed/certificates/v1" + v1beta14 "k8s.io/client-go/kubernetes/typed/certificates/v1beta1" + v19 "k8s.io/client-go/kubernetes/typed/coordination/v1" + v1beta15 "k8s.io/client-go/kubernetes/typed/coordination/v1beta1" + v110 "k8s.io/client-go/kubernetes/typed/core/v1" + v111 "k8s.io/client-go/kubernetes/typed/discovery/v1" + v1beta16 "k8s.io/client-go/kubernetes/typed/discovery/v1beta1" + v112 "k8s.io/client-go/kubernetes/typed/events/v1" + v1beta17 "k8s.io/client-go/kubernetes/typed/events/v1beta1" + v1beta18 "k8s.io/client-go/kubernetes/typed/extensions/v1beta1" + v1alpha10 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1" + v1beta19 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta1" + v1beta20 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta2" + v113 "k8s.io/client-go/kubernetes/typed/networking/v1" + v1beta110 "k8s.io/client-go/kubernetes/typed/networking/v1beta1" + v114 "k8s.io/client-go/kubernetes/typed/node/v1" + v1alpha11 "k8s.io/client-go/kubernetes/typed/node/v1alpha1" + v1beta111 "k8s.io/client-go/kubernetes/typed/node/v1beta1" + v115 "k8s.io/client-go/kubernetes/typed/policy/v1" + v1beta112 "k8s.io/client-go/kubernetes/typed/policy/v1beta1" + v116 "k8s.io/client-go/kubernetes/typed/rbac/v1" + v1alpha12 "k8s.io/client-go/kubernetes/typed/rbac/v1alpha1" + v1beta113 "k8s.io/client-go/kubernetes/typed/rbac/v1beta1" + v117 "k8s.io/client-go/kubernetes/typed/scheduling/v1" + v1alpha13 "k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1" + v1beta114 "k8s.io/client-go/kubernetes/typed/scheduling/v1beta1" + v118 "k8s.io/client-go/kubernetes/typed/storage/v1" + v1alpha14 "k8s.io/client-go/kubernetes/typed/storage/v1alpha1" + v1beta115 "k8s.io/client-go/kubernetes/typed/storage/v1beta1" + rest "k8s.io/client-go/rest" + + v119 "kubevirt.io/api/core/v1" + versioned "kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned" + versioned0 "kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned" + versioned1 "kubevirt.io/client-go/generated/kubevirt/clientset/versioned" + v1alpha15 "kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/flavor/v1alpha1" + v1alpha16 "kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/migrations/v1alpha1" + v1alpha17 "kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/pool/v1alpha1" + v1alpha18 "kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/snapshot/v1alpha1" + versioned2 "kubevirt.io/client-go/generated/network-attachment-definition-client/clientset/versioned" + versioned3 "kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned" + version "kubevirt.io/client-go/version" +) + +// Mock of KubevirtClient interface +type MockKubevirtClient struct { + ctrl *gomock.Controller + recorder *_MockKubevirtClientRecorder +} + +// Recorder for MockKubevirtClient (not exported) +type _MockKubevirtClientRecorder struct { + mock *MockKubevirtClient +} + +func NewMockKubevirtClient(ctrl *gomock.Controller) *MockKubevirtClient { + mock := &MockKubevirtClient{ctrl: ctrl} + mock.recorder = &_MockKubevirtClientRecorder{mock} + return mock +} + +func (_m *MockKubevirtClient) EXPECT() *_MockKubevirtClientRecorder { + return _m.recorder +} + +func (_m *MockKubevirtClient) VirtualMachineInstance(namespace string) VirtualMachineInstanceInterface { + ret := _m.ctrl.Call(_m, "VirtualMachineInstance", namespace) + ret0, _ := ret[0].(VirtualMachineInstanceInterface) + return ret0 +} + +func (_mr *_MockKubevirtClientRecorder) VirtualMachineInstance(arg0 interface{}) *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "VirtualMachineInstance", arg0) +} + +func (_m *MockKubevirtClient) VirtualMachineInstanceMigration(namespace string) VirtualMachineInstanceMigrationInterface { + ret := _m.ctrl.Call(_m, "VirtualMachineInstanceMigration", namespace) + ret0, _ := ret[0].(VirtualMachineInstanceMigrationInterface) + return ret0 +} + +func (_mr *_MockKubevirtClientRecorder) VirtualMachineInstanceMigration(arg0 interface{}) *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "VirtualMachineInstanceMigration", arg0) +} + +func (_m *MockKubevirtClient) ReplicaSet(namespace string) ReplicaSetInterface { + ret := _m.ctrl.Call(_m, "ReplicaSet", namespace) + ret0, _ := ret[0].(ReplicaSetInterface) + return ret0 +} + +func (_mr *_MockKubevirtClientRecorder) ReplicaSet(arg0 interface{}) *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "ReplicaSet", arg0) +} + +func (_m *MockKubevirtClient) VirtualMachinePool(namespace string) v1alpha17.VirtualMachinePoolInterface { + ret := _m.ctrl.Call(_m, "VirtualMachinePool", namespace) + ret0, _ := ret[0].(v1alpha17.VirtualMachinePoolInterface) + return ret0 +} + +func (_mr *_MockKubevirtClientRecorder) VirtualMachinePool(arg0 interface{}) *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "VirtualMachinePool", arg0) +} + +func (_m *MockKubevirtClient) VirtualMachine(namespace string) VirtualMachineInterface { + ret := _m.ctrl.Call(_m, "VirtualMachine", namespace) + ret0, _ := ret[0].(VirtualMachineInterface) + return ret0 +} + +func (_mr *_MockKubevirtClientRecorder) VirtualMachine(arg0 interface{}) *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "VirtualMachine", arg0) +} + +func (_m *MockKubevirtClient) KubeVirt(namespace string) KubeVirtInterface { + ret := _m.ctrl.Call(_m, "KubeVirt", namespace) + ret0, _ := ret[0].(KubeVirtInterface) + return ret0 +} + +func (_mr *_MockKubevirtClientRecorder) KubeVirt(arg0 interface{}) *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "KubeVirt", arg0) +} + +func (_m *MockKubevirtClient) VirtualMachineInstancePreset(namespace string) VirtualMachineInstancePresetInterface { + ret := _m.ctrl.Call(_m, "VirtualMachineInstancePreset", namespace) + ret0, _ := ret[0].(VirtualMachineInstancePresetInterface) + return ret0 +} + +func (_mr *_MockKubevirtClientRecorder) VirtualMachineInstancePreset(arg0 interface{}) *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "VirtualMachineInstancePreset", arg0) +} + +func (_m *MockKubevirtClient) VirtualMachineSnapshot(namespace string) v1alpha18.VirtualMachineSnapshotInterface { + ret := _m.ctrl.Call(_m, "VirtualMachineSnapshot", namespace) + ret0, _ := ret[0].(v1alpha18.VirtualMachineSnapshotInterface) + return ret0 +} + +func (_mr *_MockKubevirtClientRecorder) VirtualMachineSnapshot(arg0 interface{}) *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "VirtualMachineSnapshot", arg0) +} + +func (_m *MockKubevirtClient) VirtualMachineSnapshotContent(namespace string) v1alpha18.VirtualMachineSnapshotContentInterface { + ret := _m.ctrl.Call(_m, "VirtualMachineSnapshotContent", namespace) + ret0, _ := ret[0].(v1alpha18.VirtualMachineSnapshotContentInterface) + return ret0 +} + +func (_mr *_MockKubevirtClientRecorder) VirtualMachineSnapshotContent(arg0 interface{}) *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "VirtualMachineSnapshotContent", arg0) +} + +func (_m *MockKubevirtClient) VirtualMachineRestore(namespace string) v1alpha18.VirtualMachineRestoreInterface { + ret := _m.ctrl.Call(_m, "VirtualMachineRestore", namespace) + ret0, _ := ret[0].(v1alpha18.VirtualMachineRestoreInterface) + return ret0 +} + +func (_mr *_MockKubevirtClientRecorder) VirtualMachineRestore(arg0 interface{}) *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "VirtualMachineRestore", arg0) +} + +func (_m *MockKubevirtClient) VirtualMachineFlavor(namespace string) v1alpha15.VirtualMachineFlavorInterface { + ret := _m.ctrl.Call(_m, "VirtualMachineFlavor", namespace) + ret0, _ := ret[0].(v1alpha15.VirtualMachineFlavorInterface) + return ret0 +} + +func (_mr *_MockKubevirtClientRecorder) VirtualMachineFlavor(arg0 interface{}) *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "VirtualMachineFlavor", arg0) +} + +func (_m *MockKubevirtClient) VirtualMachineClusterFlavor() v1alpha15.VirtualMachineClusterFlavorInterface { + ret := _m.ctrl.Call(_m, "VirtualMachineClusterFlavor") + ret0, _ := ret[0].(v1alpha15.VirtualMachineClusterFlavorInterface) + return ret0 +} + +func (_mr *_MockKubevirtClientRecorder) VirtualMachineClusterFlavor() *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "VirtualMachineClusterFlavor") +} + +func (_m *MockKubevirtClient) MigrationPolicy() v1alpha16.MigrationPolicyInterface { + ret := _m.ctrl.Call(_m, "MigrationPolicy") + ret0, _ := ret[0].(v1alpha16.MigrationPolicyInterface) + return ret0 +} + +func (_mr *_MockKubevirtClientRecorder) MigrationPolicy() *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "MigrationPolicy") +} + +func (_m *MockKubevirtClient) ServerVersion() ServerVersionInterface { + ret := _m.ctrl.Call(_m, "ServerVersion") + ret0, _ := ret[0].(ServerVersionInterface) + return ret0 +} + +func (_mr *_MockKubevirtClientRecorder) ServerVersion() *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "ServerVersion") +} + +func (_m *MockKubevirtClient) ClusterProfiler() *ClusterProfiler { + ret := _m.ctrl.Call(_m, "ClusterProfiler") + ret0, _ := ret[0].(*ClusterProfiler) + return ret0 +} + +func (_mr *_MockKubevirtClientRecorder) ClusterProfiler() *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "ClusterProfiler") +} + +func (_m *MockKubevirtClient) GuestfsVersion() *GuestfsVersion { + ret := _m.ctrl.Call(_m, "GuestfsVersion") + ret0, _ := ret[0].(*GuestfsVersion) + return ret0 +} + +func (_mr *_MockKubevirtClientRecorder) GuestfsVersion() *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "GuestfsVersion") +} + +func (_m *MockKubevirtClient) RestClient() *rest.RESTClient { + ret := _m.ctrl.Call(_m, "RestClient") + ret0, _ := ret[0].(*rest.RESTClient) + return ret0 +} + +func (_mr *_MockKubevirtClientRecorder) RestClient() *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "RestClient") +} + +func (_m *MockKubevirtClient) GeneratedKubeVirtClient() versioned1.Interface { + ret := _m.ctrl.Call(_m, "GeneratedKubeVirtClient") + ret0, _ := ret[0].(versioned1.Interface) + return ret0 +} + +func (_mr *_MockKubevirtClientRecorder) GeneratedKubeVirtClient() *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "GeneratedKubeVirtClient") +} + +func (_m *MockKubevirtClient) CdiClient() versioned.Interface { + ret := _m.ctrl.Call(_m, "CdiClient") + ret0, _ := ret[0].(versioned.Interface) + return ret0 +} + +func (_mr *_MockKubevirtClientRecorder) CdiClient() *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "CdiClient") +} + +func (_m *MockKubevirtClient) NetworkClient() versioned2.Interface { + ret := _m.ctrl.Call(_m, "NetworkClient") + ret0, _ := ret[0].(versioned2.Interface) + return ret0 +} + +func (_mr *_MockKubevirtClientRecorder) NetworkClient() *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "NetworkClient") +} + +func (_m *MockKubevirtClient) ExtensionsClient() clientset.Interface { + ret := _m.ctrl.Call(_m, "ExtensionsClient") + ret0, _ := ret[0].(clientset.Interface) + return ret0 +} + +func (_mr *_MockKubevirtClientRecorder) ExtensionsClient() *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "ExtensionsClient") +} + +func (_m *MockKubevirtClient) SecClient() v1.SecurityV1Interface { + ret := _m.ctrl.Call(_m, "SecClient") + ret0, _ := ret[0].(v1.SecurityV1Interface) + return ret0 +} + +func (_mr *_MockKubevirtClientRecorder) SecClient() *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "SecClient") +} + +func (_m *MockKubevirtClient) DiscoveryClient() discovery.DiscoveryInterface { + ret := _m.ctrl.Call(_m, "DiscoveryClient") + ret0, _ := ret[0].(discovery.DiscoveryInterface) + return ret0 +} + +func (_mr *_MockKubevirtClientRecorder) DiscoveryClient() *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "DiscoveryClient") +} + +func (_m *MockKubevirtClient) PrometheusClient() versioned3.Interface { + ret := _m.ctrl.Call(_m, "PrometheusClient") + ret0, _ := ret[0].(versioned3.Interface) + return ret0 +} + +func (_mr *_MockKubevirtClientRecorder) PrometheusClient() *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "PrometheusClient") +} + +func (_m *MockKubevirtClient) KubernetesSnapshotClient() versioned0.Interface { + ret := _m.ctrl.Call(_m, "KubernetesSnapshotClient") + ret0, _ := ret[0].(versioned0.Interface) + return ret0 +} + +func (_mr *_MockKubevirtClientRecorder) KubernetesSnapshotClient() *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "KubernetesSnapshotClient") +} + +func (_m *MockKubevirtClient) DynamicClient() dynamic.Interface { + ret := _m.ctrl.Call(_m, "DynamicClient") + ret0, _ := ret[0].(dynamic.Interface) + return ret0 +} + +func (_mr *_MockKubevirtClientRecorder) DynamicClient() *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "DynamicClient") +} + +func (_m *MockKubevirtClient) MigrationPolicyClient() *v1alpha16.MigrationsV1alpha1Client { + ret := _m.ctrl.Call(_m, "MigrationPolicyClient") + ret0, _ := ret[0].(*v1alpha16.MigrationsV1alpha1Client) + return ret0 +} + +func (_mr *_MockKubevirtClientRecorder) MigrationPolicyClient() *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "MigrationPolicyClient") +} + +func (_m *MockKubevirtClient) Discovery() discovery.DiscoveryInterface { + ret := _m.ctrl.Call(_m, "Discovery") + ret0, _ := ret[0].(discovery.DiscoveryInterface) + return ret0 +} + +func (_mr *_MockKubevirtClientRecorder) Discovery() *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "Discovery") +} + +func (_m *MockKubevirtClient) AdmissionregistrationV1() v12.AdmissionregistrationV1Interface { + ret := _m.ctrl.Call(_m, "AdmissionregistrationV1") + ret0, _ := ret[0].(v12.AdmissionregistrationV1Interface) + return ret0 +} + +func (_mr *_MockKubevirtClientRecorder) AdmissionregistrationV1() *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "AdmissionregistrationV1") +} + +func (_m *MockKubevirtClient) AdmissionregistrationV1beta1() v1beta1.AdmissionregistrationV1beta1Interface { + ret := _m.ctrl.Call(_m, "AdmissionregistrationV1beta1") + ret0, _ := ret[0].(v1beta1.AdmissionregistrationV1beta1Interface) + return ret0 +} + +func (_mr *_MockKubevirtClientRecorder) AdmissionregistrationV1beta1() *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "AdmissionregistrationV1beta1") +} + +func (_m *MockKubevirtClient) InternalV1alpha1() v1alpha1.InternalV1alpha1Interface { + ret := _m.ctrl.Call(_m, "InternalV1alpha1") + ret0, _ := ret[0].(v1alpha1.InternalV1alpha1Interface) + return ret0 +} + +func (_mr *_MockKubevirtClientRecorder) InternalV1alpha1() *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "InternalV1alpha1") +} + +func (_m *MockKubevirtClient) AppsV1() v13.AppsV1Interface { + ret := _m.ctrl.Call(_m, "AppsV1") + ret0, _ := ret[0].(v13.AppsV1Interface) + return ret0 +} + +func (_mr *_MockKubevirtClientRecorder) AppsV1() *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "AppsV1") +} + +func (_m *MockKubevirtClient) AppsV1beta1() v1beta10.AppsV1beta1Interface { + ret := _m.ctrl.Call(_m, "AppsV1beta1") + ret0, _ := ret[0].(v1beta10.AppsV1beta1Interface) + return ret0 +} + +func (_mr *_MockKubevirtClientRecorder) AppsV1beta1() *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "AppsV1beta1") +} + +func (_m *MockKubevirtClient) AppsV1beta2() v1beta2.AppsV1beta2Interface { + ret := _m.ctrl.Call(_m, "AppsV1beta2") + ret0, _ := ret[0].(v1beta2.AppsV1beta2Interface) + return ret0 +} + +func (_mr *_MockKubevirtClientRecorder) AppsV1beta2() *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "AppsV1beta2") +} + +func (_m *MockKubevirtClient) AuthenticationV1() v14.AuthenticationV1Interface { + ret := _m.ctrl.Call(_m, "AuthenticationV1") + ret0, _ := ret[0].(v14.AuthenticationV1Interface) + return ret0 +} + +func (_mr *_MockKubevirtClientRecorder) AuthenticationV1() *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "AuthenticationV1") +} + +func (_m *MockKubevirtClient) AuthenticationV1beta1() v1beta11.AuthenticationV1beta1Interface { + ret := _m.ctrl.Call(_m, "AuthenticationV1beta1") + ret0, _ := ret[0].(v1beta11.AuthenticationV1beta1Interface) + return ret0 +} + +func (_mr *_MockKubevirtClientRecorder) AuthenticationV1beta1() *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "AuthenticationV1beta1") +} + +func (_m *MockKubevirtClient) AuthorizationV1() v15.AuthorizationV1Interface { + ret := _m.ctrl.Call(_m, "AuthorizationV1") + ret0, _ := ret[0].(v15.AuthorizationV1Interface) + return ret0 +} + +func (_mr *_MockKubevirtClientRecorder) AuthorizationV1() *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "AuthorizationV1") +} + +func (_m *MockKubevirtClient) AuthorizationV1beta1() v1beta12.AuthorizationV1beta1Interface { + ret := _m.ctrl.Call(_m, "AuthorizationV1beta1") + ret0, _ := ret[0].(v1beta12.AuthorizationV1beta1Interface) + return ret0 +} + +func (_mr *_MockKubevirtClientRecorder) AuthorizationV1beta1() *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "AuthorizationV1beta1") +} + +func (_m *MockKubevirtClient) AutoscalingV1() v16.AutoscalingV1Interface { + ret := _m.ctrl.Call(_m, "AutoscalingV1") + ret0, _ := ret[0].(v16.AutoscalingV1Interface) + return ret0 +} + +func (_mr *_MockKubevirtClientRecorder) AutoscalingV1() *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "AutoscalingV1") +} + +func (_m *MockKubevirtClient) AutoscalingV2() v2.AutoscalingV2Interface { + ret := _m.ctrl.Call(_m, "AutoscalingV2") + ret0, _ := ret[0].(v2.AutoscalingV2Interface) + return ret0 +} + +func (_mr *_MockKubevirtClientRecorder) AutoscalingV2() *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "AutoscalingV2") +} + +func (_m *MockKubevirtClient) AutoscalingV2beta1() v2beta1.AutoscalingV2beta1Interface { + ret := _m.ctrl.Call(_m, "AutoscalingV2beta1") + ret0, _ := ret[0].(v2beta1.AutoscalingV2beta1Interface) + return ret0 +} + +func (_mr *_MockKubevirtClientRecorder) AutoscalingV2beta1() *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "AutoscalingV2beta1") +} + +func (_m *MockKubevirtClient) AutoscalingV2beta2() v2beta2.AutoscalingV2beta2Interface { + ret := _m.ctrl.Call(_m, "AutoscalingV2beta2") + ret0, _ := ret[0].(v2beta2.AutoscalingV2beta2Interface) + return ret0 +} + +func (_mr *_MockKubevirtClientRecorder) AutoscalingV2beta2() *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "AutoscalingV2beta2") +} + +func (_m *MockKubevirtClient) BatchV1() v17.BatchV1Interface { + ret := _m.ctrl.Call(_m, "BatchV1") + ret0, _ := ret[0].(v17.BatchV1Interface) + return ret0 +} + +func (_mr *_MockKubevirtClientRecorder) BatchV1() *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "BatchV1") +} + +func (_m *MockKubevirtClient) BatchV1beta1() v1beta13.BatchV1beta1Interface { + ret := _m.ctrl.Call(_m, "BatchV1beta1") + ret0, _ := ret[0].(v1beta13.BatchV1beta1Interface) + return ret0 +} + +func (_mr *_MockKubevirtClientRecorder) BatchV1beta1() *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "BatchV1beta1") +} + +func (_m *MockKubevirtClient) CertificatesV1() v18.CertificatesV1Interface { + ret := _m.ctrl.Call(_m, "CertificatesV1") + ret0, _ := ret[0].(v18.CertificatesV1Interface) + return ret0 +} + +func (_mr *_MockKubevirtClientRecorder) CertificatesV1() *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "CertificatesV1") +} + +func (_m *MockKubevirtClient) CertificatesV1beta1() v1beta14.CertificatesV1beta1Interface { + ret := _m.ctrl.Call(_m, "CertificatesV1beta1") + ret0, _ := ret[0].(v1beta14.CertificatesV1beta1Interface) + return ret0 +} + +func (_mr *_MockKubevirtClientRecorder) CertificatesV1beta1() *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "CertificatesV1beta1") +} + +func (_m *MockKubevirtClient) CoordinationV1beta1() v1beta15.CoordinationV1beta1Interface { + ret := _m.ctrl.Call(_m, "CoordinationV1beta1") + ret0, _ := ret[0].(v1beta15.CoordinationV1beta1Interface) + return ret0 +} + +func (_mr *_MockKubevirtClientRecorder) CoordinationV1beta1() *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "CoordinationV1beta1") +} + +func (_m *MockKubevirtClient) CoordinationV1() v19.CoordinationV1Interface { + ret := _m.ctrl.Call(_m, "CoordinationV1") + ret0, _ := ret[0].(v19.CoordinationV1Interface) + return ret0 +} + +func (_mr *_MockKubevirtClientRecorder) CoordinationV1() *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "CoordinationV1") +} + +func (_m *MockKubevirtClient) CoreV1() v110.CoreV1Interface { + ret := _m.ctrl.Call(_m, "CoreV1") + ret0, _ := ret[0].(v110.CoreV1Interface) + return ret0 +} + +func (_mr *_MockKubevirtClientRecorder) CoreV1() *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "CoreV1") +} + +func (_m *MockKubevirtClient) DiscoveryV1() v111.DiscoveryV1Interface { + ret := _m.ctrl.Call(_m, "DiscoveryV1") + ret0, _ := ret[0].(v111.DiscoveryV1Interface) + return ret0 +} + +func (_mr *_MockKubevirtClientRecorder) DiscoveryV1() *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "DiscoveryV1") +} + +func (_m *MockKubevirtClient) DiscoveryV1beta1() v1beta16.DiscoveryV1beta1Interface { + ret := _m.ctrl.Call(_m, "DiscoveryV1beta1") + ret0, _ := ret[0].(v1beta16.DiscoveryV1beta1Interface) + return ret0 +} + +func (_mr *_MockKubevirtClientRecorder) DiscoveryV1beta1() *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "DiscoveryV1beta1") +} + +func (_m *MockKubevirtClient) EventsV1() v112.EventsV1Interface { + ret := _m.ctrl.Call(_m, "EventsV1") + ret0, _ := ret[0].(v112.EventsV1Interface) + return ret0 +} + +func (_mr *_MockKubevirtClientRecorder) EventsV1() *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "EventsV1") +} + +func (_m *MockKubevirtClient) EventsV1beta1() v1beta17.EventsV1beta1Interface { + ret := _m.ctrl.Call(_m, "EventsV1beta1") + ret0, _ := ret[0].(v1beta17.EventsV1beta1Interface) + return ret0 +} + +func (_mr *_MockKubevirtClientRecorder) EventsV1beta1() *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "EventsV1beta1") +} + +func (_m *MockKubevirtClient) ExtensionsV1beta1() v1beta18.ExtensionsV1beta1Interface { + ret := _m.ctrl.Call(_m, "ExtensionsV1beta1") + ret0, _ := ret[0].(v1beta18.ExtensionsV1beta1Interface) + return ret0 +} + +func (_mr *_MockKubevirtClientRecorder) ExtensionsV1beta1() *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "ExtensionsV1beta1") +} + +func (_m *MockKubevirtClient) FlowcontrolV1alpha1() v1alpha10.FlowcontrolV1alpha1Interface { + ret := _m.ctrl.Call(_m, "FlowcontrolV1alpha1") + ret0, _ := ret[0].(v1alpha10.FlowcontrolV1alpha1Interface) + return ret0 +} + +func (_mr *_MockKubevirtClientRecorder) FlowcontrolV1alpha1() *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "FlowcontrolV1alpha1") +} + +func (_m *MockKubevirtClient) FlowcontrolV1beta1() v1beta19.FlowcontrolV1beta1Interface { + ret := _m.ctrl.Call(_m, "FlowcontrolV1beta1") + ret0, _ := ret[0].(v1beta19.FlowcontrolV1beta1Interface) + return ret0 +} + +func (_mr *_MockKubevirtClientRecorder) FlowcontrolV1beta1() *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "FlowcontrolV1beta1") +} + +func (_m *MockKubevirtClient) FlowcontrolV1beta2() v1beta20.FlowcontrolV1beta2Interface { + ret := _m.ctrl.Call(_m, "FlowcontrolV1beta2") + ret0, _ := ret[0].(v1beta20.FlowcontrolV1beta2Interface) + return ret0 +} + +func (_mr *_MockKubevirtClientRecorder) FlowcontrolV1beta2() *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "FlowcontrolV1beta2") +} + +func (_m *MockKubevirtClient) NetworkingV1() v113.NetworkingV1Interface { + ret := _m.ctrl.Call(_m, "NetworkingV1") + ret0, _ := ret[0].(v113.NetworkingV1Interface) + return ret0 +} + +func (_mr *_MockKubevirtClientRecorder) NetworkingV1() *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "NetworkingV1") +} + +func (_m *MockKubevirtClient) NetworkingV1beta1() v1beta110.NetworkingV1beta1Interface { + ret := _m.ctrl.Call(_m, "NetworkingV1beta1") + ret0, _ := ret[0].(v1beta110.NetworkingV1beta1Interface) + return ret0 +} + +func (_mr *_MockKubevirtClientRecorder) NetworkingV1beta1() *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "NetworkingV1beta1") +} + +func (_m *MockKubevirtClient) NodeV1() v114.NodeV1Interface { + ret := _m.ctrl.Call(_m, "NodeV1") + ret0, _ := ret[0].(v114.NodeV1Interface) + return ret0 +} + +func (_mr *_MockKubevirtClientRecorder) NodeV1() *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "NodeV1") +} + +func (_m *MockKubevirtClient) NodeV1alpha1() v1alpha11.NodeV1alpha1Interface { + ret := _m.ctrl.Call(_m, "NodeV1alpha1") + ret0, _ := ret[0].(v1alpha11.NodeV1alpha1Interface) + return ret0 +} + +func (_mr *_MockKubevirtClientRecorder) NodeV1alpha1() *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "NodeV1alpha1") +} + +func (_m *MockKubevirtClient) NodeV1beta1() v1beta111.NodeV1beta1Interface { + ret := _m.ctrl.Call(_m, "NodeV1beta1") + ret0, _ := ret[0].(v1beta111.NodeV1beta1Interface) + return ret0 +} + +func (_mr *_MockKubevirtClientRecorder) NodeV1beta1() *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "NodeV1beta1") +} + +func (_m *MockKubevirtClient) PolicyV1() v115.PolicyV1Interface { + ret := _m.ctrl.Call(_m, "PolicyV1") + ret0, _ := ret[0].(v115.PolicyV1Interface) + return ret0 +} + +func (_mr *_MockKubevirtClientRecorder) PolicyV1() *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "PolicyV1") +} + +func (_m *MockKubevirtClient) PolicyV1beta1() v1beta112.PolicyV1beta1Interface { + ret := _m.ctrl.Call(_m, "PolicyV1beta1") + ret0, _ := ret[0].(v1beta112.PolicyV1beta1Interface) + return ret0 +} + +func (_mr *_MockKubevirtClientRecorder) PolicyV1beta1() *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "PolicyV1beta1") +} + +func (_m *MockKubevirtClient) RbacV1() v116.RbacV1Interface { + ret := _m.ctrl.Call(_m, "RbacV1") + ret0, _ := ret[0].(v116.RbacV1Interface) + return ret0 +} + +func (_mr *_MockKubevirtClientRecorder) RbacV1() *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "RbacV1") +} + +func (_m *MockKubevirtClient) RbacV1beta1() v1beta113.RbacV1beta1Interface { + ret := _m.ctrl.Call(_m, "RbacV1beta1") + ret0, _ := ret[0].(v1beta113.RbacV1beta1Interface) + return ret0 +} + +func (_mr *_MockKubevirtClientRecorder) RbacV1beta1() *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "RbacV1beta1") +} + +func (_m *MockKubevirtClient) RbacV1alpha1() v1alpha12.RbacV1alpha1Interface { + ret := _m.ctrl.Call(_m, "RbacV1alpha1") + ret0, _ := ret[0].(v1alpha12.RbacV1alpha1Interface) + return ret0 +} + +func (_mr *_MockKubevirtClientRecorder) RbacV1alpha1() *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "RbacV1alpha1") +} + +func (_m *MockKubevirtClient) SchedulingV1alpha1() v1alpha13.SchedulingV1alpha1Interface { + ret := _m.ctrl.Call(_m, "SchedulingV1alpha1") + ret0, _ := ret[0].(v1alpha13.SchedulingV1alpha1Interface) + return ret0 +} + +func (_mr *_MockKubevirtClientRecorder) SchedulingV1alpha1() *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "SchedulingV1alpha1") +} + +func (_m *MockKubevirtClient) SchedulingV1beta1() v1beta114.SchedulingV1beta1Interface { + ret := _m.ctrl.Call(_m, "SchedulingV1beta1") + ret0, _ := ret[0].(v1beta114.SchedulingV1beta1Interface) + return ret0 +} + +func (_mr *_MockKubevirtClientRecorder) SchedulingV1beta1() *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "SchedulingV1beta1") +} + +func (_m *MockKubevirtClient) SchedulingV1() v117.SchedulingV1Interface { + ret := _m.ctrl.Call(_m, "SchedulingV1") + ret0, _ := ret[0].(v117.SchedulingV1Interface) + return ret0 +} + +func (_mr *_MockKubevirtClientRecorder) SchedulingV1() *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "SchedulingV1") +} + +func (_m *MockKubevirtClient) StorageV1beta1() v1beta115.StorageV1beta1Interface { + ret := _m.ctrl.Call(_m, "StorageV1beta1") + ret0, _ := ret[0].(v1beta115.StorageV1beta1Interface) + return ret0 +} + +func (_mr *_MockKubevirtClientRecorder) StorageV1beta1() *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "StorageV1beta1") +} + +func (_m *MockKubevirtClient) StorageV1() v118.StorageV1Interface { + ret := _m.ctrl.Call(_m, "StorageV1") + ret0, _ := ret[0].(v118.StorageV1Interface) + return ret0 +} + +func (_mr *_MockKubevirtClientRecorder) StorageV1() *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "StorageV1") +} + +func (_m *MockKubevirtClient) StorageV1alpha1() v1alpha14.StorageV1alpha1Interface { + ret := _m.ctrl.Call(_m, "StorageV1alpha1") + ret0, _ := ret[0].(v1alpha14.StorageV1alpha1Interface) + return ret0 +} + +func (_mr *_MockKubevirtClientRecorder) StorageV1alpha1() *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "StorageV1alpha1") +} + +func (_m *MockKubevirtClient) Config() *rest.Config { + ret := _m.ctrl.Call(_m, "Config") + ret0, _ := ret[0].(*rest.Config) + return ret0 +} + +func (_mr *_MockKubevirtClientRecorder) Config() *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "Config") +} + +// Mock of StreamInterface interface +type MockStreamInterface struct { + ctrl *gomock.Controller + recorder *_MockStreamInterfaceRecorder +} + +// Recorder for MockStreamInterface (not exported) +type _MockStreamInterfaceRecorder struct { + mock *MockStreamInterface +} + +func NewMockStreamInterface(ctrl *gomock.Controller) *MockStreamInterface { + mock := &MockStreamInterface{ctrl: ctrl} + mock.recorder = &_MockStreamInterfaceRecorder{mock} + return mock +} + +func (_m *MockStreamInterface) EXPECT() *_MockStreamInterfaceRecorder { + return _m.recorder +} + +func (_m *MockStreamInterface) Stream(options StreamOptions) error { + ret := _m.ctrl.Call(_m, "Stream", options) + ret0, _ := ret[0].(error) + return ret0 +} + +func (_mr *_MockStreamInterfaceRecorder) Stream(arg0 interface{}) *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "Stream", arg0) +} + +func (_m *MockStreamInterface) AsConn() net.Conn { + ret := _m.ctrl.Call(_m, "AsConn") + ret0, _ := ret[0].(net.Conn) + return ret0 +} + +func (_mr *_MockStreamInterfaceRecorder) AsConn() *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "AsConn") +} + +// Mock of VirtualMachineInstanceInterface interface +type MockVirtualMachineInstanceInterface struct { + ctrl *gomock.Controller + recorder *_MockVirtualMachineInstanceInterfaceRecorder +} + +// Recorder for MockVirtualMachineInstanceInterface (not exported) +type _MockVirtualMachineInstanceInterfaceRecorder struct { + mock *MockVirtualMachineInstanceInterface +} + +func NewMockVirtualMachineInstanceInterface(ctrl *gomock.Controller) *MockVirtualMachineInstanceInterface { + mock := &MockVirtualMachineInstanceInterface{ctrl: ctrl} + mock.recorder = &_MockVirtualMachineInstanceInterfaceRecorder{mock} + return mock +} + +func (_m *MockVirtualMachineInstanceInterface) EXPECT() *_MockVirtualMachineInstanceInterfaceRecorder { + return _m.recorder +} + +func (_m *MockVirtualMachineInstanceInterface) Get(name string, options *v11.GetOptions) (*v119.VirtualMachineInstance, error) { + ret := _m.ctrl.Call(_m, "Get", name, options) + ret0, _ := ret[0].(*v119.VirtualMachineInstance) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +func (_mr *_MockVirtualMachineInstanceInterfaceRecorder) Get(arg0, arg1 interface{}) *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "Get", arg0, arg1) +} + +func (_m *MockVirtualMachineInstanceInterface) List(opts *v11.ListOptions) (*v119.VirtualMachineInstanceList, error) { + ret := _m.ctrl.Call(_m, "List", opts) + ret0, _ := ret[0].(*v119.VirtualMachineInstanceList) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +func (_mr *_MockVirtualMachineInstanceInterfaceRecorder) List(arg0 interface{}) *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "List", arg0) +} + +func (_m *MockVirtualMachineInstanceInterface) Create(instance *v119.VirtualMachineInstance) (*v119.VirtualMachineInstance, error) { + ret := _m.ctrl.Call(_m, "Create", instance) + ret0, _ := ret[0].(*v119.VirtualMachineInstance) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +func (_mr *_MockVirtualMachineInstanceInterfaceRecorder) Create(arg0 interface{}) *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "Create", arg0) +} + +func (_m *MockVirtualMachineInstanceInterface) Update(_param0 *v119.VirtualMachineInstance) (*v119.VirtualMachineInstance, error) { + ret := _m.ctrl.Call(_m, "Update", _param0) + ret0, _ := ret[0].(*v119.VirtualMachineInstance) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +func (_mr *_MockVirtualMachineInstanceInterfaceRecorder) Update(arg0 interface{}) *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "Update", arg0) +} + +func (_m *MockVirtualMachineInstanceInterface) Delete(name string, options *v11.DeleteOptions) error { + ret := _m.ctrl.Call(_m, "Delete", name, options) + ret0, _ := ret[0].(error) + return ret0 +} + +func (_mr *_MockVirtualMachineInstanceInterfaceRecorder) Delete(arg0, arg1 interface{}) *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "Delete", arg0, arg1) +} + +func (_m *MockVirtualMachineInstanceInterface) Patch(name string, pt types.PatchType, data []byte, patchOptions *v11.PatchOptions, subresources ...string) (*v119.VirtualMachineInstance, error) { + _s := []interface{}{name, pt, data, patchOptions} + for _, _x := range subresources { + _s = append(_s, _x) + } + ret := _m.ctrl.Call(_m, "Patch", _s...) + ret0, _ := ret[0].(*v119.VirtualMachineInstance) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +func (_mr *_MockVirtualMachineInstanceInterfaceRecorder) Patch(arg0, arg1, arg2, arg3 interface{}, arg4 ...interface{}) *gomock.Call { + _s := append([]interface{}{arg0, arg1, arg2, arg3}, arg4...) + return _mr.mock.ctrl.RecordCall(_mr.mock, "Patch", _s...) +} + +func (_m *MockVirtualMachineInstanceInterface) Watch(opts v11.ListOptions) (watch.Interface, error) { + ret := _m.ctrl.Call(_m, "Watch", opts) + ret0, _ := ret[0].(watch.Interface) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +func (_mr *_MockVirtualMachineInstanceInterfaceRecorder) Watch(arg0 interface{}) *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "Watch", arg0) +} + +func (_m *MockVirtualMachineInstanceInterface) SerialConsole(name string, options *SerialConsoleOptions) (StreamInterface, error) { + ret := _m.ctrl.Call(_m, "SerialConsole", name, options) + ret0, _ := ret[0].(StreamInterface) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +func (_mr *_MockVirtualMachineInstanceInterfaceRecorder) SerialConsole(arg0, arg1 interface{}) *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "SerialConsole", arg0, arg1) +} + +func (_m *MockVirtualMachineInstanceInterface) USBRedir(vmiName string) (StreamInterface, error) { + ret := _m.ctrl.Call(_m, "USBRedir", vmiName) + ret0, _ := ret[0].(StreamInterface) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +func (_mr *_MockVirtualMachineInstanceInterfaceRecorder) USBRedir(arg0 interface{}) *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "USBRedir", arg0) +} + +func (_m *MockVirtualMachineInstanceInterface) VNC(name string) (StreamInterface, error) { + ret := _m.ctrl.Call(_m, "VNC", name) + ret0, _ := ret[0].(StreamInterface) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +func (_mr *_MockVirtualMachineInstanceInterfaceRecorder) VNC(arg0 interface{}) *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "VNC", arg0) +} + +func (_m *MockVirtualMachineInstanceInterface) PortForward(name string, port int, protocol string) (StreamInterface, error) { + ret := _m.ctrl.Call(_m, "PortForward", name, port, protocol) + ret0, _ := ret[0].(StreamInterface) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +func (_mr *_MockVirtualMachineInstanceInterfaceRecorder) PortForward(arg0, arg1, arg2 interface{}) *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "PortForward", arg0, arg1, arg2) +} + +func (_m *MockVirtualMachineInstanceInterface) Pause(name string, pauseOptions *v119.PauseOptions) error { + ret := _m.ctrl.Call(_m, "Pause", name, pauseOptions) + ret0, _ := ret[0].(error) + return ret0 +} + +func (_mr *_MockVirtualMachineInstanceInterfaceRecorder) Pause(arg0, arg1 interface{}) *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "Pause", arg0, arg1) +} + +func (_m *MockVirtualMachineInstanceInterface) Unpause(name string, unpauseOptions *v119.UnpauseOptions) error { + ret := _m.ctrl.Call(_m, "Unpause", name, unpauseOptions) + ret0, _ := ret[0].(error) + return ret0 +} + +func (_mr *_MockVirtualMachineInstanceInterfaceRecorder) Unpause(arg0, arg1 interface{}) *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "Unpause", arg0, arg1) +} + +func (_m *MockVirtualMachineInstanceInterface) Freeze(name string, unfreezeTimeout time.Duration) error { + ret := _m.ctrl.Call(_m, "Freeze", name, unfreezeTimeout) + ret0, _ := ret[0].(error) + return ret0 +} + +func (_mr *_MockVirtualMachineInstanceInterfaceRecorder) Freeze(arg0, arg1 interface{}) *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "Freeze", arg0, arg1) +} + +func (_m *MockVirtualMachineInstanceInterface) Unfreeze(name string) error { + ret := _m.ctrl.Call(_m, "Unfreeze", name) + ret0, _ := ret[0].(error) + return ret0 +} + +func (_mr *_MockVirtualMachineInstanceInterfaceRecorder) Unfreeze(arg0 interface{}) *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "Unfreeze", arg0) +} + +func (_m *MockVirtualMachineInstanceInterface) SoftReboot(name string) error { + ret := _m.ctrl.Call(_m, "SoftReboot", name) + ret0, _ := ret[0].(error) + return ret0 +} + +func (_mr *_MockVirtualMachineInstanceInterfaceRecorder) SoftReboot(arg0 interface{}) *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "SoftReboot", arg0) +} + +func (_m *MockVirtualMachineInstanceInterface) GuestOsInfo(name string) (v119.VirtualMachineInstanceGuestAgentInfo, error) { + ret := _m.ctrl.Call(_m, "GuestOsInfo", name) + ret0, _ := ret[0].(v119.VirtualMachineInstanceGuestAgentInfo) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +func (_mr *_MockVirtualMachineInstanceInterfaceRecorder) GuestOsInfo(arg0 interface{}) *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "GuestOsInfo", arg0) +} + +func (_m *MockVirtualMachineInstanceInterface) UserList(name string) (v119.VirtualMachineInstanceGuestOSUserList, error) { + ret := _m.ctrl.Call(_m, "UserList", name) + ret0, _ := ret[0].(v119.VirtualMachineInstanceGuestOSUserList) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +func (_mr *_MockVirtualMachineInstanceInterfaceRecorder) UserList(arg0 interface{}) *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "UserList", arg0) +} + +func (_m *MockVirtualMachineInstanceInterface) FilesystemList(name string) (v119.VirtualMachineInstanceFileSystemList, error) { + ret := _m.ctrl.Call(_m, "FilesystemList", name) + ret0, _ := ret[0].(v119.VirtualMachineInstanceFileSystemList) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +func (_mr *_MockVirtualMachineInstanceInterfaceRecorder) FilesystemList(arg0 interface{}) *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "FilesystemList", arg0) +} + +func (_m *MockVirtualMachineInstanceInterface) AddVolume(name string, addVolumeOptions *v119.AddVolumeOptions) error { + ret := _m.ctrl.Call(_m, "AddVolume", name, addVolumeOptions) + ret0, _ := ret[0].(error) + return ret0 +} + +func (_mr *_MockVirtualMachineInstanceInterfaceRecorder) AddVolume(arg0, arg1 interface{}) *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "AddVolume", arg0, arg1) +} + +func (_m *MockVirtualMachineInstanceInterface) RemoveVolume(name string, removeVolumeOptions *v119.RemoveVolumeOptions) error { + ret := _m.ctrl.Call(_m, "RemoveVolume", name, removeVolumeOptions) + ret0, _ := ret[0].(error) + return ret0 +} + +func (_mr *_MockVirtualMachineInstanceInterfaceRecorder) RemoveVolume(arg0, arg1 interface{}) *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "RemoveVolume", arg0, arg1) +} + +// Mock of ReplicaSetInterface interface +type MockReplicaSetInterface struct { + ctrl *gomock.Controller + recorder *_MockReplicaSetInterfaceRecorder +} + +// Recorder for MockReplicaSetInterface (not exported) +type _MockReplicaSetInterfaceRecorder struct { + mock *MockReplicaSetInterface +} + +func NewMockReplicaSetInterface(ctrl *gomock.Controller) *MockReplicaSetInterface { + mock := &MockReplicaSetInterface{ctrl: ctrl} + mock.recorder = &_MockReplicaSetInterfaceRecorder{mock} + return mock +} + +func (_m *MockReplicaSetInterface) EXPECT() *_MockReplicaSetInterfaceRecorder { + return _m.recorder +} + +func (_m *MockReplicaSetInterface) Get(name string, options v11.GetOptions) (*v119.VirtualMachineInstanceReplicaSet, error) { + ret := _m.ctrl.Call(_m, "Get", name, options) + ret0, _ := ret[0].(*v119.VirtualMachineInstanceReplicaSet) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +func (_mr *_MockReplicaSetInterfaceRecorder) Get(arg0, arg1 interface{}) *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "Get", arg0, arg1) +} + +func (_m *MockReplicaSetInterface) List(opts v11.ListOptions) (*v119.VirtualMachineInstanceReplicaSetList, error) { + ret := _m.ctrl.Call(_m, "List", opts) + ret0, _ := ret[0].(*v119.VirtualMachineInstanceReplicaSetList) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +func (_mr *_MockReplicaSetInterfaceRecorder) List(arg0 interface{}) *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "List", arg0) +} + +func (_m *MockReplicaSetInterface) Create(_param0 *v119.VirtualMachineInstanceReplicaSet) (*v119.VirtualMachineInstanceReplicaSet, error) { + ret := _m.ctrl.Call(_m, "Create", _param0) + ret0, _ := ret[0].(*v119.VirtualMachineInstanceReplicaSet) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +func (_mr *_MockReplicaSetInterfaceRecorder) Create(arg0 interface{}) *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "Create", arg0) +} + +func (_m *MockReplicaSetInterface) Update(_param0 *v119.VirtualMachineInstanceReplicaSet) (*v119.VirtualMachineInstanceReplicaSet, error) { + ret := _m.ctrl.Call(_m, "Update", _param0) + ret0, _ := ret[0].(*v119.VirtualMachineInstanceReplicaSet) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +func (_mr *_MockReplicaSetInterfaceRecorder) Update(arg0 interface{}) *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "Update", arg0) +} + +func (_m *MockReplicaSetInterface) Delete(name string, options *v11.DeleteOptions) error { + ret := _m.ctrl.Call(_m, "Delete", name, options) + ret0, _ := ret[0].(error) + return ret0 +} + +func (_mr *_MockReplicaSetInterfaceRecorder) Delete(arg0, arg1 interface{}) *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "Delete", arg0, arg1) +} + +func (_m *MockReplicaSetInterface) GetScale(replicaSetName string, options v11.GetOptions) (*v10.Scale, error) { + ret := _m.ctrl.Call(_m, "GetScale", replicaSetName, options) + ret0, _ := ret[0].(*v10.Scale) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +func (_mr *_MockReplicaSetInterfaceRecorder) GetScale(arg0, arg1 interface{}) *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "GetScale", arg0, arg1) +} + +func (_m *MockReplicaSetInterface) UpdateScale(replicaSetName string, scale *v10.Scale) (*v10.Scale, error) { + ret := _m.ctrl.Call(_m, "UpdateScale", replicaSetName, scale) + ret0, _ := ret[0].(*v10.Scale) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +func (_mr *_MockReplicaSetInterfaceRecorder) UpdateScale(arg0, arg1 interface{}) *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "UpdateScale", arg0, arg1) +} + +func (_m *MockReplicaSetInterface) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (*v119.VirtualMachineInstanceReplicaSet, error) { + _s := []interface{}{name, pt, data} + for _, _x := range subresources { + _s = append(_s, _x) + } + ret := _m.ctrl.Call(_m, "Patch", _s...) + ret0, _ := ret[0].(*v119.VirtualMachineInstanceReplicaSet) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +func (_mr *_MockReplicaSetInterfaceRecorder) Patch(arg0, arg1, arg2 interface{}, arg3 ...interface{}) *gomock.Call { + _s := append([]interface{}{arg0, arg1, arg2}, arg3...) + return _mr.mock.ctrl.RecordCall(_mr.mock, "Patch", _s...) +} + +func (_m *MockReplicaSetInterface) UpdateStatus(_param0 *v119.VirtualMachineInstanceReplicaSet) (*v119.VirtualMachineInstanceReplicaSet, error) { + ret := _m.ctrl.Call(_m, "UpdateStatus", _param0) + ret0, _ := ret[0].(*v119.VirtualMachineInstanceReplicaSet) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +func (_mr *_MockReplicaSetInterfaceRecorder) UpdateStatus(arg0 interface{}) *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "UpdateStatus", arg0) +} + +func (_m *MockReplicaSetInterface) PatchStatus(name string, pt types.PatchType, data []byte) (*v119.VirtualMachineInstanceReplicaSet, error) { + ret := _m.ctrl.Call(_m, "PatchStatus", name, pt, data) + ret0, _ := ret[0].(*v119.VirtualMachineInstanceReplicaSet) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +func (_mr *_MockReplicaSetInterfaceRecorder) PatchStatus(arg0, arg1, arg2 interface{}) *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "PatchStatus", arg0, arg1, arg2) +} + +// Mock of VirtualMachineInstancePresetInterface interface +type MockVirtualMachineInstancePresetInterface struct { + ctrl *gomock.Controller + recorder *_MockVirtualMachineInstancePresetInterfaceRecorder +} + +// Recorder for MockVirtualMachineInstancePresetInterface (not exported) +type _MockVirtualMachineInstancePresetInterfaceRecorder struct { + mock *MockVirtualMachineInstancePresetInterface +} + +func NewMockVirtualMachineInstancePresetInterface(ctrl *gomock.Controller) *MockVirtualMachineInstancePresetInterface { + mock := &MockVirtualMachineInstancePresetInterface{ctrl: ctrl} + mock.recorder = &_MockVirtualMachineInstancePresetInterfaceRecorder{mock} + return mock +} + +func (_m *MockVirtualMachineInstancePresetInterface) EXPECT() *_MockVirtualMachineInstancePresetInterfaceRecorder { + return _m.recorder +} + +func (_m *MockVirtualMachineInstancePresetInterface) Get(name string, options v11.GetOptions) (*v119.VirtualMachineInstancePreset, error) { + ret := _m.ctrl.Call(_m, "Get", name, options) + ret0, _ := ret[0].(*v119.VirtualMachineInstancePreset) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +func (_mr *_MockVirtualMachineInstancePresetInterfaceRecorder) Get(arg0, arg1 interface{}) *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "Get", arg0, arg1) +} + +func (_m *MockVirtualMachineInstancePresetInterface) List(opts v11.ListOptions) (*v119.VirtualMachineInstancePresetList, error) { + ret := _m.ctrl.Call(_m, "List", opts) + ret0, _ := ret[0].(*v119.VirtualMachineInstancePresetList) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +func (_mr *_MockVirtualMachineInstancePresetInterfaceRecorder) List(arg0 interface{}) *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "List", arg0) +} + +func (_m *MockVirtualMachineInstancePresetInterface) Create(_param0 *v119.VirtualMachineInstancePreset) (*v119.VirtualMachineInstancePreset, error) { + ret := _m.ctrl.Call(_m, "Create", _param0) + ret0, _ := ret[0].(*v119.VirtualMachineInstancePreset) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +func (_mr *_MockVirtualMachineInstancePresetInterfaceRecorder) Create(arg0 interface{}) *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "Create", arg0) +} + +func (_m *MockVirtualMachineInstancePresetInterface) Update(_param0 *v119.VirtualMachineInstancePreset) (*v119.VirtualMachineInstancePreset, error) { + ret := _m.ctrl.Call(_m, "Update", _param0) + ret0, _ := ret[0].(*v119.VirtualMachineInstancePreset) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +func (_mr *_MockVirtualMachineInstancePresetInterfaceRecorder) Update(arg0 interface{}) *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "Update", arg0) +} + +func (_m *MockVirtualMachineInstancePresetInterface) Delete(name string, options *v11.DeleteOptions) error { + ret := _m.ctrl.Call(_m, "Delete", name, options) + ret0, _ := ret[0].(error) + return ret0 +} + +func (_mr *_MockVirtualMachineInstancePresetInterfaceRecorder) Delete(arg0, arg1 interface{}) *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "Delete", arg0, arg1) +} + +func (_m *MockVirtualMachineInstancePresetInterface) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (*v119.VirtualMachineInstancePreset, error) { + _s := []interface{}{name, pt, data} + for _, _x := range subresources { + _s = append(_s, _x) + } + ret := _m.ctrl.Call(_m, "Patch", _s...) + ret0, _ := ret[0].(*v119.VirtualMachineInstancePreset) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +func (_mr *_MockVirtualMachineInstancePresetInterfaceRecorder) Patch(arg0, arg1, arg2 interface{}, arg3 ...interface{}) *gomock.Call { + _s := append([]interface{}{arg0, arg1, arg2}, arg3...) + return _mr.mock.ctrl.RecordCall(_mr.mock, "Patch", _s...) +} + +// Mock of VirtualMachineInterface interface +type MockVirtualMachineInterface struct { + ctrl *gomock.Controller + recorder *_MockVirtualMachineInterfaceRecorder +} + +// Recorder for MockVirtualMachineInterface (not exported) +type _MockVirtualMachineInterfaceRecorder struct { + mock *MockVirtualMachineInterface +} + +func NewMockVirtualMachineInterface(ctrl *gomock.Controller) *MockVirtualMachineInterface { + mock := &MockVirtualMachineInterface{ctrl: ctrl} + mock.recorder = &_MockVirtualMachineInterfaceRecorder{mock} + return mock +} + +func (_m *MockVirtualMachineInterface) EXPECT() *_MockVirtualMachineInterfaceRecorder { + return _m.recorder +} + +func (_m *MockVirtualMachineInterface) Get(name string, options *v11.GetOptions) (*v119.VirtualMachine, error) { + ret := _m.ctrl.Call(_m, "Get", name, options) + ret0, _ := ret[0].(*v119.VirtualMachine) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +func (_mr *_MockVirtualMachineInterfaceRecorder) Get(arg0, arg1 interface{}) *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "Get", arg0, arg1) +} + +func (_m *MockVirtualMachineInterface) List(opts *v11.ListOptions) (*v119.VirtualMachineList, error) { + ret := _m.ctrl.Call(_m, "List", opts) + ret0, _ := ret[0].(*v119.VirtualMachineList) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +func (_mr *_MockVirtualMachineInterfaceRecorder) List(arg0 interface{}) *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "List", arg0) +} + +func (_m *MockVirtualMachineInterface) Create(_param0 *v119.VirtualMachine) (*v119.VirtualMachine, error) { + ret := _m.ctrl.Call(_m, "Create", _param0) + ret0, _ := ret[0].(*v119.VirtualMachine) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +func (_mr *_MockVirtualMachineInterfaceRecorder) Create(arg0 interface{}) *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "Create", arg0) +} + +func (_m *MockVirtualMachineInterface) Update(_param0 *v119.VirtualMachine) (*v119.VirtualMachine, error) { + ret := _m.ctrl.Call(_m, "Update", _param0) + ret0, _ := ret[0].(*v119.VirtualMachine) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +func (_mr *_MockVirtualMachineInterfaceRecorder) Update(arg0 interface{}) *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "Update", arg0) +} + +func (_m *MockVirtualMachineInterface) Delete(name string, options *v11.DeleteOptions) error { + ret := _m.ctrl.Call(_m, "Delete", name, options) + ret0, _ := ret[0].(error) + return ret0 +} + +func (_mr *_MockVirtualMachineInterfaceRecorder) Delete(arg0, arg1 interface{}) *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "Delete", arg0, arg1) +} + +func (_m *MockVirtualMachineInterface) Patch(name string, pt types.PatchType, data []byte, patchOptions *v11.PatchOptions, subresources ...string) (*v119.VirtualMachine, error) { + _s := []interface{}{name, pt, data, patchOptions} + for _, _x := range subresources { + _s = append(_s, _x) + } + ret := _m.ctrl.Call(_m, "Patch", _s...) + ret0, _ := ret[0].(*v119.VirtualMachine) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +func (_mr *_MockVirtualMachineInterfaceRecorder) Patch(arg0, arg1, arg2, arg3 interface{}, arg4 ...interface{}) *gomock.Call { + _s := append([]interface{}{arg0, arg1, arg2, arg3}, arg4...) + return _mr.mock.ctrl.RecordCall(_mr.mock, "Patch", _s...) +} + +func (_m *MockVirtualMachineInterface) UpdateStatus(_param0 *v119.VirtualMachine) (*v119.VirtualMachine, error) { + ret := _m.ctrl.Call(_m, "UpdateStatus", _param0) + ret0, _ := ret[0].(*v119.VirtualMachine) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +func (_mr *_MockVirtualMachineInterfaceRecorder) UpdateStatus(arg0 interface{}) *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "UpdateStatus", arg0) +} + +func (_m *MockVirtualMachineInterface) PatchStatus(name string, pt types.PatchType, data []byte, patchOptions *v11.PatchOptions) (*v119.VirtualMachine, error) { + ret := _m.ctrl.Call(_m, "PatchStatus", name, pt, data, patchOptions) + ret0, _ := ret[0].(*v119.VirtualMachine) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +func (_mr *_MockVirtualMachineInterfaceRecorder) PatchStatus(arg0, arg1, arg2, arg3 interface{}) *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "PatchStatus", arg0, arg1, arg2, arg3) +} + +func (_m *MockVirtualMachineInterface) Restart(name string, restartOptions *v119.RestartOptions) error { + ret := _m.ctrl.Call(_m, "Restart", name, restartOptions) + ret0, _ := ret[0].(error) + return ret0 +} + +func (_mr *_MockVirtualMachineInterfaceRecorder) Restart(arg0, arg1 interface{}) *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "Restart", arg0, arg1) +} + +func (_m *MockVirtualMachineInterface) ForceRestart(name string, restartOptions *v119.RestartOptions) error { + ret := _m.ctrl.Call(_m, "ForceRestart", name, restartOptions) + ret0, _ := ret[0].(error) + return ret0 +} + +func (_mr *_MockVirtualMachineInterfaceRecorder) ForceRestart(arg0, arg1 interface{}) *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "ForceRestart", arg0, arg1) +} + +func (_m *MockVirtualMachineInterface) Start(name string, startOptions *v119.StartOptions) error { + ret := _m.ctrl.Call(_m, "Start", name, startOptions) + ret0, _ := ret[0].(error) + return ret0 +} + +func (_mr *_MockVirtualMachineInterfaceRecorder) Start(arg0, arg1 interface{}) *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "Start", arg0, arg1) +} + +func (_m *MockVirtualMachineInterface) Stop(name string, stopOptions *v119.StopOptions) error { + ret := _m.ctrl.Call(_m, "Stop", name, stopOptions) + ret0, _ := ret[0].(error) + return ret0 +} + +func (_mr *_MockVirtualMachineInterfaceRecorder) Stop(arg0, arg1 interface{}) *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "Stop", arg0, arg1) +} + +func (_m *MockVirtualMachineInterface) ForceStop(name string, stopOptions *v119.StopOptions) error { + ret := _m.ctrl.Call(_m, "ForceStop", name, stopOptions) + ret0, _ := ret[0].(error) + return ret0 +} + +func (_mr *_MockVirtualMachineInterfaceRecorder) ForceStop(arg0, arg1 interface{}) *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "ForceStop", arg0, arg1) +} + +func (_m *MockVirtualMachineInterface) Migrate(name string, migrateOptions *v119.MigrateOptions) error { + ret := _m.ctrl.Call(_m, "Migrate", name, migrateOptions) + ret0, _ := ret[0].(error) + return ret0 +} + +func (_mr *_MockVirtualMachineInterfaceRecorder) Migrate(arg0, arg1 interface{}) *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "Migrate", arg0, arg1) +} + +func (_m *MockVirtualMachineInterface) AddVolume(name string, addVolumeOptions *v119.AddVolumeOptions) error { + ret := _m.ctrl.Call(_m, "AddVolume", name, addVolumeOptions) + ret0, _ := ret[0].(error) + return ret0 +} + +func (_mr *_MockVirtualMachineInterfaceRecorder) AddVolume(arg0, arg1 interface{}) *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "AddVolume", arg0, arg1) +} + +func (_m *MockVirtualMachineInterface) RemoveVolume(name string, removeVolumeOptions *v119.RemoveVolumeOptions) error { + ret := _m.ctrl.Call(_m, "RemoveVolume", name, removeVolumeOptions) + ret0, _ := ret[0].(error) + return ret0 +} + +func (_mr *_MockVirtualMachineInterfaceRecorder) RemoveVolume(arg0, arg1 interface{}) *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "RemoveVolume", arg0, arg1) +} + +func (_m *MockVirtualMachineInterface) PortForward(name string, port int, protocol string) (StreamInterface, error) { + ret := _m.ctrl.Call(_m, "PortForward", name, port, protocol) + ret0, _ := ret[0].(StreamInterface) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +func (_mr *_MockVirtualMachineInterfaceRecorder) PortForward(arg0, arg1, arg2 interface{}) *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "PortForward", arg0, arg1, arg2) +} + +// Mock of VirtualMachineInstanceMigrationInterface interface +type MockVirtualMachineInstanceMigrationInterface struct { + ctrl *gomock.Controller + recorder *_MockVirtualMachineInstanceMigrationInterfaceRecorder +} + +// Recorder for MockVirtualMachineInstanceMigrationInterface (not exported) +type _MockVirtualMachineInstanceMigrationInterfaceRecorder struct { + mock *MockVirtualMachineInstanceMigrationInterface +} + +func NewMockVirtualMachineInstanceMigrationInterface(ctrl *gomock.Controller) *MockVirtualMachineInstanceMigrationInterface { + mock := &MockVirtualMachineInstanceMigrationInterface{ctrl: ctrl} + mock.recorder = &_MockVirtualMachineInstanceMigrationInterfaceRecorder{mock} + return mock +} + +func (_m *MockVirtualMachineInstanceMigrationInterface) EXPECT() *_MockVirtualMachineInstanceMigrationInterfaceRecorder { + return _m.recorder +} + +func (_m *MockVirtualMachineInstanceMigrationInterface) Get(name string, options *v11.GetOptions) (*v119.VirtualMachineInstanceMigration, error) { + ret := _m.ctrl.Call(_m, "Get", name, options) + ret0, _ := ret[0].(*v119.VirtualMachineInstanceMigration) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +func (_mr *_MockVirtualMachineInstanceMigrationInterfaceRecorder) Get(arg0, arg1 interface{}) *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "Get", arg0, arg1) +} + +func (_m *MockVirtualMachineInstanceMigrationInterface) List(opts *v11.ListOptions) (*v119.VirtualMachineInstanceMigrationList, error) { + ret := _m.ctrl.Call(_m, "List", opts) + ret0, _ := ret[0].(*v119.VirtualMachineInstanceMigrationList) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +func (_mr *_MockVirtualMachineInstanceMigrationInterfaceRecorder) List(arg0 interface{}) *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "List", arg0) +} + +func (_m *MockVirtualMachineInstanceMigrationInterface) Create(migration *v119.VirtualMachineInstanceMigration, options *v11.CreateOptions) (*v119.VirtualMachineInstanceMigration, error) { + ret := _m.ctrl.Call(_m, "Create", migration, options) + ret0, _ := ret[0].(*v119.VirtualMachineInstanceMigration) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +func (_mr *_MockVirtualMachineInstanceMigrationInterfaceRecorder) Create(arg0, arg1 interface{}) *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "Create", arg0, arg1) +} + +func (_m *MockVirtualMachineInstanceMigrationInterface) Update(_param0 *v119.VirtualMachineInstanceMigration) (*v119.VirtualMachineInstanceMigration, error) { + ret := _m.ctrl.Call(_m, "Update", _param0) + ret0, _ := ret[0].(*v119.VirtualMachineInstanceMigration) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +func (_mr *_MockVirtualMachineInstanceMigrationInterfaceRecorder) Update(arg0 interface{}) *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "Update", arg0) +} + +func (_m *MockVirtualMachineInstanceMigrationInterface) Delete(name string, options *v11.DeleteOptions) error { + ret := _m.ctrl.Call(_m, "Delete", name, options) + ret0, _ := ret[0].(error) + return ret0 +} + +func (_mr *_MockVirtualMachineInstanceMigrationInterfaceRecorder) Delete(arg0, arg1 interface{}) *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "Delete", arg0, arg1) +} + +func (_m *MockVirtualMachineInstanceMigrationInterface) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (*v119.VirtualMachineInstanceMigration, error) { + _s := []interface{}{name, pt, data} + for _, _x := range subresources { + _s = append(_s, _x) + } + ret := _m.ctrl.Call(_m, "Patch", _s...) + ret0, _ := ret[0].(*v119.VirtualMachineInstanceMigration) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +func (_mr *_MockVirtualMachineInstanceMigrationInterfaceRecorder) Patch(arg0, arg1, arg2 interface{}, arg3 ...interface{}) *gomock.Call { + _s := append([]interface{}{arg0, arg1, arg2}, arg3...) + return _mr.mock.ctrl.RecordCall(_mr.mock, "Patch", _s...) +} + +func (_m *MockVirtualMachineInstanceMigrationInterface) UpdateStatus(_param0 *v119.VirtualMachineInstanceMigration) (*v119.VirtualMachineInstanceMigration, error) { + ret := _m.ctrl.Call(_m, "UpdateStatus", _param0) + ret0, _ := ret[0].(*v119.VirtualMachineInstanceMigration) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +func (_mr *_MockVirtualMachineInstanceMigrationInterfaceRecorder) UpdateStatus(arg0 interface{}) *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "UpdateStatus", arg0) +} + +func (_m *MockVirtualMachineInstanceMigrationInterface) PatchStatus(name string, pt types.PatchType, data []byte) (*v119.VirtualMachineInstanceMigration, error) { + ret := _m.ctrl.Call(_m, "PatchStatus", name, pt, data) + ret0, _ := ret[0].(*v119.VirtualMachineInstanceMigration) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +func (_mr *_MockVirtualMachineInstanceMigrationInterfaceRecorder) PatchStatus(arg0, arg1, arg2 interface{}) *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "PatchStatus", arg0, arg1, arg2) +} + +// Mock of KubeVirtInterface interface +type MockKubeVirtInterface struct { + ctrl *gomock.Controller + recorder *_MockKubeVirtInterfaceRecorder +} + +// Recorder for MockKubeVirtInterface (not exported) +type _MockKubeVirtInterfaceRecorder struct { + mock *MockKubeVirtInterface +} + +func NewMockKubeVirtInterface(ctrl *gomock.Controller) *MockKubeVirtInterface { + mock := &MockKubeVirtInterface{ctrl: ctrl} + mock.recorder = &_MockKubeVirtInterfaceRecorder{mock} + return mock +} + +func (_m *MockKubeVirtInterface) EXPECT() *_MockKubeVirtInterfaceRecorder { + return _m.recorder +} + +func (_m *MockKubeVirtInterface) Get(name string, options *v11.GetOptions) (*v119.KubeVirt, error) { + ret := _m.ctrl.Call(_m, "Get", name, options) + ret0, _ := ret[0].(*v119.KubeVirt) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +func (_mr *_MockKubeVirtInterfaceRecorder) Get(arg0, arg1 interface{}) *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "Get", arg0, arg1) +} + +func (_m *MockKubeVirtInterface) List(opts *v11.ListOptions) (*v119.KubeVirtList, error) { + ret := _m.ctrl.Call(_m, "List", opts) + ret0, _ := ret[0].(*v119.KubeVirtList) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +func (_mr *_MockKubeVirtInterfaceRecorder) List(arg0 interface{}) *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "List", arg0) +} + +func (_m *MockKubeVirtInterface) Create(instance *v119.KubeVirt) (*v119.KubeVirt, error) { + ret := _m.ctrl.Call(_m, "Create", instance) + ret0, _ := ret[0].(*v119.KubeVirt) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +func (_mr *_MockKubeVirtInterfaceRecorder) Create(arg0 interface{}) *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "Create", arg0) +} + +func (_m *MockKubeVirtInterface) Update(_param0 *v119.KubeVirt) (*v119.KubeVirt, error) { + ret := _m.ctrl.Call(_m, "Update", _param0) + ret0, _ := ret[0].(*v119.KubeVirt) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +func (_mr *_MockKubeVirtInterfaceRecorder) Update(arg0 interface{}) *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "Update", arg0) +} + +func (_m *MockKubeVirtInterface) Delete(name string, options *v11.DeleteOptions) error { + ret := _m.ctrl.Call(_m, "Delete", name, options) + ret0, _ := ret[0].(error) + return ret0 +} + +func (_mr *_MockKubeVirtInterfaceRecorder) Delete(arg0, arg1 interface{}) *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "Delete", arg0, arg1) +} + +func (_m *MockKubeVirtInterface) Patch(name string, pt types.PatchType, data []byte, patchOptions *v11.PatchOptions, subresources ...string) (*v119.KubeVirt, error) { + _s := []interface{}{name, pt, data, patchOptions} + for _, _x := range subresources { + _s = append(_s, _x) + } + ret := _m.ctrl.Call(_m, "Patch", _s...) + ret0, _ := ret[0].(*v119.KubeVirt) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +func (_mr *_MockKubeVirtInterfaceRecorder) Patch(arg0, arg1, arg2, arg3 interface{}, arg4 ...interface{}) *gomock.Call { + _s := append([]interface{}{arg0, arg1, arg2, arg3}, arg4...) + return _mr.mock.ctrl.RecordCall(_mr.mock, "Patch", _s...) +} + +func (_m *MockKubeVirtInterface) UpdateStatus(_param0 *v119.KubeVirt) (*v119.KubeVirt, error) { + ret := _m.ctrl.Call(_m, "UpdateStatus", _param0) + ret0, _ := ret[0].(*v119.KubeVirt) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +func (_mr *_MockKubeVirtInterfaceRecorder) UpdateStatus(arg0 interface{}) *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "UpdateStatus", arg0) +} + +func (_m *MockKubeVirtInterface) PatchStatus(name string, pt types.PatchType, data []byte, patchOptions *v11.PatchOptions) (*v119.KubeVirt, error) { + ret := _m.ctrl.Call(_m, "PatchStatus", name, pt, data, patchOptions) + ret0, _ := ret[0].(*v119.KubeVirt) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +func (_mr *_MockKubeVirtInterfaceRecorder) PatchStatus(arg0, arg1, arg2, arg3 interface{}) *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "PatchStatus", arg0, arg1, arg2, arg3) +} + +// Mock of ServerVersionInterface interface +type MockServerVersionInterface struct { + ctrl *gomock.Controller + recorder *_MockServerVersionInterfaceRecorder +} + +// Recorder for MockServerVersionInterface (not exported) +type _MockServerVersionInterfaceRecorder struct { + mock *MockServerVersionInterface +} + +func NewMockServerVersionInterface(ctrl *gomock.Controller) *MockServerVersionInterface { + mock := &MockServerVersionInterface{ctrl: ctrl} + mock.recorder = &_MockServerVersionInterfaceRecorder{mock} + return mock +} + +func (_m *MockServerVersionInterface) EXPECT() *_MockServerVersionInterfaceRecorder { + return _m.recorder +} + +func (_m *MockServerVersionInterface) Get() (*version.Info, error) { + ret := _m.ctrl.Call(_m, "Get") + ret0, _ := ret[0].(*version.Info) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +func (_mr *_MockServerVersionInterfaceRecorder) Get() *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "Get") +} diff --git a/vendor/kubevirt.io/client-go/kubecli/guestfs.go b/vendor/kubevirt.io/client-go/kubecli/guestfs.go new file mode 100644 index 000000000000..0bdaa3bc4a36 --- /dev/null +++ b/vendor/kubevirt.io/client-go/kubecli/guestfs.go @@ -0,0 +1,86 @@ +/* + * This file is part of the KubeVirt project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Copyright 2021 Red Hat, Inc. + * + */ + +package kubecli + +import ( + "context" + + "encoding/json" + "fmt" + "net/url" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/client-go/rest" +) + +type GuestfsInfo struct { + Registry string `json:"registry"` + Tag string `json:"tag"` + Digest string `json:"digest"` + ImagePrefix string `json:"imagePrefix"` +} + +func (k *kubevirt) GuestfsVersion() *GuestfsVersion { + return &GuestfsVersion{ + restClient: k.restClient, + resource: "guestfs", + } +} + +type GuestfsVersion struct { + restClient *rest.RESTClient + resource string +} + +func (v *GuestfsVersion) Get() (*GuestfsInfo, error) { + var group metav1.APIGroup + // First, find out which version to query + uri := ApiGroupName + result := v.restClient.Get().RequestURI(uri).Do(context.Background()) + if data, err := result.Raw(); err != nil { + connErr, isConnectionErr := err.(*url.Error) + + if isConnectionErr { + return nil, connErr.Err + } + + return nil, err + } else if err = json.Unmarshal(data, &group); err != nil { + return nil, err + } + + // Now, query the preferred version + uri = fmt.Sprintf("/apis/%s/guestfs", group.PreferredVersion.GroupVersion) + var info GuestfsInfo + + result = v.restClient.Get().RequestURI(uri).Do(context.Background()) + if data, err := result.Raw(); err != nil { + connErr, isConnectionErr := err.(*url.Error) + + if isConnectionErr { + return nil, connErr.Err + } + + return nil, err + } else if err = json.Unmarshal(data, &info); err != nil { + return nil, err + } + return &info, nil +} diff --git a/vendor/kubevirt.io/client-go/kubecli/handler.go b/vendor/kubevirt.io/client-go/kubecli/handler.go new file mode 100644 index 000000000000..d6d26ed319e0 --- /dev/null +++ b/vendor/kubevirt.io/client-go/kubecli/handler.go @@ -0,0 +1,281 @@ +package kubecli + +import ( + "context" + "crypto/tls" + "fmt" + "io" + "io/ioutil" + "net/http" + "time" + + v1 "k8s.io/api/core/v1" + k8smetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" + "k8s.io/apimachinery/pkg/labels" + netutils "k8s.io/utils/net" + + virtv1 "kubevirt.io/api/core/v1" + + "kubevirt.io/client-go/util" +) + +const ( + consoleTemplateURI = "wss://%s:%v/v1/namespaces/%s/virtualmachineinstances/%s/console" + usbredirTemplateURI = "wss://%s:%v/v1/namespaces/%s/virtualmachineinstances/%s/usbredir" + vncTemplateURI = "wss://%s:%v/v1/namespaces/%s/virtualmachineinstances/%s/vnc" + pauseTemplateURI = "https://%s:%v/v1/namespaces/%s/virtualmachineinstances/%s/pause" + unpauseTemplateURI = "https://%s:%v/v1/namespaces/%s/virtualmachineinstances/%s/unpause" + freezeTemplateURI = "https://%s:%v/v1/namespaces/%s/virtualmachineinstances/%s/freeze" + unfreezeTemplateURI = "https://%s:%v/v1/namespaces/%s/virtualmachineinstances/%s/unfreeze" + softRebootTemplateURI = "https://%s:%v/v1/namespaces/%s/virtualmachineinstances/%s/softreboot" + guestInfoTemplateURI = "https://%s:%v/v1/namespaces/%s/virtualmachineinstances/%s/guestosinfo" + userListTemplateURI = "https://%s:%v/v1/namespaces/%s/virtualmachineinstances/%s/userlist" + filesystemListTemplateURI = "https://%s:%v/v1/namespaces/%s/virtualmachineinstances/%s/filesystemlist" +) + +func NewVirtHandlerClient(client KubevirtClient) VirtHandlerClient { + return &virtHandler{ + client: client, + virtHandlerPort: 0, + namespace: "", + } +} + +type VirtHandlerClient interface { + ForNode(nodeName string) VirtHandlerConn + Port(port int) VirtHandlerClient + Namespace(namespace string) VirtHandlerClient +} + +type VirtHandlerConn interface { + ConnectionDetails() (ip string, port int, err error) + ConsoleURI(vmi *virtv1.VirtualMachineInstance) (string, error) + USBRedirURI(vmi *virtv1.VirtualMachineInstance) (string, error) + VNCURI(vmi *virtv1.VirtualMachineInstance) (string, error) + PauseURI(vmi *virtv1.VirtualMachineInstance) (string, error) + UnpauseURI(vmi *virtv1.VirtualMachineInstance) (string, error) + FreezeURI(vmi *virtv1.VirtualMachineInstance) (string, error) + UnfreezeURI(vmi *virtv1.VirtualMachineInstance) (string, error) + SoftRebootURI(vmi *virtv1.VirtualMachineInstance) (string, error) + Pod() (pod *v1.Pod, err error) + Put(url string, tlsConfig *tls.Config, body io.ReadCloser) error + Get(url string, tlsConfig *tls.Config) (string, error) + GuestInfoURI(vmi *virtv1.VirtualMachineInstance) (string, error) + UserListURI(vmi *virtv1.VirtualMachineInstance) (string, error) + FilesystemListURI(vmi *virtv1.VirtualMachineInstance) (string, error) +} + +type virtHandler struct { + client KubevirtClient + virtHandlerPort int + namespace string +} + +type virtHandlerConn struct { + pod *v1.Pod + err error + port int +} + +func (v *virtHandler) Namespace(namespace string) VirtHandlerClient { + v.namespace = namespace + return v +} + +func (v *virtHandler) Port(port int) VirtHandlerClient { + v.virtHandlerPort = port + return v +} +func (v *virtHandler) ForNode(nodeName string) VirtHandlerConn { + conn := &virtHandlerConn{} + var err error + namespace := v.namespace + if namespace == "" { + namespace, err = util.GetNamespace() + if err != nil { + conn.err = err + return conn + } + } + pod, found, err := v.getVirtHandler(nodeName, namespace) + if !found { + conn.err = fmt.Errorf("No virt-handler on node %s found", nodeName) + } + if err != nil { + conn.err = err + } + conn.pod = pod + conn.port = v.virtHandlerPort + return conn +} + +func (v *virtHandler) getVirtHandler(nodeName string, namespace string) (*v1.Pod, bool, error) { + + handlerNodeSelector := fields.ParseSelectorOrDie("spec.nodeName=" + nodeName) + labelSelector, err := labels.Parse(virtv1.AppLabel + " in (virt-handler)") + if err != nil { + return nil, false, err + } + + pods, err := v.client.CoreV1().Pods(namespace).List(context.Background(), + k8smetav1.ListOptions{ + FieldSelector: handlerNodeSelector.String(), + LabelSelector: labelSelector.String()}) + if err != nil { + return nil, false, err + } + if len(pods.Items) > 1 { + return nil, false, fmt.Errorf("Expected to find one Pod, found %d Pods", len(pods.Items)) + } + + if len(pods.Items) == 0 { + return nil, false, nil + } + return &pods.Items[0], true, nil +} + +func (v *virtHandlerConn) ConnectionDetails() (ip string, port int, err error) { + if v.err != nil { + err = v.err + return + } + // TODO depending on in which network namespace virt-handler runs, we might have to choose the NodeIPt d + ip = v.pod.Status.PodIP + // TODO get rid of the hardcoded port + port = 8185 + if v.port != 0 { + port = v.port + } + return +} + +func (v *virtHandlerConn) formatURI(template string, vmi *virtv1.VirtualMachineInstance) (string, error) { + ip, port, err := v.ConnectionDetails() + if err != nil { + return "", err + } + + return fmt.Sprintf(template, formatIpForUri(ip), port, vmi.ObjectMeta.Namespace, vmi.ObjectMeta.Name), nil +} + +//TODO move the actual ws handling in here, and work with channels +func (v *virtHandlerConn) ConsoleURI(vmi *virtv1.VirtualMachineInstance) (string, error) { + return v.formatURI(consoleTemplateURI, vmi) +} + +func (v *virtHandlerConn) USBRedirURI(vmi *virtv1.VirtualMachineInstance) (string, error) { + return v.formatURI(usbredirTemplateURI, vmi) +} + +func (v *virtHandlerConn) VNCURI(vmi *virtv1.VirtualMachineInstance) (string, error) { + return v.formatURI(vncTemplateURI, vmi) +} + +func (v *virtHandlerConn) FreezeURI(vmi *virtv1.VirtualMachineInstance) (string, error) { + return v.formatURI(freezeTemplateURI, vmi) +} + +func (v *virtHandlerConn) UnfreezeURI(vmi *virtv1.VirtualMachineInstance) (string, error) { + return v.formatURI(unfreezeTemplateURI, vmi) +} + +func (v *virtHandlerConn) SoftRebootURI(vmi *virtv1.VirtualMachineInstance) (string, error) { + return v.formatURI(softRebootTemplateURI, vmi) +} + +func (v *virtHandlerConn) PauseURI(vmi *virtv1.VirtualMachineInstance) (string, error) { + return v.formatURI(pauseTemplateURI, vmi) +} + +func (v *virtHandlerConn) UnpauseURI(vmi *virtv1.VirtualMachineInstance) (string, error) { + return v.formatURI(unpauseTemplateURI, vmi) +} + +func (v *virtHandlerConn) Pod() (pod *v1.Pod, err error) { + if v.err != nil { + err = v.err + return + } + return v.pod, err +} + +func (v *virtHandlerConn) Put(url string, tlsConfig *tls.Config, body io.ReadCloser) error { + + client := http.Client{ + Transport: &http.Transport{ + TLSClientConfig: tlsConfig, + }, + Timeout: 10 * time.Second, + } + + req, err := http.NewRequest(http.MethodPut, url, body) + if err != nil { + return err + } + + resp, err := client.Do(req) + if err != nil { + return err + } + + if resp.StatusCode < 200 || resp.StatusCode > 299 { + return fmt.Errorf("unexpected return code %s", resp.Status) + } + + return nil +} + +func (v *virtHandlerConn) Get(url string, tlsConfig *tls.Config) (string, error) { + + client := http.Client{ + Transport: &http.Transport{ + TLSClientConfig: tlsConfig, + }, + Timeout: 10 * time.Second, + } + + req, err := http.NewRequest(http.MethodGet, url, nil) + if err != nil { + return "", err + } + + req.Header.Add("Accept", "application/json") + resp, err := client.Do(req) + if err != nil { + return "", err + } + + if resp.StatusCode < 200 || resp.StatusCode > 299 { + return "", fmt.Errorf("unexpected return code %s", resp.Status) + } + + defer resp.Body.Close() + responseData, err := ioutil.ReadAll(resp.Body) + if err != nil { + return "", fmt.Errorf("cannot read get body %s", resp.Status) + } + + responseString := string(responseData) + + return responseString, nil +} + +func (v *virtHandlerConn) GuestInfoURI(vmi *virtv1.VirtualMachineInstance) (string, error) { + return v.formatURI(guestInfoTemplateURI, vmi) +} + +func formatIpForUri(ip string) string { + if netutils.IsIPv6String(ip) { + return "[" + ip + "]" + } + return ip +} + +func (v *virtHandlerConn) UserListURI(vmi *virtv1.VirtualMachineInstance) (string, error) { + return v.formatURI(userListTemplateURI, vmi) +} + +func (v *virtHandlerConn) FilesystemListURI(vmi *virtv1.VirtualMachineInstance) (string, error) { + return v.formatURI(filesystemListTemplateURI, vmi) +} diff --git a/vendor/kubevirt.io/client-go/kubecli/kubecli.go b/vendor/kubevirt.io/client-go/kubecli/kubecli.go new file mode 100644 index 000000000000..59118aa0cb9d --- /dev/null +++ b/vendor/kubevirt.io/client-go/kubecli/kubecli.go @@ -0,0 +1,408 @@ +/* + * This file is part of the KubeVirt project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Copyright 2018 Red Hat, Inc. + * Copyright 2018 The Kubernetes Authors. + * + */ + +package kubecli + +import ( + "flag" + "os" + "sync" + + migrationsv1 "kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/migrations/v1alpha1" + + secv1 "github.com/openshift/client-go/security/clientset/versioned/typed/security/v1" + "github.com/spf13/pflag" + extclient "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/runtime/serializer" + "k8s.io/client-go/discovery" + "k8s.io/client-go/dynamic" + "k8s.io/client-go/kubernetes" + "k8s.io/client-go/kubernetes/scheme" + "k8s.io/client-go/rest" + restclient "k8s.io/client-go/rest" + "k8s.io/client-go/tools/clientcmd" + + "kubevirt.io/api/core" + v1 "kubevirt.io/api/core/v1" + + cdiclient "kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned" + k8ssnapshotclient "kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned" + generatedclient "kubevirt.io/client-go/generated/kubevirt/clientset/versioned" + networkclient "kubevirt.io/client-go/generated/network-attachment-definition-client/clientset/versioned" + promclient "kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned" +) + +var ( + kubeconfig string + master string +) + +var ( + SchemeBuilder runtime.SchemeBuilder + Scheme *runtime.Scheme + Codecs serializer.CodecFactory + ParameterCodec runtime.ParameterCodec +) + +func init() { + // This allows consumers of the KubeVirt client go package to + // customize what version the client uses. Without specifying a + // version, all versions are registered. While this techincally + // file to register all versions, so k8s ecosystem libraries + // do not work well with this. By explicitly setting the env var, + // consumers of our client go can avoid these scenarios by only + // registering a single version + registerVersion := os.Getenv(v1.KubeVirtClientGoSchemeRegistrationVersionEnvVar) + if registerVersion != "" { + SchemeBuilder = runtime.NewSchemeBuilder(v1.AddKnownTypesGenerator([]schema.GroupVersion{schema.GroupVersion{Group: core.GroupName, Version: registerVersion}})) + } else { + SchemeBuilder = runtime.NewSchemeBuilder(v1.AddKnownTypesGenerator(v1.GroupVersions)) + } + Scheme = runtime.NewScheme() + AddToScheme := SchemeBuilder.AddToScheme + Codecs = serializer.NewCodecFactory(Scheme) + ParameterCodec = runtime.NewParameterCodec(Scheme) + AddToScheme(Scheme) + AddToScheme(scheme.Scheme) +} + +type RestConfigHookFunc func(*rest.Config) + +var restConfigHooks []RestConfigHookFunc +var restConfigHooksLock sync.Mutex + +var virtclient KubevirtClient +var once sync.Once + +// Init adds the default `kubeconfig` and `master` flags. It is not added by default to allow integration into +// the different controller generators which normally add these flags too. +func Init() { + if flag.CommandLine.Lookup("kubeconfig") == nil { + flag.StringVar(&kubeconfig, "kubeconfig", "", "absolute path to the kubeconfig file") + } + if flag.CommandLine.Lookup("master") == nil { + flag.StringVar(&master, "master", "", "master url") + } +} + +func RegisterRestConfigHook(fn RestConfigHookFunc) { + restConfigHooksLock.Lock() + defer restConfigHooksLock.Unlock() + + restConfigHooks = append(restConfigHooks, fn) +} + +func executeRestConfigHooks(config *rest.Config) { + restConfigHooksLock.Lock() + defer restConfigHooksLock.Unlock() + + for _, hookFn := range restConfigHooks { + hookFn(config) + } +} + +func FlagSet() *flag.FlagSet { + set := flag.NewFlagSet(os.Args[0], flag.ExitOnError) + set.StringVar(&kubeconfig, "kubeconfig", "", "absolute path to the kubeconfig file") + set.StringVar(&master, "master", "", "master url") + return set +} + +func GetKubevirtSubresourceClientFromFlags(master string, kubeconfig string) (KubevirtClient, error) { + config, err := clientcmd.BuildConfigFromFlags(master, kubeconfig) + if err != nil { + return nil, err + } + + config.GroupVersion = &v1.SubresourceStorageGroupVersion + config.NegotiatedSerializer = serializer.WithoutConversionCodecFactory{CodecFactory: Codecs} + config.APIPath = "/apis" + config.ContentType = runtime.ContentTypeJSON + + restClient, err := rest.RESTClientFor(config) + if err != nil { + return nil, err + } + + coreClient, err := kubernetes.NewForConfig(config) + if err != nil { + return nil, err + } + + generatedKubeVirtClient, err := generatedclient.NewForConfig(config) + if err != nil { + return nil, err + } + + cdiClient, err := cdiclient.NewForConfig(config) + if err != nil { + return nil, err + } + + networkClient, err := networkclient.NewForConfig(config) + if err != nil { + return nil, err + } + + extensionsClient, err := extclient.NewForConfig(config) + if err != nil { + return nil, err + } + + secClient, err := secv1.NewForConfig(config) + if err != nil { + return nil, err + } + + discoveryClient, err := discovery.NewDiscoveryClientForConfig(config) + if err != nil { + return nil, err + } + + prometheusClient, err := promclient.NewForConfig(config) + if err != nil { + return nil, err + } + + snapshotClient, err := k8ssnapshotclient.NewForConfig(config) + if err != nil { + return nil, err + } + + dynamicClient, err := dynamic.NewForConfig(config) + if err != nil { + return nil, err + } + + migrationsClient, err := migrationsv1.NewForConfig(config) + if err != nil { + return nil, err + } + + return &kubevirt{ + master, + kubeconfig, + restClient, + config, + generatedKubeVirtClient, + cdiClient, + networkClient, + extensionsClient, + secClient, + discoveryClient, + prometheusClient, + snapshotClient, + dynamicClient, + migrationsClient, + coreClient, + }, nil +} + +// DefaultClientConfig creates a clientcmd.ClientConfig with the following hierarchy: +// 1. Use the kubeconfig builder. The number of merges and overrides here gets a little crazy. Stay with me. +// 1. Merge the kubeconfig itself. This is done with the following hierarchy rules: +// 1. CommandLineLocation - this parsed from the command line, so it must be late bound. If you specify this, +// then no other kubeconfig files are merged. This file must exist. +// 2. If $KUBECONFIG is set, then it is treated as a list of files that should be merged. +// 3. HomeDirectoryLocation +// Empty filenames are ignored. Files with non-deserializable content produced errors. +// The first file to set a particular value or map key wins and the value or map key is never changed. +// This means that the first file to set CurrentContext will have its context preserved. It also means +// that if two files specify a "red-user", only values from the first file's red-user are used. Even +// non-conflicting entries from the second file's "red-user" are discarded. +// 2. Determine the context to use based on the first hit in this chain +// 1. command line argument - again, parsed from the command line, so it must be late bound +// 2. CurrentContext from the merged kubeconfig file +// 3. Empty is allowed at this stage +// 3. Determine the cluster info and auth info to use. At this point, we may or may not have a context. They +// are built based on the first hit in this chain. (run it twice, once for auth, once for cluster) +// 1. command line argument +// 2. If context is present, then use the context value +// 3. Empty is allowed +// 4. Determine the actual cluster info to use. At this point, we may or may not have a cluster info. Build +// each piece of the cluster info based on the chain: +// 1. command line argument +// 2. If cluster info is present and a value for the attribute is present, use it. +// 3. If you don't have a server location, bail. +// 5. Auth info is build using the same rules as cluster info, EXCEPT that you can only have one authentication +// technique per auth info. The following conditions result in an error: +// 1. If there are two conflicting techniques specified from the command line, fail. +// 2. If the command line does not specify one, and the auth info has conflicting techniques, fail. +// 3. If the command line specifies one and the auth info specifies another, honor the command line technique. +// 2. Use default values and potentially prompt for auth information +// +// However, if it appears that we're running in a kubernetes cluster +// container environment, then run with the auth info kubernetes mounted for +// us. Specifically: +// The env vars KUBERNETES_SERVICE_HOST and KUBERNETES_SERVICE_PORT are +// set, and the file /var/run/secrets/kubernetes.io/serviceaccount/token +// exists and is not a directory. +// Initially copied from https://github.com/kubernetes/kubernetes/blob/09f321c80bfc9bca63a5530b56d7a1a3ba80ba9b/pkg/kubectl/cmd/util/factory_client_access.go#L174 +func DefaultClientConfig(flags *pflag.FlagSet) clientcmd.ClientConfig { + loadingRules := clientcmd.NewDefaultClientConfigLoadingRules() + // use the standard defaults for this client command + // DEPRECATED: remove and replace with something more accurate + loadingRules.DefaultClientConfig = &clientcmd.DefaultClientConfig + + flags.StringVar(&loadingRules.ExplicitPath, "kubeconfig", "", "Path to the kubeconfig file to use for CLI requests.") + + overrides := &clientcmd.ConfigOverrides{ClusterDefaults: clientcmd.ClusterDefaults} + + flagNames := clientcmd.RecommendedConfigOverrideFlags("") + // short flagnames are disabled by default. These are here for compatibility with existing scripts + flagNames.ClusterOverrideFlags.APIServer.ShortName = "s" + + clientcmd.BindOverrideFlags(overrides, flags, flagNames) + clientConfig := clientcmd.NewInteractiveDeferredLoadingClientConfig(loadingRules, overrides, os.Stdin) + + return clientConfig +} + +// this function is defined as a closure so iut could be overwritten by unit tests +var GetKubevirtClientFromClientConfig = func(cmdConfig clientcmd.ClientConfig) (KubevirtClient, error) { + config, err := cmdConfig.ClientConfig() + if err != nil { + return nil, err + } + return GetKubevirtClientFromRESTConfig(config) + +} + +func GetKubevirtClientFromRESTConfig(config *rest.Config) (KubevirtClient, error) { + shallowCopy := *config + shallowCopy.GroupVersion = &v1.StorageGroupVersion + shallowCopy.NegotiatedSerializer = serializer.WithoutConversionCodecFactory{CodecFactory: Codecs} + shallowCopy.APIPath = "/apis" + shallowCopy.ContentType = runtime.ContentTypeJSON + if config.UserAgent == "" { + config.UserAgent = restclient.DefaultKubernetesUserAgent() + } + + executeRestConfigHooks(&shallowCopy) + + restClient, err := rest.RESTClientFor(&shallowCopy) + if err != nil { + return nil, err + } + + coreClient, err := kubernetes.NewForConfig(&shallowCopy) + if err != nil { + return nil, err + } + + generatedKubeVirtClient, err := generatedclient.NewForConfig(&shallowCopy) + if err != nil { + return nil, err + } + + cdiClient, err := cdiclient.NewForConfig(&shallowCopy) + if err != nil { + return nil, err + } + + networkClient, err := networkclient.NewForConfig(&shallowCopy) + if err != nil { + return nil, err + } + + extensionsClient, err := extclient.NewForConfig(&shallowCopy) + if err != nil { + return nil, err + } + + secClient, err := secv1.NewForConfig(&shallowCopy) + if err != nil { + return nil, err + } + + discoveryClient, err := discovery.NewDiscoveryClientForConfig(&shallowCopy) + if err != nil { + return nil, err + } + + prometheusClient, err := promclient.NewForConfig(&shallowCopy) + if err != nil { + return nil, err + } + + snapshotClient, err := k8ssnapshotclient.NewForConfig(&shallowCopy) + if err != nil { + return nil, err + } + + dynamicClient, err := dynamic.NewForConfig(&shallowCopy) + if err != nil { + return nil, err + } + + migrationsClient, err := migrationsv1.NewForConfig(&shallowCopy) + if err != nil { + return nil, err + } + + return &kubevirt{ + master, + kubeconfig, + restClient, + &shallowCopy, + generatedKubeVirtClient, + cdiClient, + networkClient, + extensionsClient, + secClient, + discoveryClient, + prometheusClient, + snapshotClient, + dynamicClient, + migrationsClient, + coreClient, + }, nil +} + +func GetKubevirtClientFromFlags(master string, kubeconfig string) (KubevirtClient, error) { + config, err := clientcmd.BuildConfigFromFlags(master, kubeconfig) + if err != nil { + return nil, err + } + return GetKubevirtClientFromRESTConfig(config) +} + +func GetKubevirtClient() (KubevirtClient, error) { + var err error + once.Do(func() { + virtclient, err = GetKubevirtClientFromFlags(master, kubeconfig) + }) + return virtclient, err +} + +func GetKubevirtSubresourceClient() (KubevirtClient, error) { + return GetKubevirtSubresourceClientFromFlags(master, kubeconfig) +} + +// Deprecated: Use GetKubevirtClientConfig instead +func GetConfig() (*restclient.Config, error) { + return clientcmd.BuildConfigFromFlags(master, kubeconfig) +} + +func GetKubevirtClientConfig() (*rest.Config, error) { + return GetConfig() +} diff --git a/vendor/kubevirt.io/client-go/kubecli/kubevirt.go b/vendor/kubevirt.io/client-go/kubecli/kubevirt.go new file mode 100644 index 000000000000..39e6db90f167 --- /dev/null +++ b/vendor/kubevirt.io/client-go/kubecli/kubevirt.go @@ -0,0 +1,288 @@ +/* + * This file is part of the KubeVirt project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Copyright 2018 Red Hat, Inc. + * + */ + +package kubecli + +//go:generate mockgen -source $GOFILE -package=$GOPACKAGE -destination=generated_mock_$GOFILE + +/* + ATTENTION: Rerun code generators when interface signatures are modified. +*/ + +import ( + "io" + "net" + "time" + + "kubevirt.io/client-go/version" + + migrationsv1 "kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/migrations/v1alpha1" + + secv1 "github.com/openshift/client-go/security/clientset/versioned/typed/security/v1" + autov1 "k8s.io/api/autoscaling/v1" + extclient "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset" + k8smetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/types" + "k8s.io/apimachinery/pkg/watch" + "k8s.io/client-go/discovery" + "k8s.io/client-go/dynamic" + "k8s.io/client-go/kubernetes" + "k8s.io/client-go/rest" + + v1 "kubevirt.io/api/core/v1" + cdiclient "kubevirt.io/client-go/generated/containerized-data-importer/clientset/versioned" + k8ssnapshotclient "kubevirt.io/client-go/generated/external-snapshotter/clientset/versioned" + generatedclient "kubevirt.io/client-go/generated/kubevirt/clientset/versioned" + flavorv1alpha1 "kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/flavor/v1alpha1" + poolv1 "kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/pool/v1alpha1" + vmsnapshotv1alpha1 "kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/snapshot/v1alpha1" + networkclient "kubevirt.io/client-go/generated/network-attachment-definition-client/clientset/versioned" + promclient "kubevirt.io/client-go/generated/prometheus-operator/clientset/versioned" +) + +type KubevirtClient interface { + VirtualMachineInstance(namespace string) VirtualMachineInstanceInterface + VirtualMachineInstanceMigration(namespace string) VirtualMachineInstanceMigrationInterface + ReplicaSet(namespace string) ReplicaSetInterface + VirtualMachinePool(namespace string) poolv1.VirtualMachinePoolInterface + VirtualMachine(namespace string) VirtualMachineInterface + KubeVirt(namespace string) KubeVirtInterface + VirtualMachineInstancePreset(namespace string) VirtualMachineInstancePresetInterface + VirtualMachineSnapshot(namespace string) vmsnapshotv1alpha1.VirtualMachineSnapshotInterface + VirtualMachineSnapshotContent(namespace string) vmsnapshotv1alpha1.VirtualMachineSnapshotContentInterface + VirtualMachineRestore(namespace string) vmsnapshotv1alpha1.VirtualMachineRestoreInterface + VirtualMachineFlavor(namespace string) flavorv1alpha1.VirtualMachineFlavorInterface + VirtualMachineClusterFlavor() flavorv1alpha1.VirtualMachineClusterFlavorInterface + MigrationPolicy() migrationsv1.MigrationPolicyInterface + ServerVersion() ServerVersionInterface + ClusterProfiler() *ClusterProfiler + GuestfsVersion() *GuestfsVersion + RestClient() *rest.RESTClient + GeneratedKubeVirtClient() generatedclient.Interface + CdiClient() cdiclient.Interface + NetworkClient() networkclient.Interface + ExtensionsClient() extclient.Interface + SecClient() secv1.SecurityV1Interface + DiscoveryClient() discovery.DiscoveryInterface + PrometheusClient() promclient.Interface + KubernetesSnapshotClient() k8ssnapshotclient.Interface + DynamicClient() dynamic.Interface + MigrationPolicyClient() *migrationsv1.MigrationsV1alpha1Client + kubernetes.Interface + Config() *rest.Config +} + +type kubevirt struct { + master string + kubeconfig string + restClient *rest.RESTClient + config *rest.Config + generatedKubeVirtClient *generatedclient.Clientset + cdiClient *cdiclient.Clientset + networkClient *networkclient.Clientset + extensionsClient *extclient.Clientset + secClient *secv1.SecurityV1Client + discoveryClient *discovery.DiscoveryClient + prometheusClient *promclient.Clientset + snapshotClient *k8ssnapshotclient.Clientset + dynamicClient dynamic.Interface + migrationsClient *migrationsv1.MigrationsV1alpha1Client + *kubernetes.Clientset +} + +func (k kubevirt) Config() *rest.Config { + return k.config +} + +func (k kubevirt) CdiClient() cdiclient.Interface { + return k.cdiClient +} + +func (k kubevirt) NetworkClient() networkclient.Interface { + return k.networkClient +} + +func (k kubevirt) ExtensionsClient() extclient.Interface { + return k.extensionsClient +} + +func (k kubevirt) SecClient() secv1.SecurityV1Interface { + return k.secClient +} + +func (k kubevirt) DiscoveryClient() discovery.DiscoveryInterface { + return k.discoveryClient +} + +func (k kubevirt) PrometheusClient() promclient.Interface { + return k.prometheusClient +} + +func (k kubevirt) RestClient() *rest.RESTClient { + return k.restClient +} + +func (k kubevirt) GeneratedKubeVirtClient() generatedclient.Interface { + return k.generatedKubeVirtClient +} + +func (k kubevirt) VirtualMachinePool(namespace string) poolv1.VirtualMachinePoolInterface { + return k.generatedKubeVirtClient.PoolV1alpha1().VirtualMachinePools(namespace) +} + +func (k kubevirt) VirtualMachineSnapshot(namespace string) vmsnapshotv1alpha1.VirtualMachineSnapshotInterface { + return k.generatedKubeVirtClient.SnapshotV1alpha1().VirtualMachineSnapshots(namespace) +} + +func (k kubevirt) VirtualMachineSnapshotContent(namespace string) vmsnapshotv1alpha1.VirtualMachineSnapshotContentInterface { + return k.generatedKubeVirtClient.SnapshotV1alpha1().VirtualMachineSnapshotContents(namespace) +} + +func (k kubevirt) VirtualMachineRestore(namespace string) vmsnapshotv1alpha1.VirtualMachineRestoreInterface { + return k.generatedKubeVirtClient.SnapshotV1alpha1().VirtualMachineRestores(namespace) +} + +func (k kubevirt) VirtualMachineFlavor(namespace string) flavorv1alpha1.VirtualMachineFlavorInterface { + return k.generatedKubeVirtClient.FlavorV1alpha1().VirtualMachineFlavors(namespace) +} + +func (k kubevirt) VirtualMachineClusterFlavor() flavorv1alpha1.VirtualMachineClusterFlavorInterface { + return k.generatedKubeVirtClient.FlavorV1alpha1().VirtualMachineClusterFlavors() +} + +func (k kubevirt) KubernetesSnapshotClient() k8ssnapshotclient.Interface { + return k.snapshotClient +} + +func (k kubevirt) DynamicClient() dynamic.Interface { + return k.dynamicClient +} + +func (k kubevirt) MigrationPolicy() migrationsv1.MigrationPolicyInterface { + return k.generatedKubeVirtClient.MigrationsV1alpha1().MigrationPolicies() +} + +func (k kubevirt) MigrationPolicyClient() *migrationsv1.MigrationsV1alpha1Client { + return k.migrationsClient +} + +type StreamOptions struct { + In io.Reader + Out io.Writer +} + +type StreamInterface interface { + Stream(options StreamOptions) error + AsConn() net.Conn +} + +type VirtualMachineInstanceInterface interface { + Get(name string, options *k8smetav1.GetOptions) (*v1.VirtualMachineInstance, error) + List(opts *k8smetav1.ListOptions) (*v1.VirtualMachineInstanceList, error) + Create(instance *v1.VirtualMachineInstance) (*v1.VirtualMachineInstance, error) + Update(*v1.VirtualMachineInstance) (*v1.VirtualMachineInstance, error) + Delete(name string, options *k8smetav1.DeleteOptions) error + Patch(name string, pt types.PatchType, data []byte, patchOptions *k8smetav1.PatchOptions, subresources ...string) (result *v1.VirtualMachineInstance, err error) + Watch(opts metav1.ListOptions) (watch.Interface, error) + SerialConsole(name string, options *SerialConsoleOptions) (StreamInterface, error) + USBRedir(vmiName string) (StreamInterface, error) + VNC(name string) (StreamInterface, error) + PortForward(name string, port int, protocol string) (StreamInterface, error) + Pause(name string, pauseOptions *v1.PauseOptions) error + Unpause(name string, unpauseOptions *v1.UnpauseOptions) error + Freeze(name string, unfreezeTimeout time.Duration) error + Unfreeze(name string) error + SoftReboot(name string) error + GuestOsInfo(name string) (v1.VirtualMachineInstanceGuestAgentInfo, error) + UserList(name string) (v1.VirtualMachineInstanceGuestOSUserList, error) + FilesystemList(name string) (v1.VirtualMachineInstanceFileSystemList, error) + AddVolume(name string, addVolumeOptions *v1.AddVolumeOptions) error + RemoveVolume(name string, removeVolumeOptions *v1.RemoveVolumeOptions) error +} + +type ReplicaSetInterface interface { + Get(name string, options k8smetav1.GetOptions) (*v1.VirtualMachineInstanceReplicaSet, error) + List(opts k8smetav1.ListOptions) (*v1.VirtualMachineInstanceReplicaSetList, error) + Create(*v1.VirtualMachineInstanceReplicaSet) (*v1.VirtualMachineInstanceReplicaSet, error) + Update(*v1.VirtualMachineInstanceReplicaSet) (*v1.VirtualMachineInstanceReplicaSet, error) + Delete(name string, options *k8smetav1.DeleteOptions) error + GetScale(replicaSetName string, options k8smetav1.GetOptions) (*autov1.Scale, error) + UpdateScale(replicaSetName string, scale *autov1.Scale) (*autov1.Scale, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.VirtualMachineInstanceReplicaSet, err error) + UpdateStatus(*v1.VirtualMachineInstanceReplicaSet) (*v1.VirtualMachineInstanceReplicaSet, error) + PatchStatus(name string, pt types.PatchType, data []byte) (result *v1.VirtualMachineInstanceReplicaSet, err error) +} + +type VirtualMachineInstancePresetInterface interface { + Get(name string, options k8smetav1.GetOptions) (*v1.VirtualMachineInstancePreset, error) + List(opts k8smetav1.ListOptions) (*v1.VirtualMachineInstancePresetList, error) + Create(*v1.VirtualMachineInstancePreset) (*v1.VirtualMachineInstancePreset, error) + Update(*v1.VirtualMachineInstancePreset) (*v1.VirtualMachineInstancePreset, error) + Delete(name string, options *k8smetav1.DeleteOptions) error + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.VirtualMachineInstancePreset, err error) +} + +// VirtualMachineInterface provides convenience methods to work with +// virtual machines inside the cluster +type VirtualMachineInterface interface { + Get(name string, options *k8smetav1.GetOptions) (*v1.VirtualMachine, error) + List(opts *k8smetav1.ListOptions) (*v1.VirtualMachineList, error) + Create(*v1.VirtualMachine) (*v1.VirtualMachine, error) + Update(*v1.VirtualMachine) (*v1.VirtualMachine, error) + Delete(name string, options *k8smetav1.DeleteOptions) error + Patch(name string, pt types.PatchType, data []byte, patchOptions *metav1.PatchOptions, subresources ...string) (result *v1.VirtualMachine, err error) + UpdateStatus(*v1.VirtualMachine) (*v1.VirtualMachine, error) + PatchStatus(name string, pt types.PatchType, data []byte, patchOptions *metav1.PatchOptions) (result *v1.VirtualMachine, err error) + Restart(name string, restartOptions *v1.RestartOptions) error + ForceRestart(name string, restartOptions *v1.RestartOptions) error + Start(name string, startOptions *v1.StartOptions) error + Stop(name string, stopOptions *v1.StopOptions) error + ForceStop(name string, stopOptions *v1.StopOptions) error + Migrate(name string, migrateOptions *v1.MigrateOptions) error + AddVolume(name string, addVolumeOptions *v1.AddVolumeOptions) error + RemoveVolume(name string, removeVolumeOptions *v1.RemoveVolumeOptions) error + PortForward(name string, port int, protocol string) (StreamInterface, error) +} + +type VirtualMachineInstanceMigrationInterface interface { + Get(name string, options *k8smetav1.GetOptions) (*v1.VirtualMachineInstanceMigration, error) + List(opts *k8smetav1.ListOptions) (*v1.VirtualMachineInstanceMigrationList, error) + Create(migration *v1.VirtualMachineInstanceMigration, options *k8smetav1.CreateOptions) (*v1.VirtualMachineInstanceMigration, error) + Update(*v1.VirtualMachineInstanceMigration) (*v1.VirtualMachineInstanceMigration, error) + Delete(name string, options *k8smetav1.DeleteOptions) error + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.VirtualMachineInstanceMigration, err error) + UpdateStatus(*v1.VirtualMachineInstanceMigration) (*v1.VirtualMachineInstanceMigration, error) + PatchStatus(name string, pt types.PatchType, data []byte) (result *v1.VirtualMachineInstanceMigration, err error) +} + +type KubeVirtInterface interface { + Get(name string, options *k8smetav1.GetOptions) (*v1.KubeVirt, error) + List(opts *k8smetav1.ListOptions) (*v1.KubeVirtList, error) + Create(instance *v1.KubeVirt) (*v1.KubeVirt, error) + Update(*v1.KubeVirt) (*v1.KubeVirt, error) + Delete(name string, options *k8smetav1.DeleteOptions) error + Patch(name string, pt types.PatchType, data []byte, patchOptions *metav1.PatchOptions, subresources ...string) (result *v1.KubeVirt, err error) + UpdateStatus(*v1.KubeVirt) (*v1.KubeVirt, error) + PatchStatus(name string, pt types.PatchType, data []byte, patchOptions *metav1.PatchOptions) (result *v1.KubeVirt, err error) +} + +type ServerVersionInterface interface { + Get() (*version.Info, error) +} diff --git a/vendor/kubevirt.io/client-go/kubecli/kubevirt_test_utils.go b/vendor/kubevirt.io/client-go/kubecli/kubevirt_test_utils.go new file mode 100644 index 000000000000..affc7b407162 --- /dev/null +++ b/vendor/kubevirt.io/client-go/kubecli/kubevirt_test_utils.go @@ -0,0 +1,87 @@ +package kubecli + +import ( + "errors" + + "kubevirt.io/api/migrations/v1alpha1" + + k8smetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/client-go/tools/clientcmd" + + v1 "kubevirt.io/api/core/v1" +) + +// GetMockKubevirtClientFromClientConfig, MockKubevirtClientInstance are used to create a mechanism +// for overriding the actual kubevirt client access. This is useful when the unit tested code invokes GetKubevirtClientFromClientConfig() +// and therefore the unit test code cannot generate the mock client directly. In such a case following steps are needed: +// (1) Override the GetKubevirtClientFromClientConfig() closure with GetMockKubevirtClientFromClientConfig() or +// GetInvalidKubevirtClientFromClientConfig() +// (2) Then create the instance of the client, and assign into MockKubevirtClientInstance before the tests start: +// ctrl := gomock.NewController(GinkgoT()) +// kubecli.MockKubevirtClientInstance = kubecli.NewMockKubevirtClient(ctrl) +// (3) Rest of the kubevirt mocking is automatically generated in generated_mock_kubevirt.go + +// MockKubevirtClientInstance is a reference to the kubevirt client that could be manipulated by the test code +var MockKubevirtClientInstance *MockKubevirtClient + +// GetMockKubevirtClientFromClientConfig is an entry point for testing, could be used to override GetKubevirtClientFromClientConfig +func GetMockKubevirtClientFromClientConfig(cmdConfig clientcmd.ClientConfig) (KubevirtClient, error) { + return MockKubevirtClientInstance, nil +} + +// GetInvalidKubevirtClientFromClientConfig is an entry point for testing case where client should be invalid +func GetInvalidKubevirtClientFromClientConfig(cmdConfig clientcmd.ClientConfig) (KubevirtClient, error) { + return nil, errors.New("invalid fake client") +} + +func NewMinimalMigration(name string) *v1.VirtualMachineInstanceMigration { + return &v1.VirtualMachineInstanceMigration{TypeMeta: k8smetav1.TypeMeta{APIVersion: v1.GroupVersion.String(), Kind: "VirtualMachineInstanceMigration"}, ObjectMeta: k8smetav1.ObjectMeta{Name: name}} +} + +func NewMinimalVM(name string) *v1.VirtualMachine { + return &v1.VirtualMachine{TypeMeta: k8smetav1.TypeMeta{APIVersion: v1.GroupVersion.String(), Kind: "VirtualMachine"}, ObjectMeta: k8smetav1.ObjectMeta{Name: name}} +} + +func NewMigrationList(migrations ...v1.VirtualMachineInstanceMigration) *v1.VirtualMachineInstanceMigrationList { + return &v1.VirtualMachineInstanceMigrationList{TypeMeta: k8smetav1.TypeMeta{APIVersion: v1.GroupVersion.String(), Kind: "VirtualMachineInstanceMigrationList"}, Items: migrations} +} + +func NewVMList(vms ...v1.VirtualMachine) *v1.VirtualMachineList { + return &v1.VirtualMachineList{TypeMeta: k8smetav1.TypeMeta{APIVersion: v1.GroupVersion.String(), Kind: "VirtualMachineList"}, Items: vms} +} + +func NewVirtualMachineInstanceReplicaSetList(rss ...v1.VirtualMachineInstanceReplicaSet) *v1.VirtualMachineInstanceReplicaSetList { + return &v1.VirtualMachineInstanceReplicaSetList{TypeMeta: k8smetav1.TypeMeta{APIVersion: v1.GroupVersion.String(), Kind: "VirtualMachineInstanceReplicaSetList"}, Items: rss} +} + +func NewMinimalVirtualMachineInstanceReplicaSet(name string) *v1.VirtualMachineInstanceReplicaSet { + return &v1.VirtualMachineInstanceReplicaSet{TypeMeta: k8smetav1.TypeMeta{APIVersion: v1.GroupVersion.String(), Kind: "VirtualMachineInstanceReplicaSet"}, ObjectMeta: k8smetav1.ObjectMeta{Name: name}} +} + +func NewMinimalKubeVirt(name string) *v1.KubeVirt { + return &v1.KubeVirt{TypeMeta: k8smetav1.TypeMeta{APIVersion: v1.GroupVersion.String(), Kind: "KubeVirt"}, ObjectMeta: k8smetav1.ObjectMeta{Name: name}} +} + +func NewKubeVirtList(kubevirts ...v1.KubeVirt) *v1.KubeVirtList { + return &v1.KubeVirtList{TypeMeta: k8smetav1.TypeMeta{APIVersion: v1.GroupVersion.String(), Kind: "KubeVirtList"}, Items: kubevirts} +} + +func NewVirtualMachineInstancePresetList(rss ...v1.VirtualMachineInstancePreset) *v1.VirtualMachineInstancePresetList { + return &v1.VirtualMachineInstancePresetList{TypeMeta: k8smetav1.TypeMeta{APIVersion: v1.GroupVersion.String(), Kind: "VirtualMachineInstancePresetList"}, Items: rss} +} + +func NewMinimalVirtualMachineInstancePreset(name string) *v1.VirtualMachineInstancePreset { + return &v1.VirtualMachineInstancePreset{TypeMeta: k8smetav1.TypeMeta{APIVersion: v1.GroupVersion.String(), Kind: "VirtualMachineInstancePreset"}, ObjectMeta: k8smetav1.ObjectMeta{Name: name}} +} + +func NewMinimalMigrationPolicy(name string) *v1alpha1.MigrationPolicy { + return &v1alpha1.MigrationPolicy{TypeMeta: k8smetav1.TypeMeta{APIVersion: v1alpha1.GroupVersion.String(), Kind: v1alpha1.MigrationPolicyKind.Kind}, + ObjectMeta: k8smetav1.ObjectMeta{ + Name: name, + }, + } +} + +func NewMinimalMigrationPolicyList(policies ...v1alpha1.MigrationPolicy) *v1alpha1.MigrationPolicyList { + return &v1alpha1.MigrationPolicyList{TypeMeta: k8smetav1.TypeMeta{APIVersion: v1alpha1.GroupVersion.String(), Kind: v1alpha1.MigrationPolicyListKind.Kind}, Items: policies} +} diff --git a/vendor/kubevirt.io/client-go/kubecli/kv.go b/vendor/kubevirt.io/client-go/kubecli/kv.go new file mode 100644 index 000000000000..099588f8b89b --- /dev/null +++ b/vendor/kubevirt.io/client-go/kubecli/kv.go @@ -0,0 +1,164 @@ +/* + * This file is part of the KubeVirt project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Copyright 2018 Red Hat, Inc. + * + */ + +package kubecli + +import ( + "context" + + k8smetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/types" + "k8s.io/client-go/kubernetes/scheme" + "k8s.io/client-go/rest" + + v1 "kubevirt.io/api/core/v1" +) + +func (k *kubevirt) KubeVirt(namespace string) KubeVirtInterface { + return &kv{ + restClient: k.restClient, + namespace: namespace, + resource: "kubevirts", + } +} + +type kv struct { + restClient *rest.RESTClient + namespace string + resource string +} + +// Create new KubeVirt in the cluster to specified namespace +func (o *kv) Create(vm *v1.KubeVirt) (*v1.KubeVirt, error) { + newKv := &v1.KubeVirt{} + err := o.restClient.Post(). + Resource(o.resource). + Namespace(o.namespace). + Body(vm). + Do(context.Background()). + Into(newKv) + + newKv.SetGroupVersionKind(v1.KubeVirtGroupVersionKind) + + return newKv, err +} + +// Get the KubeVirt from the cluster by its name and namespace +func (o *kv) Get(name string, options *k8smetav1.GetOptions) (*v1.KubeVirt, error) { + newKv := &v1.KubeVirt{} + err := o.restClient.Get(). + Resource(o.resource). + Namespace(o.namespace). + Name(name). + VersionedParams(options, scheme.ParameterCodec). + Do(context.Background()). + Into(newKv) + + newKv.SetGroupVersionKind(v1.KubeVirtGroupVersionKind) + + return newKv, err +} + +// Update the KubeVirt instance in the cluster in given namespace +func (o *kv) Update(vm *v1.KubeVirt) (*v1.KubeVirt, error) { + updatedVm := &v1.KubeVirt{} + err := o.restClient.Put(). + Resource(o.resource). + Namespace(o.namespace). + Name(vm.Name). + Body(vm). + Do(context.Background()). + Into(updatedVm) + + updatedVm.SetGroupVersionKind(v1.KubeVirtGroupVersionKind) + + return updatedVm, err +} + +// Delete the defined KubeVirt in the cluster in defined namespace +func (o *kv) Delete(name string, options *k8smetav1.DeleteOptions) error { + err := o.restClient.Delete(). + Resource(o.resource). + Namespace(o.namespace). + Name(name). + Body(options). + Do(context.Background()). + Error() + + return err +} + +// List all KubeVirts in given namespace +func (o *kv) List(options *k8smetav1.ListOptions) (*v1.KubeVirtList, error) { + newKvList := &v1.KubeVirtList{} + err := o.restClient.Get(). + Resource(o.resource). + Namespace(o.namespace). + VersionedParams(options, scheme.ParameterCodec). + Do(context.Background()). + Into(newKvList) + + for _, vm := range newKvList.Items { + vm.SetGroupVersionKind(v1.KubeVirtGroupVersionKind) + } + + return newKvList, err +} + +func (v *kv) Patch(name string, pt types.PatchType, data []byte, patchOptions *k8smetav1.PatchOptions, subresources ...string) (result *v1.KubeVirt, err error) { + result = &v1.KubeVirt{} + err = v.restClient.Patch(pt). + Namespace(v.namespace). + Resource(v.resource). + SubResource(subresources...). + VersionedParams(patchOptions, scheme.ParameterCodec). + Name(name). + Body(data). + Do(context.Background()). + Into(result) + return result, err +} + +func (v *kv) PatchStatus(name string, pt types.PatchType, data []byte, patchOptions *k8smetav1.PatchOptions) (result *v1.KubeVirt, err error) { + result = &v1.KubeVirt{} + err = v.restClient.Patch(pt). + Namespace(v.namespace). + Resource(v.resource). + SubResource("status"). + VersionedParams(patchOptions, scheme.ParameterCodec). + Name(name). + Body(data). + Do(context.Background()). + Into(result) + return +} + +func (v *kv) UpdateStatus(vmi *v1.KubeVirt) (result *v1.KubeVirt, err error) { + result = &v1.KubeVirt{} + err = v.restClient.Put(). + Name(vmi.ObjectMeta.Name). + Namespace(v.namespace). + Resource(v.resource). + SubResource("status"). + Body(vmi). + Do(context.Background()). + Into(result) + result.SetGroupVersionKind(v1.KubeVirtGroupVersionKind) + return +} diff --git a/vendor/kubevirt.io/client-go/kubecli/migration.go b/vendor/kubevirt.io/client-go/kubecli/migration.go new file mode 100644 index 000000000000..64d184ca508b --- /dev/null +++ b/vendor/kubevirt.io/client-go/kubecli/migration.go @@ -0,0 +1,163 @@ +/* + * This file is part of the KubeVirt project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Copyright 2018 Red Hat, Inc. + * + */ + +package kubecli + +import ( + "context" + + k8smetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/types" + "k8s.io/client-go/kubernetes/scheme" + "k8s.io/client-go/rest" + + v1 "kubevirt.io/api/core/v1" +) + +func (k *kubevirt) VirtualMachineInstanceMigration(namespace string) VirtualMachineInstanceMigrationInterface { + return &migration{ + restClient: k.restClient, + namespace: namespace, + resource: "virtualmachineinstancemigrations", + } +} + +type migration struct { + restClient *rest.RESTClient + namespace string + resource string +} + +// Create new VirtualMachineInstanceMigration in the cluster to specified namespace +func (o *migration) Create(newMigration *v1.VirtualMachineInstanceMigration, options *k8smetav1.CreateOptions) (*v1.VirtualMachineInstanceMigration, error) { + newMigrationResult := &v1.VirtualMachineInstanceMigration{} + err := o.restClient.Post(). + Resource(o.resource). + Namespace(o.namespace). + Body(newMigration). + VersionedParams(options, scheme.ParameterCodec). + Do(context.Background()). + Into(newMigrationResult) + + newMigrationResult.SetGroupVersionKind(v1.VirtualMachineInstanceMigrationGroupVersionKind) + + return newMigrationResult, err +} + +// Get the VirtualMachineInstanceMigration from the cluster by its name and namespace +func (o *migration) Get(name string, options *k8smetav1.GetOptions) (*v1.VirtualMachineInstanceMigration, error) { + newVm := &v1.VirtualMachineInstanceMigration{} + err := o.restClient.Get(). + Resource(o.resource). + Namespace(o.namespace). + Name(name). + VersionedParams(options, scheme.ParameterCodec). + Do(context.Background()). + Into(newVm) + + newVm.SetGroupVersionKind(v1.VirtualMachineInstanceMigrationGroupVersionKind) + + return newVm, err +} + +// Update the VirtualMachineInstanceMigration instance in the cluster in given namespace +func (o *migration) Update(migration *v1.VirtualMachineInstanceMigration) (*v1.VirtualMachineInstanceMigration, error) { + updatedVm := &v1.VirtualMachineInstanceMigration{} + err := o.restClient.Put(). + Resource(o.resource). + Namespace(o.namespace). + Name(migration.Name). + Body(migration). + Do(context.Background()). + Into(updatedVm) + + updatedVm.SetGroupVersionKind(v1.VirtualMachineInstanceMigrationGroupVersionKind) + + return updatedVm, err +} + +// Delete the defined VirtualMachineInstanceMigration in the cluster in defined namespace +func (o *migration) Delete(name string, options *k8smetav1.DeleteOptions) error { + err := o.restClient.Delete(). + Resource(o.resource). + Namespace(o.namespace). + Name(name). + Body(options). + Do(context.Background()). + Error() + + return err +} + +// List all VirtualMachineInstanceMigrations in given namespace +func (o *migration) List(options *k8smetav1.ListOptions) (*v1.VirtualMachineInstanceMigrationList, error) { + newVmList := &v1.VirtualMachineInstanceMigrationList{} + err := o.restClient.Get(). + Resource(o.resource). + Namespace(o.namespace). + VersionedParams(options, scheme.ParameterCodec). + Do(context.Background()). + Into(newVmList) + + for _, migration := range newVmList.Items { + migration.SetGroupVersionKind(v1.VirtualMachineInstanceMigrationGroupVersionKind) + } + + return newVmList, err +} + +func (v *migration) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.VirtualMachineInstanceMigration, err error) { + result = &v1.VirtualMachineInstanceMigration{} + err = v.restClient.Patch(pt). + Namespace(v.namespace). + Resource(v.resource). + SubResource(subresources...). + Name(name). + Body(data). + Do(context.Background()). + Into(result) + return result, err +} + +func (v *migration) PatchStatus(name string, pt types.PatchType, data []byte) (result *v1.VirtualMachineInstanceMigration, err error) { + result = &v1.VirtualMachineInstanceMigration{} + err = v.restClient.Patch(pt). + Namespace(v.namespace). + Resource(v.resource). + SubResource("status"). + Name(name). + Body(data). + Do(context.Background()). + Into(result) + return +} + +func (v *migration) UpdateStatus(vmi *v1.VirtualMachineInstanceMigration) (result *v1.VirtualMachineInstanceMigration, err error) { + result = &v1.VirtualMachineInstanceMigration{} + err = v.restClient.Put(). + Name(vmi.ObjectMeta.Name). + Namespace(v.namespace). + Resource(v.resource). + SubResource("status"). + Body(vmi). + Do(context.Background()). + Into(result) + result.SetGroupVersionKind(v1.VirtualMachineInstanceMigrationGroupVersionKind) + return +} diff --git a/vendor/kubevirt.io/client-go/kubecli/profiler.go b/vendor/kubevirt.io/client-go/kubecli/profiler.go new file mode 100644 index 000000000000..f554373f28c1 --- /dev/null +++ b/vendor/kubevirt.io/client-go/kubecli/profiler.go @@ -0,0 +1,131 @@ +/* + * This file is part of the KubeVirt project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Copyright 2018 Red Hat, Inc. + * + */ + +package kubecli + +import ( + "context" + "encoding/json" + "fmt" + "net/url" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/client-go/rest" + + v1 "kubevirt.io/api/core/v1" +) + +func (k *kubevirt) ClusterProfiler() *ClusterProfiler { + return &ClusterProfiler{ + restClient: k.restClient, + resource: "cluster-profiler", + } +} + +type ClusterProfiler struct { + restClient *rest.RESTClient + resource string +} + +func (v *ClusterProfiler) preferredVersion() (string, error) { + var group metav1.APIGroup + // First, find out which version to query + uri := ApiGroupName + result := v.restClient.Get().RequestURI(uri).Do(context.Background()) + if data, err := result.Raw(); err != nil { + connErr, isConnectionErr := err.(*url.Error) + + if isConnectionErr { + return "", connErr.Err + } + + return "", err + } else if err = json.Unmarshal(data, &group); err != nil { + return "", err + } + + return group.PreferredVersion.GroupVersion, nil + +} + +func (v *ClusterProfiler) Start() error { + preferredVersion, err := v.preferredVersion() + if err != nil { + return err + } + + // Now, query the preferred version + uri := fmt.Sprintf("/apis/%s/start-cluster-profiler", preferredVersion) + + return v.restClient.Get().RequestURI(uri).Do(context.Background()).Error() +} + +func (v *ClusterProfiler) Stop() error { + preferredVersion, err := v.preferredVersion() + if err != nil { + + return fmt.Errorf("error encountered while detecting preferred version: %v", err) + } + + // Now, query the preferred version + uri := fmt.Sprintf("/apis/%s/stop-cluster-profiler", preferredVersion) + + return v.restClient.Get().RequestURI(uri).Do(context.Background()).Error() +} + +// Dump returns at most cpRequest.PageSize profiler results. To fetch results from all kubevirt pods +// Dump should be called with Continue fields set to Continue field value from the response to a previous request. +// This should be repeated until Continue or ComponentsResult field in ClusterProfilerResponse is empty. +func (v *ClusterProfiler) Dump(cpRequest *v1.ClusterProfilerRequest) (*v1.ClusterProfilerResults, error) { + preferredVersion, err := v.preferredVersion() + if err != nil { + return nil, err + } + + if cpRequest == nil { + return nil, fmt.Errorf("request body can't be nil") + } + + bytes, err := json.Marshal(cpRequest) + if err != nil { + return nil, err + } + + // Now, query the preferred version + uri := fmt.Sprintf("/apis/%s/dump-cluster-profiler", preferredVersion) + + var profileResults v1.ClusterProfilerResults + + result := v.restClient.Get().RequestURI(uri).Body(bytes).Do(context.Background()) + if data, err := result.Raw(); err != nil { + connErr, isConnectionErr := err.(*url.Error) + + if isConnectionErr { + return nil, connErr.Err + } + + return nil, err + } else if len(data) == 0 { + return &profileResults, nil + } else if err = json.Unmarshal(data, &profileResults); err != nil { + return nil, err + } + + return &profileResults, nil +} diff --git a/vendor/kubevirt.io/client-go/kubecli/replicaset.go b/vendor/kubevirt.io/client-go/kubecli/replicaset.go new file mode 100644 index 000000000000..426301017af1 --- /dev/null +++ b/vendor/kubevirt.io/client-go/kubecli/replicaset.go @@ -0,0 +1,170 @@ +/* + * This file is part of the KubeVirt project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Copyright 2017 Red Hat, Inc. + * + */ + +package kubecli + +import ( + "context" + + autov1 "k8s.io/api/autoscaling/v1" + k8smetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/types" + "k8s.io/client-go/kubernetes/scheme" + "k8s.io/client-go/rest" + + v1 "kubevirt.io/api/core/v1" +) + +func (k *kubevirt) ReplicaSet(namespace string) ReplicaSetInterface { + return &rc{k.restClient, namespace, "virtualmachineinstancereplicasets"} +} + +type rc struct { + restClient *rest.RESTClient + namespace string + resource string +} + +func (v *rc) GetScale(replicaSetName string, options k8smetav1.GetOptions) (result *autov1.Scale, err error) { + result = &autov1.Scale{} + err = v.restClient.Get(). + Namespace(v.namespace). + Resource(v.resource). + Name(replicaSetName). + SubResource("scale"). + Do(context.Background()). + Into(result) + return +} + +func (v *rc) UpdateScale(replicaSetName string, scale *autov1.Scale) (result *autov1.Scale, err error) { + result = &autov1.Scale{} + err = v.restClient.Put(). + Namespace(v.namespace). + Resource(v.resource). + Name(replicaSetName). + SubResource("scale"). + Body(scale). + Do(context.Background()). + Into(result) + return +} + +func (v *rc) Get(name string, options k8smetav1.GetOptions) (replicaset *v1.VirtualMachineInstanceReplicaSet, err error) { + replicaset = &v1.VirtualMachineInstanceReplicaSet{} + err = v.restClient.Get(). + Resource(v.resource). + Namespace(v.namespace). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(context.Background()). + Into(replicaset) + replicaset.SetGroupVersionKind(v1.VirtualMachineInstanceReplicaSetGroupVersionKind) + return +} + +func (v *rc) List(options k8smetav1.ListOptions) (replicasetList *v1.VirtualMachineInstanceReplicaSetList, err error) { + replicasetList = &v1.VirtualMachineInstanceReplicaSetList{} + err = v.restClient.Get(). + Resource(v.resource). + Namespace(v.namespace). + VersionedParams(&options, scheme.ParameterCodec). + Do(context.Background()). + Into(replicasetList) + for _, replicaset := range replicasetList.Items { + replicaset.SetGroupVersionKind(v1.VirtualMachineInstanceReplicaSetGroupVersionKind) + } + + return +} + +func (v *rc) Create(replicaset *v1.VirtualMachineInstanceReplicaSet) (result *v1.VirtualMachineInstanceReplicaSet, err error) { + result = &v1.VirtualMachineInstanceReplicaSet{} + err = v.restClient.Post(). + Namespace(v.namespace). + Resource(v.resource). + Body(replicaset). + Do(context.Background()). + Into(result) + result.SetGroupVersionKind(v1.VirtualMachineInstanceReplicaSetGroupVersionKind) + return +} + +func (v *rc) Update(replicaset *v1.VirtualMachineInstanceReplicaSet) (result *v1.VirtualMachineInstanceReplicaSet, err error) { + result = &v1.VirtualMachineInstanceReplicaSet{} + err = v.restClient.Put(). + Name(replicaset.ObjectMeta.Name). + Namespace(v.namespace). + Resource(v.resource). + Body(replicaset). + Do(context.Background()). + Into(result) + result.SetGroupVersionKind(v1.VirtualMachineInstanceReplicaSetGroupVersionKind) + return +} + +func (v *rc) Delete(name string, options *k8smetav1.DeleteOptions) error { + return v.restClient.Delete(). + Namespace(v.namespace). + Resource(v.resource). + Name(name). + Body(options). + Do(context.Background()). + Error() +} + +func (v *rc) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.VirtualMachineInstanceReplicaSet, err error) { + result = &v1.VirtualMachineInstanceReplicaSet{} + err = v.restClient.Patch(pt). + Namespace(v.namespace). + Resource(v.resource). + SubResource(subresources...). + Name(name). + Body(data). + Do(context.Background()). + Into(result) + return +} + +func (v *rc) PatchStatus(name string, pt types.PatchType, data []byte) (result *v1.VirtualMachineInstanceReplicaSet, err error) { + result = &v1.VirtualMachineInstanceReplicaSet{} + err = v.restClient.Patch(pt). + Namespace(v.namespace). + Resource(v.resource). + SubResource("status"). + Name(name). + Body(data). + Do(context.Background()). + Into(result) + return +} + +func (v *rc) UpdateStatus(vmi *v1.VirtualMachineInstanceReplicaSet) (result *v1.VirtualMachineInstanceReplicaSet, err error) { + result = &v1.VirtualMachineInstanceReplicaSet{} + err = v.restClient.Put(). + Name(vmi.ObjectMeta.Name). + Namespace(v.namespace). + Resource(v.resource). + SubResource("status"). + Body(vmi). + Do(context.Background()). + Into(result) + result.SetGroupVersionKind(v1.VirtualMachineInstanceReplicaSetGroupVersionKind) + return +} diff --git a/vendor/kubevirt.io/client-go/kubecli/streamer.go b/vendor/kubevirt.io/client-go/kubecli/streamer.go new file mode 100644 index 000000000000..0103a1a4e31b --- /dev/null +++ b/vendor/kubevirt.io/client-go/kubecli/streamer.go @@ -0,0 +1,55 @@ +package kubecli + +import ( + "net" + "time" + + "github.com/gorilla/websocket" +) + +type wsStreamer struct { + conn *websocket.Conn + done chan struct{} +} + +func (ws *wsStreamer) streamDone() { + close(ws.done) +} + +func (ws *wsStreamer) Stream(options StreamOptions) error { + copyErr := make(chan error, 1) + + go func() { + _, err := CopyTo(ws.conn, options.In) + copyErr <- err + }() + + go func() { + _, err := CopyFrom(options.Out, ws.conn) + copyErr <- err + }() + + defer ws.streamDone() + return <-copyErr +} + +func (ws *wsStreamer) AsConn() net.Conn { + return &wsConn{ + Conn: ws.conn, + binaryReader: &binaryReader{conn: ws.conn}, + binaryWriter: &binaryWriter{conn: ws.conn}, + } +} + +type wsConn struct { + *websocket.Conn + *binaryReader + *binaryWriter +} + +func (c *wsConn) SetDeadline(t time.Time) error { + if err := c.Conn.SetWriteDeadline(t); err != nil { + return err + } + return c.Conn.SetReadDeadline(t) +} diff --git a/vendor/kubevirt.io/client-go/kubecli/version.go b/vendor/kubevirt.io/client-go/kubecli/version.go new file mode 100644 index 000000000000..7c14ef44bb59 --- /dev/null +++ b/vendor/kubevirt.io/client-go/kubecli/version.go @@ -0,0 +1,88 @@ +/* + * This file is part of the KubeVirt project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Copyright 2018 Red Hat, Inc. + * + */ + +package kubecli + +import ( + "context" + + "encoding/json" + "fmt" + "net/url" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/client-go/rest" + + v1 "kubevirt.io/api/core/v1" + + "kubevirt.io/client-go/version" +) + +const ( + ApiGroupName = "/apis/" + v1.SubresourceGroupName +) + +func (k *kubevirt) ServerVersion() ServerVersionInterface { + return &ServerVersion{ + restClient: k.restClient, + resource: "version", + } +} + +type ServerVersion struct { + restClient *rest.RESTClient + resource string +} + +func (v *ServerVersion) Get() (*version.Info, error) { + + var group metav1.APIGroup + // First, find out which version to query + uri := ApiGroupName + result := v.restClient.Get().RequestURI(uri).Do(context.Background()) + if data, err := result.Raw(); err != nil { + connErr, isConnectionErr := err.(*url.Error) + + if isConnectionErr { + return nil, connErr.Err + } + + return nil, err + } else if err = json.Unmarshal(data, &group); err != nil { + return nil, err + } + + // Now, query the preferred version + uri = fmt.Sprintf("/apis/%s/version", group.PreferredVersion.GroupVersion) + var serverInfo version.Info + + result = v.restClient.Get().RequestURI(uri).Do(context.Background()) + if data, err := result.Raw(); err != nil { + connErr, isConnectionErr := err.(*url.Error) + + if isConnectionErr { + return nil, connErr.Err + } + + return nil, err + } else if err = json.Unmarshal(data, &serverInfo); err != nil { + return nil, err + } + return &serverInfo, nil +} diff --git a/vendor/kubevirt.io/client-go/kubecli/vm.go b/vendor/kubevirt.io/client-go/kubecli/vm.go new file mode 100644 index 000000000000..89d7ca76ce72 --- /dev/null +++ b/vendor/kubevirt.io/client-go/kubecli/vm.go @@ -0,0 +1,257 @@ +/* + * This file is part of the KubeVirt project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Copyright 2018 Red Hat, Inc. + * + */ + +package kubecli + +import ( + "context" + + "encoding/json" + "fmt" + + k8smetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/types" + "k8s.io/client-go/kubernetes/scheme" + "k8s.io/client-go/rest" + + v1 "kubevirt.io/api/core/v1" +) + +const ( + cannotMarshalJSONErrFmt = "Cannot Marshal to json: %s" + vmSubresourceURLFmt = "/apis/subresources.kubevirt.io/%s/namespaces/%s/virtualmachines/%s/%s" +) + +func (k *kubevirt) VirtualMachine(namespace string) VirtualMachineInterface { + return &vm{ + restClient: k.restClient, + config: k.config, + namespace: namespace, + resource: "virtualmachines", + } +} + +type vm struct { + restClient *rest.RESTClient + config *rest.Config + namespace string + resource string +} + +// Create new VirtualMachine in the cluster to specified namespace +func (v *vm) Create(vm *v1.VirtualMachine) (*v1.VirtualMachine, error) { + newVm := &v1.VirtualMachine{} + err := v.restClient.Post(). + Resource(v.resource). + Namespace(v.namespace). + Body(vm). + Do(context.Background()). + Into(newVm) + + newVm.SetGroupVersionKind(v1.VirtualMachineGroupVersionKind) + + return newVm, err +} + +// Get the Virtual machine from the cluster by its name and namespace +func (v *vm) Get(name string, options *k8smetav1.GetOptions) (*v1.VirtualMachine, error) { + newVm := &v1.VirtualMachine{} + err := v.restClient.Get(). + Resource(v.resource). + Namespace(v.namespace). + Name(name). + VersionedParams(options, scheme.ParameterCodec). + Do(context.Background()). + Into(newVm) + + newVm.SetGroupVersionKind(v1.VirtualMachineGroupVersionKind) + + return newVm, err +} + +// Update the VirtualMachine instance in the cluster in given namespace +func (v *vm) Update(vm *v1.VirtualMachine) (*v1.VirtualMachine, error) { + updatedVm := &v1.VirtualMachine{} + err := v.restClient.Put(). + Resource(v.resource). + Namespace(v.namespace). + Name(vm.Name). + Body(vm). + Do(context.Background()). + Into(updatedVm) + + updatedVm.SetGroupVersionKind(v1.VirtualMachineGroupVersionKind) + + return updatedVm, err +} + +// Delete the defined VirtualMachine in the cluster in defined namespace +func (v *vm) Delete(name string, options *k8smetav1.DeleteOptions) error { + err := v.restClient.Delete(). + Resource(v.resource). + Namespace(v.namespace). + Name(name). + Body(options). + Do(context.Background()). + Error() + + return err +} + +// List all VirtualMachines in given namespace +func (v *vm) List(options *k8smetav1.ListOptions) (*v1.VirtualMachineList, error) { + newVmList := &v1.VirtualMachineList{} + err := v.restClient.Get(). + Resource(v.resource). + Namespace(v.namespace). + VersionedParams(options, scheme.ParameterCodec). + Do(context.Background()). + Into(newVmList) + + for _, vm := range newVmList.Items { + vm.SetGroupVersionKind(v1.VirtualMachineGroupVersionKind) + } + + return newVmList, err +} + +func (v *vm) Patch(name string, pt types.PatchType, data []byte, patchOptions *k8smetav1.PatchOptions, subresources ...string) (result *v1.VirtualMachine, err error) { + result = &v1.VirtualMachine{} + err = v.restClient.Patch(pt). + Namespace(v.namespace). + Resource(v.resource). + SubResource(subresources...). + VersionedParams(patchOptions, scheme.ParameterCodec). + Name(name). + Body(data). + Do(context.Background()). + Into(result) + return result, err +} + +func (v *vm) PatchStatus(name string, pt types.PatchType, data []byte, patchOptions *k8smetav1.PatchOptions) (result *v1.VirtualMachine, err error) { + result = &v1.VirtualMachine{} + err = v.restClient.Patch(pt). + Namespace(v.namespace). + Resource(v.resource). + SubResource("status"). + VersionedParams(patchOptions, scheme.ParameterCodec). + Name(name). + Body(data). + Do(context.Background()). + Into(result) + return +} + +func (v *vm) UpdateStatus(vmi *v1.VirtualMachine) (result *v1.VirtualMachine, err error) { + result = &v1.VirtualMachine{} + err = v.restClient.Put(). + Name(vmi.ObjectMeta.Name). + Namespace(v.namespace). + Resource(v.resource). + SubResource("status"). + Body(vmi). + Do(context.Background()). + Into(result) + result.SetGroupVersionKind(v1.VirtualMachineGroupVersionKind) + return +} + +func (v *vm) Restart(name string, restartOptions *v1.RestartOptions) error { + body, err := json.Marshal(restartOptions) + if err != nil { + return fmt.Errorf(cannotMarshalJSONErrFmt, err) + } + uri := fmt.Sprintf(vmSubresourceURLFmt, v1.ApiStorageVersion, v.namespace, name, "restart") + return v.restClient.Put().RequestURI(uri).Body(body).Do(context.Background()).Error() +} + +func (v *vm) ForceRestart(name string, restartOptions *v1.RestartOptions) error { + body, err := json.Marshal(restartOptions) + if err != nil { + return fmt.Errorf(cannotMarshalJSONErrFmt, err) + } + uri := fmt.Sprintf(vmSubresourceURLFmt, v1.ApiStorageVersion, v.namespace, name, "restart") + return v.restClient.Put().RequestURI(uri).Body(body).Do(context.Background()).Error() +} + +func (v *vm) Start(name string, startOptions *v1.StartOptions) error { + uri := fmt.Sprintf(vmSubresourceURLFmt, v1.ApiStorageVersion, v.namespace, name, "start") + + optsJson, err := json.Marshal(startOptions) + if err != nil { + return err + } + return v.restClient.Put().RequestURI(uri).Body(optsJson).Do(context.Background()).Error() +} + +func (v *vm) Stop(name string, stopOptions *v1.StopOptions) error { + uri := fmt.Sprintf(vmSubresourceURLFmt, v1.ApiStorageVersion, v.namespace, name, "stop") + optsJson, err := json.Marshal(stopOptions) + if err != nil { + return err + } + return v.restClient.Put().RequestURI(uri).Body(optsJson).Do(context.Background()).Error() +} + +func (v *vm) ForceStop(name string, stopOptions *v1.StopOptions) error { + body, err := json.Marshal(stopOptions) + if err != nil { + return fmt.Errorf(cannotMarshalJSONErrFmt, err) + } + uri := fmt.Sprintf(vmSubresourceURLFmt, v1.ApiStorageVersion, v.namespace, name, "stop") + return v.restClient.Put().RequestURI(uri).Body(body).Do(context.Background()).Error() +} + +func (v *vm) Migrate(name string, migrateOptions *v1.MigrateOptions) error { + uri := fmt.Sprintf(vmSubresourceURLFmt, v1.ApiStorageVersion, v.namespace, name, "migrate") + optsJson, err := json.Marshal(migrateOptions) + if err != nil { + return err + } + return v.restClient.Put().RequestURI(uri).Body(optsJson).Do(context.Background()).Error() +} + +func (v *vm) AddVolume(name string, addVolumeOptions *v1.AddVolumeOptions) error { + uri := fmt.Sprintf(vmSubresourceURLFmt, v1.ApiStorageVersion, v.namespace, name, "addvolume") + + JSON, err := json.Marshal(addVolumeOptions) + + if err != nil { + return err + } + + return v.restClient.Put().RequestURI(uri).Body([]byte(JSON)).Do(context.Background()).Error() +} + +func (v *vm) RemoveVolume(name string, removeVolumeOptions *v1.RemoveVolumeOptions) error { + uri := fmt.Sprintf(vmSubresourceURLFmt, v1.ApiStorageVersion, v.namespace, name, "removevolume") + + JSON, err := json.Marshal(removeVolumeOptions) + + if err != nil { + return err + } + + return v.restClient.Put().RequestURI(uri).Body([]byte(JSON)).Do(context.Background()).Error() +} + +func (v *vm) PortForward(name string, port int, protocol string) (StreamInterface, error) { + return asyncSubresourceHelper(v.config, v.resource, v.namespace, name, buildPortForwardResourcePath(port, protocol)) +} diff --git a/vendor/kubevirt.io/client-go/kubecli/vmi.go b/vendor/kubevirt.io/client-go/kubecli/vmi.go new file mode 100644 index 000000000000..794cbe24a74d --- /dev/null +++ b/vendor/kubevirt.io/client-go/kubecli/vmi.go @@ -0,0 +1,477 @@ +/* + * This file is part of the KubeVirt project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Copyright 2017 Red Hat, Inc. + * + */ + +package kubecli + +import ( + "context" + + "encoding/json" + "fmt" + "io/ioutil" + "net/http" + "net/url" + "path" + "strconv" + "strings" + "time" + + "github.com/gorilla/websocket" + "k8s.io/apimachinery/pkg/api/errors" + k8smetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/types" + "k8s.io/apimachinery/pkg/watch" + "k8s.io/client-go/kubernetes" + "k8s.io/client-go/kubernetes/scheme" + "k8s.io/client-go/rest" + + v1 "kubevirt.io/api/core/v1" + + "kubevirt.io/client-go/log" + "kubevirt.io/client-go/subresources" +) + +const vmiSubresourceURL = "/apis/subresources.kubevirt.io/%s/namespaces/%s/virtualmachineinstances/%s/%s" + +func (k *kubevirt) VirtualMachineInstance(namespace string) VirtualMachineInstanceInterface { + return &vmis{ + restClient: k.restClient, + config: k.config, + clientSet: k.Clientset, + namespace: namespace, + resource: "virtualmachineinstances", + } +} + +type vmis struct { + restClient *rest.RESTClient + config *rest.Config + clientSet *kubernetes.Clientset + namespace string + resource string + master string + kubeconfig string +} + +type RoundTripCallback func(conn *websocket.Conn, resp *http.Response, err error) error + +type WebsocketRoundTripper struct { + Dialer *websocket.Dialer + Do RoundTripCallback +} + +func (d *WebsocketRoundTripper) RoundTrip(r *http.Request) (*http.Response, error) { + conn, resp, err := d.Dialer.Dial(r.URL.String(), r.Header) + if err == nil { + defer conn.Close() + } + return resp, d.Do(conn, resp, err) +} + +type asyncWSRoundTripper struct { + Done chan struct{} + Connection chan *websocket.Conn +} + +func (aws *asyncWSRoundTripper) WebsocketCallback(ws *websocket.Conn, resp *http.Response, err error) error { + + if err != nil { + if resp != nil && resp.StatusCode != http.StatusOK { + return enrichError(err, resp) + } + return fmt.Errorf("Can't connect to websocket: %s\n", err.Error()) + } + aws.Connection <- ws + + // Keep the roundtripper open until we are done with the stream + <-aws.Done + return nil +} + +func roundTripperFromConfig(config *rest.Config, callback RoundTripCallback) (http.RoundTripper, error) { + + // Configure TLS + tlsConfig, err := rest.TLSConfigFor(config) + if err != nil { + return nil, err + } + + // Configure the websocket dialer + dialer := &websocket.Dialer{ + Proxy: http.ProxyFromEnvironment, + TLSClientConfig: tlsConfig, + WriteBufferSize: WebsocketMessageBufferSize, + ReadBufferSize: WebsocketMessageBufferSize, + Subprotocols: []string{subresources.PlainStreamProtocolName}, + } + + // Create a roundtripper which will pass in the final underlying websocket connection to a callback + rt := &WebsocketRoundTripper{ + Do: callback, + Dialer: dialer, + } + + // Make sure we inherit all relevant security headers + return rest.HTTPWrappersForConfig(config, rt) +} + +func RequestFromConfig(config *rest.Config, resource, name, namespace, subresource string) (*http.Request, error) { + + u, err := url.Parse(config.Host) + if err != nil { + return nil, err + } + + switch u.Scheme { + case "https": + u.Scheme = "wss" + case "http": + u.Scheme = "ws" + default: + return nil, fmt.Errorf("Unsupported Protocol %s", u.Scheme) + } + + u.Path = path.Join( + u.Path, + fmt.Sprintf("/apis/subresources.kubevirt.io/%s/namespaces/%s/%s/%s/%s", v1.ApiStorageVersion, namespace, resource, name, subresource), + ) + req := &http.Request{ + Method: http.MethodGet, + URL: u, + Header: map[string][]string{}, + } + + return req, nil +} + +func (v *vmis) USBRedir(name string) (StreamInterface, error) { + return asyncSubresourceHelper(v.config, v.resource, v.namespace, name, "usbredir") +} + +func (v *vmis) VNC(name string) (StreamInterface, error) { + return asyncSubresourceHelper(v.config, v.resource, v.namespace, name, "vnc") +} + +func (v *vmis) PortForward(name string, port int, protocol string) (StreamInterface, error) { + return asyncSubresourceHelper(v.config, v.resource, v.namespace, name, buildPortForwardResourcePath(port, protocol)) +} + +func buildPortForwardResourcePath(port int, protocol string) string { + resource := strings.Builder{} + resource.WriteString("portforward/") + resource.WriteString(strconv.Itoa(port)) + + if len(protocol) > 0 { + resource.WriteString("/") + resource.WriteString(protocol) + } + + return resource.String() +} + +type connectionStruct struct { + con StreamInterface + err error +} + +type SerialConsoleOptions struct { + ConnectionTimeout time.Duration +} + +func (v *vmis) SerialConsole(name string, options *SerialConsoleOptions) (StreamInterface, error) { + + if options != nil && options.ConnectionTimeout != 0 { + timeoutChan := time.Tick(options.ConnectionTimeout) + connectionChan := make(chan connectionStruct) + + go func() { + for { + + select { + case <-timeoutChan: + connectionChan <- connectionStruct{ + con: nil, + err: fmt.Errorf("Timeout trying to connect to the virtual machine instance"), + } + return + default: + } + + con, err := asyncSubresourceHelper(v.config, v.resource, v.namespace, name, "console") + if err != nil { + asyncSubresourceError, ok := err.(*AsyncSubresourceError) + // return if response status code does not equal to 400 + if !ok || asyncSubresourceError.GetStatusCode() != http.StatusBadRequest { + connectionChan <- connectionStruct{con: nil, err: err} + return + } + + time.Sleep(1 * time.Second) + continue + } + + connectionChan <- connectionStruct{con: con, err: nil} + return + } + }() + conStruct := <-connectionChan + return conStruct.con, conStruct.err + } else { + return asyncSubresourceHelper(v.config, v.resource, v.namespace, name, "console") + } +} + +func (v *vmis) Freeze(name string, unfreezeTimeout time.Duration) error { + log.Log.Infof("Freeze VMI %s", name) + uri := fmt.Sprintf(vmiSubresourceURL, v1.ApiStorageVersion, v.namespace, name, "freeze") + + freezeUnfreezeTimeout := &v1.FreezeUnfreezeTimeout{ + UnfreezeTimeout: &metav1.Duration{ + Duration: unfreezeTimeout, + }, + } + + JSON, err := json.Marshal(freezeUnfreezeTimeout) + if err != nil { + return err + } + + return v.restClient.Put().RequestURI(uri).Body([]byte(JSON)).Do(context.Background()).Error() +} + +func (v *vmis) Unfreeze(name string) error { + log.Log.Infof("Unfreeze VMI %s", name) + uri := fmt.Sprintf(vmiSubresourceURL, v1.ApiStorageVersion, v.namespace, name, "unfreeze") + return v.restClient.Put().RequestURI(uri).Do(context.Background()).Error() +} + +func (v *vmis) SoftReboot(name string) error { + log.Log.Infof("SoftReboot VMI") + uri := fmt.Sprintf(vmiSubresourceURL, v1.ApiStorageVersion, v.namespace, name, "softreboot") + return v.restClient.Put().RequestURI(uri).Do(context.Background()).Error() +} + +func (v *vmis) Pause(name string, pauseOptions *v1.PauseOptions) error { + body, err := json.Marshal(pauseOptions) + if err != nil { + return fmt.Errorf("Cannot Marshal to json: %s", err) + } + uri := fmt.Sprintf(vmiSubresourceURL, v1.ApiStorageVersion, v.namespace, name, "pause") + return v.restClient.Put().RequestURI(uri).Body(body).Do(context.Background()).Error() +} + +func (v *vmis) Unpause(name string, unpauseOptions *v1.UnpauseOptions) error { + body, err := json.Marshal(unpauseOptions) + if err != nil { + return fmt.Errorf("Cannot Marshal to json: %s", err) + } + uri := fmt.Sprintf(vmiSubresourceURL, v1.ApiStorageVersion, v.namespace, name, "unpause") + return v.restClient.Put().RequestURI(uri).Body(body).Do(context.Background()).Error() +} + +func (v *vmis) Get(name string, options *k8smetav1.GetOptions) (vmi *v1.VirtualMachineInstance, err error) { + vmi = &v1.VirtualMachineInstance{} + err = v.restClient.Get(). + Resource(v.resource). + Namespace(v.namespace). + Name(name). + VersionedParams(options, scheme.ParameterCodec). + Do(context.Background()). + Into(vmi) + vmi.SetGroupVersionKind(v1.VirtualMachineInstanceGroupVersionKind) + return +} + +func (v *vmis) List(options *k8smetav1.ListOptions) (vmiList *v1.VirtualMachineInstanceList, err error) { + vmiList = &v1.VirtualMachineInstanceList{} + err = v.restClient.Get(). + Resource(v.resource). + Namespace(v.namespace). + VersionedParams(options, scheme.ParameterCodec). + Do(context.Background()). + Into(vmiList) + for _, vmi := range vmiList.Items { + vmi.SetGroupVersionKind(v1.VirtualMachineInstanceGroupVersionKind) + } + + return +} + +func (v *vmis) Create(vmi *v1.VirtualMachineInstance) (result *v1.VirtualMachineInstance, err error) { + result = &v1.VirtualMachineInstance{} + err = v.restClient.Post(). + Namespace(v.namespace). + Resource(v.resource). + Body(vmi). + Do(context.Background()). + Into(result) + result.SetGroupVersionKind(v1.VirtualMachineInstanceGroupVersionKind) + return +} + +func (v *vmis) Update(vmi *v1.VirtualMachineInstance) (result *v1.VirtualMachineInstance, err error) { + result = &v1.VirtualMachineInstance{} + err = v.restClient.Put(). + Name(vmi.ObjectMeta.Name). + Namespace(v.namespace). + Resource(v.resource). + Body(vmi). + Do(context.Background()). + Into(result) + result.SetGroupVersionKind(v1.VirtualMachineInstanceGroupVersionKind) + return +} + +func (v *vmis) Delete(name string, options *k8smetav1.DeleteOptions) error { + return v.restClient.Delete(). + Namespace(v.namespace). + Resource(v.resource). + Name(name). + Body(options). + Do(context.Background()). + Error() +} + +func (v *vmis) Patch(name string, pt types.PatchType, data []byte, patchOptions *k8smetav1.PatchOptions, subresources ...string) (result *v1.VirtualMachineInstance, err error) { + result = &v1.VirtualMachineInstance{} + err = v.restClient.Patch(pt). + Namespace(v.namespace). + Resource(v.resource). + SubResource(subresources...). + Name(name). + VersionedParams(patchOptions, scheme.ParameterCodec). + Body(data). + Do(context.Background()). + Into(result) + return +} + +func (v *vmis) Watch(opts metav1.ListOptions) (watch.Interface, error) { + opts.Watch = true + return v.restClient.Get(). + Resource(v.resource). + Namespace(v.namespace). + VersionedParams(&opts, scheme.ParameterCodec). + Watch(context.Background()) +} + +// enrichError checks the response body for a k8s Status object and extracts the error from it. +// TODO the k8s http REST client has very sophisticated handling, investigate on how we can reuse it +func enrichError(httpErr error, resp *http.Response) error { + if resp == nil { + return httpErr + } + httpErr = fmt.Errorf("Can't connect to websocket (%d): %s\n", resp.StatusCode, httpErr) + status := &k8smetav1.Status{} + + if resp.Header.Get("Content-Type") != "application/json" { + return httpErr + } + // decode, but if the result is Status return that as an error instead. + body, err := ioutil.ReadAll(resp.Body) + if err != nil { + return err + } + if len(body) == 0 { + return httpErr + } + err = json.Unmarshal(body, status) + if err != nil { + return err + } + if status.Kind == "Status" && status.APIVersion == "v1" { + if status.Status != k8smetav1.StatusSuccess { + return errors.FromObject(status) + } + } + return httpErr +} + +func (v *vmis) GuestOsInfo(name string) (v1.VirtualMachineInstanceGuestAgentInfo, error) { + guestInfo := v1.VirtualMachineInstanceGuestAgentInfo{} + uri := fmt.Sprintf(vmiSubresourceURL, v1.ApiStorageVersion, v.namespace, name, "guestosinfo") + + // WORKAROUND: + // When doing v.restClient.Get().RequestURI(uri).Do(context.Background()).Into(guestInfo) + // k8s client-go requires the object to have metav1.ObjectMeta inlined and deepcopy generated + // without deepcopy the Into does not work. + // With metav1.ObjectMeta added the openapi validation fails on pkg/virt-api/api.go:310 + // When returning object the openapi schema validation fails on invalid type field for + // metav1.ObjectMeta.CreationTimestamp of type time (the schema validation fails, not the object validation). + // In our schema we implemented workaround to have multiple types for this field (null, string), which is causing issues + // with deserialization. + // The issue popped up for this code since this is the first time anything is returned. + // + // The issue is present because KubeVirt have to support multiple k8s version. In newer k8s version (1.17+) + // this issue should be solved. + // This workaround can go away once the least supported k8s version is the working one. + // The issue has been described in: https://github.com/kubevirt/kubevirt/issues/3059 + res := v.restClient.Get().RequestURI(uri).Do(context.Background()) + rawInfo, err := res.Raw() + if err != nil { + log.Log.Errorf("Cannot retrieve GuestOSInfo: %s", err.Error()) + return guestInfo, err + } + + err = json.Unmarshal(rawInfo, &guestInfo) + if err != nil { + log.Log.Errorf("Cannot unmarshal GuestOSInfo response: %s", err.Error()) + } + + return guestInfo, err +} + +func (v *vmis) UserList(name string) (v1.VirtualMachineInstanceGuestOSUserList, error) { + userList := v1.VirtualMachineInstanceGuestOSUserList{} + uri := fmt.Sprintf(vmiSubresourceURL, v1.ApiStorageVersion, v.namespace, name, "userlist") + err := v.restClient.Get().RequestURI(uri).Do(context.Background()).Into(&userList) + return userList, err +} + +func (v *vmis) FilesystemList(name string) (v1.VirtualMachineInstanceFileSystemList, error) { + fsList := v1.VirtualMachineInstanceFileSystemList{} + uri := fmt.Sprintf(vmiSubresourceURL, v1.ApiStorageVersion, v.namespace, name, "filesystemlist") + err := v.restClient.Get().RequestURI(uri).Do(context.Background()).Into(&fsList) + return fsList, err +} + +func (v *vmis) AddVolume(name string, addVolumeOptions *v1.AddVolumeOptions) error { + uri := fmt.Sprintf(vmiSubresourceURL, v1.ApiStorageVersion, v.namespace, name, "addvolume") + + JSON, err := json.Marshal(addVolumeOptions) + + if err != nil { + return err + } + + return v.restClient.Put().RequestURI(uri).Body([]byte(JSON)).Do(context.Background()).Error() +} + +func (v *vmis) RemoveVolume(name string, removeVolumeOptions *v1.RemoveVolumeOptions) error { + uri := fmt.Sprintf(vmiSubresourceURL, v1.ApiStorageVersion, v.namespace, name, "removevolume") + + JSON, err := json.Marshal(removeVolumeOptions) + + if err != nil { + return err + } + + return v.restClient.Put().RequestURI(uri).Body([]byte(JSON)).Do(context.Background()).Error() +} diff --git a/vendor/kubevirt.io/client-go/kubecli/vmipreset.go b/vendor/kubevirt.io/client-go/kubecli/vmipreset.go new file mode 100644 index 000000000000..b362557b54ec --- /dev/null +++ b/vendor/kubevirt.io/client-go/kubecli/vmipreset.go @@ -0,0 +1,117 @@ +/* + * This file is part of the KubeVirt project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Copyright 2017 Red Hat, Inc. + * + */ + +package kubecli + +import ( + "context" + + k8smetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/types" + "k8s.io/client-go/kubernetes/scheme" + "k8s.io/client-go/rest" + + v1 "kubevirt.io/api/core/v1" +) + +func (k *kubevirt) VirtualMachineInstancePreset(namespace string) VirtualMachineInstancePresetInterface { + return &vmiPresets{k.restClient, namespace, "virtualmachineinstancepresets"} +} + +type vmiPresets struct { + restClient *rest.RESTClient + namespace string + resource string +} + +func (v *vmiPresets) Get(name string, options k8smetav1.GetOptions) (vmi *v1.VirtualMachineInstancePreset, err error) { + vmi = &v1.VirtualMachineInstancePreset{} + err = v.restClient.Get(). + Resource(v.resource). + Namespace(v.namespace). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(context.Background()). + Into(vmi) + vmi.SetGroupVersionKind(v1.VirtualMachineInstancePresetGroupVersionKind) + return +} + +func (v *vmiPresets) List(options k8smetav1.ListOptions) (vmiList *v1.VirtualMachineInstancePresetList, err error) { + vmiList = &v1.VirtualMachineInstancePresetList{} + err = v.restClient.Get(). + Resource(v.resource). + Namespace(v.namespace). + VersionedParams(&options, scheme.ParameterCodec). + Do(context.Background()). + Into(vmiList) + for _, vmi := range vmiList.Items { + vmi.SetGroupVersionKind(v1.VirtualMachineInstancePresetGroupVersionKind) + } + + return +} + +func (v *vmiPresets) Create(vmi *v1.VirtualMachineInstancePreset) (result *v1.VirtualMachineInstancePreset, err error) { + result = &v1.VirtualMachineInstancePreset{} + err = v.restClient.Post(). + Namespace(v.namespace). + Resource(v.resource). + Body(vmi). + Do(context.Background()). + Into(result) + result.SetGroupVersionKind(v1.VirtualMachineInstancePresetGroupVersionKind) + return +} + +func (v *vmiPresets) Update(vmi *v1.VirtualMachineInstancePreset) (result *v1.VirtualMachineInstancePreset, err error) { + result = &v1.VirtualMachineInstancePreset{} + err = v.restClient.Put(). + Name(vmi.ObjectMeta.Name). + Namespace(v.namespace). + Resource(v.resource). + Body(vmi). + Do(context.Background()). + Into(result) + result.SetGroupVersionKind(v1.VirtualMachineInstancePresetGroupVersionKind) + return +} + +func (v *vmiPresets) Delete(name string, options *k8smetav1.DeleteOptions) error { + return v.restClient.Delete(). + Namespace(v.namespace). + Resource(v.resource). + Name(name). + Body(options). + Do(context.Background()). + Error() +} + +func (v *vmiPresets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.VirtualMachineInstancePreset, err error) { + result = &v1.VirtualMachineInstancePreset{} + err = v.restClient.Patch(pt). + Namespace(v.namespace). + Resource(v.resource). + SubResource(subresources...). + Name(name). + Body(data). + Do(context.Background()). + Into(result) + return +} diff --git a/vendor/kubevirt.io/client-go/kubecli/websocket.go b/vendor/kubevirt.io/client-go/kubecli/websocket.go new file mode 100644 index 000000000000..1e784759c17e --- /dev/null +++ b/vendor/kubevirt.io/client-go/kubecli/websocket.go @@ -0,0 +1,133 @@ +/* + * This file is part of the KubeVirt project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Copyright 2017 Red Hat, Inc. + * + */ + +package kubecli + +import ( + "crypto/tls" + "io" + "net/http" + + "github.com/gorilla/websocket" + + "kubevirt.io/client-go/subresources" +) + +const ( + WebsocketMessageBufferSize = 10240 +) + +func NewUpgrader() *websocket.Upgrader { + return &websocket.Upgrader{ + ReadBufferSize: WebsocketMessageBufferSize, + WriteBufferSize: WebsocketMessageBufferSize, + CheckOrigin: func(_ *http.Request) bool { + return true + }, + Subprotocols: []string{subresources.PlainStreamProtocolName}, + } +} + +func Dial(address string, tlsConfig *tls.Config) (*websocket.Conn, *http.Response, error) { + dialer := &websocket.Dialer{ + ReadBufferSize: WebsocketMessageBufferSize, + WriteBufferSize: WebsocketMessageBufferSize, + Subprotocols: []string{subresources.PlainStreamProtocolName}, + TLSClientConfig: tlsConfig, + } + return dialer.Dial(address, nil) +} + +func Copy(dst *websocket.Conn, src *websocket.Conn) (int64, error) { + return io.Copy(dst.UnderlyingConn(), src.UnderlyingConn()) +} + +func CopyFrom(dst io.Writer, src *websocket.Conn) (written int64, err error) { + return io.Copy(dst, &binaryReader{conn: src}) +} + +func CopyTo(dst *websocket.Conn, src io.Reader) (written int64, err error) { + return io.Copy(&binaryWriter{conn: dst}, src) +} + +type binaryWriter struct { + conn *websocket.Conn +} + +func (s *binaryWriter) Write(p []byte) (int, error) { + w, err := s.conn.NextWriter(websocket.BinaryMessage) + if err != nil { + return 0, convert(err) + } + defer w.Close() + n, err := w.Write(p) + return n, err +} + +type binaryReader struct { + conn *websocket.Conn + reader io.Reader +} + +func (s *binaryReader) Read(p []byte) (int, error) { + var msgType int + var err error + for { + if s.reader == nil { + msgType, s.reader, err = s.conn.NextReader() + } else { + msgType = websocket.BinaryMessage + } + if err != nil { + s.reader = nil + return 0, convert(err) + } + + switch msgType { + case websocket.BinaryMessage: + n, readErr := s.reader.Read(p) + err = readErr + if err != nil { + s.reader = nil + if err == io.EOF { + if n == 0 { + continue + } else { + return n, nil + } + } + } + return n, convert(err) + case websocket.CloseMessage: + return 0, io.EOF + default: + s.reader = nil + } + } +} + +func convert(err error) error { + if err == nil { + return nil + } + if e, ok := err.(*websocket.CloseError); ok && e.Code == websocket.CloseNormalClosure { + return io.EOF + } + return err +} diff --git a/vendor/kubevirt.io/client-go/log/BUILD.bazel b/vendor/kubevirt.io/client-go/log/BUILD.bazel new file mode 100644 index 000000000000..f888d67114bd --- /dev/null +++ b/vendor/kubevirt.io/client-go/log/BUILD.bazel @@ -0,0 +1,35 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") + +go_library( + name = "go_default_library", + srcs = ["log.go"], + importpath = "kubevirt.io/client-go/log", + visibility = ["//visibility:public"], + deps = [ + "//staging/src/github.com/golang/glog:go_default_library", + "//vendor/github.com/go-kit/kit/log:go_default_library", + "//vendor/github.com/spf13/pflag:go_default_library", + "//vendor/k8s.io/api/core/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", + "//vendor/k8s.io/client-go/tools/cache:go_default_library", + ], +) + +go_test( + name = "go_default_test", + srcs = [ + "log_suite_test.go", + "log_test.go", + ], + embed = [":go_default_library"], + deps = [ + "//staging/src/kubevirt.io/api/core/v1:go_default_library", + "//staging/src/kubevirt.io/client-go/reporter:go_default_library", + "//vendor/github.com/onsi/ginkgo/v2:go_default_library", + "//vendor/github.com/onsi/ginkgo/v2/reporters:go_default_library", + "//vendor/github.com/onsi/gomega:go_default_library", + "//vendor/k8s.io/api/core/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + ], +) diff --git a/vendor/kubevirt.io/client-go/log/log.go b/vendor/kubevirt.io/client-go/log/log.go new file mode 100644 index 000000000000..755ac006908b --- /dev/null +++ b/vendor/kubevirt.io/client-go/log/log.go @@ -0,0 +1,447 @@ +/* + * This file is part of the KubeVirt project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Copyright 2017 Red Hat, Inc. + * + */ + +package log + +import ( + "errors" + goflag "flag" + "fmt" + "io" + "os" + "path/filepath" + "runtime" + "strconv" + "strings" + "sync" + "time" + + "github.com/go-kit/kit/log" + "github.com/golang/glog" + flag "github.com/spf13/pflag" + v1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8sruntime "k8s.io/apimachinery/pkg/runtime" + "k8s.io/client-go/tools/cache" +) + +const ( + libvirtTimestampFormat = "2006-01-02 15:04:05.999-0700" + logTimestampFormat = "2006-01-02T15:04:05.000000Z" +) + +type LogLevel int32 + +const ( + INFO LogLevel = iota + WARNING + ERROR + FATAL +) + +var LogLevelNames = map[LogLevel]string{ + INFO: "info", + WARNING: "warning", + ERROR: "error", + FATAL: "fatal", +} + +var lock sync.Mutex + +type LoggableObject interface { + metav1.ObjectMetaAccessor + k8sruntime.Object +} + +type FilteredLogger struct { + logger log.Logger + component string + filterLevel LogLevel + currentLogLevel LogLevel + verbosityLevel int + currentVerbosityLevel int + err error +} + +var Log = DefaultLogger() + +func InitializeLogging(comp string) { + defaultComponent = comp + Log = DefaultLogger() + glog.CopyStandardLogTo(LogLevelNames[INFO]) + goflag.CommandLine.Set("component", comp) + goflag.CommandLine.Set("logtostderr", "true") +} + +func getDefaultVerbosity() int { + if verbosityFlag := flag.Lookup("v"); verbosityFlag != nil { + defaultVerbosity, _ := strconv.Atoi(verbosityFlag.Value.String()) + return defaultVerbosity + } else { + // "the practical default level is V(2)" + // see https://github.com/kubernetes/community/blob/master/contributors/devel/logging.md + return 2 + } +} + +// Wrap a go-kit logger in a FilteredLogger. Not cached +func MakeLogger(logger log.Logger) *FilteredLogger { + defaultLogLevel := INFO + + defaultVerbosity = getDefaultVerbosity() + // This verbosity will be used for info logs without setting a custom verbosity level + defaultCurrentVerbosity := 2 + + return &FilteredLogger{ + logger: logger, + component: defaultComponent, + filterLevel: defaultLogLevel, + currentLogLevel: defaultLogLevel, + verbosityLevel: defaultVerbosity, + currentVerbosityLevel: defaultCurrentVerbosity, + } +} + +type NullLogger struct{} + +func (n NullLogger) Log(params ...interface{}) error { return nil } + +var loggers = make(map[string]*FilteredLogger) +var defaultComponent = "" +var defaultVerbosity = 0 + +func createLogger(component string) { + lock.Lock() + defer lock.Unlock() + _, ok := loggers[component] + if ok == false { + logger := log.NewJSONLogger(os.Stderr) + log := MakeLogger(logger) + log.component = component + loggers[component] = log + } +} + +func Logger(component string) *FilteredLogger { + _, ok := loggers[component] + if ok == false { + createLogger(component) + } + return loggers[component] +} + +func DefaultLogger() *FilteredLogger { + return Logger(defaultComponent) +} + +// SetIOWriter is meant to be used for testing. "log" and "glog" logs are sent to /dev/nil. +// KubeVirt related log messages will be sent to this writer +func (l *FilteredLogger) SetIOWriter(w io.Writer) { + l.logger = log.NewJSONLogger(w) + goflag.CommandLine.Set("logtostderr", "false") +} + +func (l *FilteredLogger) SetLogger(logger log.Logger) *FilteredLogger { + l.logger = logger + return l +} + +type LogError struct { + message string +} + +func (e LogError) Error() string { + return e.message +} + +func (l FilteredLogger) msg(msg interface{}) { + l.log(3, "msg", msg) +} + +func (l FilteredLogger) msgf(msg string, args ...interface{}) { + l.log(3, "msg", fmt.Sprintf(msg, args...)) +} + +func (l FilteredLogger) Log(params ...interface{}) error { + return l.log(2, params...) +} + +func (l FilteredLogger) log(skipFrames int, params ...interface{}) error { + // messages should be logged if any of these conditions are met: + // The log filtering level is info and verbosity checks match + // The log message priority is warning or higher + if l.currentLogLevel >= WARNING || (l.filterLevel == INFO && + (l.currentLogLevel == l.filterLevel) && + (l.currentVerbosityLevel <= l.verbosityLevel)) { + now := time.Now().UTC() + _, fileName, lineNumber, _ := runtime.Caller(skipFrames) + logParams := make([]interface{}, 0, 8) + + logParams = append(logParams, + "level", LogLevelNames[l.currentLogLevel], + "timestamp", now.Format(logTimestampFormat), + "pos", fmt.Sprintf("%s:%d", filepath.Base(fileName), lineNumber), + "component", l.component, + ) + if l.err != nil { + l.logger = log.With(l.logger, "reason", l.err) + } + return log.WithPrefix(l.logger, logParams...).Log(params...) + } + return nil +} + +func (l FilteredLogger) Key(key string, kind string) *FilteredLogger { + if key == "" { + return &l + + } + name, namespace, err := cache.SplitMetaNamespaceKey(key) + if err != nil { + return &l + } + logParams := make([]interface{}, 0) + if namespace != "" { + logParams = append(logParams, "namespace", namespace) + } + logParams = append(logParams, "name", name) + logParams = append(logParams, "kind", kind) + l.with(logParams...) + return &l +} + +func (l FilteredLogger) Object(obj LoggableObject) *FilteredLogger { + + name := obj.GetObjectMeta().GetName() + namespace := obj.GetObjectMeta().GetNamespace() + uid := obj.GetObjectMeta().GetUID() + kind := obj.GetObjectKind().GroupVersionKind().Kind + + logParams := make([]interface{}, 0) + if namespace != "" { + logParams = append(logParams, "namespace", namespace) + } + logParams = append(logParams, "name", name) + logParams = append(logParams, "kind", kind) + logParams = append(logParams, "uid", uid) + + l.with(logParams...) + return &l +} + +func (l FilteredLogger) ObjectRef(obj *v1.ObjectReference) *FilteredLogger { + + if obj == nil { + return &l + } + + logParams := make([]interface{}, 0) + if obj.Namespace != "" { + logParams = append(logParams, "namespace", obj.Namespace) + } + logParams = append(logParams, "name", obj.Name) + logParams = append(logParams, "kind", obj.Kind) + logParams = append(logParams, "uid", obj.UID) + + l.with(logParams...) + return &l +} + +func (l FilteredLogger) With(obj ...interface{}) *FilteredLogger { + l.logger = log.With(l.logger, obj...) + return &l +} + +func (l *FilteredLogger) with(obj ...interface{}) *FilteredLogger { + l.logger = log.With(l.logger, obj...) + return l +} + +func (l *FilteredLogger) SetLogLevel(filterLevel LogLevel) error { + if (filterLevel >= INFO) && (filterLevel <= FATAL) { + l.filterLevel = filterLevel + return nil + } + return fmt.Errorf("Log level %d does not exist", filterLevel) +} + +func (l *FilteredLogger) SetVerbosityLevel(level int) error { + if level >= 0 { + l.verbosityLevel = level + } else { + return errors.New("Verbosity setting must not be negative") + } + return nil +} + +// It would be consistent to return an error from this function, but +// a multi-value function would break the primary use case: log.V(2).Info().... +func (l FilteredLogger) V(level int) *FilteredLogger { + if level >= 0 { + l.currentVerbosityLevel = level + } + return &l +} + +func (l FilteredLogger) Reason(err error) *FilteredLogger { + l.err = err + return &l +} + +func (l FilteredLogger) Level(level LogLevel) *FilteredLogger { + l.currentLogLevel = level + return &l +} + +func (l FilteredLogger) Info(msg string) { + l.Level(INFO).msg(msg) +} + +func (l FilteredLogger) Infof(msg string, args ...interface{}) { + l.Level(INFO).msgf(msg, args...) +} + +func (l FilteredLogger) Warning(msg string) { + l.Level(WARNING).msg(msg) +} + +func (l FilteredLogger) Warningf(msg string, args ...interface{}) { + l.Level(WARNING).msgf(msg, args...) +} + +func (l FilteredLogger) Error(msg string) { + l.Level(ERROR).msg(msg) +} + +func (l FilteredLogger) Errorf(msg string, args ...interface{}) { + l.Level(ERROR).msgf(msg, args...) +} + +func (l FilteredLogger) Critical(msg string) { + l.Level(FATAL).msg(msg) + panic(msg) +} + +func (l FilteredLogger) Criticalf(msg string, args ...interface{}) { + l.Level(FATAL).msgf(msg, args...) +} + +func LogLibvirtLogLine(logger *FilteredLogger, line string) { + + if len(strings.TrimSpace(line)) == 0 { + return + } + + fragments := strings.SplitN(line, ": ", 5) + if len(fragments) < 4 { + now := time.Now() + logger.logger.Log( + "level", "info", + "timestamp", now.Format(logTimestampFormat), + "component", logger.component, + "subcomponent", "libvirt", + "msg", line, + ) + return + } + severity := strings.ToLower(strings.TrimSpace(fragments[2])) + + if severity == "debug" { + severity = "info" + } + + t, err := time.Parse(libvirtTimestampFormat, strings.TrimSpace(fragments[0])) + if err != nil { + fmt.Println(err) + return + } + thread := strings.TrimSpace(fragments[1]) + pos := strings.TrimSpace(fragments[3]) + msg := strings.TrimSpace(fragments[4]) + + //TODO: implement proper behavior for unsupported GA commands + // by either considering the GA version as unsupported or just don't + // send commands which not supported + if strings.Contains(msg, "unable to execute QEMU agent command") { + if logger.verbosityLevel < 4 { + return + } + + severity = LogLevelNames[WARNING] + } + + // check if we really got a position + isPos := false + if split := strings.Split(pos, ":"); len(split) == 2 { + if _, err := strconv.Atoi(split[1]); err == nil { + isPos = true + } + } + + if !isPos { + msg = strings.TrimSpace(fragments[3] + ": " + fragments[4]) + logger.logger.Log( + "level", severity, + "timestamp", t.Format(logTimestampFormat), + "component", logger.component, + "subcomponent", "libvirt", + "thread", thread, + "msg", msg, + ) + } else { + logger.logger.Log( + "level", severity, + "timestamp", t.Format(logTimestampFormat), + "pos", pos, + "component", logger.component, + "subcomponent", "libvirt", + "thread", thread, + "msg", msg, + ) + } +} + +var qemuLogLines = "" + +func LogQemuLogLine(logger *FilteredLogger, line string) { + + if len(strings.TrimSpace(line)) == 0 { + return + } + + // Concat break lines to have full command in one log message + if strings.HasSuffix(line, "\\") { + qemuLogLines += line + return + } + + if len(qemuLogLines) > 0 { + line = qemuLogLines + line + qemuLogLines = "" + } + + now := time.Now() + logger.logger.Log( + "level", "info", + "timestamp", now.Format(logTimestampFormat), + "component", logger.component, + "subcomponent", "qemu", + "msg", line, + ) +} diff --git a/vendor/kubevirt.io/client-go/precond/BUILD.bazel b/vendor/kubevirt.io/client-go/precond/BUILD.bazel new file mode 100644 index 000000000000..f3330734e6cc --- /dev/null +++ b/vendor/kubevirt.io/client-go/precond/BUILD.bazel @@ -0,0 +1,8 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = ["precond.go"], + importpath = "kubevirt.io/client-go/precond", + visibility = ["//visibility:public"], +) diff --git a/vendor/kubevirt.io/client-go/precond/precond.go b/vendor/kubevirt.io/client-go/precond/precond.go new file mode 100644 index 000000000000..44fc624fbdd2 --- /dev/null +++ b/vendor/kubevirt.io/client-go/precond/precond.go @@ -0,0 +1,89 @@ +/* + * This file is part of the KubeVirt project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Copyright 2017 Red Hat, Inc. + * + */ + +package precond + +import ( + "fmt" +) + +type PreconditionError struct { + msg string +} + +func (e *PreconditionError) Error() string { + return e.msg +} + +func MustNotBeEmpty(str string, msg ...interface{}) string { + panicOnError(CheckNotEmpty(str, msg...)) + return str +} + +func MustNotBeNil(obj interface{}, msg ...interface{}) interface{} { + panicOnError(CheckNotNil(obj, msg...)) + return obj +} + +func MustBeTrue(b bool, msg ...interface{}) { + panicOnError(CheckTrue(b, msg...)) +} + +func CheckNotEmpty(str string, msg ...interface{}) error { + if str == "" { + return newError("String must not be empty", msg...) + } + return nil +} + +func CheckNotNil(obj interface{}, msg ...interface{}) error { + if obj == nil { + return newError("Object must not be nil", msg...) + } + return nil +} + +func CheckTrue(b bool, msg ...interface{}) error { + if b == false { + return newError("Expression must be true", msg...) + } + return nil +} + +func panicOnError(e error) { + if e != nil { + panic(e) + } +} + +func newError(defaultMsg string, msg ...interface{}) *PreconditionError { + return &PreconditionError{msg: newErrMsg(defaultMsg, msg...)} +} + +func newErrMsg(defaultMsg string, msg ...interface{}) string { + if msg != nil { + switch t := msg[0].(type) { + case string: + return fmt.Sprintf(t, msg[1:]...) + default: + return fmt.Sprint(msg...) + } + } + return defaultMsg +} diff --git a/vendor/kubevirt.io/client-go/reporter/BUILD.bazel b/vendor/kubevirt.io/client-go/reporter/BUILD.bazel new file mode 100644 index 000000000000..6d1ace29db52 --- /dev/null +++ b/vendor/kubevirt.io/client-go/reporter/BUILD.bazel @@ -0,0 +1,12 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = ["reporter.go"], + importpath = "kubevirt.io/client-go/reporter", + visibility = ["//visibility:public"], + deps = [ + "//vendor/github.com/onsi/ginkgo/v2/config:go_default_library", + "//vendor/github.com/onsi/ginkgo/v2/types:go_default_library", + ], +) diff --git a/vendor/kubevirt.io/client-go/reporter/reporter.go b/vendor/kubevirt.io/client-go/reporter/reporter.go new file mode 100644 index 000000000000..042492c3d2d1 --- /dev/null +++ b/vendor/kubevirt.io/client-go/reporter/reporter.go @@ -0,0 +1,192 @@ +/* + * This file is part of the KubeVirt project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Copyright 2022 Red Hat, Inc. + * + */ + +package reporter + +import ( + "encoding/xml" + "fmt" + "math" + "os" + "path/filepath" + "strings" + + "github.com/onsi/ginkgo/v2/config" + "github.com/onsi/ginkgo/v2/types" +) + +type JUnitTestCase struct { + Name string `xml:"name,attr"` + ClassName string `xml:"classname,attr"` + PassedMessage *JUnitPassedMessage `xml:"passed,omitempty"` + FailureMessage *JUnitFailureMessage `xml:"failure,omitempty"` + Skipped *JUnitSkipped `xml:"skipped,omitempty"` + Time float64 `xml:"time,attr"` + SystemOut string `xml:"system-out,omitempty"` +} + +type JUnitPassedMessage struct { + Message string `xml:",chardata"` +} + +type JUnitFailureMessage struct { + Type string `xml:"type,attr"` + Message string `xml:",chardata"` +} + +type JUnitSkipped struct { + XMLName xml.Name `xml:"skipped"` +} + +type JUnitTestSuite struct { + XMLName xml.Name `xml:"testsuite"` + TestCases []JUnitTestCase `xml:"testcase"` + Name string `xml:"name,attr"` + Tests int `xml:"tests,attr"` + Failures int `xml:"failures,attr"` + Errors int `xml:"errors,attr"` + Time float64 `xml:"time,attr"` +} +type V1JUnitReporter struct { + suite JUnitTestSuite + filename string + testSuiteName string + ReporterConfig config.DefaultReporterConfigType +} + +//NewV1JUnitReporter creates a new V1 JUnit XML reporter. The XML will be stored in the passed in filename. +func NewV1JUnitReporter(filename string) *V1JUnitReporter { + return &V1JUnitReporter{ + filename: filename, + } +} + +func (reporter *V1JUnitReporter) AfterSuiteDidRun(setupSummary *types.SetupSummary) { + reporter.handleSetupSummary("AfterSuite", setupSummary) +} + +func (reporter *V1JUnitReporter) BeforeSuiteDidRun(setupSummary *types.SetupSummary) { + reporter.handleSetupSummary("BeforeSuite", setupSummary) +} + +func (reporter *V1JUnitReporter) handleSetupSummary(name string, setupSummary *types.SetupSummary) { + if setupSummary.State != types.SpecStatePassed { + testCase := JUnitTestCase{ + Name: name, + ClassName: reporter.testSuiteName, + } + + testCase.FailureMessage = &JUnitFailureMessage{ + Type: reporter.failureTypeForState(setupSummary.State), + Message: failureMessage(setupSummary.Failure), + } + testCase.SystemOut = setupSummary.CapturedOutput + testCase.Time = setupSummary.RunTime.Seconds() + reporter.suite.TestCases = append(reporter.suite.TestCases, testCase) + } +} + +func failureMessage(failure types.SpecFailure) string { + return fmt.Sprintf("%s\n%s\n%s", failure.ComponentCodeLocation.String(), failure.Message, failure.Location.String()) +} + +func (reporter *V1JUnitReporter) SpecDidComplete(specSummary *types.SpecSummary) { + testCase := JUnitTestCase{ + Name: strings.Join(specSummary.ComponentTexts, " "), + ClassName: reporter.testSuiteName, + } + if reporter.ReporterConfig.ReportPassed && specSummary.State == types.SpecStatePassed { + testCase.PassedMessage = &JUnitPassedMessage{ + Message: specSummary.CapturedOutput, + } + } + if specSummary.State == types.SpecStateFailed || specSummary.State == types.SpecStateInterrupted || specSummary.State == types.SpecStatePanicked { + testCase.FailureMessage = &JUnitFailureMessage{ + Type: reporter.failureTypeForState(specSummary.State), + Message: failureMessage(specSummary.Failure), + } + if specSummary.State == types.SpecStatePanicked { + testCase.FailureMessage.Message += fmt.Sprintf("\n\nPanic: %s\n\nFull stack:\n%s", + specSummary.Failure.ForwardedPanic, + specSummary.Failure.Location.FullStackTrace) + } + testCase.SystemOut = specSummary.CapturedOutput + } + if specSummary.State == types.SpecStateSkipped || specSummary.State == types.SpecStatePending { + testCase.Skipped = &JUnitSkipped{} + } + testCase.Time = specSummary.RunTime.Seconds() + reporter.suite.TestCases = append(reporter.suite.TestCases, testCase) +} + +func (reporter *V1JUnitReporter) SpecWillRun(specSummary *types.SpecSummary) { +} + +func (reporter *V1JUnitReporter) SuiteDidEnd(summary *types.SuiteSummary) { + reporter.suite.Tests = summary.NumberOfSpecsThatWillBeRun + reporter.suite.Time = math.Trunc(summary.RunTime.Seconds()*1000) / 1000 + reporter.suite.Failures = summary.NumberOfFailedSpecs + reporter.suite.Errors = 0 + if reporter.ReporterConfig.ReportFile != "" { + reporter.filename = reporter.ReporterConfig.ReportFile + fmt.Printf("\nJUnit path was configured: %s\n", reporter.filename) + } + filePath, _ := filepath.Abs(reporter.filename) + dirPath := filepath.Dir(filePath) + err := os.MkdirAll(dirPath, os.ModePerm) + if err != nil { + fmt.Printf("\nFailed to create JUnit directory: %s\n\t%s", filePath, err.Error()) + } + file, err := os.Create(filePath) + if err != nil { + fmt.Fprintf(os.Stderr, "Failed to create JUnit report file: %s\n\t%s", filePath, err.Error()) + } + defer file.Close() + file.WriteString(xml.Header) + encoder := xml.NewEncoder(file) + encoder.Indent(" ", " ") + err = encoder.Encode(reporter.suite) + if err == nil { + fmt.Fprintf(os.Stdout, "\nJUnit report was created: %s\n", filePath) + } else { + fmt.Fprintf(os.Stderr, "\nFailed to generate JUnit report data:\n\t%s", err.Error()) + } +} + +func (reporter *V1JUnitReporter) SuiteWillBegin(ginkgoConfig config.GinkgoConfigType, summary *types.SuiteSummary) { + reporter.suite = JUnitTestSuite{ + Name: summary.SuiteDescription, + TestCases: []JUnitTestCase{}, + } + reporter.testSuiteName = summary.SuiteDescription + reporter.ReporterConfig = config.DefaultReporterConfigType{} +} + +func (reporter *V1JUnitReporter) failureTypeForState(state types.SpecState) string { + switch state { + case types.SpecStateFailed: + return "Failure" + case types.SpecStateInterrupted: + return "Interrupted" + case types.SpecStatePanicked: + return "Panic" + default: + return "" + } +} diff --git a/vendor/kubevirt.io/client-go/subresources/BUILD.bazel b/vendor/kubevirt.io/client-go/subresources/BUILD.bazel new file mode 100644 index 000000000000..cbde92ba64e1 --- /dev/null +++ b/vendor/kubevirt.io/client-go/subresources/BUILD.bazel @@ -0,0 +1,8 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = ["constants.go"], + importpath = "kubevirt.io/client-go/subresources", + visibility = ["//visibility:public"], +) diff --git a/vendor/kubevirt.io/client-go/subresources/constants.go b/vendor/kubevirt.io/client-go/subresources/constants.go new file mode 100644 index 000000000000..d60d224ab3ff --- /dev/null +++ b/vendor/kubevirt.io/client-go/subresources/constants.go @@ -0,0 +1,25 @@ +/* + * This file is part of the KubeVirt project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Copyright 2018 The KubeVirt Authors + * + */ + +package subresources + +// PlainStreamProtocolName is a subprotocol which indicates a plain websocket stream. +// Mostly useful for browser connections which need to use the websocket subprotocol +// field to pass credentials. As a consequence they need to get a subprotocol back. +const PlainStreamProtocolName = "plain.kubevirt.io" diff --git a/vendor/kubevirt.io/client-go/testutils/BUILD.bazel b/vendor/kubevirt.io/client-go/testutils/BUILD.bazel new file mode 100644 index 000000000000..489f749dd1fd --- /dev/null +++ b/vendor/kubevirt.io/client-go/testutils/BUILD.bazel @@ -0,0 +1,15 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = ["setup.go"], + importpath = "kubevirt.io/client-go/testutils", + visibility = ["//visibility:public"], + deps = [ + "//staging/src/kubevirt.io/client-go/log:go_default_library", + "//staging/src/kubevirt.io/client-go/reporter:go_default_library", + "//vendor/github.com/onsi/ginkgo/v2:go_default_library", + "//vendor/github.com/onsi/ginkgo/v2/reporters:go_default_library", + "//vendor/github.com/onsi/gomega:go_default_library", + ], +) diff --git a/vendor/kubevirt.io/client-go/testutils/setup.go b/vendor/kubevirt.io/client-go/testutils/setup.go new file mode 100644 index 000000000000..840a0abab079 --- /dev/null +++ b/vendor/kubevirt.io/client-go/testutils/setup.go @@ -0,0 +1,80 @@ +package testutils + +import ( + "fmt" + "os" + "path/filepath" + "runtime" + "strings" + "testing" + + . "github.com/onsi/ginkgo/v2" + "github.com/onsi/ginkgo/v2/reporters" + "github.com/onsi/gomega" + + "kubevirt.io/client-go/log" + v1reporter "kubevirt.io/client-go/reporter" +) + +var afterSuiteReporters = []reporters.DeprecatedReporter{} + +// KubeVirtTestSuiteSetup is the default setup function for kubevirts unittests. +// If tests are executed through bazel, the provided description is ignored. Instead +// the TEST_TARGET environment variable will be used to synchronize the output +// with bazels test output and make test navigation and detection consistent. +func KubeVirtTestSuiteSetup(t *testing.T) { + _, description, _, _ := runtime.Caller(1) + projectRoot := findRoot() + description = strings.TrimPrefix(description, projectRoot) + // Redirect writes to ginkgo writer to keep tests quiet when + // they succeed + log.Log.SetIOWriter(GinkgoWriter) + // setup the connection between ginkgo and gomega + gomega.RegisterFailHandler(Fail) + + // See https://github.com/bazelbuild/rules_go/blob/197699822e081dad064835a09825448a3e4cc2a2/go/core.rst#go_test + // for context. + testsWrapped := os.Getenv("GO_TEST_WRAP") + outputFile := os.Getenv("XML_OUTPUT_FILE") + + suiteConfig, _ := GinkgoConfiguration() + + // if run on bazel (XML_OUTPUT_FILE is not empty) + // and rules_go is configured to not produce the junit xml + // produce it here. Otherwise just run the default RunSpec + if testsWrapped == "0" && outputFile != "" { + testTarget := os.Getenv("TEST_TARGET") + if suiteConfig.ParallelTotal > 1 { + outputFile = fmt.Sprintf("%s-%d", outputFile, GinkgoParallelProcess()) + } + + afterSuiteReporters = append(afterSuiteReporters, v1reporter.NewV1JUnitReporter(outputFile)) + + RunSpecs(t, testTarget) + } else { + RunSpecs(t, description) + } +} + +func findRoot() string { + _, current, _, _ := runtime.Caller(0) + for { + current = filepath.Dir(current) + if current == "/" || current == "." { + return current + } + if _, err := os.Stat(filepath.Join(current, "WORKSPACE")); err == nil { + return strings.TrimSuffix(current, "/") + "/" + } else if os.IsNotExist(err) { + continue + } else if err != nil { + panic(err) + } + } +} + +var _ = ReportAfterSuite("KubeVirtTest", func(report Report) { + for _, reporter := range afterSuiteReporters { + reporters.ReportViaDeprecatedReporter(reporter, report) + } +}) diff --git a/vendor/kubevirt.io/client-go/util/BUILD.bazel b/vendor/kubevirt.io/client-go/util/BUILD.bazel new file mode 100644 index 000000000000..835690fb6454 --- /dev/null +++ b/vendor/kubevirt.io/client-go/util/BUILD.bazel @@ -0,0 +1,8 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = ["util.go"], + importpath = "kubevirt.io/client-go/util", + visibility = ["//visibility:public"], +) diff --git a/vendor/kubevirt.io/client-go/util/util.go b/vendor/kubevirt.io/client-go/util/util.go new file mode 100644 index 000000000000..3786778d046e --- /dev/null +++ b/vendor/kubevirt.io/client-go/util/util.go @@ -0,0 +1,22 @@ +package util + +import ( + "fmt" + "io/ioutil" + "os" + "strings" +) + +const ServiceAccountNamespaceFile = "/var/run/secrets/kubernetes.io/serviceaccount/namespace" +const namespaceKubevirt = "kubevirt" + +func GetNamespace() (string, error) { + if data, err := ioutil.ReadFile(ServiceAccountNamespaceFile); err == nil { + if ns := strings.TrimSpace(string(data)); len(ns) > 0 { + return ns, nil + } + } else if err != nil && !os.IsNotExist(err) { + return "", fmt.Errorf("failed to determine namespace from %s: %v", ServiceAccountNamespaceFile, err) + } + return namespaceKubevirt, nil +} diff --git a/vendor/gopkg.in/inf.v0/BUILD.bazel b/vendor/kubevirt.io/client-go/version/BUILD.bazel similarity index 53% rename from vendor/gopkg.in/inf.v0/BUILD.bazel rename to vendor/kubevirt.io/client-go/version/BUILD.bazel index f58288814e38..c278e9aa26e4 100644 --- a/vendor/gopkg.in/inf.v0/BUILD.bazel +++ b/vendor/kubevirt.io/client-go/version/BUILD.bazel @@ -3,10 +3,10 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library") go_library( name = "go_default_library", srcs = [ - "dec.go", - "rounder.go", + "base.go", + "types.go", + "version.go", ], - importmap = "kubevirt.io/kubevirt/vendor/gopkg.in/inf.v0", - importpath = "gopkg.in/inf.v0", + importpath = "kubevirt.io/client-go/version", visibility = ["//visibility:public"], ) diff --git a/vendor/kubevirt.io/client-go/version/base.go b/vendor/kubevirt.io/client-go/version/base.go new file mode 100644 index 000000000000..bd933defa4d6 --- /dev/null +++ b/vendor/kubevirt.io/client-go/version/base.go @@ -0,0 +1,28 @@ +/* + * This file is part of the KubeVirt project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Copyright 2018 Red Hat, Inc. + * + */ + +package version + +var ( + gitVersion = "v0.0.0-master+$Format:%h$" + gitCommit = "$Format:%H$" // sha1 from git, output of $(git rev-parse HEAD) + gitTreeState = "" // state of git tree, either "clean" or "dirty" + + buildDate = "1970-01-01T00:00:00Z" // build date in ISO8601 format, output of $(date -u +'%Y-%m-%dT%H:%M:%SZ') +) diff --git a/vendor/kubevirt.io/client-go/version/def.bzl b/vendor/kubevirt.io/client-go/version/def.bzl new file mode 100644 index 000000000000..0a5703932a51 --- /dev/null +++ b/vendor/kubevirt.io/client-go/version/def.bzl @@ -0,0 +1,36 @@ +# Copyright 2017 The Kubernetes Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Implements hack/version.sh's kube::version::ldflags() for Bazel. +def version_x_defs(): + # This should match the list of packages in kube::version::ldflag + stamp_pkgs = [ + "kubevirt.io/client-go/version", + ] + + # This should match the list of vars in kube::version::ldflags + # It should also match the list of vars set in hack/print-workspace-status.sh. + stamp_vars = [ + "buildDate", + "gitCommit", + "gitTreeState", + "gitVersion", + ] + + # Generate the cross-product. + x_defs = {} + for pkg in stamp_pkgs: + for var in stamp_vars: + x_defs["%s.%s" % (pkg, var)] = "{%s}" % var + return x_defs diff --git a/vendor/kubevirt.io/client-go/version/types.go b/vendor/kubevirt.io/client-go/version/types.go new file mode 100644 index 000000000000..e90fb07d5943 --- /dev/null +++ b/vendor/kubevirt.io/client-go/version/types.go @@ -0,0 +1,34 @@ +/* + * This file is part of the KubeVirt project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Copyright 2018 Red Hat, Inc. + * + */ +package version + +type Info struct { + GitVersion string `json:"gitVersion"` + GitCommit string `json:"gitCommit"` + GitTreeState string `json:"gitTreeState"` + BuildDate string `json:"buildDate"` + GoVersion string `json:"goVersion"` + Compiler string `json:"compiler"` + Platform string `json:"platform"` +} + +// String returns info as a human-friendly version string. +func (info Info) String() string { + return info.GitVersion +} diff --git a/vendor/kubevirt.io/client-go/version/version.go b/vendor/kubevirt.io/client-go/version/version.go new file mode 100644 index 000000000000..208ec20a08e1 --- /dev/null +++ b/vendor/kubevirt.io/client-go/version/version.go @@ -0,0 +1,53 @@ +/* + * This file is part of the KubeVirt project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Copyright 2018 Red Hat, Inc. + * + */ + +package version + +import ( + "fmt" + "runtime" + + "bytes" + "encoding/json" +) + +func Get() Info { + return Info{ + GitVersion: gitVersion, + GitCommit: gitCommit, + GitTreeState: gitTreeState, + BuildDate: buildDate, + GoVersion: runtime.Version(), + Compiler: runtime.Compiler, + Platform: fmt.Sprintf("%s/%s", runtime.GOOS, runtime.GOARCH), + } +} + +func GetCompactJSON() (string, error) { + v, err := json.Marshal(Get()) + if err != nil { + return "", err + } + compactedBuffer := new(bytes.Buffer) + err = json.Compact(compactedBuffer, []byte(v)) + if err != nil { + return "", err + } + return compactedBuffer.String(), nil +} diff --git a/vendor/kubevirt.io/containerized-data-importer-api/pkg/apis/core/BUILD.bazel b/vendor/kubevirt.io/containerized-data-importer-api/pkg/apis/core/BUILD.bazel deleted file mode 100644 index 4691fe278d8a..000000000000 --- a/vendor/kubevirt.io/containerized-data-importer-api/pkg/apis/core/BUILD.bazel +++ /dev/null @@ -1,9 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = ["register.go"], - importmap = "kubevirt.io/kubevirt/vendor/kubevirt.io/containerized-data-importer-api/pkg/apis/core", - importpath = "kubevirt.io/containerized-data-importer-api/pkg/apis/core", - visibility = ["//visibility:public"], -) diff --git a/vendor/kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1/BUILD.bazel b/vendor/kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1/BUILD.bazel deleted file mode 100644 index c92db26a1821..000000000000 --- a/vendor/kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1/BUILD.bazel +++ /dev/null @@ -1,25 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "register.go", - "types.go", - "types_swagger_generated.go", - "types_transfer.go", - "utils.go", - "zz_generated.deepcopy.go", - ], - importmap = "kubevirt.io/kubevirt/vendor/kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1", - importpath = "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1", - visibility = ["//visibility:public"], - deps = [ - "//vendor/k8s.io/api/core/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/kubevirt.io/containerized-data-importer-api/pkg/apis/core:go_default_library", - "//vendor/kubevirt.io/controller-lifecycle-operator-sdk/pkg/sdk/api:go_default_library", - ], -) diff --git a/vendor/kubevirt.io/containerized-data-importer-api/pkg/apis/upload/BUILD.bazel b/vendor/kubevirt.io/containerized-data-importer-api/pkg/apis/upload/BUILD.bazel deleted file mode 100644 index a4375dd5775b..000000000000 --- a/vendor/kubevirt.io/containerized-data-importer-api/pkg/apis/upload/BUILD.bazel +++ /dev/null @@ -1,9 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = ["register.go"], - importmap = "kubevirt.io/kubevirt/vendor/kubevirt.io/containerized-data-importer-api/pkg/apis/upload", - importpath = "kubevirt.io/containerized-data-importer-api/pkg/apis/upload", - visibility = ["//visibility:public"], -) diff --git a/vendor/kubevirt.io/containerized-data-importer-api/pkg/apis/upload/v1beta1/BUILD.bazel b/vendor/kubevirt.io/containerized-data-importer-api/pkg/apis/upload/v1beta1/BUILD.bazel deleted file mode 100644 index bffbe3dceb23..000000000000 --- a/vendor/kubevirt.io/containerized-data-importer-api/pkg/apis/upload/v1beta1/BUILD.bazel +++ /dev/null @@ -1,21 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "register.go", - "types.go", - "types_swagger_generated.go", - "zz_generated.deepcopy.go", - ], - importmap = "kubevirt.io/kubevirt/vendor/kubevirt.io/containerized-data-importer-api/pkg/apis/upload/v1beta1", - importpath = "kubevirt.io/containerized-data-importer-api/pkg/apis/upload/v1beta1", - visibility = ["//visibility:public"], - deps = [ - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/kubevirt.io/containerized-data-importer-api/pkg/apis/upload:go_default_library", - ], -) diff --git a/vendor/kubevirt.io/containerized-data-importer/pkg/clone/BUILD.bazel b/vendor/kubevirt.io/containerized-data-importer/pkg/clone/BUILD.bazel index 40e9ea2cb026..d4ab127cd2a5 100644 --- a/vendor/kubevirt.io/containerized-data-importer/pkg/clone/BUILD.bazel +++ b/vendor/kubevirt.io/containerized-data-importer/pkg/clone/BUILD.bazel @@ -3,13 +3,12 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library") go_library( name = "go_default_library", srcs = ["auth.go"], - importmap = "kubevirt.io/kubevirt/vendor/kubevirt.io/containerized-data-importer/pkg/clone", importpath = "kubevirt.io/containerized-data-importer/pkg/clone", visibility = ["//visibility:public"], deps = [ + "//staging/src/kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1:go_default_library", "//vendor/k8s.io/api/authentication/v1:go_default_library", "//vendor/k8s.io/api/authorization/v1:go_default_library", "//vendor/k8s.io/klog/v2:go_default_library", - "//vendor/kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1:go_default_library", ], ) diff --git a/vendor/kubevirt.io/controller-lifecycle-operator-sdk/pkg/sdk/api/BUILD.bazel b/vendor/kubevirt.io/controller-lifecycle-operator-sdk/pkg/sdk/api/BUILD.bazel deleted file mode 100644 index 5889bac4c856..000000000000 --- a/vendor/kubevirt.io/controller-lifecycle-operator-sdk/pkg/sdk/api/BUILD.bazel +++ /dev/null @@ -1,13 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = ["types.go"], - importmap = "kubevirt.io/kubevirt/vendor/kubevirt.io/controller-lifecycle-operator-sdk/pkg/sdk/api", - importpath = "kubevirt.io/controller-lifecycle-operator-sdk/pkg/sdk/api", - visibility = ["//visibility:public"], - deps = [ - "//vendor/github.com/openshift/custom-resource-status/conditions/v1:go_default_library", - "//vendor/k8s.io/api/core/v1:go_default_library", - ], -) diff --git a/vendor/kubevirt.io/qe-tools/pkg/ginkgo-reporters/BUILD.bazel b/vendor/kubevirt.io/qe-tools/pkg/ginkgo-reporters/BUILD.bazel deleted file mode 100644 index 0489849ee2ec..000000000000 --- a/vendor/kubevirt.io/qe-tools/pkg/ginkgo-reporters/BUILD.bazel +++ /dev/null @@ -1,18 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "junit_reporter.go", - "polarion_reporter.go", - ], - importmap = "kubevirt.io/kubevirt/vendor/kubevirt.io/qe-tools/pkg/ginkgo-reporters", - importpath = "kubevirt.io/qe-tools/pkg/ginkgo-reporters", - visibility = ["//visibility:public"], - deps = [ - "//vendor/github.com/onsi/ginkgo/v2/config:go_default_library", - "//vendor/github.com/onsi/ginkgo/v2/reporters:go_default_library", - "//vendor/github.com/onsi/ginkgo/v2/types:go_default_library", - "//vendor/kubevirt.io/qe-tools/pkg/polarion-xml:go_default_library", - ], -) diff --git a/vendor/kubevirt.io/qe-tools/pkg/polarion-xml/BUILD.bazel b/vendor/kubevirt.io/qe-tools/pkg/polarion-xml/BUILD.bazel deleted file mode 100644 index b798b34127e4..000000000000 --- a/vendor/kubevirt.io/qe-tools/pkg/polarion-xml/BUILD.bazel +++ /dev/null @@ -1,9 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = ["polarion_xml.go"], - importmap = "kubevirt.io/kubevirt/vendor/kubevirt.io/qe-tools/pkg/polarion-xml", - importpath = "kubevirt.io/qe-tools/pkg/polarion-xml", - visibility = ["//visibility:public"], -) diff --git a/vendor/libvirt.org/go/libvirt/BUILD.bazel b/vendor/libvirt.org/go/libvirt/BUILD.bazel deleted file mode 100644 index 7782e1f194e6..000000000000 --- a/vendor/libvirt.org/go/libvirt/BUILD.bazel +++ /dev/null @@ -1,102 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "callbacks.go", - "callbacks_wrapper.go", - "callbacks_wrapper.h", - "connect.go", - "connect_compat.h", - "connect_wrapper.go", - "connect_wrapper.h", - "doc.go", - "domain.go", - "domain_checkpoint.go", - "domain_checkpoint_compat.h", - "domain_checkpoint_wrapper.go", - "domain_checkpoint_wrapper.h", - "domain_compat.h", - "domain_events.go", - "domain_events_wrapper.go", - "domain_events_wrapper.h", - "domain_snapshot.go", - "domain_snapshot_compat.h", - "domain_snapshot_wrapper.go", - "domain_snapshot_wrapper.h", - "domain_wrapper.go", - "domain_wrapper.h", - "error.go", - "error_compat.h", - "events.go", - "events_wrapper.go", - "events_wrapper.h", - "interface.go", - "interface_compat.h", - "interface_wrapper.go", - "interface_wrapper.h", - "lxc.go", - "lxc_wrapper.go", - "lxc_wrapper.h", - "network.go", - "network_compat.h", - "network_events.go", - "network_events_wrapper.go", - "network_events_wrapper.h", - "network_port.go", - "network_port_compat.h", - "network_port_wrapper.go", - "network_port_wrapper.h", - "network_wrapper.go", - "network_wrapper.h", - "node_device.go", - "node_device_compat.h", - "node_device_events.go", - "node_device_events_wrapper.go", - "node_device_events_wrapper.h", - "node_device_wrapper.go", - "node_device_wrapper.h", - "nwfilter.go", - "nwfilter_binding.go", - "nwfilter_binding_compat.h", - "nwfilter_binding_wrapper.go", - "nwfilter_binding_wrapper.h", - "nwfilter_compat.h", - "nwfilter_wrapper.go", - "nwfilter_wrapper.h", - "qemu.go", - "qemu_compat.h", - "qemu_wrapper.go", - "qemu_wrapper.h", - "secret.go", - "secret_compat.h", - "secret_events.go", - "secret_events_wrapper.go", - "secret_events_wrapper.h", - "secret_wrapper.go", - "secret_wrapper.h", - "storage_pool.go", - "storage_pool_compat.h", - "storage_pool_events.go", - "storage_pool_events_wrapper.go", - "storage_pool_events_wrapper.h", - "storage_pool_wrapper.go", - "storage_pool_wrapper.h", - "storage_volume.go", - "storage_volume_compat.h", - "storage_volume_wrapper.go", - "storage_volume_wrapper.h", - "stream.go", - "stream_compat.h", - "stream_wrapper.go", - "stream_wrapper.h", - "typedparams.go", - "typedparams_wrapper.go", - "typedparams_wrapper.h", - ], - cdeps = ["//:libvirt-libs"], - cgo = True, - importmap = "kubevirt.io/kubevirt/vendor/libvirt.org/go/libvirt", - importpath = "libvirt.org/go/libvirt", - visibility = ["//visibility:public"], -) diff --git a/vendor/modules.txt b/vendor/modules.txt index 2eb09d20434b..be91e1b8bc05 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -102,10 +102,15 @@ github.com/go-logfmt/logfmt # github.com/go-logr/logr v1.2.3 ## explicit; go 1.16 github.com/go-logr/logr -# github.com/go-openapi/analysis v0.20.0 +# github.com/go-openapi/analysis v0.21.2 ## explicit; go 1.13 github.com/go-openapi/analysis -github.com/go-openapi/analysis/internal +github.com/go-openapi/analysis/internal/debug +github.com/go-openapi/analysis/internal/flatten/normalize +github.com/go-openapi/analysis/internal/flatten/operations +github.com/go-openapi/analysis/internal/flatten/replace +github.com/go-openapi/analysis/internal/flatten/schutils +github.com/go-openapi/analysis/internal/flatten/sortref # github.com/go-openapi/errors v0.19.9 ## explicit; go 1.14 github.com/go-openapi/errors @@ -115,7 +120,7 @@ github.com/go-openapi/jsonpointer # github.com/go-openapi/jsonreference v0.19.6 ## explicit; go 1.13 github.com/go-openapi/jsonreference -# github.com/go-openapi/loads v0.20.2 +# github.com/go-openapi/loads v0.21.1 ## explicit; go 1.13 github.com/go-openapi/loads # github.com/go-openapi/runtime v0.19.24 @@ -129,16 +134,16 @@ github.com/go-openapi/runtime/middleware/header github.com/go-openapi/runtime/middleware/untyped github.com/go-openapi/runtime/security github.com/go-openapi/runtime/yamlpc -# github.com/go-openapi/spec v0.20.3 +# github.com/go-openapi/spec v0.20.4 ## explicit; go 1.13 github.com/go-openapi/spec -# github.com/go-openapi/strfmt v0.20.0 +# github.com/go-openapi/strfmt v0.21.1 ## explicit; go 1.13 github.com/go-openapi/strfmt # github.com/go-openapi/swag v0.21.1 ## explicit; go 1.11 github.com/go-openapi/swag -# github.com/go-openapi/validate v0.20.2 +# github.com/go-openapi/validate v0.22.0 ## explicit; go 1.14 github.com/go-openapi/validate # github.com/go-stack/stack v1.8.0 @@ -279,6 +284,9 @@ github.com/modern-go/concurrent # github.com/modern-go/reflect2 v1.0.2 ## explicit; go 1.12 github.com/modern-go/reflect2 +# github.com/oklog/ulid v1.3.1 +## explicit +github.com/oklog/ulid # github.com/onsi/ginkgo/v2 v2.1.3 => github.com/onsi/ginkgo/v2 v2.1.3 ## explicit; go 1.16 github.com/onsi/ginkgo/v2 diff --git a/vendor/mvdan.cc/editorconfig/BUILD.bazel b/vendor/mvdan.cc/editorconfig/BUILD.bazel deleted file mode 100644 index 252f4a7cc26a..000000000000 --- a/vendor/mvdan.cc/editorconfig/BUILD.bazel +++ /dev/null @@ -1,12 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "editorconfig.go", - "pattern_bundle.go", - ], - importmap = "kubevirt.io/kubevirt/vendor/mvdan.cc/editorconfig", - importpath = "mvdan.cc/editorconfig", - visibility = ["//visibility:public"], -) diff --git a/vendor/mvdan.cc/sh/v3/cmd/shfmt/BUILD.bazel b/vendor/mvdan.cc/sh/v3/cmd/shfmt/BUILD.bazel deleted file mode 100644 index eb1212856070..000000000000 --- a/vendor/mvdan.cc/sh/v3/cmd/shfmt/BUILD.bazel +++ /dev/null @@ -1,26 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "json.go", - "main.go", - ], - importmap = "kubevirt.io/kubevirt/vendor/mvdan.cc/sh/v3/cmd/shfmt", - importpath = "mvdan.cc/sh/v3/cmd/shfmt", - visibility = ["//visibility:private"], - deps = [ - "//vendor/github.com/google/renameio:go_default_library", - "//vendor/github.com/pkg/diff:go_default_library", - "//vendor/golang.org/x/term:go_default_library", - "//vendor/mvdan.cc/editorconfig:go_default_library", - "//vendor/mvdan.cc/sh/v3/fileutil:go_default_library", - "//vendor/mvdan.cc/sh/v3/syntax:go_default_library", - ], -) - -go_binary( - name = "shfmt", - embed = [":go_default_library"], - visibility = ["//visibility:public"], -) diff --git a/vendor/mvdan.cc/sh/v3/fileutil/BUILD.bazel b/vendor/mvdan.cc/sh/v3/fileutil/BUILD.bazel deleted file mode 100644 index 490bb1182c82..000000000000 --- a/vendor/mvdan.cc/sh/v3/fileutil/BUILD.bazel +++ /dev/null @@ -1,9 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = ["file.go"], - importmap = "kubevirt.io/kubevirt/vendor/mvdan.cc/sh/v3/fileutil", - importpath = "mvdan.cc/sh/v3/fileutil", - visibility = ["//visibility:public"], -) diff --git a/vendor/mvdan.cc/sh/v3/syntax/BUILD.bazel b/vendor/mvdan.cc/sh/v3/syntax/BUILD.bazel deleted file mode 100644 index 78d583b18306..000000000000 --- a/vendor/mvdan.cc/sh/v3/syntax/BUILD.bazel +++ /dev/null @@ -1,21 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "braces.go", - "doc.go", - "lexer.go", - "nodes.go", - "parser.go", - "printer.go", - "quotestate_string.go", - "simplify.go", - "token_string.go", - "tokens.go", - "walk.go", - ], - importmap = "kubevirt.io/kubevirt/vendor/mvdan.cc/sh/v3/syntax", - importpath = "mvdan.cc/sh/v3/syntax", - visibility = ["//visibility:public"], -) diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/runtime/scheme/BUILD.bazel b/vendor/sigs.k8s.io/controller-runtime/pkg/runtime/scheme/BUILD.bazel deleted file mode 100644 index c0c72dbe5dbd..000000000000 --- a/vendor/sigs.k8s.io/controller-runtime/pkg/runtime/scheme/BUILD.bazel +++ /dev/null @@ -1,10 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = ["scheme.go"], - importmap = "kubevirt.io/kubevirt/vendor/sigs.k8s.io/controller-runtime/pkg/runtime/scheme", - importpath = "sigs.k8s.io/controller-runtime/pkg/runtime/scheme", - visibility = ["//visibility:public"], - deps = ["//vendor/sigs.k8s.io/controller-runtime/pkg/scheme:go_default_library"], -) diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/scheme/BUILD.bazel b/vendor/sigs.k8s.io/controller-runtime/pkg/scheme/BUILD.bazel deleted file mode 100644 index 68eb99f4f7b3..000000000000 --- a/vendor/sigs.k8s.io/controller-runtime/pkg/scheme/BUILD.bazel +++ /dev/null @@ -1,14 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = ["scheme.go"], - importmap = "kubevirt.io/kubevirt/vendor/sigs.k8s.io/controller-runtime/pkg/scheme", - importpath = "sigs.k8s.io/controller-runtime/pkg/scheme", - visibility = ["//visibility:public"], - deps = [ - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - ], -) diff --git a/vendor/sigs.k8s.io/json/BUILD.bazel b/vendor/sigs.k8s.io/json/BUILD.bazel deleted file mode 100644 index 18ca3fbecdf3..000000000000 --- a/vendor/sigs.k8s.io/json/BUILD.bazel +++ /dev/null @@ -1,13 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "json.go", - ], - importmap = "kubevirt.io/kubevirt/vendor/sigs.k8s.io/json", - importpath = "sigs.k8s.io/json", - visibility = ["//visibility:public"], - deps = ["//vendor/sigs.k8s.io/json/internal/golang/encoding/json:go_default_library"], -) diff --git a/vendor/sigs.k8s.io/json/internal/golang/encoding/json/BUILD.bazel b/vendor/sigs.k8s.io/json/internal/golang/encoding/json/BUILD.bazel deleted file mode 100644 index 44eb10241d73..000000000000 --- a/vendor/sigs.k8s.io/json/internal/golang/encoding/json/BUILD.bazel +++ /dev/null @@ -1,19 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "decode.go", - "encode.go", - "fold.go", - "indent.go", - "kubernetes_patch.go", - "scanner.go", - "stream.go", - "tables.go", - "tags.go", - ], - importmap = "kubevirt.io/kubevirt/vendor/sigs.k8s.io/json/internal/golang/encoding/json", - importpath = "sigs.k8s.io/json/internal/golang/encoding/json", - visibility = ["//vendor/sigs.k8s.io/json:__subpackages__"], -) diff --git a/vendor/sigs.k8s.io/structured-merge-diff/v4/fieldpath/BUILD.bazel b/vendor/sigs.k8s.io/structured-merge-diff/v4/fieldpath/BUILD.bazel deleted file mode 100644 index 9d696547520d..000000000000 --- a/vendor/sigs.k8s.io/structured-merge-diff/v4/fieldpath/BUILD.bazel +++ /dev/null @@ -1,24 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "element.go", - "fromvalue.go", - "managers.go", - "path.go", - "pathelementmap.go", - "serialize.go", - "serialize-pe.go", - "set.go", - ], - importmap = "kubevirt.io/kubevirt/vendor/sigs.k8s.io/structured-merge-diff/v4/fieldpath", - importpath = "sigs.k8s.io/structured-merge-diff/v4/fieldpath", - visibility = ["//visibility:public"], - deps = [ - "//vendor/github.com/json-iterator/go:go_default_library", - "//vendor/sigs.k8s.io/structured-merge-diff/v4/schema:go_default_library", - "//vendor/sigs.k8s.io/structured-merge-diff/v4/value:go_default_library", - ], -) diff --git a/vendor/sigs.k8s.io/structured-merge-diff/v4/schema/BUILD.bazel b/vendor/sigs.k8s.io/structured-merge-diff/v4/schema/BUILD.bazel deleted file mode 100644 index aca35599812e..000000000000 --- a/vendor/sigs.k8s.io/structured-merge-diff/v4/schema/BUILD.bazel +++ /dev/null @@ -1,14 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "elements.go", - "equals.go", - "schemaschema.go", - ], - importmap = "kubevirt.io/kubevirt/vendor/sigs.k8s.io/structured-merge-diff/v4/schema", - importpath = "sigs.k8s.io/structured-merge-diff/v4/schema", - visibility = ["//visibility:public"], -) diff --git a/vendor/sigs.k8s.io/structured-merge-diff/v4/typed/BUILD.bazel b/vendor/sigs.k8s.io/structured-merge-diff/v4/typed/BUILD.bazel deleted file mode 100644 index 3f1b439839d8..000000000000 --- a/vendor/sigs.k8s.io/structured-merge-diff/v4/typed/BUILD.bazel +++ /dev/null @@ -1,26 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "helpers.go", - "merge.go", - "parser.go", - "reconcile_schema.go", - "remove.go", - "tofieldset.go", - "typed.go", - "union.go", - "validate.go", - ], - importmap = "kubevirt.io/kubevirt/vendor/sigs.k8s.io/structured-merge-diff/v4/typed", - importpath = "sigs.k8s.io/structured-merge-diff/v4/typed", - visibility = ["//visibility:public"], - deps = [ - "//vendor/gopkg.in/yaml.v2:go_default_library", - "//vendor/sigs.k8s.io/structured-merge-diff/v4/fieldpath:go_default_library", - "//vendor/sigs.k8s.io/structured-merge-diff/v4/schema:go_default_library", - "//vendor/sigs.k8s.io/structured-merge-diff/v4/value:go_default_library", - ], -) diff --git a/vendor/sigs.k8s.io/structured-merge-diff/v4/value/BUILD.bazel b/vendor/sigs.k8s.io/structured-merge-diff/v4/value/BUILD.bazel deleted file mode 100644 index 98eb97129432..000000000000 --- a/vendor/sigs.k8s.io/structured-merge-diff/v4/value/BUILD.bazel +++ /dev/null @@ -1,30 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "allocator.go", - "doc.go", - "fields.go", - "jsontagutil.go", - "list.go", - "listreflect.go", - "listunstructured.go", - "map.go", - "mapreflect.go", - "mapunstructured.go", - "reflectcache.go", - "scalar.go", - "structreflect.go", - "value.go", - "valuereflect.go", - "valueunstructured.go", - ], - importmap = "kubevirt.io/kubevirt/vendor/sigs.k8s.io/structured-merge-diff/v4/value", - importpath = "sigs.k8s.io/structured-merge-diff/v4/value", - visibility = ["//visibility:public"], - deps = [ - "//vendor/github.com/json-iterator/go:go_default_library", - "//vendor/gopkg.in/yaml.v2:go_default_library", - ], -) diff --git a/vendor/sigs.k8s.io/yaml/BUILD.bazel b/vendor/sigs.k8s.io/yaml/BUILD.bazel deleted file mode 100644 index dfff62e1649d..000000000000 --- a/vendor/sigs.k8s.io/yaml/BUILD.bazel +++ /dev/null @@ -1,14 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "fields.go", - "yaml.go", - "yaml_go110.go", - ], - importmap = "kubevirt.io/kubevirt/vendor/sigs.k8s.io/yaml", - importpath = "sigs.k8s.io/yaml", - visibility = ["//visibility:public"], - deps = ["//vendor/gopkg.in/yaml.v2:go_default_library"], -)