From 03f7dc5889f0a9698d36fd442fe26ef5579c6c2f Mon Sep 17 00:00:00 2001 From: Amir Alavi Date: Mon, 18 May 2026 22:39:53 -0400 Subject: [PATCH] Bump KubeVirt dependencies to v1.8.2 and migrate to new client package - Update kubevirt.io/api from v1.3.0 to v1.8.2 - Update kubevirt.io/client-go from v1.3.0 to v1.8.2 - Update kubevirt.io/containerized-data-importer-api from v1.57.0-alpha1 to v1.64.0 - Migrate e2e test from deprecated generated clientset path (kubevirt.io/client-go/generated/kubevirt/clientset/versioned) to new kubevirt.io/client-go/kubevirt client package - Update vendor and dependencies for Kubernetes 1.36 compatibility --- go.mod | 15 +- go.sum | 38 +- test/e2e/e2e_evictioninbackground_test.go | 10 +- vendor/github.com/go-kit/kit/LICENSE | 22 - vendor/github.com/go-kit/kit/log/README.md | 160 - vendor/github.com/go-kit/kit/log/doc.go | 118 - .../github.com/go-kit/kit/log/json_logger.go | 15 - vendor/github.com/go-kit/kit/log/log.go | 51 - .../go-kit/kit/log/logfmt_logger.go | 15 - .../github.com/go-kit/kit/log/nop_logger.go | 8 - vendor/github.com/go-kit/kit/log/stdlib.go | 54 - vendor/github.com/go-kit/kit/log/sync.go | 37 - vendor/github.com/go-kit/kit/log/value.go | 52 - vendor/github.com/golang/glog/LICENSE | 191 - vendor/github.com/golang/glog/README.md | 36 - vendor/github.com/golang/glog/glog.go | 794 --- vendor/github.com/golang/glog/glog_file.go | 449 -- .../github.com/golang/glog/glog_file_linux.go | 39 - .../golang/glog/glog_file_nonwindows.go | 19 - .../github.com/golang/glog/glog_file_other.go | 30 - .../github.com/golang/glog/glog_file_posix.go | 53 - .../golang/glog/glog_file_windows.go | 43 - vendor/github.com/golang/glog/glog_flags.go | 398 -- .../golang/glog/internal/logsink/logsink.go | 393 -- .../glog/internal/logsink/logsink_fatal.go | 35 - .../glog/internal/stackdump/stackdump.go | 127 - vendor/github.com/openshift/api/LICENSE | 191 - ...rsion-operator_01_clusteroperator.crd.yaml | 137 - ...ersion-operator_01_clusterversion.crd.yaml | 435 -- .../0000_03_config-operator_01_proxy.crd.yaml | 78 - ...rketplace-operator_01_operatorhub.crd.yaml | 84 - ...fig-operator_01_apiserver-Default.crd.yaml | 179 - ...01_apiserver-TechPreviewNoUpgrade.crd.yaml | 179 - ...config-operator_01_authentication.crd.yaml | 101 - .../0000_10_config-operator_01_build.crd.yaml | 290 - ...000_10_config-operator_01_console.crd.yaml | 57 - .../0000_10_config-operator_01_dns.crd.yaml | 72 - ...10_config-operator_01_featuregate.crd.yaml | 153 - .../0000_10_config-operator_01_image.crd.yaml | 108 - ...ig-operator_01_imagecontentpolicy.crd.yaml | 68 - ...-operator_01_imagedigestmirrorset.crd.yaml | 74 - ...fig-operator_01_imagetagmirrorset.crd.yaml | 74 - ...perator_01_infrastructure-Default.crd.yaml | 834 --- ...r_01_infrastructure-Default.crd.yaml-patch | 24 - ...frastructure-TechPreviewNoUpgrade.crd.yaml | 905 --- ...ucture-TechPreviewNoUpgrade.crd.yaml-patch | 24 - ...000_10_config-operator_01_ingress.crd.yaml | 334 -- ...000_10_config-operator_01_network.crd.yaml | 163 - .../0000_10_config-operator_01_node.crd.yaml | 59 - .../0000_10_config-operator_01_oauth.crd.yaml | 444 -- ...000_10_config-operator_01_project.crd.yaml | 55 - ...0_10_config-operator_01_scheduler.crd.yaml | 68 - .../openshift/api/config/v1/Makefile | 3 - .../github.com/openshift/api/config/v1/doc.go | 8 - .../openshift/api/config/v1/feature_gates.go | 185 - .../openshift/api/config/v1/register.go | 78 - .../config/v1/stable.apiserver.testsuite.yaml | 36 - .../v1/stable.authentication.testsuite.yaml | 14 - .../api/config/v1/stable.build.testsuite.yaml | 14 - .../v1/stable.clusteroperator.testsuite.yaml | 14 - .../v1/stable.clusterversion.testsuite.yaml | 138 - .../config/v1/stable.console.testsuite.yaml | 14 - .../api/config/v1/stable.dns.testsuite.yaml | 14 - .../v1/stable.featuregate.testsuite.yaml | 14 - .../api/config/v1/stable.image.testsuite.yaml | 14 - .../stable.imagecontentpolicy.testsuite.yaml | 14 - ...stable.imagedigestmirrorset.testsuite.yaml | 14 - .../stable.imagetagmirrorset.testsuite.yaml | 14 - .../v1/stable.infrastructure.testsuite.yaml | 476 -- .../config/v1/stable.ingress.testsuite.yaml | 14 - .../config/v1/stable.network.testsuite.yaml | 14 - .../api/config/v1/stable.node.testsuite.yaml | 14 - .../api/config/v1/stable.oauth.testsuite.yaml | 14 - .../v1/stable.operatorhub.testsuite.yaml | 14 - .../config/v1/stable.project.testsuite.yaml | 14 - .../api/config/v1/stable.proxy.testsuite.yaml | 14 - .../config/v1/stable.scheduler.testsuite.yaml | 14 - .../openshift/api/config/v1/stringsource.go | 31 - .../v1/techpreview.apiserver.testsuite.yaml | 35 - .../techpreview.infrastructure.testsuite.yaml | 213 - .../openshift/api/config/v1/types.go | 400 -- .../api/config/v1/types_apiserver.go | 221 - .../api/config/v1/types_authentication.go | 161 - .../openshift/api/config/v1/types_build.go | 127 - .../api/config/v1/types_cluster_operator.go | 216 - .../api/config/v1/types_cluster_version.go | 650 -- .../openshift/api/config/v1/types_console.go | 75 - .../openshift/api/config/v1/types_dns.go | 98 - .../openshift/api/config/v1/types_feature.go | 283 - .../openshift/api/config/v1/types_image.go | 134 - .../config/v1/types_image_content_policy.go | 95 - .../v1/types_image_digest_mirror_set.go | 137 - .../config/v1/types_image_tag_mirror_set.go | 124 - .../api/config/v1/types_infrastructure.go | 1342 ----- .../openshift/api/config/v1/types_ingress.go | 334 -- .../openshift/api/config/v1/types_network.go | 183 - .../openshift/api/config/v1/types_node.go | 114 - .../openshift/api/config/v1/types_oauth.go | 592 -- .../api/config/v1/types_operatorhub.go | 91 - .../openshift/api/config/v1/types_project.go | 65 - .../openshift/api/config/v1/types_proxy.go | 105 - .../api/config/v1/types_scheduling.go | 111 - .../api/config/v1/zz_generated.deepcopy.go | 5299 ----------------- .../v1/zz_generated.swagger_doc_generated.go | 2281 ------- .../pkg/apis/apiextensions/doc.go | 2 +- .../apis/apiextensions/types_jsonschema.go | 1 - .../pkg/apis/apiextensions/v1/conversion.go | 2 +- .../pkg/apis/apiextensions/v1/defaults.go | 4 +- .../pkg/apis/apiextensions/v1/doc.go | 3 +- .../pkg/apis/apiextensions/v1/generated.proto | 13 +- .../pkg/apis/apiextensions/v1/marshal.go | 161 +- .../pkg/apis/apiextensions/v1/types.go | 3 + .../apis/apiextensions/v1/types_jsonschema.go | 1 - .../v1/zz_generated.prerelease-lifecycle.go | 40 + vendor/kubevirt.io/api/backup/register.go | 25 + .../api/backup/v1alpha1/deepcopy_generated.go | 386 ++ .../v1alpha2 => backup/v1alpha1}/doc.go | 8 +- .../api/backup/v1alpha1/register.go | 66 + .../kubevirt.io/api/backup/v1alpha1/types.go | 274 + .../v1alpha1/types_swagger_generated.go | 101 + vendor/kubevirt.io/api/clone/register.go | 10 +- .../api/clone/v1alpha1/deepcopy_generated.go | 4 +- .../api/clone/v1alpha1/register.go | 6 +- .../api/clone/v1beta1/deepcopy_generated.go | 235 + vendor/kubevirt.io/api/clone/v1beta1/doc.go | 24 + .../v1alpha2 => clone/v1beta1}/register.go | 26 +- vendor/kubevirt.io/api/clone/v1beta1/types.go | 208 + .../clone/v1beta1/types_swagger_generated.go | 58 + .../api/core/v1/deepcopy_generated.go | 1095 +++- vendor/kubevirt.io/api/core/v1/defaults.go | 25 - vendor/kubevirt.io/api/core/v1/schema.go | 286 +- .../api/core/v1/schema_swagger_generated.go | 142 +- vendor/kubevirt.io/api/core/v1/types.go | 910 ++- .../api/core/v1/types_swagger_generated.go | 266 +- .../api/core/v1/zz_generated.defaults.go | 76 +- .../api/export/v1alpha1/deepcopy_generated.go | 4 +- .../api/export/v1beta1/deepcopy_generated.go | 48 +- .../kubevirt.io/api/export/v1beta1/types.go | 33 + .../export/v1beta1/types_swagger_generated.go | 17 + vendor/kubevirt.io/api/instancetype/OWNERS | 10 + .../api/instancetype/v1alpha1/conversion.go | 73 - .../v1alpha1/conversion_generated.go | 820 --- .../v1alpha1/deepcopy_generated.go | 669 --- .../api/instancetype/v1alpha1/types.go | 488 -- .../v1alpha1/types_swagger_generated.go | 190 - .../api/instancetype/v1alpha2/conversion.go | 73 - .../v1alpha2/conversion_generated.go | 851 --- .../v1alpha2/deepcopy_generated.go | 648 -- .../api/instancetype/v1alpha2/types.go | 475 -- .../v1alpha2/types_swagger_generated.go | 181 - .../v1beta1/deepcopy_generated.go | 41 +- .../api/instancetype/v1beta1/types.go | 58 +- .../v1beta1/types_swagger_generated.go | 13 +- .../migrations/v1alpha1/deepcopy_generated.go | 9 +- .../api/migrations/v1alpha1/types.go | 10 + .../v1alpha1/types_swagger_generated.go | 1 + .../api/pool/v1alpha1/deepcopy_generated.go | 303 +- vendor/kubevirt.io/api/pool/v1alpha1/types.go | 171 +- .../pool/v1alpha1/types_swagger_generated.go | 89 +- .../api/pool/v1beta1/deepcopy_generated.go | 479 ++ .../v1alpha1 => pool/v1beta1}/doc.go | 6 +- .../v1alpha1 => pool/v1beta1}/register.go | 18 +- vendor/kubevirt.io/api/pool/v1beta1/types.go | 290 + .../pool/v1beta1/types_swagger_generated.go | 136 + .../snapshot/v1alpha1/deepcopy_generated.go | 25 +- .../api/snapshot/v1alpha1/types.go | 17 +- .../v1alpha1/types_swagger_generated.go | 13 +- .../snapshot/v1beta1/deepcopy_generated.go | 77 +- .../kubevirt.io/api/snapshot/v1beta1/types.go | 102 +- .../v1beta1/types_swagger_generated.go | 34 +- .../clone/v1alpha1/virtualmachineclone.go | 195 - .../versioned/typed/core/v1/kubevirt.go | 195 - .../versioned/typed/core/v1/virtualmachine.go | 195 - .../typed/core/v1/virtualmachineinstance.go | 195 - .../v1/virtualmachineinstancemigration.go | 195 - .../core/v1/virtualmachineinstancepreset.go | 178 - .../v1/virtualmachineinstancereplicaset.go | 195 - .../export/v1alpha1/virtualmachineexport.go | 195 - .../export/v1beta1/virtualmachineexport.go | 195 - .../v1alpha1/generated_expansion.go | 27 - .../v1alpha1/instancetype_client.go | 104 - .../virtualmachineclusterinstancetype.go | 168 - .../virtualmachineclusterpreference.go | 168 - .../v1alpha1/virtualmachineinstancetype.go | 178 - .../v1alpha1/virtualmachinepreference.go | 178 - .../typed/instancetype/v1alpha2/doc.go | 20 - .../v1alpha2/generated_expansion.go | 27 - .../v1alpha2/instancetype_client.go | 104 - .../virtualmachineclusterinstancetype.go | 168 - .../virtualmachineclusterpreference.go | 168 - .../v1alpha2/virtualmachineinstancetype.go | 178 - .../v1alpha2/virtualmachinepreference.go | 178 - .../virtualmachineclusterinstancetype.go | 168 - .../virtualmachineclusterpreference.go | 168 - .../v1beta1/virtualmachineinstancetype.go | 178 - .../v1beta1/virtualmachinepreference.go | 178 - .../migrations/v1alpha1/migrationpolicy.go | 184 - .../versioned/typed/pool/v1alpha1/doc.go | 20 - .../typed/pool/v1alpha1/virtualmachinepool.go | 195 - .../versioned/typed/snapshot/v1alpha1/doc.go | 20 - .../v1alpha1/virtualmachinerestore.go | 195 - .../v1alpha1/virtualmachinesnapshot.go | 195 - .../v1alpha1/virtualmachinesnapshotcontent.go | 195 - .../snapshot/v1beta1/virtualmachinerestore.go | 195 - .../v1beta1/virtualmachinesnapshot.go | 195 - .../v1beta1/virtualmachinesnapshotcontent.go | 195 - .../versioned => kubevirt}/clientset.go | 164 +- .../clientset/versioned => kubevirt}/doc.go | 2 +- .../versioned => kubevirt}/scheme/doc.go | 4 +- .../versioned => kubevirt}/scheme/register.go | 14 +- .../typed/backup/v1alpha1/backup_client.go | 114 + .../typed/backup}/v1alpha1/doc.go | 4 +- .../backup/v1alpha1/generated_expansion.go | 25 + .../backup/v1alpha1/virtualmachinebackup.go | 72 + .../v1alpha1/virtualmachinebackuptracker.go | 76 + .../typed/clone/v1alpha1/clone_client.go | 32 +- .../typed/clone}/v1alpha1/doc.go | 4 +- .../clone/v1alpha1/generated_expansion.go | 4 +- .../clone/v1alpha1/virtualmachineclone.go | 72 + .../typed/clone/v1beta1/clone_client.go | 109 + .../typed/clone}/v1beta1/doc.go | 4 +- .../clone/v1beta1/generated_expansion.go | 23 + .../clone/v1beta1/virtualmachineclone.go | 72 + .../typed/core/v1/async.go | 45 +- .../typed/core/v1/core_client.go | 32 +- .../typed/core/v1/doc.go | 4 +- .../typed/core/v1/generated_expansion.go | 4 +- .../kubevirt/typed/core/v1/kubevirt.go | 72 + .../typed/core/v1/kubevirt_expansion.go | 0 .../typed/core/v1/streamer.go | 0 .../kubevirt/typed/core/v1/virtualmachine.go | 72 + .../typed/core/v1/virtualmachine_expansion.go | 110 +- .../typed/core/v1/virtualmachineinstance.go | 70 + .../v1/virtualmachineinstance_expansion.go | 170 +- .../v1/virtualmachineinstancemigration.go | 74 + ...rtualmachineinstancemigration_expansion.go | 0 .../core/v1/virtualmachineinstancepreset.go | 70 + .../v1/virtualmachineinstancereplicaset.go | 74 + ...tualmachineinstancereplicaset_expansion.go | 8 +- .../typed/core/v1/websocket.go | 0 .../typed/export}/v1alpha1/doc.go | 4 +- .../typed/export/v1alpha1/export_client.go | 32 +- .../export/v1alpha1/generated_expansion.go | 4 +- .../export/v1alpha1/virtualmachineexport.go | 72 + .../typed/export}/v1beta1/doc.go | 4 +- .../typed/export/v1beta1/export_client.go | 32 +- .../export/v1beta1/generated_expansion.go | 4 +- .../export/v1beta1/virtualmachineexport.go | 72 + .../typed/instancetype}/v1beta1/doc.go | 4 +- .../v1beta1/generated_expansion.go | 4 +- .../v1beta1/instancetype_client.go | 32 +- .../virtualmachineclusterinstancetype.go | 74 + .../virtualmachineclusterpreference.go | 74 + .../v1beta1/virtualmachineinstancetype.go | 74 + .../v1beta1/virtualmachinepreference.go | 74 + .../typed/migrations/v1alpha1/doc.go | 4 +- .../v1alpha1/generated_expansion.go | 4 +- .../migrations/v1alpha1/migrationpolicy.go | 72 + .../migrations/v1alpha1/migrations_client.go | 32 +- .../kubevirt/typed/pool/v1alpha1/doc.go | 22 + .../pool/v1alpha1/generated_expansion.go | 4 +- .../typed/pool/v1alpha1/pool_client.go | 32 +- .../typed/pool/v1alpha1/virtualmachinepool.go | 72 + .../kubevirt/typed/pool/v1beta1/doc.go | 22 + .../typed/pool/v1beta1/generated_expansion.go | 23 + .../typed/pool/v1beta1/pool_client.go | 109 + .../typed/pool/v1beta1/virtualmachinepool.go | 72 + .../kubevirt/typed/snapshot/v1alpha1/doc.go | 22 + .../snapshot/v1alpha1/generated_expansion.go | 4 +- .../snapshot/v1alpha1/snapshot_client.go | 32 +- .../v1alpha1/virtualmachinerestore.go | 74 + .../v1alpha1/virtualmachinesnapshot.go | 74 + .../v1alpha1/virtualmachinesnapshotcontent.go | 76 + .../kubevirt/typed/snapshot/v1beta1/doc.go | 22 + .../snapshot/v1beta1/generated_expansion.go | 4 +- .../typed/snapshot/v1beta1/snapshot_client.go | 32 +- .../snapshot/v1beta1/virtualmachinerestore.go | 72 + .../v1beta1/virtualmachinesnapshot.go | 74 + .../v1beta1/virtualmachinesnapshotcontent.go | 76 + vendor/kubevirt.io/client-go/log/log.go | 27 +- .../pkg/apis/core/v1beta1/authorize_utils.go | 11 +- .../pkg/apis/core/v1beta1/register.go | 7 +- .../pkg/apis/core/v1beta1/types.go | 162 +- .../core/v1beta1/types_swagger_generated.go | 129 +- .../core/v1beta1}/types_tlssecurityprofile.go | 34 +- .../pkg/apis/core/v1beta1/types_transfer.go | 2 + .../core/v1beta1/zz_generated.deepcopy.go | 350 +- vendor/modules.txt | 64 +- 288 files changed, 9666 insertions(+), 34013 deletions(-) delete mode 100644 vendor/github.com/go-kit/kit/LICENSE delete mode 100644 vendor/github.com/go-kit/kit/log/README.md delete mode 100644 vendor/github.com/go-kit/kit/log/doc.go delete mode 100644 vendor/github.com/go-kit/kit/log/json_logger.go delete mode 100644 vendor/github.com/go-kit/kit/log/log.go delete mode 100644 vendor/github.com/go-kit/kit/log/logfmt_logger.go delete mode 100644 vendor/github.com/go-kit/kit/log/nop_logger.go delete mode 100644 vendor/github.com/go-kit/kit/log/stdlib.go delete mode 100644 vendor/github.com/go-kit/kit/log/sync.go delete mode 100644 vendor/github.com/go-kit/kit/log/value.go delete mode 100644 vendor/github.com/golang/glog/LICENSE delete mode 100644 vendor/github.com/golang/glog/README.md delete mode 100644 vendor/github.com/golang/glog/glog.go delete mode 100644 vendor/github.com/golang/glog/glog_file.go delete mode 100644 vendor/github.com/golang/glog/glog_file_linux.go delete mode 100644 vendor/github.com/golang/glog/glog_file_nonwindows.go delete mode 100644 vendor/github.com/golang/glog/glog_file_other.go delete mode 100644 vendor/github.com/golang/glog/glog_file_posix.go delete mode 100644 vendor/github.com/golang/glog/glog_file_windows.go delete mode 100644 vendor/github.com/golang/glog/glog_flags.go delete mode 100644 vendor/github.com/golang/glog/internal/logsink/logsink.go delete mode 100644 vendor/github.com/golang/glog/internal/logsink/logsink_fatal.go delete mode 100644 vendor/github.com/golang/glog/internal/stackdump/stackdump.go delete mode 100644 vendor/github.com/openshift/api/LICENSE delete mode 100644 vendor/github.com/openshift/api/config/v1/0000_00_cluster-version-operator_01_clusteroperator.crd.yaml delete mode 100644 vendor/github.com/openshift/api/config/v1/0000_00_cluster-version-operator_01_clusterversion.crd.yaml delete mode 100644 vendor/github.com/openshift/api/config/v1/0000_03_config-operator_01_proxy.crd.yaml delete mode 100644 vendor/github.com/openshift/api/config/v1/0000_03_marketplace-operator_01_operatorhub.crd.yaml delete mode 100644 vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_apiserver-Default.crd.yaml delete mode 100644 vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_apiserver-TechPreviewNoUpgrade.crd.yaml delete mode 100644 vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_authentication.crd.yaml delete mode 100644 vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_build.crd.yaml delete mode 100644 vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_console.crd.yaml delete mode 100644 vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_dns.crd.yaml delete mode 100644 vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_featuregate.crd.yaml delete mode 100644 vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_image.crd.yaml delete mode 100644 vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_imagecontentpolicy.crd.yaml delete mode 100644 vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_imagedigestmirrorset.crd.yaml delete mode 100644 vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_imagetagmirrorset.crd.yaml delete mode 100644 vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_infrastructure-Default.crd.yaml delete mode 100644 vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_infrastructure-Default.crd.yaml-patch delete mode 100644 vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_infrastructure-TechPreviewNoUpgrade.crd.yaml delete mode 100644 vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_infrastructure-TechPreviewNoUpgrade.crd.yaml-patch delete mode 100644 vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_ingress.crd.yaml delete mode 100644 vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_network.crd.yaml delete mode 100644 vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_node.crd.yaml delete mode 100644 vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_oauth.crd.yaml delete mode 100644 vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_project.crd.yaml delete mode 100644 vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_scheduler.crd.yaml delete mode 100644 vendor/github.com/openshift/api/config/v1/Makefile delete mode 100644 vendor/github.com/openshift/api/config/v1/doc.go delete mode 100644 vendor/github.com/openshift/api/config/v1/feature_gates.go delete mode 100644 vendor/github.com/openshift/api/config/v1/register.go delete mode 100644 vendor/github.com/openshift/api/config/v1/stable.apiserver.testsuite.yaml delete mode 100644 vendor/github.com/openshift/api/config/v1/stable.authentication.testsuite.yaml delete mode 100644 vendor/github.com/openshift/api/config/v1/stable.build.testsuite.yaml delete mode 100644 vendor/github.com/openshift/api/config/v1/stable.clusteroperator.testsuite.yaml delete mode 100644 vendor/github.com/openshift/api/config/v1/stable.clusterversion.testsuite.yaml delete mode 100644 vendor/github.com/openshift/api/config/v1/stable.console.testsuite.yaml delete mode 100644 vendor/github.com/openshift/api/config/v1/stable.dns.testsuite.yaml delete mode 100644 vendor/github.com/openshift/api/config/v1/stable.featuregate.testsuite.yaml delete mode 100644 vendor/github.com/openshift/api/config/v1/stable.image.testsuite.yaml delete mode 100644 vendor/github.com/openshift/api/config/v1/stable.imagecontentpolicy.testsuite.yaml delete mode 100644 vendor/github.com/openshift/api/config/v1/stable.imagedigestmirrorset.testsuite.yaml delete mode 100644 vendor/github.com/openshift/api/config/v1/stable.imagetagmirrorset.testsuite.yaml delete mode 100644 vendor/github.com/openshift/api/config/v1/stable.infrastructure.testsuite.yaml delete mode 100644 vendor/github.com/openshift/api/config/v1/stable.ingress.testsuite.yaml delete mode 100644 vendor/github.com/openshift/api/config/v1/stable.network.testsuite.yaml delete mode 100644 vendor/github.com/openshift/api/config/v1/stable.node.testsuite.yaml delete mode 100644 vendor/github.com/openshift/api/config/v1/stable.oauth.testsuite.yaml delete mode 100644 vendor/github.com/openshift/api/config/v1/stable.operatorhub.testsuite.yaml delete mode 100644 vendor/github.com/openshift/api/config/v1/stable.project.testsuite.yaml delete mode 100644 vendor/github.com/openshift/api/config/v1/stable.proxy.testsuite.yaml delete mode 100644 vendor/github.com/openshift/api/config/v1/stable.scheduler.testsuite.yaml delete mode 100644 vendor/github.com/openshift/api/config/v1/stringsource.go delete mode 100644 vendor/github.com/openshift/api/config/v1/techpreview.apiserver.testsuite.yaml delete mode 100644 vendor/github.com/openshift/api/config/v1/techpreview.infrastructure.testsuite.yaml delete mode 100644 vendor/github.com/openshift/api/config/v1/types.go delete mode 100644 vendor/github.com/openshift/api/config/v1/types_apiserver.go delete mode 100644 vendor/github.com/openshift/api/config/v1/types_authentication.go delete mode 100644 vendor/github.com/openshift/api/config/v1/types_build.go delete mode 100644 vendor/github.com/openshift/api/config/v1/types_cluster_operator.go delete mode 100644 vendor/github.com/openshift/api/config/v1/types_cluster_version.go delete mode 100644 vendor/github.com/openshift/api/config/v1/types_console.go delete mode 100644 vendor/github.com/openshift/api/config/v1/types_dns.go delete mode 100644 vendor/github.com/openshift/api/config/v1/types_feature.go delete mode 100644 vendor/github.com/openshift/api/config/v1/types_image.go delete mode 100644 vendor/github.com/openshift/api/config/v1/types_image_content_policy.go delete mode 100644 vendor/github.com/openshift/api/config/v1/types_image_digest_mirror_set.go delete mode 100644 vendor/github.com/openshift/api/config/v1/types_image_tag_mirror_set.go delete mode 100644 vendor/github.com/openshift/api/config/v1/types_infrastructure.go delete mode 100644 vendor/github.com/openshift/api/config/v1/types_ingress.go delete mode 100644 vendor/github.com/openshift/api/config/v1/types_network.go delete mode 100644 vendor/github.com/openshift/api/config/v1/types_node.go delete mode 100644 vendor/github.com/openshift/api/config/v1/types_oauth.go delete mode 100644 vendor/github.com/openshift/api/config/v1/types_operatorhub.go delete mode 100644 vendor/github.com/openshift/api/config/v1/types_project.go delete mode 100644 vendor/github.com/openshift/api/config/v1/types_proxy.go delete mode 100644 vendor/github.com/openshift/api/config/v1/types_scheduling.go delete mode 100644 vendor/github.com/openshift/api/config/v1/zz_generated.deepcopy.go delete mode 100644 vendor/github.com/openshift/api/config/v1/zz_generated.swagger_doc_generated.go create mode 100644 vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/zz_generated.prerelease-lifecycle.go create mode 100644 vendor/kubevirt.io/api/backup/register.go create mode 100644 vendor/kubevirt.io/api/backup/v1alpha1/deepcopy_generated.go rename vendor/kubevirt.io/api/{instancetype/v1alpha2 => backup/v1alpha1}/doc.go (75%) create mode 100644 vendor/kubevirt.io/api/backup/v1alpha1/register.go create mode 100644 vendor/kubevirt.io/api/backup/v1alpha1/types.go create mode 100644 vendor/kubevirt.io/api/backup/v1alpha1/types_swagger_generated.go create mode 100644 vendor/kubevirt.io/api/clone/v1beta1/deepcopy_generated.go create mode 100644 vendor/kubevirt.io/api/clone/v1beta1/doc.go rename vendor/kubevirt.io/api/{instancetype/v1alpha2 => clone/v1beta1}/register.go (73%) create mode 100644 vendor/kubevirt.io/api/clone/v1beta1/types.go create mode 100644 vendor/kubevirt.io/api/clone/v1beta1/types_swagger_generated.go create mode 100644 vendor/kubevirt.io/api/instancetype/OWNERS delete mode 100644 vendor/kubevirt.io/api/instancetype/v1alpha1/conversion.go delete mode 100644 vendor/kubevirt.io/api/instancetype/v1alpha1/conversion_generated.go delete mode 100644 vendor/kubevirt.io/api/instancetype/v1alpha1/deepcopy_generated.go delete mode 100644 vendor/kubevirt.io/api/instancetype/v1alpha1/types.go delete mode 100644 vendor/kubevirt.io/api/instancetype/v1alpha1/types_swagger_generated.go delete mode 100644 vendor/kubevirt.io/api/instancetype/v1alpha2/conversion.go delete mode 100644 vendor/kubevirt.io/api/instancetype/v1alpha2/conversion_generated.go delete mode 100644 vendor/kubevirt.io/api/instancetype/v1alpha2/deepcopy_generated.go delete mode 100644 vendor/kubevirt.io/api/instancetype/v1alpha2/types.go delete mode 100644 vendor/kubevirt.io/api/instancetype/v1alpha2/types_swagger_generated.go create mode 100644 vendor/kubevirt.io/api/pool/v1beta1/deepcopy_generated.go rename vendor/kubevirt.io/api/{instancetype/v1alpha1 => pool/v1beta1}/doc.go (78%) rename vendor/kubevirt.io/api/{instancetype/v1alpha1 => pool/v1beta1}/register.go (76%) create mode 100644 vendor/kubevirt.io/api/pool/v1beta1/types.go create mode 100644 vendor/kubevirt.io/api/pool/v1beta1/types_swagger_generated.go delete mode 100644 vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/clone/v1alpha1/virtualmachineclone.go delete mode 100644 vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/core/v1/kubevirt.go delete mode 100644 vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/core/v1/virtualmachine.go delete mode 100644 vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/core/v1/virtualmachineinstance.go delete mode 100644 vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/core/v1/virtualmachineinstancemigration.go delete mode 100644 vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/core/v1/virtualmachineinstancepreset.go delete mode 100644 vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/core/v1/virtualmachineinstancereplicaset.go delete mode 100644 vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/export/v1alpha1/virtualmachineexport.go delete mode 100644 vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/export/v1beta1/virtualmachineexport.go delete mode 100644 vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/instancetype/v1alpha1/generated_expansion.go delete mode 100644 vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/instancetype/v1alpha1/instancetype_client.go delete mode 100644 vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/instancetype/v1alpha1/virtualmachineclusterinstancetype.go delete mode 100644 vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/instancetype/v1alpha1/virtualmachineclusterpreference.go delete mode 100644 vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/instancetype/v1alpha1/virtualmachineinstancetype.go delete mode 100644 vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/instancetype/v1alpha1/virtualmachinepreference.go delete mode 100644 vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/instancetype/v1alpha2/doc.go delete mode 100644 vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/instancetype/v1alpha2/generated_expansion.go delete mode 100644 vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/instancetype/v1alpha2/instancetype_client.go delete mode 100644 vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/instancetype/v1alpha2/virtualmachineclusterinstancetype.go delete mode 100644 vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/instancetype/v1alpha2/virtualmachineclusterpreference.go delete mode 100644 vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/instancetype/v1alpha2/virtualmachineinstancetype.go delete mode 100644 vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/instancetype/v1alpha2/virtualmachinepreference.go delete mode 100644 vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/instancetype/v1beta1/virtualmachineclusterinstancetype.go delete mode 100644 vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/instancetype/v1beta1/virtualmachineclusterpreference.go delete mode 100644 vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/instancetype/v1beta1/virtualmachineinstancetype.go delete mode 100644 vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/instancetype/v1beta1/virtualmachinepreference.go delete mode 100644 vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/migrations/v1alpha1/migrationpolicy.go delete mode 100644 vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/pool/v1alpha1/doc.go delete mode 100644 vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/pool/v1alpha1/virtualmachinepool.go delete mode 100644 vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/snapshot/v1alpha1/doc.go delete mode 100644 vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/snapshot/v1alpha1/virtualmachinerestore.go delete mode 100644 vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/snapshot/v1alpha1/virtualmachinesnapshot.go delete mode 100644 vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/snapshot/v1alpha1/virtualmachinesnapshotcontent.go delete mode 100644 vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/snapshot/v1beta1/virtualmachinerestore.go delete mode 100644 vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/snapshot/v1beta1/virtualmachinesnapshot.go delete mode 100644 vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/snapshot/v1beta1/virtualmachinesnapshotcontent.go rename vendor/kubevirt.io/client-go/{generated/kubevirt/clientset/versioned => kubevirt}/clientset.go (52%) rename vendor/kubevirt.io/client-go/{generated/kubevirt/clientset/versioned => kubevirt}/doc.go (97%) rename vendor/kubevirt.io/client-go/{generated/kubevirt/clientset/versioned => kubevirt}/scheme/doc.go (94%) rename vendor/kubevirt.io/client-go/{generated/kubevirt/clientset/versioned => kubevirt}/scheme/register.go (90%) create mode 100644 vendor/kubevirt.io/client-go/kubevirt/typed/backup/v1alpha1/backup_client.go rename vendor/kubevirt.io/client-go/{generated/kubevirt/clientset/versioned/typed/instancetype => kubevirt/typed/backup}/v1alpha1/doc.go (94%) create mode 100644 vendor/kubevirt.io/client-go/kubevirt/typed/backup/v1alpha1/generated_expansion.go create mode 100644 vendor/kubevirt.io/client-go/kubevirt/typed/backup/v1alpha1/virtualmachinebackup.go create mode 100644 vendor/kubevirt.io/client-go/kubevirt/typed/backup/v1alpha1/virtualmachinebackuptracker.go rename vendor/kubevirt.io/client-go/{generated/kubevirt/clientset/versioned => kubevirt}/typed/clone/v1alpha1/clone_client.go (68%) rename vendor/kubevirt.io/client-go/{generated/kubevirt/clientset/versioned/typed/export => kubevirt/typed/clone}/v1alpha1/doc.go (94%) rename vendor/kubevirt.io/client-go/{generated/kubevirt/clientset/versioned => kubevirt}/typed/clone/v1alpha1/generated_expansion.go (94%) create mode 100644 vendor/kubevirt.io/client-go/kubevirt/typed/clone/v1alpha1/virtualmachineclone.go create mode 100644 vendor/kubevirt.io/client-go/kubevirt/typed/clone/v1beta1/clone_client.go rename vendor/kubevirt.io/client-go/{generated/kubevirt/clientset/versioned/typed/instancetype => kubevirt/typed/clone}/v1beta1/doc.go (94%) create mode 100644 vendor/kubevirt.io/client-go/kubevirt/typed/clone/v1beta1/generated_expansion.go create mode 100644 vendor/kubevirt.io/client-go/kubevirt/typed/clone/v1beta1/virtualmachineclone.go rename vendor/kubevirt.io/client-go/{generated/kubevirt/clientset/versioned => kubevirt}/typed/core/v1/async.go (86%) rename vendor/kubevirt.io/client-go/{generated/kubevirt/clientset/versioned => kubevirt}/typed/core/v1/core_client.go (76%) rename vendor/kubevirt.io/client-go/{generated/kubevirt/clientset/versioned => kubevirt}/typed/core/v1/doc.go (94%) rename vendor/kubevirt.io/client-go/{generated/kubevirt/clientset/versioned => kubevirt}/typed/core/v1/generated_expansion.go (94%) create mode 100644 vendor/kubevirt.io/client-go/kubevirt/typed/core/v1/kubevirt.go rename vendor/kubevirt.io/client-go/{generated/kubevirt/clientset/versioned => kubevirt}/typed/core/v1/kubevirt_expansion.go (100%) rename vendor/kubevirt.io/client-go/{generated/kubevirt/clientset/versioned => kubevirt}/typed/core/v1/streamer.go (100%) create mode 100644 vendor/kubevirt.io/client-go/kubevirt/typed/core/v1/virtualmachine.go rename vendor/kubevirt.io/client-go/{generated/kubevirt/clientset/versioned => kubevirt}/typed/core/v1/virtualmachine_expansion.go (80%) create mode 100644 vendor/kubevirt.io/client-go/kubevirt/typed/core/v1/virtualmachineinstance.go rename vendor/kubevirt.io/client-go/{generated/kubevirt/clientset/versioned => kubevirt}/typed/core/v1/virtualmachineinstance_expansion.go (72%) create mode 100644 vendor/kubevirt.io/client-go/kubevirt/typed/core/v1/virtualmachineinstancemigration.go rename vendor/kubevirt.io/client-go/{generated/kubevirt/clientset/versioned => kubevirt}/typed/core/v1/virtualmachineinstancemigration_expansion.go (100%) create mode 100644 vendor/kubevirt.io/client-go/kubevirt/typed/core/v1/virtualmachineinstancepreset.go create mode 100644 vendor/kubevirt.io/client-go/kubevirt/typed/core/v1/virtualmachineinstancereplicaset.go rename vendor/kubevirt.io/client-go/{generated/kubevirt/clientset/versioned => kubevirt}/typed/core/v1/virtualmachineinstancereplicaset_expansion.go (94%) rename vendor/kubevirt.io/client-go/{generated/kubevirt/clientset/versioned => kubevirt}/typed/core/v1/websocket.go (100%) rename vendor/kubevirt.io/client-go/{generated/kubevirt/clientset/versioned/typed/clone => kubevirt/typed/export}/v1alpha1/doc.go (94%) rename vendor/kubevirt.io/client-go/{generated/kubevirt/clientset/versioned => kubevirt}/typed/export/v1alpha1/export_client.go (69%) rename vendor/kubevirt.io/client-go/{generated/kubevirt/clientset/versioned => kubevirt}/typed/export/v1alpha1/generated_expansion.go (94%) create mode 100644 vendor/kubevirt.io/client-go/kubevirt/typed/export/v1alpha1/virtualmachineexport.go rename vendor/kubevirt.io/client-go/{generated/kubevirt/clientset/versioned/typed/snapshot => kubevirt/typed/export}/v1beta1/doc.go (94%) rename vendor/kubevirt.io/client-go/{generated/kubevirt/clientset/versioned => kubevirt}/typed/export/v1beta1/export_client.go (69%) rename vendor/kubevirt.io/client-go/{generated/kubevirt/clientset/versioned => kubevirt}/typed/export/v1beta1/generated_expansion.go (94%) create mode 100644 vendor/kubevirt.io/client-go/kubevirt/typed/export/v1beta1/virtualmachineexport.go rename vendor/kubevirt.io/client-go/{generated/kubevirt/clientset/versioned/typed/export => kubevirt/typed/instancetype}/v1beta1/doc.go (94%) rename vendor/kubevirt.io/client-go/{generated/kubevirt/clientset/versioned => kubevirt}/typed/instancetype/v1beta1/generated_expansion.go (95%) rename vendor/kubevirt.io/client-go/{generated/kubevirt/clientset/versioned => kubevirt}/typed/instancetype/v1beta1/instancetype_client.go (74%) create mode 100644 vendor/kubevirt.io/client-go/kubevirt/typed/instancetype/v1beta1/virtualmachineclusterinstancetype.go create mode 100644 vendor/kubevirt.io/client-go/kubevirt/typed/instancetype/v1beta1/virtualmachineclusterpreference.go create mode 100644 vendor/kubevirt.io/client-go/kubevirt/typed/instancetype/v1beta1/virtualmachineinstancetype.go create mode 100644 vendor/kubevirt.io/client-go/kubevirt/typed/instancetype/v1beta1/virtualmachinepreference.go rename vendor/kubevirt.io/client-go/{generated/kubevirt/clientset/versioned => kubevirt}/typed/migrations/v1alpha1/doc.go (94%) rename vendor/kubevirt.io/client-go/{generated/kubevirt/clientset/versioned => kubevirt}/typed/migrations/v1alpha1/generated_expansion.go (93%) create mode 100644 vendor/kubevirt.io/client-go/kubevirt/typed/migrations/v1alpha1/migrationpolicy.go rename vendor/kubevirt.io/client-go/{generated/kubevirt/clientset/versioned => kubevirt}/typed/migrations/v1alpha1/migrations_client.go (68%) create mode 100644 vendor/kubevirt.io/client-go/kubevirt/typed/pool/v1alpha1/doc.go rename vendor/kubevirt.io/client-go/{generated/kubevirt/clientset/versioned => kubevirt}/typed/pool/v1alpha1/generated_expansion.go (94%) rename vendor/kubevirt.io/client-go/{generated/kubevirt/clientset/versioned => kubevirt}/typed/pool/v1alpha1/pool_client.go (68%) create mode 100644 vendor/kubevirt.io/client-go/kubevirt/typed/pool/v1alpha1/virtualmachinepool.go create mode 100644 vendor/kubevirt.io/client-go/kubevirt/typed/pool/v1beta1/doc.go create mode 100644 vendor/kubevirt.io/client-go/kubevirt/typed/pool/v1beta1/generated_expansion.go create mode 100644 vendor/kubevirt.io/client-go/kubevirt/typed/pool/v1beta1/pool_client.go create mode 100644 vendor/kubevirt.io/client-go/kubevirt/typed/pool/v1beta1/virtualmachinepool.go create mode 100644 vendor/kubevirt.io/client-go/kubevirt/typed/snapshot/v1alpha1/doc.go rename vendor/kubevirt.io/client-go/{generated/kubevirt/clientset/versioned => kubevirt}/typed/snapshot/v1alpha1/generated_expansion.go (94%) rename vendor/kubevirt.io/client-go/{generated/kubevirt/clientset/versioned => kubevirt}/typed/snapshot/v1alpha1/snapshot_client.go (72%) create mode 100644 vendor/kubevirt.io/client-go/kubevirt/typed/snapshot/v1alpha1/virtualmachinerestore.go create mode 100644 vendor/kubevirt.io/client-go/kubevirt/typed/snapshot/v1alpha1/virtualmachinesnapshot.go create mode 100644 vendor/kubevirt.io/client-go/kubevirt/typed/snapshot/v1alpha1/virtualmachinesnapshotcontent.go create mode 100644 vendor/kubevirt.io/client-go/kubevirt/typed/snapshot/v1beta1/doc.go rename vendor/kubevirt.io/client-go/{generated/kubevirt/clientset/versioned => kubevirt}/typed/snapshot/v1beta1/generated_expansion.go (94%) rename vendor/kubevirt.io/client-go/{generated/kubevirt/clientset/versioned => kubevirt}/typed/snapshot/v1beta1/snapshot_client.go (72%) create mode 100644 vendor/kubevirt.io/client-go/kubevirt/typed/snapshot/v1beta1/virtualmachinerestore.go create mode 100644 vendor/kubevirt.io/client-go/kubevirt/typed/snapshot/v1beta1/virtualmachinesnapshot.go create mode 100644 vendor/kubevirt.io/client-go/kubevirt/typed/snapshot/v1beta1/virtualmachinesnapshotcontent.go rename vendor/{github.com/openshift/api/config/v1 => kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1}/types_tlssecurityprofile.go (90%) diff --git a/go.mod b/go.mod index 915e24753..42f529496 100644 --- a/go.mod +++ b/go.mod @@ -28,8 +28,8 @@ require ( k8s.io/klog/v2 v2.140.0 k8s.io/metrics v0.36.1 k8s.io/utils v0.0.0-20260507154919-ff6756f316d2 - kubevirt.io/api v1.3.0 - kubevirt.io/client-go v1.3.0 + kubevirt.io/api v1.8.2 + kubevirt.io/client-go v1.8.2 sigs.k8s.io/mdtoc v1.4.0 sigs.k8s.io/yaml v1.6.0 ) @@ -52,7 +52,6 @@ require ( github.com/felixge/httpsnoop v1.0.4 // indirect github.com/fsnotify/fsnotify v1.9.0 // indirect github.com/fxamacker/cbor/v2 v2.9.0 // indirect - github.com/go-kit/kit v0.13.0 // indirect github.com/go-kit/log v0.2.1 // indirect github.com/go-logfmt/logfmt v0.6.0 // indirect github.com/go-logr/logr v1.4.3 // indirect @@ -74,7 +73,6 @@ require ( github.com/go-openapi/swag/yamlutils v0.25.4 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang-jwt/jwt/v5 v5.3.0 // indirect - github.com/golang/glog v1.2.5 // indirect github.com/golang/protobuf v1.5.4 // indirect github.com/gomarkdown/markdown v0.0.0-20260217112301-37c66b85d6ab // indirect github.com/google/cel-go v0.26.0 // indirect @@ -93,7 +91,6 @@ require ( github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f // indirect - github.com/openshift/api v0.0.0-20230503133300-8bbcb7ca7183 // indirect github.com/openshift/custom-resource-status v1.1.2 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/prometheus/client_model v0.6.2 // indirect @@ -129,13 +126,13 @@ require ( gopkg.in/evanphx/json-patch.v4 v4.13.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect - k8s.io/apiextensions-apiserver v0.30.0 // indirect + k8s.io/apiextensions-apiserver v0.34.3 // indirect k8s.io/gengo/v2 v2.0.0-20250922181213-ec3ebc5fd46b // indirect k8s.io/kms v0.36.1 // indirect - k8s.io/kube-openapi v0.30.0 // indirect + k8s.io/kube-openapi v0.31.0 // indirect k8s.io/streaming v0.36.1 // indirect - kubevirt.io/containerized-data-importer-api v1.57.0-alpha1 // indirect - kubevirt.io/controller-lifecycle-operator-sdk/api v0.0.0-20220329064328-f3cc58c6ed90 // indirect + kubevirt.io/containerized-data-importer-api v1.64.0 // indirect + kubevirt.io/controller-lifecycle-operator-sdk/api v0.2.4 // indirect sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.34.0 // indirect sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 // indirect sigs.k8s.io/randfill v1.0.0 // indirect diff --git a/go.sum b/go.sum index 716c93606..433a5f277 100644 --- a/go.sum +++ b/go.sum @@ -55,8 +55,6 @@ github.com/fsnotify/fsnotify v1.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S github.com/fsnotify/fsnotify v1.9.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0= github.com/fxamacker/cbor/v2 v2.9.0 h1:NpKPmjDBgUfBms6tr6JZkTHtfFGcMKsw3eGcmD/sapM= github.com/fxamacker/cbor/v2 v2.9.0/go.mod h1:vM4b+DJCtHn+zz7h3FFp/hDAI9WNWCsZj23V5ytsSxQ= -github.com/go-kit/kit v0.13.0 h1:OoneCcHKHQ03LfBpoQCUfCluwd2Vt3ohz+kvbJneZAU= -github.com/go-kit/kit v0.13.0/go.mod h1:phqEHMMUbyrCFCTgH48JueqrM3md2HcAZ8N3XE4FKDg= github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= github.com/go-logfmt/logfmt v0.6.0 h1:wGYYu3uicYdqXVgoYbvnkrPVXkuLM1p1ifugDMEdRi4= @@ -125,8 +123,6 @@ github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69 github.com/golang-jwt/jwt/v5 v5.3.0 h1:pv4AsKCKKZuqlgs5sUmn4x8UlGa0kEVt/puTpKx9vvo= github.com/golang-jwt/jwt/v5 v5.3.0/go.mod h1:fxCRLWMO43lRc8nhHWY6LGqRcf+1gQWArsqaEUEa5bE= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/glog v1.2.5 h1:DrW6hGnjIhtvhOIiAKT6Psh/Kd/ldepEa81DKeiRJ5I= -github.com/golang/glog v1.2.5/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -161,8 +157,8 @@ github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20240424215950-a892ee059fd6 h1:k7nVchz72niMH6YLQNvHSdIE7iqsQxK1P41mySCvssg= -github.com/google/pprof v0.0.0-20240424215950-a892ee059fd6/go.mod h1:kf6iHlnVGwgKolg33glAes7Yg/8iWP8ukqeldJSO7jw= +github.com/google/pprof v0.0.0-20241029153458-d1b30febd7db h1:097atOisP2aRj7vFgYQBbFN4U4JNXUNYpxael3UzMyo= +github.com/google/pprof v0.0.0-20241029153458-d1b30febd7db/go.mod h1:vavhavw2zAxS5dIdcRluK6cSGGPlZynqzFM8NdvU144= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= @@ -231,16 +227,14 @@ github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9k github.com/onsi/ginkgo v1.16.4 h1:29JGrr5oVBm5ulCWet69zQkzWipVXIol6ygQUe/EzNc= github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= github.com/onsi/ginkgo/v2 v2.0.0/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= -github.com/onsi/ginkgo/v2 v2.17.2 h1:7eMhcy3GimbsA3hEnVKdw/PQM9XN9krpKVXsZdph0/g= -github.com/onsi/ginkgo/v2 v2.17.2/go.mod h1:nP2DPOQoNsQmsVyv5rDA8JkXQoCs6goXIvr/PRJ1eCc= +github.com/onsi/ginkgo/v2 v2.21.0 h1:7rg/4f3rB88pb5obDgNZrNHrQ4e6WpjonchcpuBRnZM= +github.com/onsi/ginkgo/v2 v2.21.0/go.mod h1:7Du3c42kxCUegi0IImZ1wUQzMBVecgIHjR1C+NkhLQo= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= github.com/onsi/gomega v1.18.1/go.mod h1:0q+aL8jAiMXy9hbwj2mr5GziHiwhAIQpFmmtT5hitRs= -github.com/onsi/gomega v1.33.1 h1:dsYjIxxSR755MDmKVsaFQTE22ChNBcuuTWgkUDSubOk= -github.com/onsi/gomega v1.33.1/go.mod h1:U4R44UsT+9eLIaYRB2a5qajjtQYn0hauxvRm16AVYg0= -github.com/openshift/api v0.0.0-20230503133300-8bbcb7ca7183 h1:t/CahSnpqY46sQR01SoS+Jt0jtjgmhgE6lFmRnO4q70= -github.com/openshift/api v0.0.0-20230503133300-8bbcb7ca7183/go.mod h1:4VWG+W22wrB4HfBL88P40DxLEpSOaiBVxUnfalfJo9k= +github.com/onsi/gomega v1.35.1 h1:Cwbd75ZBPxFSuZ6T+rN/WCb/gOc6YgFBXLlZLhC7Ds4= +github.com/onsi/gomega v1.35.1/go.mod h1:PvZbdDc8J6XJEpDK4HCuRBm8a6Fzp9/DmhC9C7yFlog= github.com/openshift/custom-resource-status v1.1.2 h1:C3DL44LEbvlbItfd8mT5jWrqPfHnSOQoQf/sypqA6A4= github.com/openshift/custom-resource-status v1.1.2/go.mod h1:DB/Mf2oTeiAmVVX1gN+NEqweonAPY0TKUwADizj8+ZA= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= @@ -657,8 +651,8 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh k8s.io/api v0.23.3/go.mod h1:w258XdGyvCmnBj/vGzQMj6kzdufJZVUwEM1U2fRJwSQ= k8s.io/api v0.36.1 h1:XbL/EMj8K2aJpJtePmqUyQMsM0D4QI2pvl7YKJ20FTY= k8s.io/api v0.36.1/go.mod h1:KOWo4ey3TINlXjeHVuwB3i+tXXnu+UcwFBHlI/9dvEo= -k8s.io/apiextensions-apiserver v0.30.0 h1:jcZFKMqnICJfRxTgnC4E+Hpcq8UEhT8B2lhBcQ+6uAs= -k8s.io/apiextensions-apiserver v0.30.0/go.mod h1:N9ogQFGcrbWqAY9p2mUAL5mGxsLqwgtUce127VtRX5Y= +k8s.io/apiextensions-apiserver v0.34.3 h1:p10fGlkDY09eWKOTeUSioxwLukJnm+KuDZdrW71y40g= +k8s.io/apiextensions-apiserver v0.34.3/go.mod h1:aujxvqGFRdb/cmXYfcRTeppN7S2XV/t7WMEc64zB5A0= k8s.io/apimachinery v0.23.3/go.mod h1:BEuFMMBaIbcOqVIJqNZJXGFTP4W6AycEpb5+m/97hrM= k8s.io/apimachinery v0.36.1 h1:G63Gjx2W+q0YD+72Vo8oY0nDnePVwnuzTmmy5ENrVSA= k8s.io/apimachinery v0.36.1/go.mod h1:ibYOR00vW/I1kzvi5SF0dRuJ52BvKtfvRdOn35GPQ+8= @@ -696,14 +690,14 @@ k8s.io/utils v0.0.0-20211116205334-6203023598ed/go.mod h1:jPW/WVKK9YHAvNhRxK0md/ k8s.io/utils v0.0.0-20260210185600-b8788abfbbc2/go.mod h1:xDxuJ0whA3d0I4mf/C4ppKHxXynQ+fxnkmQH0vTHnuk= k8s.io/utils v0.0.0-20260507154919-ff6756f316d2 h1:wU4tMEhLGgIbLvXQb1cfN+EcM0wf7zC6CPF+C79jroc= k8s.io/utils v0.0.0-20260507154919-ff6756f316d2/go.mod h1:xDxuJ0whA3d0I4mf/C4ppKHxXynQ+fxnkmQH0vTHnuk= -kubevirt.io/api v1.3.0 h1:9sGElMmnRU50pGED+MPPD2OwQl4S5lvjCUjm+t0mI90= -kubevirt.io/api v1.3.0/go.mod h1:e6LkElYZZm8NcP2gKlFVHZS9pgNhIARHIjSBSfeiP1s= -kubevirt.io/client-go v1.3.0 h1:/HKn4exzwsctEVTwVtEFaeT9D2v4TgWr2SmxITVEZ/4= -kubevirt.io/client-go v1.3.0/go.mod h1:qmcJZvUjbmggY1pp7irO3zesBJj7wwGIWAdnYEoh3yc= -kubevirt.io/containerized-data-importer-api v1.57.0-alpha1 h1:IWo12+ei3jltSN5jQN1xjgakfvRSF3G3Rr4GXVOOy2I= -kubevirt.io/containerized-data-importer-api v1.57.0-alpha1/go.mod h1:Y/8ETgHS1GjO89bl682DPtQOYEU/1ctPFBz6Sjxm4DM= -kubevirt.io/controller-lifecycle-operator-sdk/api v0.0.0-20220329064328-f3cc58c6ed90 h1:QMrd0nKP0BGbnxTqakhDZAUhGKxPiPiN5gSDqKUmGGc= -kubevirt.io/controller-lifecycle-operator-sdk/api v0.0.0-20220329064328-f3cc58c6ed90/go.mod h1:018lASpFYBsYN6XwmA2TIrPCx6e0gviTd/ZNtSitKgc= +kubevirt.io/api v1.8.2 h1:h8AACJlity2n8gRE6e9PgikLAwzmNz6gzVjT1kbsDZY= +kubevirt.io/api v1.8.2/go.mod h1:EUaPeD1GQK4IIEp8TVtk5dsFlYQGzFfcWi4CV4rs0rY= +kubevirt.io/client-go v1.8.2 h1:jKJe5j/M7GDfpqTreoBA+BVoyQPCPTbLpuGHHaBfjdk= +kubevirt.io/client-go v1.8.2/go.mod h1:eoH34Z/Wa1JuHeIezT/tcGDMa6zLLEf3FPRx5beJU3k= +kubevirt.io/containerized-data-importer-api v1.64.0 h1:yBLY6qEogUp8F+XSJvabIkx9uEEDeToYDfRr0mbUxJc= +kubevirt.io/containerized-data-importer-api v1.64.0/go.mod h1:VGp35wxpLXU18b7cnEpmcThI3AjcZUSfg/Zfql44U4o= +kubevirt.io/controller-lifecycle-operator-sdk/api v0.2.4 h1:fZYvD3/Vnitfkx6IJxjLAk8ugnZQ7CXVYcRfkSKmuZY= +kubevirt.io/controller-lifecycle-operator-sdk/api v0.2.4/go.mod h1:018lASpFYBsYN6XwmA2TIrPCx6e0gviTd/ZNtSitKgc= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.34.0 h1:hSfpvjjTQXQY2Fol2CS0QHMNs/WI1MOSGzCm1KhM5ec= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.34.0/go.mod h1:Ve9uj1L+deCXFrPOk1LpFXqTg7LCFzFso6PA48q/XZw= sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6/go.mod h1:p4QtZmO4uMYipTQNzagwnNoseA6OxSUutVw05NhYDRs= diff --git a/test/e2e/e2e_evictioninbackground_test.go b/test/e2e/e2e_evictioninbackground_test.go index f81deb5f1..e469db5a7 100644 --- a/test/e2e/e2e_evictioninbackground_test.go +++ b/test/e2e/e2e_evictioninbackground_test.go @@ -23,7 +23,7 @@ import ( utilptr "k8s.io/utils/ptr" kvcorev1 "kubevirt.io/api/core/v1" - generatedclient "kubevirt.io/client-go/generated/kubevirt/clientset/versioned" + kubevirtclient "kubevirt.io/client-go/kubevirt" "sigs.k8s.io/descheduler/pkg/api" apiv1alpha2 "sigs.k8s.io/descheduler/pkg/api/v1alpha2" @@ -110,7 +110,7 @@ ethernets: } } -func waitForKubevirtReady(t *testing.T, ctx context.Context, kvClient generatedclient.Interface) { +func waitForKubevirtReady(t *testing.T, ctx context.Context, kvClient kubevirtclient.Interface) { obj, err := kvClient.KubevirtV1().KubeVirts("kubevirt").Get(ctx, "kubevirt", metav1.GetOptions{}) if err != nil { t.Fatalf("Unable to get kubevirt/kubevirt: %v", err) @@ -129,7 +129,7 @@ func waitForKubevirtReady(t *testing.T, ctx context.Context, kvClient generatedc klog.Infof("Kubevirt is available") } -func allVMIsHaveRunningPods(t *testing.T, ctx context.Context, kubeClient clientset.Interface, kvClient generatedclient.Interface) (bool, error) { +func allVMIsHaveRunningPods(t *testing.T, ctx context.Context, kubeClient clientset.Interface, kvClient kubevirtclient.Interface) (bool, error) { klog.Infof("Checking all vmi active pods are running") uidMap := make(map[types.UID]*corev1.Pod) podList, err := kubeClient.CoreV1().Pods("default").List(ctx, metav1.ListOptions{}) @@ -368,7 +368,7 @@ func updateDeschedulerPolicy(t *testing.T, ctx context.Context, kubeClient clien } } -func createKubevirtClient() (generatedclient.Interface, error) { +func createKubevirtClient() (kubevirtclient.Interface, error) { loadingRules := clientcmd.NewDefaultClientConfigLoadingRules() loadingRules.DefaultClientConfig = &clientcmd.DefaultClientConfig overrides := &clientcmd.ConfigOverrides{} @@ -382,7 +382,7 @@ func createKubevirtClient() (generatedclient.Interface, error) { config.APIPath = "/apis" config.ContentType = runtime.ContentTypeJSON - return generatedclient.NewForConfig(config) + return kubevirtclient.NewForConfig(config) } func TestLiveMigrationInBackground(t *testing.T) { diff --git a/vendor/github.com/go-kit/kit/LICENSE b/vendor/github.com/go-kit/kit/LICENSE deleted file mode 100644 index 9d83342ac..000000000 --- a/vendor/github.com/go-kit/kit/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Peter Bourgon - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - diff --git a/vendor/github.com/go-kit/kit/log/README.md b/vendor/github.com/go-kit/kit/log/README.md deleted file mode 100644 index 5492dd944..000000000 --- a/vendor/github.com/go-kit/kit/log/README.md +++ /dev/null @@ -1,160 +0,0 @@ -# package log - -**Deprecation notice:** The core Go kit log packages (log, log/level, log/term, and -log/syslog) have been moved to their own repository at github.com/go-kit/log. -The corresponding packages in this directory remain for backwards compatibility. -Their types alias the types and their functions call the functions provided by -the new repository. Using either import path should be equivalent. Prefer the -new import path when practical. - -______ - -`package log` provides a minimal interface for structured logging in services. -It may be wrapped to encode conventions, enforce type-safety, provide leveled -logging, and so on. It can be used for both typical application log events, -and log-structured data streams. - -## Structured logging - -Structured logging is, basically, conceding to the reality that logs are -_data_, and warrant some level of schematic rigor. Using a stricter, -key/value-oriented message format for our logs, containing contextual and -semantic information, makes it much easier to get insight into the -operational activity of the systems we build. Consequently, `package log` is -of the strong belief that "[the benefits of structured logging outweigh the -minimal effort involved](https://www.thoughtworks.com/radar/techniques/structured-logging)". - -Migrating from unstructured to structured logging is probably a lot easier -than you'd expect. - -```go -// Unstructured -log.Printf("HTTP server listening on %s", addr) - -// Structured -logger.Log("transport", "HTTP", "addr", addr, "msg", "listening") -``` - -## Usage - -### Typical application logging - -```go -w := log.NewSyncWriter(os.Stderr) -logger := log.NewLogfmtLogger(w) -logger.Log("question", "what is the meaning of life?", "answer", 42) - -// Output: -// question="what is the meaning of life?" answer=42 -``` - -### Contextual Loggers - -```go -func main() { - var logger log.Logger - logger = log.NewLogfmtLogger(log.NewSyncWriter(os.Stderr)) - logger = log.With(logger, "instance_id", 123) - - logger.Log("msg", "starting") - NewWorker(log.With(logger, "component", "worker")).Run() - NewSlacker(log.With(logger, "component", "slacker")).Run() -} - -// Output: -// instance_id=123 msg=starting -// instance_id=123 component=worker msg=running -// instance_id=123 component=slacker msg=running -``` - -### Interact with stdlib logger - -Redirect stdlib logger to Go kit logger. - -```go -import ( - "os" - stdlog "log" - kitlog "github.com/go-kit/kit/log" -) - -func main() { - logger := kitlog.NewJSONLogger(kitlog.NewSyncWriter(os.Stdout)) - stdlog.SetOutput(kitlog.NewStdlibAdapter(logger)) - stdlog.Print("I sure like pie") -} - -// Output: -// {"msg":"I sure like pie","ts":"2016/01/01 12:34:56"} -``` - -Or, if, for legacy reasons, you need to pipe all of your logging through the -stdlib log package, you can redirect Go kit logger to the stdlib logger. - -```go -logger := kitlog.NewLogfmtLogger(kitlog.StdlibWriter{}) -logger.Log("legacy", true, "msg", "at least it's something") - -// Output: -// 2016/01/01 12:34:56 legacy=true msg="at least it's something" -``` - -### Timestamps and callers - -```go -var logger log.Logger -logger = log.NewLogfmtLogger(log.NewSyncWriter(os.Stderr)) -logger = log.With(logger, "ts", log.DefaultTimestampUTC, "caller", log.DefaultCaller) - -logger.Log("msg", "hello") - -// Output: -// ts=2016-01-01T12:34:56Z caller=main.go:15 msg=hello -``` - -## Levels - -Log levels are supported via the [level package](https://godoc.org/github.com/go-kit/kit/log/level). - -## Supported output formats - -- [Logfmt](https://brandur.org/logfmt) ([see also](https://blog.codeship.com/logfmt-a-log-format-thats-easy-to-read-and-write)) -- JSON - -## Enhancements - -`package log` is centered on the one-method Logger interface. - -```go -type Logger interface { - Log(keyvals ...interface{}) error -} -``` - -This interface, and its supporting code like is the product of much iteration -and evaluation. For more details on the evolution of the Logger interface, -see [The Hunt for a Logger Interface](http://go-talks.appspot.com/github.com/ChrisHines/talks/structured-logging/structured-logging.slide#1), -a talk by [Chris Hines](https://github.com/ChrisHines). -Also, please see -[#63](https://github.com/go-kit/kit/issues/63), -[#76](https://github.com/go-kit/kit/pull/76), -[#131](https://github.com/go-kit/kit/issues/131), -[#157](https://github.com/go-kit/kit/pull/157), -[#164](https://github.com/go-kit/kit/issues/164), and -[#252](https://github.com/go-kit/kit/pull/252) -to review historical conversations about package log and the Logger interface. - -Value-add packages and suggestions, -like improvements to [the leveled logger](https://godoc.org/github.com/go-kit/kit/log/level), -are of course welcome. Good proposals should - -- Be composable with [contextual loggers](https://godoc.org/github.com/go-kit/kit/log#With), -- Not break the behavior of [log.Caller](https://godoc.org/github.com/go-kit/kit/log#Caller) in any wrapped contextual loggers, and -- Be friendly to packages that accept only an unadorned log.Logger. - -## Benchmarks & comparisons - -There are a few Go logging benchmarks and comparisons that include Go kit's package log. - -- [imkira/go-loggers-bench](https://github.com/imkira/go-loggers-bench) includes kit/log -- [uber-common/zap](https://github.com/uber-common/zap), a zero-alloc logging library, includes a comparison with kit/log diff --git a/vendor/github.com/go-kit/kit/log/doc.go b/vendor/github.com/go-kit/kit/log/doc.go deleted file mode 100644 index c9873f4bc..000000000 --- a/vendor/github.com/go-kit/kit/log/doc.go +++ /dev/null @@ -1,118 +0,0 @@ -// Package log provides a structured logger. -// -// Deprecated: Use github.com/go-kit/log instead. -// -// Structured logging produces logs easily consumed later by humans or -// machines. Humans might be interested in debugging errors, or tracing -// specific requests. Machines might be interested in counting interesting -// events, or aggregating information for off-line processing. In both cases, -// it is important that the log messages are structured and actionable. -// Package log is designed to encourage both of these best practices. -// -// Basic Usage -// -// The fundamental interface is Logger. Loggers create log events from -// key/value data. The Logger interface has a single method, Log, which -// accepts a sequence of alternating key/value pairs, which this package names -// keyvals. -// -// type Logger interface { -// Log(keyvals ...interface{}) error -// } -// -// Here is an example of a function using a Logger to create log events. -// -// func RunTask(task Task, logger log.Logger) string { -// logger.Log("taskID", task.ID, "event", "starting task") -// ... -// logger.Log("taskID", task.ID, "event", "task complete") -// } -// -// The keys in the above example are "taskID" and "event". The values are -// task.ID, "starting task", and "task complete". Every key is followed -// immediately by its value. -// -// Keys are usually plain strings. Values may be any type that has a sensible -// encoding in the chosen log format. With structured logging it is a good -// idea to log simple values without formatting them. This practice allows -// the chosen logger to encode values in the most appropriate way. -// -// Contextual Loggers -// -// A contextual logger stores keyvals that it includes in all log events. -// Building appropriate contextual loggers reduces repetition and aids -// consistency in the resulting log output. With, WithPrefix, and WithSuffix -// add context to a logger. We can use With to improve the RunTask example. -// -// func RunTask(task Task, logger log.Logger) string { -// logger = log.With(logger, "taskID", task.ID) -// logger.Log("event", "starting task") -// ... -// taskHelper(task.Cmd, logger) -// ... -// logger.Log("event", "task complete") -// } -// -// The improved version emits the same log events as the original for the -// first and last calls to Log. Passing the contextual logger to taskHelper -// enables each log event created by taskHelper to include the task.ID even -// though taskHelper does not have access to that value. Using contextual -// loggers this way simplifies producing log output that enables tracing the -// life cycle of individual tasks. (See the Contextual example for the full -// code of the above snippet.) -// -// Dynamic Contextual Values -// -// A Valuer function stored in a contextual logger generates a new value each -// time an event is logged. The Valuer example demonstrates how this feature -// works. -// -// Valuers provide the basis for consistently logging timestamps and source -// code location. The log package defines several valuers for that purpose. -// See Timestamp, DefaultTimestamp, DefaultTimestampUTC, Caller, and -// DefaultCaller. A common logger initialization sequence that ensures all log -// entries contain a timestamp and source location looks like this: -// -// logger := log.NewLogfmtLogger(log.NewSyncWriter(os.Stdout)) -// logger = log.With(logger, "ts", log.DefaultTimestampUTC, "caller", log.DefaultCaller) -// -// Concurrent Safety -// -// Applications with multiple goroutines want each log event written to the -// same logger to remain separate from other log events. Package log provides -// two simple solutions for concurrent safe logging. -// -// NewSyncWriter wraps an io.Writer and serializes each call to its Write -// method. Using a SyncWriter has the benefit that the smallest practical -// portion of the logging logic is performed within a mutex, but it requires -// the formatting Logger to make only one call to Write per log event. -// -// NewSyncLogger wraps any Logger and serializes each call to its Log method. -// Using a SyncLogger has the benefit that it guarantees each log event is -// handled atomically within the wrapped logger, but it typically serializes -// both the formatting and output logic. Use a SyncLogger if the formatting -// logger may perform multiple writes per log event. -// -// Error Handling -// -// This package relies on the practice of wrapping or decorating loggers with -// other loggers to provide composable pieces of functionality. It also means -// that Logger.Log must return an error because some -// implementations—especially those that output log data to an io.Writer—may -// encounter errors that cannot be handled locally. This in turn means that -// Loggers that wrap other loggers should return errors from the wrapped -// logger up the stack. -// -// Fortunately, the decorator pattern also provides a way to avoid the -// necessity to check for errors every time an application calls Logger.Log. -// An application required to panic whenever its Logger encounters -// an error could initialize its logger as follows. -// -// fmtlogger := log.NewLogfmtLogger(log.NewSyncWriter(os.Stdout)) -// logger := log.LoggerFunc(func(keyvals ...interface{}) error { -// if err := fmtlogger.Log(keyvals...); err != nil { -// panic(err) -// } -// return nil -// }) -package log diff --git a/vendor/github.com/go-kit/kit/log/json_logger.go b/vendor/github.com/go-kit/kit/log/json_logger.go deleted file mode 100644 index edfde2f46..000000000 --- a/vendor/github.com/go-kit/kit/log/json_logger.go +++ /dev/null @@ -1,15 +0,0 @@ -package log - -import ( - "io" - - "github.com/go-kit/log" -) - -// NewJSONLogger returns a Logger that encodes keyvals to the Writer as a -// single JSON object. Each log event produces no more than one call to -// w.Write. The passed Writer must be safe for concurrent use by multiple -// goroutines if the returned Logger will be used concurrently. -func NewJSONLogger(w io.Writer) Logger { - return log.NewJSONLogger(w) -} diff --git a/vendor/github.com/go-kit/kit/log/log.go b/vendor/github.com/go-kit/kit/log/log.go deleted file mode 100644 index 164a4f94a..000000000 --- a/vendor/github.com/go-kit/kit/log/log.go +++ /dev/null @@ -1,51 +0,0 @@ -package log - -import ( - "github.com/go-kit/log" -) - -// Logger is the fundamental interface for all log operations. Log creates a -// log event from keyvals, a variadic sequence of alternating keys and values. -// Implementations must be safe for concurrent use by multiple goroutines. In -// particular, any implementation of Logger that appends to keyvals or -// modifies or retains any of its elements must make a copy first. -type Logger = log.Logger - -// ErrMissingValue is appended to keyvals slices with odd length to substitute -// the missing value. -var ErrMissingValue = log.ErrMissingValue - -// With returns a new contextual logger with keyvals prepended to those passed -// to calls to Log. If logger is also a contextual logger created by With, -// WithPrefix, or WithSuffix, keyvals is appended to the existing context. -// -// The returned Logger replaces all value elements (odd indexes) containing a -// Valuer with their generated value for each call to its Log method. -func With(logger Logger, keyvals ...interface{}) Logger { - return log.With(logger, keyvals...) -} - -// WithPrefix returns a new contextual logger with keyvals prepended to those -// passed to calls to Log. If logger is also a contextual logger created by -// With, WithPrefix, or WithSuffix, keyvals is prepended to the existing context. -// -// The returned Logger replaces all value elements (odd indexes) containing a -// Valuer with their generated value for each call to its Log method. -func WithPrefix(logger Logger, keyvals ...interface{}) Logger { - return log.WithPrefix(logger, keyvals...) -} - -// WithSuffix returns a new contextual logger with keyvals appended to those -// passed to calls to Log. If logger is also a contextual logger created by -// With, WithPrefix, or WithSuffix, keyvals is appended to the existing context. -// -// The returned Logger replaces all value elements (odd indexes) containing a -// Valuer with their generated value for each call to its Log method. -func WithSuffix(logger Logger, keyvals ...interface{}) Logger { - return log.WithSuffix(logger, keyvals...) -} - -// LoggerFunc is an adapter to allow use of ordinary functions as Loggers. If -// f is a function with the appropriate signature, LoggerFunc(f) is a Logger -// object that calls f. -type LoggerFunc = log.LoggerFunc diff --git a/vendor/github.com/go-kit/kit/log/logfmt_logger.go b/vendor/github.com/go-kit/kit/log/logfmt_logger.go deleted file mode 100644 index 51cde2c56..000000000 --- a/vendor/github.com/go-kit/kit/log/logfmt_logger.go +++ /dev/null @@ -1,15 +0,0 @@ -package log - -import ( - "io" - - "github.com/go-kit/log" -) - -// NewLogfmtLogger returns a logger that encodes keyvals to the Writer in -// logfmt format. Each log event produces no more than one call to w.Write. -// The passed Writer must be safe for concurrent use by multiple goroutines if -// the returned Logger will be used concurrently. -func NewLogfmtLogger(w io.Writer) Logger { - return log.NewLogfmtLogger(w) -} diff --git a/vendor/github.com/go-kit/kit/log/nop_logger.go b/vendor/github.com/go-kit/kit/log/nop_logger.go deleted file mode 100644 index b02c68606..000000000 --- a/vendor/github.com/go-kit/kit/log/nop_logger.go +++ /dev/null @@ -1,8 +0,0 @@ -package log - -import "github.com/go-kit/log" - -// NewNopLogger returns a logger that doesn't do anything. -func NewNopLogger() Logger { - return log.NewNopLogger() -} diff --git a/vendor/github.com/go-kit/kit/log/stdlib.go b/vendor/github.com/go-kit/kit/log/stdlib.go deleted file mode 100644 index cb604a7a8..000000000 --- a/vendor/github.com/go-kit/kit/log/stdlib.go +++ /dev/null @@ -1,54 +0,0 @@ -package log - -import ( - "io" - - "github.com/go-kit/log" -) - -// StdlibWriter implements io.Writer by invoking the stdlib log.Print. It's -// designed to be passed to a Go kit logger as the writer, for cases where -// it's necessary to redirect all Go kit log output to the stdlib logger. -// -// If you have any choice in the matter, you shouldn't use this. Prefer to -// redirect the stdlib log to the Go kit logger via NewStdlibAdapter. -type StdlibWriter = log.StdlibWriter - -// StdlibAdapter wraps a Logger and allows it to be passed to the stdlib -// logger's SetOutput. It will extract date/timestamps, filenames, and -// messages, and place them under relevant keys. -type StdlibAdapter = log.StdlibAdapter - -// StdlibAdapterOption sets a parameter for the StdlibAdapter. -type StdlibAdapterOption = log.StdlibAdapterOption - -// TimestampKey sets the key for the timestamp field. By default, it's "ts". -func TimestampKey(key string) StdlibAdapterOption { - return log.TimestampKey(key) -} - -// FileKey sets the key for the file and line field. By default, it's "caller". -func FileKey(key string) StdlibAdapterOption { - return log.FileKey(key) -} - -// MessageKey sets the key for the actual log message. By default, it's "msg". -func MessageKey(key string) StdlibAdapterOption { - return log.MessageKey(key) -} - -// Prefix configures the adapter to parse a prefix from stdlib log events. If -// you provide a non-empty prefix to the stdlib logger, then your should provide -// that same prefix to the adapter via this option. -// -// By default, the prefix isn't included in the msg key. Set joinPrefixToMsg to -// true if you want to include the parsed prefix in the msg. -func Prefix(prefix string, joinPrefixToMsg bool) StdlibAdapterOption { - return log.Prefix(prefix, joinPrefixToMsg) -} - -// NewStdlibAdapter returns a new StdlibAdapter wrapper around the passed -// logger. It's designed to be passed to log.SetOutput. -func NewStdlibAdapter(logger Logger, options ...StdlibAdapterOption) io.Writer { - return log.NewStdlibAdapter(logger, options...) -} diff --git a/vendor/github.com/go-kit/kit/log/sync.go b/vendor/github.com/go-kit/kit/log/sync.go deleted file mode 100644 index bcfee2bfd..000000000 --- a/vendor/github.com/go-kit/kit/log/sync.go +++ /dev/null @@ -1,37 +0,0 @@ -package log - -import ( - "io" - - "github.com/go-kit/log" -) - -// SwapLogger wraps another logger that may be safely replaced while other -// goroutines use the SwapLogger concurrently. The zero value for a SwapLogger -// will discard all log events without error. -// -// SwapLogger serves well as a package global logger that can be changed by -// importers. -type SwapLogger = log.SwapLogger - -// NewSyncWriter returns a new writer that is safe for concurrent use by -// multiple goroutines. Writes to the returned writer are passed on to w. If -// another write is already in progress, the calling goroutine blocks until -// the writer is available. -// -// If w implements the following interface, so does the returned writer. -// -// interface { -// Fd() uintptr -// } -func NewSyncWriter(w io.Writer) io.Writer { - return log.NewSyncWriter(w) -} - -// NewSyncLogger returns a logger that synchronizes concurrent use of the -// wrapped logger. When multiple goroutines use the SyncLogger concurrently -// only one goroutine will be allowed to log to the wrapped logger at a time. -// The other goroutines will block until the logger is available. -func NewSyncLogger(logger Logger) Logger { - return log.NewSyncLogger(logger) -} diff --git a/vendor/github.com/go-kit/kit/log/value.go b/vendor/github.com/go-kit/kit/log/value.go deleted file mode 100644 index 96d783bd5..000000000 --- a/vendor/github.com/go-kit/kit/log/value.go +++ /dev/null @@ -1,52 +0,0 @@ -package log - -import ( - "time" - - "github.com/go-kit/log" -) - -// A Valuer generates a log value. When passed to With, WithPrefix, or -// WithSuffix in a value element (odd indexes), it represents a dynamic -// value which is re-evaluated with each log event. -type Valuer = log.Valuer - -// Timestamp returns a timestamp Valuer. It invokes the t function to get the -// time; unless you are doing something tricky, pass time.Now. -// -// Most users will want to use DefaultTimestamp or DefaultTimestampUTC, which -// are TimestampFormats that use the RFC3339Nano format. -func Timestamp(t func() time.Time) Valuer { - return log.Timestamp(t) -} - -// TimestampFormat returns a timestamp Valuer with a custom time format. It -// invokes the t function to get the time to format; unless you are doing -// something tricky, pass time.Now. The layout string is passed to -// Time.Format. -// -// Most users will want to use DefaultTimestamp or DefaultTimestampUTC, which -// are TimestampFormats that use the RFC3339Nano format. -func TimestampFormat(t func() time.Time, layout string) Valuer { - return log.TimestampFormat(t, layout) -} - -// Caller returns a Valuer that returns a file and line from a specified depth -// in the callstack. Users will probably want to use DefaultCaller. -func Caller(depth int) Valuer { - return log.Caller(depth) -} - -var ( - // DefaultTimestamp is a Valuer that returns the current wallclock time, - // respecting time zones, when bound. - DefaultTimestamp = log.DefaultTimestamp - - // DefaultTimestampUTC is a Valuer that returns the current time in UTC - // when bound. - DefaultTimestampUTC = log.DefaultTimestampUTC - - // DefaultCaller is a Valuer that returns the file and line where the Log - // method was invoked. It can only be used with log.With. - DefaultCaller = log.DefaultCaller -) diff --git a/vendor/github.com/golang/glog/LICENSE b/vendor/github.com/golang/glog/LICENSE deleted file mode 100644 index 37ec93a14..000000000 --- a/vendor/github.com/golang/glog/LICENSE +++ /dev/null @@ -1,191 +0,0 @@ -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: - -You must give any other recipients of the Work or Derivative Works a copy of -this License; and -You must cause any modified files to carry prominent notices stating that You -changed the files; and -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 -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/golang/glog/README.md b/vendor/github.com/golang/glog/README.md deleted file mode 100644 index a4f73883b..000000000 --- a/vendor/github.com/golang/glog/README.md +++ /dev/null @@ -1,36 +0,0 @@ -# glog - -[![PkgGoDev](https://pkg.go.dev/badge/github.com/golang/glog)](https://pkg.go.dev/github.com/golang/glog) - -Leveled execution logs for Go. - -This is an efficient pure Go implementation of leveled logs in the -manner of the open source C++ package [_glog_](https://github.com/google/glog). - -By binding methods to booleans it is possible to use the log package without paying the expense of evaluating the arguments to the log. Through the `-vmodule` flag, the package also provides fine-grained -control over logging at the file level. - -The comment from `glog.go` introduces the ideas: - -Package _glog_ implements logging analogous to the Google-internal C++ INFO/ERROR/V setup. It provides the functions Info, Warning, Error, Fatal, plus formatting variants such as Infof. It also provides V-style loggingcontrolled by the `-v` and `-vmodule=file=2` flags. - -Basic examples: - -```go -glog.Info("Prepare to repel boarders") - -glog.Fatalf("Initialization failed: %s", err) -``` - -See the documentation for the V function for an explanation of these examples: - -```go -if glog.V(2) { - glog.Info("Starting transaction...") -} -glog.V(2).Infoln("Processed", nItems, "elements") -``` - -The repository contains an open source version of the log package used inside Google. The master copy of the source lives inside Google, not here. The code in this repo is for export only and is not itself under development. Feature requests will be ignored. - -Send bug reports to golang-nuts@googlegroups.com. diff --git a/vendor/github.com/golang/glog/glog.go b/vendor/github.com/golang/glog/glog.go deleted file mode 100644 index c8bebc3be..000000000 --- a/vendor/github.com/golang/glog/glog.go +++ /dev/null @@ -1,794 +0,0 @@ -// Go support for leveled logs, analogous to https://github.com/google/glog. -// -// Copyright 2023 Google Inc. All Rights Reserved. -// -// 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 glog implements logging analogous to the Google-internal C++ INFO/ERROR/V setup. -// It provides functions that have a name matched by regex: -// -// (Info|Warning|Error|Fatal)(Context)?(Depth)?(f)? -// -// If Context is present, function takes context.Context argument. The -// context is used to pass through the Trace Context to log sinks that can make use -// of it. -// It is recommended to use the context variant of the functions over the non-context -// variants if a context is available to make sure the Trace Contexts are present -// in logs. -// -// If Depth is present, this function calls log from a different depth in the call stack. -// This enables a callee to emit logs that use the callsite information of its caller -// or any other callers in the stack. When depth == 0, the original callee's line -// information is emitted. When depth > 0, depth frames are skipped in the call stack -// and the final frame is treated like the original callee to Info. -// -// If 'f' is present, function formats according to a format specifier. -// -// This package also provides V-style logging controlled by the -v and -vmodule=file=2 flags. -// -// Basic examples: -// -// glog.Info("Prepare to repel boarders") -// -// glog.Fatalf("Initialization failed: %s", err) -// -// See the documentation for the V function for an explanation of these examples: -// -// if glog.V(2) { -// glog.Info("Starting transaction...") -// } -// -// glog.V(2).Infoln("Processed", nItems, "elements") -// -// Log output is buffered and written periodically using Flush. Programs -// should call Flush before exiting to guarantee all log output is written. -// -// By default, all log statements write to files in a temporary directory. -// This package provides several flags that modify this behavior. -// As a result, flag.Parse must be called before any logging is done. -// -// -logtostderr=false -// Logs are written to standard error instead of to files. -// -alsologtostderr=false -// Logs are written to standard error as well as to files. -// -stderrthreshold=ERROR -// Log events at or above this severity are logged to standard -// error as well as to files. -// -log_dir="" -// Log files will be written to this directory instead of the -// default temporary directory. -// -// Other flags provide aids to debugging. -// -// -log_backtrace_at="" -// A comma-separated list of file and line numbers holding a logging -// statement, such as -// -log_backtrace_at=gopherflakes.go:234 -// A stack trace will be written to the Info log whenever execution -// hits one of these statements. (Unlike with -vmodule, the ".go" -// must be present.) -// -v=0 -// Enable V-leveled logging at the specified level. -// -vmodule="" -// The syntax of the argument is a comma-separated list of pattern=N, -// where pattern is a literal file name (minus the ".go" suffix) or -// "glob" pattern and N is a V level. For instance, -// -vmodule=gopher*=3 -// sets the V level to 3 in all Go files whose names begin with "gopher", -// and -// -vmodule=/path/to/glog/glog_test=1 -// sets the V level to 1 in the Go file /path/to/glog/glog_test.go. -// If a glob pattern contains a slash, it is matched against the full path, -// and the file name. Otherwise, the pattern is -// matched only against the file's basename. When both -vmodule and -v -// are specified, the -vmodule values take precedence for the specified -// modules. -package glog - -// This file contains the parts of the log package that are shared among all -// implementations (file, envelope, and appengine). - -import ( - "bytes" - "context" - "errors" - "fmt" - stdLog "log" - "os" - "reflect" - "runtime" - "runtime/pprof" - "strconv" - "sync" - "sync/atomic" - "time" - - "github.com/golang/glog/internal/logsink" - "github.com/golang/glog/internal/stackdump" -) - -var timeNow = time.Now // Stubbed out for testing. - -// MaxSize is the maximum size of a log file in bytes. -var MaxSize uint64 = 1024 * 1024 * 1800 - -// ErrNoLog is the error we return if no log file has yet been created -// for the specified log type. -var ErrNoLog = errors.New("log file not yet created") - -// 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 -} - -var severityStats = [...]*OutputStats{ - logsink.Info: &Stats.Info, - logsink.Warning: &Stats.Warning, - logsink.Error: &Stats.Error, - logsink.Fatal: nil, -} - -// Level specifies a level of verbosity for V logs. The -v flag is of type -// Level and should be modified only through the flag.Value interface. -type Level int32 - -var metaPool sync.Pool // Pool of *logsink.Meta. - -// metaPoolGet returns a *logsink.Meta from metaPool as both an interface and a -// pointer, allocating a new one if necessary. (Returning the interface value -// directly avoids an allocation if there was an existing pointer in the pool.) -func metaPoolGet() (any, *logsink.Meta) { - if metai := metaPool.Get(); metai != nil { - return metai, metai.(*logsink.Meta) - } - meta := new(logsink.Meta) - return meta, meta -} - -type stack bool - -const ( - noStack = stack(false) - withStack = stack(true) -) - -func appendBacktrace(depth int, format string, args []any) (string, []any) { - // Capture a backtrace as a stackdump.Stack (both text and PC slice). - // Structured log sinks can extract the backtrace in whichever format they - // prefer (PCs or text), and Text sinks will include it as just another part - // of the log message. - // - // Use depth instead of depth+1 so that the backtrace always includes the - // log function itself - otherwise the reason for the trace appearing in the - // log may not be obvious to the reader. - dump := stackdump.Caller(depth) - - // Add an arg and an entry in the format string for the stack dump. - // - // Copy the "args" slice to avoid a rare but serious aliasing bug - // (corrupting the caller's slice if they passed it to a non-Fatal call - // using "..."). - format = format + "\n\n%v\n" - args = append(append([]any(nil), args...), dump) - - return format, args -} - -// logf acts as ctxlogf, but doesn't expect a context. -func logf(depth int, severity logsink.Severity, verbose bool, stack stack, format string, args ...any) { - ctxlogf(nil, depth+1, severity, verbose, stack, format, args...) -} - -// ctxlogf writes a log message for a log function call (or log function wrapper) -// at the given depth in the current goroutine's stack. -func ctxlogf(ctx context.Context, depth int, severity logsink.Severity, verbose bool, stack stack, format string, args ...any) { - now := timeNow() - _, file, line, ok := runtime.Caller(depth + 1) - if !ok { - file = "???" - line = 1 - } - - if stack == withStack || backtraceAt(file, line) { - format, args = appendBacktrace(depth+1, format, args) - } - - metai, meta := metaPoolGet() - *meta = logsink.Meta{ - Context: ctx, - Time: now, - File: file, - Line: line, - Depth: depth + 1, - Severity: severity, - Verbose: verbose, - Thread: int64(pid), - } - sinkf(meta, format, args...) - // Clear pointer fields so they can be garbage collected early. - meta.Context = nil - meta.Stack = nil - metaPool.Put(metai) -} - -var sinkErrOnce sync.Once - -func sinkf(meta *logsink.Meta, format string, args ...any) { - meta.Depth++ - n, err := logsink.Printf(meta, format, args...) - if stats := severityStats[meta.Severity]; stats != nil { - atomic.AddInt64(&stats.lines, 1) - atomic.AddInt64(&stats.bytes, int64(n)) - } - - if err != nil { - // Best-effort to generate a reasonable Fatalf-like - // error message in all sinks that are still here for - // the first goroutine that comes here and terminate - // the process. - sinkErrOnce.Do(func() { - m := &logsink.Meta{} - m.Time = timeNow() - m.Severity = logsink.Fatal - m.Thread = int64(pid) - _, m.File, m.Line, _ = runtime.Caller(0) - format, args := appendBacktrace(1, "log: exiting because of error writing previous log to sinks: %v", []any{err}) - logsink.Printf(m, format, args...) - flushAndAbort() - }) - } -} - -// 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 "INFO", "WARNING", "ERROR", and "FATAL". If the name is not -// recognized, CopyStandardLogTo panics. -func CopyStandardLogTo(name string) { - sev, err := logsink.ParseSeverity(name) - if err != nil { - panic(fmt.Sprintf("log.CopyStandardLogTo(%q): %v", name, err)) - } - // Set a log format that captures the user's file and line: - // d.go:23: message - stdLog.SetFlags(stdLog.Lshortfile) - stdLog.SetOutput(logBridge(sev)) -} - -// NewStandardLogger returns a Logger that writes to the Google logs for the -// named and lower severities. -// -// Valid names are "INFO", "WARNING", "ERROR", and "FATAL". If the name is not -// recognized, NewStandardLogger panics. -func NewStandardLogger(name string) *stdLog.Logger { - sev, err := logsink.ParseSeverity(name) - if err != nil { - panic(fmt.Sprintf("log.NewStandardLogger(%q): %v", name, err)) - } - return stdLog.New(logBridge(sev), "", stdLog.Lshortfile) -} - -// logBridge provides the Write method that enables CopyStandardLogTo to connect -// Go's standard logs to the logs provided by this package. -type logBridge logsink.Severity - -// 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 - } - } - - // The depth below hard-codes details of how stdlog gets here. The alternative would be to walk - // up the stack looking for src/log/log.go but that seems like it would be - // unfortunately slow. - const stdLogDepth = 4 - - metai, meta := metaPoolGet() - *meta = logsink.Meta{ - Time: timeNow(), - File: file, - Line: line, - Depth: stdLogDepth, - Severity: logsink.Severity(lb), - Thread: int64(pid), - } - - format := "%s" - args := []any{text} - if backtraceAt(file, line) { - format, args = appendBacktrace(meta.Depth, format, args) - } - - sinkf(meta, format, args...) - metaPool.Put(metai) - - return len(b), nil -} - -// defaultFormat returns a fmt.Printf format specifier that formats its -// arguments as if they were passed to fmt.Print. -func defaultFormat(args []any) string { - n := len(args) - switch n { - case 0: - return "" - case 1: - return "%v" - } - - b := make([]byte, 0, n*3-1) - wasString := true // Suppress leading space. - for _, arg := range args { - isString := arg != nil && reflect.TypeOf(arg).Kind() == reflect.String - if wasString || isString { - b = append(b, "%v"...) - } else { - b = append(b, " %v"...) - } - wasString = isString - } - return string(b) -} - -// lnFormat returns a fmt.Printf format specifier that formats its arguments -// as if they were passed to fmt.Println. -func lnFormat(args []any) string { - if len(args) == 0 { - return "\n" - } - - b := make([]byte, 0, len(args)*3) - for range args { - b = append(b, "%v "...) - } - b[len(b)-1] = '\n' // Replace the last space with a newline. - return string(b) -} - -// 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 verbosity 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 -v and --vmodule flags; both are off by default. If the level in the call to -// V is at most the value of -v, or of -vmodule for the source file containing the -// call, the V call will log. -func V(level Level) Verbose { - return VDepth(1, level) -} - -// VDepth acts as V but uses depth to determine which call frame to check vmodule for. -// VDepth(0, level) is the same as V(level). -func VDepth(depth int, level Level) Verbose { - return Verbose(verboseEnabled(depth+1, level)) -} - -// Info is equivalent to the global Info function, guarded by the value of v. -// See the documentation of V for usage. -func (v Verbose) Info(args ...any) { - v.InfoDepth(1, args...) -} - -// InfoDepth is equivalent to the global InfoDepth function, guarded by the value of v. -// See the documentation of V for usage. -func (v Verbose) InfoDepth(depth int, args ...any) { - if v { - logf(depth+1, logsink.Info, true, noStack, defaultFormat(args), args...) - } -} - -// InfoDepthf is equivalent to the global InfoDepthf function, guarded by the value of v. -// See the documentation of V for usage. -func (v Verbose) InfoDepthf(depth int, format string, args ...any) { - if v { - logf(depth+1, logsink.Info, true, noStack, format, args...) - } -} - -// Infoln is equivalent to the global Infoln function, guarded by the value of v. -// See the documentation of V for usage. -func (v Verbose) Infoln(args ...any) { - if v { - logf(1, logsink.Info, true, noStack, lnFormat(args), args...) - } -} - -// Infof is equivalent to the global Infof function, guarded by the value of v. -// See the documentation of V for usage. -func (v Verbose) Infof(format string, args ...any) { - if v { - logf(1, logsink.Info, true, noStack, format, args...) - } -} - -// InfoContext is equivalent to the global InfoContext function, guarded by the value of v. -// See the documentation of V for usage. -func (v Verbose) InfoContext(ctx context.Context, args ...any) { - v.InfoContextDepth(ctx, 1, args...) -} - -// InfoContextf is equivalent to the global InfoContextf function, guarded by the value of v. -// See the documentation of V for usage. -func (v Verbose) InfoContextf(ctx context.Context, format string, args ...any) { - if v { - ctxlogf(ctx, 1, logsink.Info, true, noStack, format, args...) - } -} - -// InfoContextDepth is equivalent to the global InfoContextDepth function, guarded by the value of v. -// See the documentation of V for usage. -func (v Verbose) InfoContextDepth(ctx context.Context, depth int, args ...any) { - if v { - ctxlogf(ctx, depth+1, logsink.Info, true, noStack, defaultFormat(args), args...) - } -} - -// InfoContextDepthf is equivalent to the global InfoContextDepthf function, guarded by the value of v. -// See the documentation of V for usage. -func (v Verbose) InfoContextDepthf(ctx context.Context, depth int, format string, args ...any) { - if v { - ctxlogf(ctx, depth+1, logsink.Info, true, noStack, format, args...) - } -} - -// Info logs to the INFO log. -// Arguments are handled in the manner of fmt.Print; a newline is appended if missing. -func Info(args ...any) { - InfoDepth(1, args...) -} - -// InfoDepth calls Info from a different depth in the call stack. -// This enables a callee to emit logs that use the callsite information of its caller -// or any other callers in the stack. When depth == 0, the original callee's line -// information is emitted. When depth > 0, depth frames are skipped in the call stack -// and the final frame is treated like the original callee to Info. -func InfoDepth(depth int, args ...any) { - logf(depth+1, logsink.Info, false, noStack, defaultFormat(args), args...) -} - -// InfoDepthf acts as InfoDepth but with format string. -func InfoDepthf(depth int, format string, args ...any) { - logf(depth+1, logsink.Info, false, noStack, format, args...) -} - -// Infoln logs to the INFO log. -// Arguments are handled in the manner of fmt.Println; a newline is appended if missing. -func Infoln(args ...any) { - logf(1, logsink.Info, false, noStack, lnFormat(args), args...) -} - -// Infof logs to the INFO log. -// Arguments are handled in the manner of fmt.Printf; a newline is appended if missing. -func Infof(format string, args ...any) { - logf(1, logsink.Info, false, noStack, format, args...) -} - -// InfoContext is like [Info], but with an extra [context.Context] parameter. The -// context is used to pass the Trace Context to log sinks. -func InfoContext(ctx context.Context, args ...any) { - InfoContextDepth(ctx, 1, args...) -} - -// InfoContextf is like [Infof], but with an extra [context.Context] parameter. The -// context is used to pass the Trace Context to log sinks. -func InfoContextf(ctx context.Context, format string, args ...any) { - ctxlogf(ctx, 1, logsink.Info, false, noStack, format, args...) -} - -// InfoContextDepth is like [InfoDepth], but with an extra [context.Context] parameter. The -// context is used to pass the Trace Context to log sinks. -func InfoContextDepth(ctx context.Context, depth int, args ...any) { - ctxlogf(ctx, depth+1, logsink.Info, false, noStack, defaultFormat(args), args...) -} - -// InfoContextDepthf is like [InfoDepthf], but with an extra [context.Context] parameter. The -// context is used to pass the Trace Context to log sinks. -func InfoContextDepthf(ctx context.Context, depth int, format string, args ...any) { - ctxlogf(ctx, depth+1, logsink.Info, false, noStack, format, args...) -} - -// Warning logs to the WARNING and INFO logs. -// Arguments are handled in the manner of fmt.Print; a newline is appended if missing. -func Warning(args ...any) { - WarningDepth(1, 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 ...any) { - logf(depth+1, logsink.Warning, false, noStack, defaultFormat(args), args...) -} - -// WarningDepthf acts as Warningf but uses depth to determine which call frame to log. -// WarningDepthf(0, "msg") is the same as Warningf("msg"). -func WarningDepthf(depth int, format string, args ...any) { - logf(depth+1, logsink.Warning, false, noStack, format, args...) -} - -// Warningln logs to the WARNING and INFO logs. -// Arguments are handled in the manner of fmt.Println; a newline is appended if missing. -func Warningln(args ...any) { - logf(1, logsink.Warning, false, noStack, lnFormat(args), args...) -} - -// Warningf logs to the WARNING and INFO logs. -// Arguments are handled in the manner of fmt.Printf; a newline is appended if missing. -func Warningf(format string, args ...any) { - logf(1, logsink.Warning, false, noStack, format, args...) -} - -// WarningContext is like [Warning], but with an extra [context.Context] parameter. The -// context is used to pass the Trace Context to log sinks. -func WarningContext(ctx context.Context, args ...any) { - WarningContextDepth(ctx, 1, args...) -} - -// WarningContextf is like [Warningf], but with an extra [context.Context] parameter. The -// context is used to pass the Trace Context to log sinks. -func WarningContextf(ctx context.Context, format string, args ...any) { - ctxlogf(ctx, 1, logsink.Warning, false, noStack, format, args...) -} - -// WarningContextDepth is like [WarningDepth], but with an extra [context.Context] parameter. The -// context is used to pass the Trace Context to log sinks. -func WarningContextDepth(ctx context.Context, depth int, args ...any) { - ctxlogf(ctx, depth+1, logsink.Warning, false, noStack, defaultFormat(args), args...) -} - -// WarningContextDepthf is like [WarningDepthf], but with an extra [context.Context] parameter. The -// context is used to pass the Trace Context to log sinks. -func WarningContextDepthf(ctx context.Context, depth int, format string, args ...any) { - ctxlogf(ctx, depth+1, logsink.Warning, false, noStack, format, args...) -} - -// Error logs to the ERROR, WARNING, and INFO logs. -// Arguments are handled in the manner of fmt.Print; a newline is appended if missing. -func Error(args ...any) { - ErrorDepth(1, 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 ...any) { - logf(depth+1, logsink.Error, false, noStack, defaultFormat(args), args...) -} - -// ErrorDepthf acts as Errorf but uses depth to determine which call frame to log. -// ErrorDepthf(0, "msg") is the same as Errorf("msg"). -func ErrorDepthf(depth int, format string, args ...any) { - logf(depth+1, logsink.Error, false, noStack, format, args...) -} - -// Errorln logs to the ERROR, WARNING, and INFO logs. -// Arguments are handled in the manner of fmt.Println; a newline is appended if missing. -func Errorln(args ...any) { - logf(1, logsink.Error, false, noStack, lnFormat(args), args...) -} - -// Errorf logs to the ERROR, WARNING, and INFO logs. -// Arguments are handled in the manner of fmt.Printf; a newline is appended if missing. -func Errorf(format string, args ...any) { - logf(1, logsink.Error, false, noStack, format, args...) -} - -// ErrorContext is like [Error], but with an extra [context.Context] parameter. The -// context is used to pass the Trace Context to log sinks. -func ErrorContext(ctx context.Context, args ...any) { - ErrorContextDepth(ctx, 1, args...) -} - -// ErrorContextf is like [Errorf], but with an extra [context.Context] parameter. The -// context is used to pass the Trace Context to log sinks. -func ErrorContextf(ctx context.Context, format string, args ...any) { - ctxlogf(ctx, 1, logsink.Error, false, noStack, format, args...) -} - -// ErrorContextDepth is like [ErrorDepth], but with an extra [context.Context] parameter. The -// context is used to pass the Trace Context to log sinks. -func ErrorContextDepth(ctx context.Context, depth int, args ...any) { - ctxlogf(ctx, depth+1, logsink.Error, false, noStack, defaultFormat(args), args...) -} - -// ErrorContextDepthf is like [ErrorDepthf], but with an extra [context.Context] parameter. The -// context is used to pass the Trace Context to log sinks. -func ErrorContextDepthf(ctx context.Context, depth int, format string, args ...any) { - ctxlogf(ctx, depth+1, logsink.Error, false, noStack, format, args...) -} - -func ctxfatalf(ctx context.Context, depth int, format string, args ...any) { - ctxlogf(ctx, depth+1, logsink.Fatal, false, withStack, format, args...) - flushAndAbort() -} - -func flushAndAbort() { - sinks.file.Flush() - - err := abortProcess() // Should not return. - - // Failed to abort the process using signals. Dump a stack trace and exit. - Errorf("abortProcess returned unexpectedly: %v", err) - sinks.file.Flush() - pprof.Lookup("goroutine").WriteTo(os.Stderr, 1) - os.Exit(2) // Exit with the same code as the default SIGABRT handler. -} - -func fatalf(depth int, format string, args ...any) { - ctxfatalf(nil, depth+1, format, args...) -} - -// Fatal logs to the FATAL, ERROR, WARNING, and INFO logs, -// including a stack trace of all running goroutines, then calls os.Exit(2). -// Arguments are handled in the manner of fmt.Print; a newline is appended if missing. -func Fatal(args ...any) { - FatalDepth(1, args...) -} - -// 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 ...any) { - fatalf(depth+1, defaultFormat(args), args...) -} - -// FatalDepthf acts as Fatalf but uses depth to determine which call frame to log. -// FatalDepthf(0, "msg") is the same as Fatalf("msg"). -func FatalDepthf(depth int, format string, args ...any) { - fatalf(depth+1, format, args...) -} - -// Fatalln logs to the FATAL, ERROR, WARNING, and INFO logs, -// including a stack trace of all running goroutines, then calls os.Exit(2). -// Arguments are handled in the manner of fmt.Println; a newline is appended if missing. -func Fatalln(args ...any) { - fatalf(1, lnFormat(args), args...) -} - -// Fatalf logs to the FATAL, ERROR, WARNING, and INFO logs, -// including a stack trace of all running goroutines, then calls os.Exit(2). -// Arguments are handled in the manner of fmt.Printf; a newline is appended if missing. -func Fatalf(format string, args ...any) { - fatalf(1, format, args...) -} - -// FatalContext is like [Fatal], but with an extra [context.Context] parameter. The -// context is used to pass the Trace Context to log sinks. -func FatalContext(ctx context.Context, args ...any) { - FatalContextDepth(ctx, 1, args...) -} - -// FatalContextf is like [Fatalf], but with an extra [context.Context] parameter. The -// context is used to pass the Trace Context to log sinks. -func FatalContextf(ctx context.Context, format string, args ...any) { - ctxfatalf(ctx, 1, format, args...) -} - -// FatalContextDepth is like [FatalDepth], but with an extra [context.Context] parameter. The -// context is used to pass the Trace Context to log sinks. -func FatalContextDepth(ctx context.Context, depth int, args ...any) { - ctxfatalf(ctx, depth+1, defaultFormat(args), args...) -} - -// FatalContextDepthf is like [FatalDepthf], but with an extra [context.Context] parameter. -func FatalContextDepthf(ctx context.Context, depth int, format string, args ...any) { - ctxfatalf(ctx, depth+1, format, args...) -} - -func ctxexitf(ctx context.Context, depth int, format string, args ...any) { - ctxlogf(ctx, depth+1, logsink.Fatal, false, noStack, format, args...) - sinks.file.Flush() - os.Exit(1) -} - -func exitf(depth int, format string, args ...any) { - ctxexitf(nil, depth+1, format, args...) -} - -// Exit logs to the FATAL, ERROR, WARNING, and INFO logs, then calls os.Exit(1). -// Arguments are handled in the manner of fmt.Print; a newline is appended if missing. -func Exit(args ...any) { - ExitDepth(1, args...) -} - -// 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 ...any) { - exitf(depth+1, defaultFormat(args), args...) -} - -// ExitDepthf acts as Exitf but uses depth to determine which call frame to log. -// ExitDepthf(0, "msg") is the same as Exitf("msg"). -func ExitDepthf(depth int, format string, args ...any) { - exitf(depth+1, format, args...) -} - -// Exitln logs to the FATAL, ERROR, WARNING, and INFO logs, then calls os.Exit(1). -func Exitln(args ...any) { - exitf(1, lnFormat(args), args...) -} - -// Exitf logs to the FATAL, ERROR, WARNING, and INFO 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 ...any) { - exitf(1, format, args...) -} - -// ExitContext is like [Exit], but with an extra [context.Context] parameter. The -// context is used to pass the Trace Context to log sinks. -func ExitContext(ctx context.Context, args ...any) { - ExitContextDepth(ctx, 1, args...) -} - -// ExitContextf is like [Exitf], but with an extra [context.Context] parameter. The -// context is used to pass the Trace Context to log sinks. -func ExitContextf(ctx context.Context, format string, args ...any) { - ctxexitf(ctx, 1, format, args...) -} - -// ExitContextDepth is like [ExitDepth], but with an extra [context.Context] parameter. The -// context is used to pass the Trace Context to log sinks. -func ExitContextDepth(ctx context.Context, depth int, args ...any) { - ctxexitf(ctx, depth+1, defaultFormat(args), args...) -} - -// ExitContextDepthf is like [ExitDepthf], but with an extra [context.Context] parameter. The -// context is used to pass the Trace Context to log sinks. -func ExitContextDepthf(ctx context.Context, depth int, format string, args ...any) { - ctxexitf(ctx, depth+1, format, args...) -} diff --git a/vendor/github.com/golang/glog/glog_file.go b/vendor/github.com/golang/glog/glog_file.go deleted file mode 100644 index b54bd4052..000000000 --- a/vendor/github.com/golang/glog/glog_file.go +++ /dev/null @@ -1,449 +0,0 @@ -// Go support for leveled logs, analogous to https://github.com/google/glog. -// -// Copyright 2023 Google Inc. All Rights Reserved. -// -// 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. - -// File I/O for logs. - -package glog - -import ( - "bufio" - "bytes" - "errors" - "flag" - "fmt" - "io" - "os" - "path/filepath" - "runtime" - "strings" - "sync" - "time" - - "github.com/golang/glog/internal/logsink" -) - -// logDirs lists the candidate directories for new log files. -var logDirs []string - -var ( - // If non-empty, overrides the choice of directory in which to write logs. - // See createLogDirs for the full list of possible destinations. - logDir = flag.String("log_dir", "", "If non-empty, write log files in this directory") - logLink = flag.String("log_link", "", "If non-empty, add symbolic links in this directory to the log files") - logBufLevel = flag.Int("logbuflevel", int(logsink.Info), "Buffer log messages logged at this level or lower"+ - " (-1 means don't buffer; 0 means buffer INFO only; ...). Has limited applicability on non-prod platforms.") -) - -func createLogDirs() { - if *logDir != "" { - logDirs = append(logDirs, *logDir) - } - logDirs = append(logDirs, os.TempDir()) -} - -var ( - pid = os.Getpid() - program = filepath.Base(os.Args[0]) - host = "unknownhost" - userName = "unknownuser" -) - -func init() { - h, err := os.Hostname() - if err == nil { - host = shortHostname(h) - } - - if u := lookupUser(); u != "" { - userName = u - } - // Sanitize userName since it is used to construct file paths. - userName = strings.Map(func(r rune) rune { - switch { - case r >= 'a' && r <= 'z': - case r >= 'A' && r <= 'Z': - case r >= '0' && r <= '9': - default: - return '_' - } - return r - }, userName) -} - -// shortHostname returns its argument, truncating at the first period. -// For instance, given "www.google.com" it returns "www". -func shortHostname(hostname string) string { - if i := strings.Index(hostname, "."); i >= 0 { - return hostname[:i] - } - return hostname -} - -// logName returns a new log file name containing tag, with start time t, and -// the name for the symlink for tag. -func logName(tag string, t time.Time) (name, link string) { - name = fmt.Sprintf("%s.%s.%s.log.%s.%04d%02d%02d-%02d%02d%02d.%d", - program, - host, - userName, - tag, - t.Year(), - t.Month(), - t.Day(), - t.Hour(), - t.Minute(), - t.Second(), - pid) - return name, program + "." + tag -} - -var onceLogDirs sync.Once - -// create creates a new log file and returns the file and its filename, which -// contains tag ("INFO", "FATAL", etc.) and t. If the file is created -// successfully, create also attempts to update the symlink for that tag, ignoring -// errors. -func create(tag string, t time.Time, dir string) (f *os.File, filename string, err error) { - if dir != "" { - f, name, err := createInDir(dir, tag, t) - if err == nil { - return f, name, err - } - return nil, "", fmt.Errorf("log: cannot create log: %v", err) - } - - onceLogDirs.Do(createLogDirs) - if len(logDirs) == 0 { - return nil, "", errors.New("log: no log dirs") - } - var lastErr error - for _, dir := range logDirs { - f, name, err := createInDir(dir, tag, t) - if err == nil { - return f, name, err - } - lastErr = err - } - return nil, "", fmt.Errorf("log: cannot create log: %v", lastErr) -} - -func createInDir(dir, tag string, t time.Time) (f *os.File, name string, err error) { - name, link := logName(tag, t) - fname := filepath.Join(dir, name) - // O_EXCL is important here, as it prevents a vulnerability. The general idea is that logs often - // live in an insecure directory (like /tmp), so an unprivileged attacker could create fname in - // advance as a symlink to a file the logging process can access, but the attacker cannot. O_EXCL - // fails the open if it already exists, thus prevent our this code from opening the existing file - // the attacker points us to. - f, err = os.OpenFile(fname, os.O_RDWR|os.O_CREATE|os.O_EXCL, 0666) - if err == nil { - symlink := filepath.Join(dir, link) - os.Remove(symlink) // ignore err - os.Symlink(name, symlink) // ignore err - if *logLink != "" { - lsymlink := filepath.Join(*logLink, link) - os.Remove(lsymlink) // ignore err - os.Symlink(fname, lsymlink) // ignore err - } - return f, fname, nil - } - return nil, "", err -} - -// flushSyncWriter is the interface satisfied by logging destinations. -type flushSyncWriter interface { - Flush() error - Sync() error - io.Writer - filenames() []string -} - -var sinks struct { - stderr stderrSink - file fileSink -} - -func init() { - // Register stderr first: that way if we crash during file-writing at least - // the log will have gone somewhere. - if shouldRegisterStderrSink() { - logsink.TextSinks = append(logsink.TextSinks, &sinks.stderr) - } - logsink.TextSinks = append(logsink.TextSinks, &sinks.file) - - sinks.file.flushChan = make(chan logsink.Severity, 1) - go sinks.file.flushDaemon() -} - -// stderrSink is a logsink.Text that writes log entries to stderr -// if they meet certain conditions. -type stderrSink struct { - mu sync.Mutex - w io.Writer // if nil Emit uses os.Stderr directly -} - -// Enabled implements logsink.Text.Enabled. It returns true if any of the -// various stderr flags are enabled for logs of the given severity, if the log -// message is from the standard "log" package, or if google.Init has not yet run -// (and hence file logging is not yet initialized). -func (s *stderrSink) Enabled(m *logsink.Meta) bool { - return toStderr || alsoToStderr || m.Severity >= stderrThreshold.get() -} - -// Emit implements logsink.Text.Emit. -func (s *stderrSink) Emit(m *logsink.Meta, data []byte) (n int, err error) { - s.mu.Lock() - defer s.mu.Unlock() - w := s.w - if w == nil { - w = os.Stderr - } - dn, err := w.Write(data) - n += dn - return n, err -} - -// severityWriters is an array of flushSyncWriter with a value for each -// logsink.Severity. -type severityWriters [4]flushSyncWriter - -// fileSink is a logsink.Text that prints to a set of Google log files. -type fileSink struct { - mu sync.Mutex - // file holds writer for each of the log types. - file severityWriters - flushChan chan logsink.Severity -} - -// Enabled implements logsink.Text.Enabled. It returns true if google.Init -// has run and both --disable_log_to_disk and --logtostderr are false. -func (s *fileSink) Enabled(m *logsink.Meta) bool { - return !toStderr -} - -// Emit implements logsink.Text.Emit -func (s *fileSink) Emit(m *logsink.Meta, data []byte) (n int, err error) { - s.mu.Lock() - defer s.mu.Unlock() - - if err = s.createMissingFiles(m.Severity); err != nil { - return 0, err - } - for sev := m.Severity; sev >= logsink.Info; sev-- { - if _, fErr := s.file[sev].Write(data); fErr != nil && err == nil { - err = fErr // Take the first error. - } - } - n = len(data) - if int(m.Severity) > *logBufLevel { - select { - case s.flushChan <- m.Severity: - default: - } - } - - return n, err -} - -// syncBuffer joins a bufio.Writer to its underlying file, providing access to the -// file's Sync method and providing a wrapper for the Write method that provides log -// file rotation. There are conflicting methods, so the file cannot be embedded. -// s.mu is held for all its methods. -type syncBuffer struct { - sink *fileSink - *bufio.Writer - file *os.File - names []string - sev logsink.Severity - nbytes uint64 // The number of bytes written to this file - madeAt time.Time -} - -func (sb *syncBuffer) Sync() error { - return sb.file.Sync() -} - -func (sb *syncBuffer) Write(p []byte) (n int, err error) { - // Rotate the file if it is too large, but ensure we only do so, - // if rotate doesn't create a conflicting filename. - if sb.nbytes+uint64(len(p)) >= MaxSize { - now := timeNow() - if now.After(sb.madeAt.Add(1*time.Second)) || now.Second() != sb.madeAt.Second() { - if err := sb.rotateFile(now); err != nil { - return 0, err - } - } - } - n, err = sb.Writer.Write(p) - sb.nbytes += uint64(n) - return n, err -} - -func (sb *syncBuffer) filenames() []string { - return sb.names -} - -const footer = "\nCONTINUED IN NEXT FILE\n" - -// rotateFile closes the syncBuffer's file and starts a new one. -func (sb *syncBuffer) rotateFile(now time.Time) error { - var err error - pn := "" - file, name, err := create(sb.sev.String(), now, "") - sb.madeAt = now - - if sb.file != nil { - // The current log file becomes the previous log at the end of - // this block, so save its name for use in the header of the next - // file. - pn = sb.file.Name() - sb.Flush() - // If there's an existing file, write a footer with the name of - // the next file in the chain, followed by the constant string - // \nCONTINUED IN NEXT FILE\n to make continuation detection simple. - sb.file.Write([]byte("Next log: ")) - sb.file.Write([]byte(name)) - sb.file.Write([]byte(footer)) - sb.file.Close() - } - - sb.file = file - sb.names = append(sb.names, name) - sb.nbytes = 0 - if err != nil { - return err - } - - sb.Writer = bufio.NewWriterSize(sb.file, bufferSize) - - // Write header. - var buf bytes.Buffer - fmt.Fprintf(&buf, "Log file created at: %s\n", now.Format("2006/01/02 15:04:05")) - fmt.Fprintf(&buf, "Running on machine: %s\n", host) - fmt.Fprintf(&buf, "Binary: Built with %s %s for %s/%s\n", runtime.Compiler, runtime.Version(), runtime.GOOS, runtime.GOARCH) - fmt.Fprintf(&buf, "Previous log: %s\n", pn) - fmt.Fprintf(&buf, "Log line format: [IWEF]mmdd hh:mm:ss.uuuuuu threadid file:line] msg\n") - n, err := sb.file.Write(buf.Bytes()) - sb.nbytes += uint64(n) - return err -} - -// bufferSize sizes the buffer associated with each log file. It's large -// so that log records can accumulate without the logging thread blocking -// on disk I/O. The flushDaemon will block instead. -const bufferSize = 256 * 1024 - -// createMissingFiles creates all the log files for severity from infoLog up to -// upTo that have not already been created. -// s.mu is held. -func (s *fileSink) createMissingFiles(upTo logsink.Severity) error { - if s.file[upTo] != nil { - return nil - } - now := time.Now() - // Files are created in increasing severity order, so we can be assured that - // if a high severity logfile exists, then so do all of lower severity. - for sev := logsink.Info; sev <= upTo; sev++ { - if s.file[sev] != nil { - continue - } - sb := &syncBuffer{ - sink: s, - sev: sev, - } - if err := sb.rotateFile(now); err != nil { - return err - } - s.file[sev] = sb - } - return nil -} - -// flushDaemon periodically flushes the log file buffers. -func (s *fileSink) flushDaemon() { - tick := time.NewTicker(30 * time.Second) - defer tick.Stop() - for { - select { - case <-tick.C: - s.Flush() - case sev := <-s.flushChan: - s.flush(sev) - } - } -} - -// Flush flushes all pending log I/O. -func Flush() { - sinks.file.Flush() -} - -// Flush flushes all the logs and attempts to "sync" their data to disk. -func (s *fileSink) Flush() error { - return s.flush(logsink.Info) -} - -// flush flushes all logs of severity threshold or greater. -func (s *fileSink) flush(threshold logsink.Severity) error { - var firstErr error - updateErr := func(err error) { - if err != nil && firstErr == nil { - firstErr = err - } - } - - // Remember where we flushed, so we can call sync without holding - // the lock. - var files []flushSyncWriter - func() { - s.mu.Lock() - defer s.mu.Unlock() - // Flush from fatal down, in case there's trouble flushing. - for sev := logsink.Fatal; sev >= threshold; sev-- { - if file := s.file[sev]; file != nil { - updateErr(file.Flush()) - files = append(files, file) - } - } - }() - - for _, file := range files { - updateErr(file.Sync()) - } - - return firstErr -} - -// Names returns the names of the log files holding the FATAL, ERROR, -// WARNING, or INFO logs. Returns ErrNoLog if the log for the given -// level doesn't exist (e.g. because no messages of that level have been -// written). This may return multiple names if the log type requested -// has rolled over. -func Names(s string) ([]string, error) { - severity, err := logsink.ParseSeverity(s) - if err != nil { - return nil, err - } - - sinks.file.mu.Lock() - defer sinks.file.mu.Unlock() - f := sinks.file.file[severity] - if f == nil { - return nil, ErrNoLog - } - - return f.filenames(), nil -} diff --git a/vendor/github.com/golang/glog/glog_file_linux.go b/vendor/github.com/golang/glog/glog_file_linux.go deleted file mode 100644 index d795092d0..000000000 --- a/vendor/github.com/golang/glog/glog_file_linux.go +++ /dev/null @@ -1,39 +0,0 @@ -// Go support for leveled logs, analogous to https://github.com/google/glog. -// -// Copyright 2023 Google Inc. All Rights Reserved. -// -// 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. - -//go:build linux - -package glog - -import ( - "errors" - "runtime" - "syscall" -) - -// abortProcess attempts to kill the current process in a way that will dump the -// currently-running goroutines someplace useful (like stderr). -// -// It does this by sending SIGABRT to the current thread. -// -// If successful, abortProcess does not return. -func abortProcess() error { - runtime.LockOSThread() - if err := syscall.Tgkill(syscall.Getpid(), syscall.Gettid(), syscall.SIGABRT); err != nil { - return err - } - return errors.New("log: killed current thread with SIGABRT, but still running") -} diff --git a/vendor/github.com/golang/glog/glog_file_nonwindows.go b/vendor/github.com/golang/glog/glog_file_nonwindows.go deleted file mode 100644 index a0089ba4a..000000000 --- a/vendor/github.com/golang/glog/glog_file_nonwindows.go +++ /dev/null @@ -1,19 +0,0 @@ -//go:build !windows - -package glog - -import "os/user" - -// shouldRegisterStderrSink determines whether we should register a log sink that writes to stderr. -// Today, this always returns true on non-Windows platforms, as it specifically checks for a -// condition that is only present on Windows. -func shouldRegisterStderrSink() bool { - return true -} - -func lookupUser() string { - if current, err := user.Current(); err == nil { - return current.Username - } - return "" -} diff --git a/vendor/github.com/golang/glog/glog_file_other.go b/vendor/github.com/golang/glog/glog_file_other.go deleted file mode 100644 index 9540f14fc..000000000 --- a/vendor/github.com/golang/glog/glog_file_other.go +++ /dev/null @@ -1,30 +0,0 @@ -// Go support for leveled logs, analogous to https://github.com/google/glog. -// -// Copyright 2023 Google Inc. All Rights Reserved. -// -// 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. - -//go:build !(unix || windows) - -package glog - -import ( - "fmt" - "runtime" -) - -// abortProcess returns an error on platforms that presumably don't support signals. -func abortProcess() error { - return fmt.Errorf("not sending SIGABRT (%s/%s does not support signals), falling back", runtime.GOOS, runtime.GOARCH) - -} diff --git a/vendor/github.com/golang/glog/glog_file_posix.go b/vendor/github.com/golang/glog/glog_file_posix.go deleted file mode 100644 index c27c7c0e4..000000000 --- a/vendor/github.com/golang/glog/glog_file_posix.go +++ /dev/null @@ -1,53 +0,0 @@ -// Go support for leveled logs, analogous to https://github.com/google/glog. -// -// Copyright 2023 Google Inc. All Rights Reserved. -// -// 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. - -//go:build (unix || windows) && !linux - -package glog - -import ( - "os" - "syscall" - "time" -) - -// abortProcess attempts to kill the current process in a way that will dump the -// currently-running goroutines someplace useful (like stderr). -// -// It does this by sending SIGABRT to the current process. Unfortunately, the -// signal may or may not be delivered to the current thread; in order to do that -// portably, we would need to add a cgo dependency and call pthread_kill. -// -// If successful, abortProcess does not return. -func abortProcess() error { - p, err := os.FindProcess(os.Getpid()) - if err != nil { - return err - } - if err := p.Signal(syscall.SIGABRT); err != nil { - return err - } - - // Sent the signal. Now we wait for it to arrive and any SIGABRT handlers to - // run (and eventually terminate the process themselves). - // - // We could just "select{}" here, but there's an outside chance that would - // trigger the runtime's deadlock detector if there happen not to be any - // background goroutines running. So we'll sleep a while first to give - // the signal some time. - time.Sleep(10 * time.Second) - select {} -} diff --git a/vendor/github.com/golang/glog/glog_file_windows.go b/vendor/github.com/golang/glog/glog_file_windows.go deleted file mode 100644 index 2f032e19b..000000000 --- a/vendor/github.com/golang/glog/glog_file_windows.go +++ /dev/null @@ -1,43 +0,0 @@ -//go:build windows - -package glog - -import ( - "os" - "syscall" -) - -// shouldRegisterStderrSink determines whether we should register a log sink that writes to stderr. -// Today, this checks if stderr is "valid", in that it maps to a non-NULL Handle. -// Windows Services are spawned without Stdout and Stderr, so any attempt to use them equates to -// referencing an invalid file Handle. -// os.Stderr's FD is derived from a call to `syscall.GetStdHandle(syscall.STD_ERROR_HANDLE)`. -// Documentation[1] for the GetStdHandle function indicates the return value may be NULL if the -// application lacks the standard handle, so consider Stderr valid if its FD is non-NULL. -// [1]: https://learn.microsoft.com/en-us/windows/console/getstdhandle -func shouldRegisterStderrSink() bool { - return os.Stderr.Fd() != 0 -} - -// This follows the logic in the standard library's user.Current() function, except -// that it leaves out the potentially expensive calls required to look up the user's -// display name in Active Directory. -func lookupUser() string { - token, err := syscall.OpenCurrentProcessToken() - if err != nil { - return "" - } - defer token.Close() - tokenUser, err := token.GetTokenUser() - if err != nil { - return "" - } - username, _, accountType, err := tokenUser.User.Sid.LookupAccount("") - if err != nil { - return "" - } - if accountType != syscall.SidTypeUser { - return "" - } - return username -} diff --git a/vendor/github.com/golang/glog/glog_flags.go b/vendor/github.com/golang/glog/glog_flags.go deleted file mode 100644 index fa4371afd..000000000 --- a/vendor/github.com/golang/glog/glog_flags.go +++ /dev/null @@ -1,398 +0,0 @@ -// Go support for leveled logs, analogous to https://github.com/google/glog. -// -// Copyright 2023 Google Inc. All Rights Reserved. -// -// 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 glog - -import ( - "bytes" - "errors" - "flag" - "fmt" - "path/filepath" - "runtime" - "strconv" - "strings" - "sync" - "sync/atomic" - - "github.com/golang/glog/internal/logsink" -) - -// modulePat contains a filter for the -vmodule flag. -// It holds a verbosity level and a file pattern to match. -type modulePat struct { - pattern string - literal bool // The pattern is a literal string - full bool // The pattern wants to match the full path - level Level -} - -// match reports whether the file matches the pattern. It uses a string -// comparison if the pattern contains no metacharacters. -func (m *modulePat) match(full, file string) bool { - if m.literal { - if m.full { - return full == m.pattern - } - return file == m.pattern - } - if m.full { - match, _ := filepath.Match(m.pattern, full) - return match - } - match, _ := filepath.Match(m.pattern, file) - return match -} - -// isLiteral reports whether the pattern is a literal string, that is, has no metacharacters -// that require filepath.Match to be called to match the pattern. -func isLiteral(pattern string) bool { - return !strings.ContainsAny(pattern, `\*?[]`) -} - -// isFull reports whether the pattern matches the full file path, that is, -// whether it contains /. -func isFull(pattern string) bool { - return strings.ContainsRune(pattern, '/') -} - -// verboseFlags represents the setting of the -v and -vmodule flags. -type verboseFlags struct { - // moduleLevelCache is a sync.Map storing the -vmodule Level for each V() - // call site, identified by PC. If there is no matching -vmodule filter, - // the cached value is exactly v. moduleLevelCache is replaced with a new - // Map whenever the -vmodule or -v flag changes state. - moduleLevelCache atomic.Value - - // mu guards all fields below. - mu sync.Mutex - - // v stores the value of the -v flag. It may be read safely using - // sync.LoadInt32, but is only modified under mu. - v Level - - // module stores the parsed -vmodule flag. - module []modulePat - - // moduleLength caches len(module). If greater than zero, it - // means vmodule is enabled. It may be read safely using sync.LoadInt32, but - // is only modified under mu. - moduleLength int32 -} - -// NOTE: For compatibility with the open-sourced v1 version of this -// package (github.com/golang/glog) we need to retain that flag.Level -// implements the flag.Value interface. See also go/log-vs-glog. - -// String is part of the flag.Value interface. -func (l *Level) String() string { - return strconv.FormatInt(int64(l.Get().(Level)), 10) -} - -// Get is part of the flag.Value interface. -func (l *Level) Get() any { - if l == &vflags.v { - // l is the value registered for the -v flag. - return Level(atomic.LoadInt32((*int32)(l))) - } - 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 - } - if l == &vflags.v { - // l is the value registered for the -v flag. - vflags.mu.Lock() - defer vflags.mu.Unlock() - vflags.moduleLevelCache.Store(&sync.Map{}) - atomic.StoreInt32((*int32)(l), int32(v)) - return nil - } - *l = Level(v) - return nil -} - -// vModuleFlag is the flag.Value for the --vmodule flag. -type vModuleFlag struct{ *verboseFlags } - -func (f vModuleFlag) String() string { - // Do not panic on the zero value. - // https://groups.google.com/g/golang-nuts/c/Atlr8uAjn6U/m/iId17Td5BQAJ. - if f.verboseFlags == nil { - return "" - } - f.mu.Lock() - defer f.mu.Unlock() - - var b bytes.Buffer - for i, f := range f.module { - if i > 0 { - b.WriteRune(',') - } - fmt.Fprintf(&b, "%s=%d", f.pattern, f.level) - } - return b.String() -} - -// Get returns nil for this flag type since the struct is not exported. -func (f vModuleFlag) Get() any { return nil } - -var errVmoduleSyntax = errors.New("syntax error: expect comma-separated list of filename=N") - -// Syntax: -vmodule=recordio=2,foo/bar/baz=1,gfs*=3 -func (f vModuleFlag) Set(value string) error { - var filter []modulePat - for _, pat := range strings.Split(value, ",") { - if len(pat) == 0 { - // Empty strings such as from a trailing comma can be ignored. - continue - } - patLev := strings.Split(pat, "=") - if len(patLev) != 2 || len(patLev[0]) == 0 || len(patLev[1]) == 0 { - return errVmoduleSyntax - } - pattern := patLev[0] - v, err := strconv.Atoi(patLev[1]) - if err != nil { - return errors.New("syntax error: expect comma-separated list of filename=N") - } - // TODO: check syntax of filter? - filter = append(filter, modulePat{pattern, isLiteral(pattern), isFull(pattern), Level(v)}) - } - - f.mu.Lock() - defer f.mu.Unlock() - f.module = filter - atomic.StoreInt32((*int32)(&f.moduleLength), int32(len(f.module))) - f.moduleLevelCache.Store(&sync.Map{}) - return nil -} - -func (f *verboseFlags) levelForPC(pc uintptr) Level { - if level, ok := f.moduleLevelCache.Load().(*sync.Map).Load(pc); ok { - return level.(Level) - } - - f.mu.Lock() - defer f.mu.Unlock() - level := Level(f.v) - fn := runtime.FuncForPC(pc) - file, _ := fn.FileLine(pc) - // The file is something like /a/b/c/d.go. We want just the d for - // regular matches, /a/b/c/d for full matches. - file = strings.TrimSuffix(file, ".go") - full := file - if slash := strings.LastIndex(file, "/"); slash >= 0 { - file = file[slash+1:] - } - for _, filter := range f.module { - if filter.match(full, file) { - level = filter.level - break // Use the first matching level. - } - } - f.moduleLevelCache.Load().(*sync.Map).Store(pc, level) - return level -} - -func (f *verboseFlags) enabled(callerDepth int, level Level) bool { - if atomic.LoadInt32(&f.moduleLength) == 0 { - // No vmodule values specified, so compare against v level. - return Level(atomic.LoadInt32((*int32)(&f.v))) >= level - } - - pcs := [1]uintptr{} - if runtime.Callers(callerDepth+2, pcs[:]) < 1 { - return false - } - frame, _ := runtime.CallersFrames(pcs[:]).Next() - return f.levelForPC(frame.Entry) >= level -} - -// traceLocation represents an entry in the -log_backtrace_at flag. -type traceLocation struct { - file string - line int -} - -var errTraceSyntax = errors.New("syntax error: expect file.go:234") - -func parseTraceLocation(value string) (traceLocation, error) { - fields := strings.Split(value, ":") - if len(fields) != 2 { - return traceLocation{}, errTraceSyntax - } - file, lineStr := fields[0], fields[1] - if !strings.Contains(file, ".") { - return traceLocation{}, errTraceSyntax - } - line, err := strconv.Atoi(lineStr) - if err != nil { - return traceLocation{}, errTraceSyntax - } - if line < 0 { - return traceLocation{}, errors.New("negative value for line") - } - return traceLocation{file, line}, nil -} - -// match reports whether the specified file and line matches the trace location. -// The argument file name is the full path, not the basename specified in the flag. -func (t traceLocation) match(file string, line int) bool { - if t.line != line { - return false - } - if i := strings.LastIndex(file, "/"); i >= 0 { - file = file[i+1:] - } - return t.file == file -} - -func (t traceLocation) String() string { - return fmt.Sprintf("%s:%d", t.file, t.line) -} - -// traceLocations represents the -log_backtrace_at flag. -// Syntax: -log_backtrace_at=recordio.go:234,sstable.go:456 -// Note that unlike vmodule the file extension is included here. -type traceLocations struct { - mu sync.Mutex - locsLen int32 // Safe for atomic read without mu. - locs []traceLocation -} - -func (t *traceLocations) String() string { - t.mu.Lock() - defer t.mu.Unlock() - - var buf bytes.Buffer - for i, tl := range t.locs { - if i > 0 { - buf.WriteString(",") - } - buf.WriteString(tl.String()) - } - return buf.String() -} - -// Get always returns nil for this flag type since the struct is not exported -func (t *traceLocations) Get() any { return nil } - -func (t *traceLocations) Set(value string) error { - var locs []traceLocation - for _, s := range strings.Split(value, ",") { - if s == "" { - continue - } - loc, err := parseTraceLocation(s) - if err != nil { - return err - } - locs = append(locs, loc) - } - - t.mu.Lock() - defer t.mu.Unlock() - atomic.StoreInt32(&t.locsLen, int32(len(locs))) - t.locs = locs - return nil -} - -func (t *traceLocations) match(file string, line int) bool { - if atomic.LoadInt32(&t.locsLen) == 0 { - return false - } - - t.mu.Lock() - defer t.mu.Unlock() - for _, tl := range t.locs { - if tl.match(file, line) { - return true - } - } - return false -} - -// severityFlag is an atomic flag.Value implementation for logsink.Severity. -type severityFlag int32 - -func (s *severityFlag) get() logsink.Severity { - return logsink.Severity(atomic.LoadInt32((*int32)(s))) -} -func (s *severityFlag) String() string { return strconv.FormatInt(int64(*s), 10) } -func (s *severityFlag) Get() any { return s.get() } -func (s *severityFlag) Set(value string) error { - threshold, err := logsink.ParseSeverity(value) - if err != nil { - // Not a severity name. Try a raw number. - v, err := strconv.Atoi(value) - if err != nil { - return err - } - threshold = logsink.Severity(v) - if threshold < logsink.Info || threshold > logsink.Fatal { - return fmt.Errorf("Severity %d out of range (min %d, max %d).", v, logsink.Info, logsink.Fatal) - } - } - atomic.StoreInt32((*int32)(s), int32(threshold)) - return nil -} - -var ( - vflags verboseFlags // The -v and -vmodule flags. - - logBacktraceAt traceLocations // The -log_backtrace_at flag. - - // Boolean flags. Not handled atomically because the flag.Value interface - // does not let us avoid the =true, and that shorthand is necessary for - // compatibility. TODO: does this matter enough to fix? Seems unlikely. - toStderr bool // The -logtostderr flag. - alsoToStderr bool // The -alsologtostderr flag. - - stderrThreshold severityFlag // The -stderrthreshold flag. -) - -// verboseEnabled returns whether the caller at the given depth should emit -// verbose logs at the given level, with depth 0 identifying the caller of -// verboseEnabled. -func verboseEnabled(callerDepth int, level Level) bool { - return vflags.enabled(callerDepth+1, level) -} - -// backtraceAt returns whether the logging call at the given function and line -// should also emit a backtrace of the current call stack. -func backtraceAt(file string, line int) bool { - return logBacktraceAt.match(file, line) -} - -func init() { - vflags.moduleLevelCache.Store(&sync.Map{}) - - flag.Var(&vflags.v, "v", "log level for V logs") - flag.Var(vModuleFlag{&vflags}, "vmodule", "comma-separated list of pattern=N settings for file-filtered logging") - - flag.Var(&logBacktraceAt, "log_backtrace_at", "when logging hits line file:N, emit a stack trace") - - stderrThreshold = severityFlag(logsink.Error) - - flag.BoolVar(&toStderr, "logtostderr", false, "log to standard error instead of files") - flag.BoolVar(&alsoToStderr, "alsologtostderr", false, "log to standard error as well as files") - flag.Var(&stderrThreshold, "stderrthreshold", "logs at or above this threshold go to stderr") -} diff --git a/vendor/github.com/golang/glog/internal/logsink/logsink.go b/vendor/github.com/golang/glog/internal/logsink/logsink.go deleted file mode 100644 index 28c38a6ab..000000000 --- a/vendor/github.com/golang/glog/internal/logsink/logsink.go +++ /dev/null @@ -1,393 +0,0 @@ -// Copyright 2023 Google Inc. All Rights Reserved. -// -// 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 logsink - -import ( - "bytes" - "context" - "fmt" - "strconv" - "strings" - "sync" - "time" - - "github.com/golang/glog/internal/stackdump" -) - -// MaxLogMessageLen is the limit on length of a formatted log message, including -// the standard line prefix and trailing newline. -// -// Chosen to match C++ glog. -const MaxLogMessageLen = 15000 - -// A Severity is a severity at which a message can be logged. -type Severity int8 - -// These constants identify the log levels in order of increasing severity. -// A message written to a high-severity log file is also written to each -// lower-severity log file. -const ( - Info Severity = iota - Warning - Error - - // Fatal contains logs written immediately before the process terminates. - // - // Sink implementations should not terminate the process themselves: the log - // package will perform any necessary cleanup and terminate the process as - // appropriate. - Fatal -) - -func (s Severity) String() string { - switch s { - case Info: - return "INFO" - case Warning: - return "WARNING" - case Error: - return "ERROR" - case Fatal: - return "FATAL" - } - return fmt.Sprintf("%T(%d)", s, s) -} - -// ParseSeverity returns the case-insensitive Severity value for the given string. -func ParseSeverity(name string) (Severity, error) { - name = strings.ToUpper(name) - for s := Info; s <= Fatal; s++ { - if s.String() == name { - return s, nil - } - } - return -1, fmt.Errorf("logsink: invalid severity %q", name) -} - -// Meta is metadata about a logging call. -type Meta struct { - // The context with which the log call was made (or nil). If set, the context - // is only valid during the logsink.Structured.Printf call, it should not be - // retained. - Context context.Context - - // Time is the time at which the log call was made. - Time time.Time - - // File is the source file from which the log entry originates. - File string - // Line is the line offset within the source file. - Line int - // Depth is the number of stack frames between the logsink and the log call. - Depth int - - Severity Severity - - // Verbose indicates whether the call was made via "log.V". Log entries below - // the current verbosity threshold are not sent to the sink. - Verbose bool - - // Thread ID. This can be populated with a thread ID from another source, - // such as a system we are importing logs from. In the normal case, this - // will be set to the process ID (PID), since Go doesn't have threads. - Thread int64 - - // Stack trace starting in the logging function. May be nil. - // A logsink should implement the StackWanter interface to request this. - // - // Even if WantStack returns false, this field may be set (e.g. if another - // sink wants a stack trace). - Stack *stackdump.Stack -} - -// Structured is a logging destination that accepts structured data as input. -type Structured interface { - // Printf formats according to a fmt.Printf format specifier and writes a log - // entry. The precise result of formatting depends on the sink, but should - // aim for consistency with fmt.Printf. - // - // Printf returns the number of bytes occupied by the log entry, which - // may not be equal to the total number of bytes written. - // - // Printf returns any error encountered *if* it is severe enough that the log - // package should terminate the process. - // - // The sink must not modify the *Meta parameter, nor reference it after - // Printf has returned: it may be reused in subsequent calls. - Printf(meta *Meta, format string, a ...any) (n int, err error) -} - -// StackWanter can be implemented by a logsink.Structured to indicate that it -// wants a stack trace to accompany at least some of the log messages it receives. -type StackWanter interface { - // WantStack returns true if the sink requires a stack trace for a log message - // with this metadata. - // - // NOTE: Returning true implies that meta.Stack will be non-nil. Returning - // false does NOT imply that meta.Stack will be nil. - WantStack(meta *Meta) bool -} - -// Text is a logging destination that accepts pre-formatted log lines (instead of -// structured data). -type Text interface { - // Enabled returns whether this sink should output messages for the given - // Meta. If the sink returns false for a given Meta, the Printf function will - // not call Emit on it for the corresponding log message. - Enabled(*Meta) bool - - // Emit writes a pre-formatted text log entry (including any applicable - // header) to the log. It returns the number of bytes occupied by the entry - // (which may differ from the length of the passed-in slice). - // - // Emit returns any error encountered *if* it is severe enough that the log - // package should terminate the process. - // - // The sink must not modify the *Meta parameter, nor reference it after - // Printf has returned: it may be reused in subsequent calls. - // - // NOTE: When developing a text sink, keep in mind the surface in which the - // logs will be displayed, and whether it's important that the sink be - // resistent to tampering in the style of b/211428300. Standard text sinks - // (like `stderrSink`) do not protect against this (e.g. by escaping - // characters) because the cases where they would show user-influenced bytes - // are vanishingly small. - Emit(*Meta, []byte) (n int, err error) -} - -// bufs is a pool of *bytes.Buffer used in formatting log entries. -var bufs sync.Pool // Pool of *bytes.Buffer. - -// textPrintf formats a text log entry and emits it to all specified Text sinks. -// -// The returned n is the maximum across all Emit calls. -// The returned err is the first non-nil error encountered. -// Sinks that are disabled by configuration should return (0, nil). -func textPrintf(m *Meta, textSinks []Text, format string, args ...any) (n int, err error) { - // We expect at most file, stderr, and perhaps syslog. If there are more, - // we'll end up allocating - no big deal. - const maxExpectedTextSinks = 3 - var noAllocSinks [maxExpectedTextSinks]Text - - sinks := noAllocSinks[:0] - for _, s := range textSinks { - if s.Enabled(m) { - sinks = append(sinks, s) - } - } - if len(sinks) == 0 && m.Severity != Fatal { - return 0, nil // No TextSinks specified; don't bother formatting. - } - - bufi := bufs.Get() - var buf *bytes.Buffer - if bufi == nil { - buf = bytes.NewBuffer(nil) - bufi = buf - } else { - buf = bufi.(*bytes.Buffer) - buf.Reset() - } - - // Lmmdd hh:mm:ss.uuuuuu PID/GID file:line] - // - // The "PID" entry arguably ought to be TID for consistency with other - // environments, but TID is not meaningful in a Go program due to the - // multiplexing of goroutines across threads. - // - // Avoid Fprintf, for speed. The format is so simple that we can do it quickly by hand. - // It's worth about 3X. Fprintf is hard. - const severityChar = "IWEF" - buf.WriteByte(severityChar[m.Severity]) - - _, month, day := m.Time.Date() - hour, minute, second := m.Time.Clock() - twoDigits(buf, int(month)) - twoDigits(buf, day) - buf.WriteByte(' ') - twoDigits(buf, hour) - buf.WriteByte(':') - twoDigits(buf, minute) - buf.WriteByte(':') - twoDigits(buf, second) - buf.WriteByte('.') - nDigits(buf, 6, uint64(m.Time.Nanosecond()/1000), '0') - buf.WriteByte(' ') - - nDigits(buf, 7, uint64(m.Thread), ' ') - buf.WriteByte(' ') - - { - file := m.File - if i := strings.LastIndex(file, "/"); i >= 0 { - file = file[i+1:] - } - buf.WriteString(file) - } - - buf.WriteByte(':') - { - var tmp [19]byte - buf.Write(strconv.AppendInt(tmp[:0], int64(m.Line), 10)) - } - buf.WriteString("] ") - - msgStart := buf.Len() - fmt.Fprintf(buf, format, args...) - if buf.Len() > MaxLogMessageLen-1 { - buf.Truncate(MaxLogMessageLen - 1) - } - msgEnd := buf.Len() - if b := buf.Bytes(); b[len(b)-1] != '\n' { - buf.WriteByte('\n') - } - - for _, s := range sinks { - sn, sErr := s.Emit(m, buf.Bytes()) - if sn > n { - n = sn - } - if sErr != nil && err == nil { - err = sErr - } - } - - if m.Severity == Fatal { - savedM := *m - fatalMessageStore(savedEntry{ - meta: &savedM, - msg: buf.Bytes()[msgStart:msgEnd], - }) - } else { - bufs.Put(bufi) - } - return n, err -} - -const digits = "0123456789" - -// twoDigits formats a zero-prefixed two-digit integer to buf. -func twoDigits(buf *bytes.Buffer, d int) { - buf.WriteByte(digits[(d/10)%10]) - buf.WriteByte(digits[d%10]) -} - -// nDigits formats an n-digit integer to buf, padding with pad on the left. It -// assumes d != 0. -func nDigits(buf *bytes.Buffer, n int, d uint64, pad byte) { - var tmp [20]byte - - cutoff := len(tmp) - n - j := len(tmp) - 1 - for ; d > 0; j-- { - tmp[j] = digits[d%10] - d /= 10 - } - for ; j >= cutoff; j-- { - tmp[j] = pad - } - j++ - buf.Write(tmp[j:]) -} - -// Printf writes a log entry to all registered TextSinks in this package, then -// to all registered StructuredSinks. -// -// The returned n is the maximum across all Emit and Printf calls. -// The returned err is the first non-nil error encountered. -// Sinks that are disabled by configuration should return (0, nil). -func Printf(m *Meta, format string, args ...any) (n int, err error) { - m.Depth++ - n, err = textPrintf(m, TextSinks, format, args...) - - for _, sink := range StructuredSinks { - // TODO: Support TextSinks that implement StackWanter? - if sw, ok := sink.(StackWanter); ok && sw.WantStack(m) { - if m.Stack == nil { - // First, try to find a stacktrace in args, otherwise generate one. - for _, arg := range args { - if stack, ok := arg.(stackdump.Stack); ok { - m.Stack = &stack - break - } - } - if m.Stack == nil { - stack := stackdump.Caller( /* skipDepth = */ m.Depth) - m.Stack = &stack - } - } - } - sn, sErr := sink.Printf(m, format, args...) - if sn > n { - n = sn - } - if sErr != nil && err == nil { - err = sErr - } - } - return n, err -} - -// The sets of sinks to which logs should be written. -// -// These must only be modified during package init, and are read-only thereafter. -var ( - // StructuredSinks is the set of Structured sink instances to which logs - // should be written. - StructuredSinks []Structured - - // TextSinks is the set of Text sink instances to which logs should be - // written. - // - // These are registered separately from Structured sink implementations to - // avoid the need to repeat the work of formatting a message for each Text - // sink that writes it. The package-level Printf function writes to both sets - // independenty, so a given log destination should only register a Structured - // *or* a Text sink (not both). - TextSinks []Text -) - -type savedEntry struct { - meta *Meta - msg []byte -} - -// StructuredTextWrapper is a Structured sink which forwards logs to a set of Text sinks. -// -// The purpose of this sink is to allow applications to intercept logging calls before they are -// serialized and sent to Text sinks. For example, if one needs to redact PII from logging -// arguments before they reach STDERR, one solution would be to do the redacting in a Structured -// sink that forwards logs to a StructuredTextWrapper instance, and make STDERR a child of that -// StructuredTextWrapper instance. This is how one could set this up in their application: -// -// func init() { -// -// wrapper := logsink.StructuredTextWrapper{TextSinks: logsink.TextSinks} -// // sanitizersink will intercept logs and remove PII -// sanitizer := sanitizersink{Sink: &wrapper} -// logsink.StructuredSinks = append(logsink.StructuredSinks, &sanitizer) -// logsink.TextSinks = nil -// -// } -type StructuredTextWrapper struct { - // TextSinks is the set of Text sinks that should receive logs from this - // StructuredTextWrapper instance. - TextSinks []Text -} - -// Printf forwards logs to all Text sinks registered in the StructuredTextWrapper. -func (w *StructuredTextWrapper) Printf(meta *Meta, format string, args ...any) (n int, err error) { - return textPrintf(meta, w.TextSinks, format, args...) -} diff --git a/vendor/github.com/golang/glog/internal/logsink/logsink_fatal.go b/vendor/github.com/golang/glog/internal/logsink/logsink_fatal.go deleted file mode 100644 index 3dc269abc..000000000 --- a/vendor/github.com/golang/glog/internal/logsink/logsink_fatal.go +++ /dev/null @@ -1,35 +0,0 @@ -package logsink - -import ( - "sync/atomic" - "unsafe" -) - -func fatalMessageStore(e savedEntry) { - // Only put a new one in if we haven't assigned before. - atomic.CompareAndSwapPointer(&fatalMessage, nil, unsafe.Pointer(&e)) -} - -var fatalMessage unsafe.Pointer // savedEntry stored with CompareAndSwapPointer - -// FatalMessage returns the Meta and message contents of the first message -// logged with Fatal severity, or false if none has occurred. -func FatalMessage() (*Meta, []byte, bool) { - e := (*savedEntry)(atomic.LoadPointer(&fatalMessage)) - if e == nil { - return nil, nil, false - } - return e.meta, e.msg, true -} - -// DoNotUseRacyFatalMessage is FatalMessage, but worse. -// -//go:norace -//go:nosplit -func DoNotUseRacyFatalMessage() (*Meta, []byte, bool) { - e := (*savedEntry)(fatalMessage) - if e == nil { - return nil, nil, false - } - return e.meta, e.msg, true -} diff --git a/vendor/github.com/golang/glog/internal/stackdump/stackdump.go b/vendor/github.com/golang/glog/internal/stackdump/stackdump.go deleted file mode 100644 index 3427c9d6b..000000000 --- a/vendor/github.com/golang/glog/internal/stackdump/stackdump.go +++ /dev/null @@ -1,127 +0,0 @@ -// Copyright 2023 Google Inc. All Rights Reserved. -// -// 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 stackdump provides wrappers for runtime.Stack and runtime.Callers -// with uniform support for skipping caller frames. -// -// ⚠ Unlike the functions in the runtime package, these may allocate a -// non-trivial quantity of memory: use them with care. ⚠ -package stackdump - -import ( - "bytes" - "runtime" -) - -// runtimeStackSelfFrames is 1 if runtime.Stack includes the call to -// runtime.Stack itself or 0 if it does not. -// -// As of 2016-04-27, the gccgo compiler includes runtime.Stack but the gc -// compiler does not. -var runtimeStackSelfFrames = func() int { - for n := 1 << 10; n < 1<<20; n *= 2 { - buf := make([]byte, n) - n := runtime.Stack(buf, false) - if bytes.Contains(buf[:n], []byte("runtime.Stack")) { - return 1 - } else if n < len(buf) || bytes.Count(buf, []byte("\n")) >= 3 { - return 0 - } - } - return 0 -}() - -// Stack is a stack dump for a single goroutine. -type Stack struct { - // Text is a representation of the stack dump in a human-readable format. - Text []byte - - // PC is a representation of the stack dump using raw program counter values. - PC []uintptr -} - -func (s Stack) String() string { return string(s.Text) } - -// Caller returns the Stack dump for the calling goroutine, starting skipDepth -// frames before the caller of Caller. (Caller(0) provides a dump starting at -// the caller of this function.) -func Caller(skipDepth int) Stack { - return Stack{ - Text: CallerText(skipDepth + 1), - PC: CallerPC(skipDepth + 1), - } -} - -// CallerText returns a textual dump of the stack starting skipDepth frames before -// the caller. (CallerText(0) provides a dump starting at the caller of this -// function.) -func CallerText(skipDepth int) []byte { - for n := 1 << 10; ; n *= 2 { - buf := make([]byte, n) - n := runtime.Stack(buf, false) - if n < len(buf) { - return pruneFrames(skipDepth+1+runtimeStackSelfFrames, buf[:n]) - } - } -} - -// CallerPC returns a dump of the program counters of the stack starting -// skipDepth frames before the caller. (CallerPC(0) provides a dump starting at -// the caller of this function.) -func CallerPC(skipDepth int) []uintptr { - for n := 1 << 8; ; n *= 2 { - buf := make([]uintptr, n) - n := runtime.Callers(skipDepth+2, buf) - if n < len(buf) { - return buf[:n] - } - } -} - -// pruneFrames removes the topmost skipDepth frames of the first goroutine in a -// textual stack dump. It overwrites the passed-in slice. -// -// If there are fewer than skipDepth frames in the first goroutine's stack, -// pruneFrames prunes it to an empty stack and leaves the remaining contents -// intact. -func pruneFrames(skipDepth int, stack []byte) []byte { - headerLen := 0 - for i, c := range stack { - if c == '\n' { - headerLen = i + 1 - break - } - } - if headerLen == 0 { - return stack // No header line - not a well-formed stack trace. - } - - skipLen := headerLen - skipNewlines := skipDepth * 2 - for ; skipLen < len(stack) && skipNewlines > 0; skipLen++ { - c := stack[skipLen] - if c != '\n' { - continue - } - skipNewlines-- - skipLen++ - if skipNewlines == 0 || skipLen == len(stack) || stack[skipLen] == '\n' { - break - } - } - - pruned := stack[skipLen-headerLen:] - copy(pruned, stack[:headerLen]) - return pruned -} diff --git a/vendor/github.com/openshift/api/LICENSE b/vendor/github.com/openshift/api/LICENSE deleted file mode 100644 index 5c389317e..000000000 --- a/vendor/github.com/openshift/api/LICENSE +++ /dev/null @@ -1,191 +0,0 @@ - - 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 - - Copyright 2020 Red Hat, Inc. - - 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/openshift/api/config/v1/0000_00_cluster-version-operator_01_clusteroperator.crd.yaml b/vendor/github.com/openshift/api/config/v1/0000_00_cluster-version-operator_01_clusteroperator.crd.yaml deleted file mode 100644 index f2e2cc365..000000000 --- a/vendor/github.com/openshift/api/config/v1/0000_00_cluster-version-operator_01_clusteroperator.crd.yaml +++ /dev/null @@ -1,137 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - api-approved.openshift.io: https://github.com/openshift/api/pull/497 - include.release.openshift.io/self-managed-high-availability: "true" - include.release.openshift.io/single-node-developer: "true" - name: clusteroperators.config.openshift.io -spec: - group: config.openshift.io - names: - kind: ClusterOperator - listKind: ClusterOperatorList - plural: clusteroperators - shortNames: - - co - singular: clusteroperator - scope: Cluster - versions: - - additionalPrinterColumns: - - description: The version the operator is at. - jsonPath: .status.versions[?(@.name=="operator")].version - name: Version - type: string - - description: Whether the operator is running and stable. - jsonPath: .status.conditions[?(@.type=="Available")].status - name: Available - type: string - - description: Whether the operator is processing changes. - jsonPath: .status.conditions[?(@.type=="Progressing")].status - name: Progressing - type: string - - description: Whether the operator is degraded. - jsonPath: .status.conditions[?(@.type=="Degraded")].status - name: Degraded - type: string - - description: The time the operator's Available status last changed. - jsonPath: .status.conditions[?(@.type=="Available")].lastTransitionTime - name: Since - type: date - name: v1 - schema: - openAPIV3Schema: - description: "ClusterOperator is the Custom Resource object which holds the current state of an operator. This object is used by operators to convey their state to the rest of the cluster. \n Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer)." - type: object - required: - - spec - properties: - apiVersion: - 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 - kind: - 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 - metadata: - type: object - spec: - description: spec holds configuration that could apply to any operator. - type: object - status: - description: status holds the information about the state of an operator. It is consistent with status information across the Kubernetes ecosystem. - type: object - properties: - conditions: - description: conditions describes the state of the operator's managed and monitored components. - type: array - items: - description: ClusterOperatorStatusCondition represents the state of the operator's managed and monitored components. - type: object - required: - - lastTransitionTime - - status - - type - properties: - lastTransitionTime: - description: lastTransitionTime is the time of the last update to the current status property. - type: string - format: date-time - message: - description: message provides additional information about the current condition. This is only to be consumed by humans. It may contain Line Feed characters (U+000A), which should be rendered as new lines. - type: string - reason: - description: reason is the CamelCase reason for the condition's current status. - type: string - status: - description: status of the condition, one of True, False, Unknown. - type: string - type: - description: type specifies the aspect reported by this condition. - type: string - extension: - description: extension contains any additional status information specific to the operator which owns this status object. - type: object - nullable: true - x-kubernetes-preserve-unknown-fields: true - relatedObjects: - description: 'relatedObjects is a list of objects that are "interesting" or related to this operator. Common uses are: 1. the detailed resource driving the operator 2. operator namespaces 3. operand namespaces' - type: array - items: - description: ObjectReference contains enough information to let you inspect or modify the referred object. - type: object - required: - - group - - name - - resource - properties: - group: - description: group of the referent. - type: string - name: - description: name of the referent. - type: string - namespace: - description: namespace of the referent. - type: string - resource: - description: resource of the referent. - type: string - versions: - description: versions is a slice of operator and operand version tuples. Operators which manage multiple operands will have multiple operand entries in the array. Available operators must report the version of the operator itself with the name "operator". An operator reports a new "operator" version when it has rolled out the new version to all of its operands. - type: array - items: - type: object - required: - - name - - version - properties: - name: - description: name is the name of the particular operand this version is for. It usually matches container images, not operators. - type: string - version: - description: version indicates which version of a particular operand is currently being managed. It must always match the Available operand. If 1.0.0 is Available, then this must indicate 1.0.0 even if the operator is trying to rollout 1.1.0 - type: string - served: true - storage: true - subresources: - status: {} diff --git a/vendor/github.com/openshift/api/config/v1/0000_00_cluster-version-operator_01_clusterversion.crd.yaml b/vendor/github.com/openshift/api/config/v1/0000_00_cluster-version-operator_01_clusterversion.crd.yaml deleted file mode 100644 index 16a333ca8..000000000 --- a/vendor/github.com/openshift/api/config/v1/0000_00_cluster-version-operator_01_clusterversion.crd.yaml +++ /dev/null @@ -1,435 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - api-approved.openshift.io: https://github.com/openshift/api/pull/495 - include.release.openshift.io/self-managed-high-availability: "true" - include.release.openshift.io/single-node-developer: "true" - name: clusterversions.config.openshift.io -spec: - group: config.openshift.io - names: - kind: ClusterVersion - plural: clusterversions - singular: clusterversion - scope: Cluster - versions: - - additionalPrinterColumns: - - jsonPath: .status.history[?(@.state=="Completed")].version - name: Version - type: string - - jsonPath: .status.conditions[?(@.type=="Available")].status - name: Available - type: string - - jsonPath: .status.conditions[?(@.type=="Progressing")].status - name: Progressing - type: string - - jsonPath: .status.conditions[?(@.type=="Progressing")].lastTransitionTime - name: Since - type: date - - jsonPath: .status.conditions[?(@.type=="Progressing")].message - name: Status - type: string - name: v1 - schema: - openAPIV3Schema: - description: "ClusterVersion is the configuration for the ClusterVersionOperator. This is where parameters related to automatic updates can be set. \n Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer)." - type: object - required: - - spec - properties: - apiVersion: - 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 - kind: - 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 - metadata: - type: object - spec: - description: spec is the desired state of the cluster version - the operator will work to ensure that the desired version is applied to the cluster. - type: object - required: - - clusterID - properties: - capabilities: - description: capabilities configures the installation of optional, core cluster components. A null value here is identical to an empty object; see the child properties for default semantics. - type: object - properties: - additionalEnabledCapabilities: - description: additionalEnabledCapabilities extends the set of managed capabilities beyond the baseline defined in baselineCapabilitySet. The default is an empty set. - type: array - items: - description: ClusterVersionCapability enumerates optional, core cluster components. - type: string - enum: - - openshift-samples - - baremetal - - marketplace - - Console - - Insights - - Storage - - CSISnapshot - - NodeTuning - x-kubernetes-list-type: atomic - baselineCapabilitySet: - description: baselineCapabilitySet selects an initial set of optional capabilities to enable, which can be extended via additionalEnabledCapabilities. If unset, the cluster will choose a default, and the default may change over time. The current default is vCurrent. - type: string - enum: - - None - - v4.11 - - v4.12 - - v4.13 - - vCurrent - channel: - description: channel is an identifier for explicitly requesting that a non-default set of updates be applied to this cluster. The default channel will be contain stable updates that are appropriate for production clusters. - type: string - clusterID: - description: clusterID uniquely identifies this cluster. This is expected to be an RFC4122 UUID value (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx in hexadecimal values). This is a required field. - type: string - desiredUpdate: - description: "desiredUpdate is an optional field that indicates the desired value of the cluster version. Setting this value will trigger an upgrade (if the current version does not match the desired version). The set of recommended update values is listed as part of available updates in status, and setting values outside that range may cause the upgrade to fail. \n Some of the fields are inter-related with restrictions and meanings described here. 1. image is specified, version is specified, architecture is specified. API validation error. 2. image is specified, version is specified, architecture is not specified. You should not do this. version is silently ignored and image is used. 3. image is specified, version is not specified, architecture is specified. API validation error. 4. image is specified, version is not specified, architecture is not specified. image is used. 5. image is not specified, version is specified, architecture is specified. version and desired architecture are used to select an image. 6. image is not specified, version is specified, architecture is not specified. version and current architecture are used to select an image. 7. image is not specified, version is not specified, architecture is specified. API validation error. 8. image is not specified, version is not specified, architecture is not specified. API validation error. \n If an upgrade fails the operator will halt and report status about the failing component. Setting the desired update value back to the previous version will cause a rollback to be attempted. Not all rollbacks will succeed." - type: object - properties: - architecture: - description: architecture is an optional field that indicates the desired value of the cluster architecture. In this context cluster architecture means either a single architecture or a multi architecture. architecture can only be set to Multi thereby only allowing updates from single to multi architecture. If architecture is set, image cannot be set and version must be set. Valid values are 'Multi' and empty. - type: string - enum: - - Multi - - "" - force: - description: force allows an administrator to update to an image that has failed verification or upgradeable checks. This option should only be used when the authenticity of the provided image has been verified out of band because the provided image will run with full administrative access to the cluster. Do not use this flag with images that comes from unknown or potentially malicious sources. - type: boolean - image: - description: image is a container image location that contains the update. image should be used when the desired version does not exist in availableUpdates or history. When image is set, version is ignored. When image is set, version should be empty. When image is set, architecture cannot be specified. - type: string - version: - description: version is a semantic version identifying the update version. version is ignored if image is specified and required if architecture is specified. - type: string - x-kubernetes-validations: - - rule: 'has(self.architecture) && has(self.image) ? (self.architecture == '''' || self.image == '''') : true' - message: cannot set both Architecture and Image - - rule: 'has(self.architecture) && self.architecture != '''' ? self.version != '''' : true' - message: Version must be set if Architecture is set - overrides: - description: overrides is list of overides for components that are managed by cluster version operator. Marking a component unmanaged will prevent the operator from creating or updating the object. - type: array - items: - description: ComponentOverride allows overriding cluster version operator's behavior for a component. - type: object - required: - - group - - kind - - name - - namespace - - unmanaged - properties: - group: - description: group identifies the API group that the kind is in. - type: string - kind: - description: kind indentifies which object to override. - type: string - name: - description: name is the component's name. - type: string - namespace: - description: namespace is the component's namespace. If the resource is cluster scoped, the namespace should be empty. - type: string - unmanaged: - description: 'unmanaged controls if cluster version operator should stop managing the resources in this cluster. Default: false' - type: boolean - upstream: - description: upstream may be used to specify the preferred update server. By default it will use the appropriate update server for the cluster and region. - type: string - status: - description: status contains information about the available updates and any in-progress updates. - type: object - required: - - availableUpdates - - desired - - observedGeneration - - versionHash - properties: - availableUpdates: - description: availableUpdates contains updates recommended for this cluster. Updates which appear in conditionalUpdates but not in availableUpdates may expose this cluster to known issues. This list may be empty if no updates are recommended, if the update service is unavailable, or if an invalid channel has been specified. - type: array - items: - description: Release represents an OpenShift release image and associated metadata. - type: object - properties: - channels: - description: channels is the set of Cincinnati channels to which the release currently belongs. - type: array - items: - type: string - image: - description: image is a container image location that contains the update. When this field is part of spec, image is optional if version is specified and the availableUpdates field contains a matching version. - type: string - url: - description: url contains information about this release. This URL is set by the 'url' metadata property on a release or the metadata returned by the update API and should be displayed as a link in user interfaces. The URL field may not be set for test or nightly releases. - type: string - version: - description: version is a semantic version identifying the update version. When this field is part of spec, version is optional if image is specified. - type: string - nullable: true - capabilities: - description: capabilities describes the state of optional, core cluster components. - type: object - properties: - enabledCapabilities: - description: enabledCapabilities lists all the capabilities that are currently managed. - type: array - items: - description: ClusterVersionCapability enumerates optional, core cluster components. - type: string - enum: - - openshift-samples - - baremetal - - marketplace - - Console - - Insights - - Storage - - CSISnapshot - - NodeTuning - x-kubernetes-list-type: atomic - knownCapabilities: - description: knownCapabilities lists all the capabilities known to the current cluster. - type: array - items: - description: ClusterVersionCapability enumerates optional, core cluster components. - type: string - enum: - - openshift-samples - - baremetal - - marketplace - - Console - - Insights - - Storage - - CSISnapshot - - NodeTuning - x-kubernetes-list-type: atomic - conditionalUpdates: - description: conditionalUpdates contains the list of updates that may be recommended for this cluster if it meets specific required conditions. Consumers interested in the set of updates that are actually recommended for this cluster should use availableUpdates. This list may be empty if no updates are recommended, if the update service is unavailable, or if an empty or invalid channel has been specified. - type: array - items: - description: ConditionalUpdate represents an update which is recommended to some clusters on the version the current cluster is reconciling, but which may not be recommended for the current cluster. - type: object - required: - - release - - risks - properties: - conditions: - description: 'conditions represents the observations of the conditional update''s current status. Known types are: * Evaluating, for whether the cluster-version operator will attempt to evaluate any risks[].matchingRules. * Recommended, for whether the update is recommended for the current cluster.' - type: array - items: - description: "Condition contains details for one aspect of the current state of this API Resource. --- This struct is intended for direct use as an array at the field path .status.conditions. For example, \n type FooStatus struct{ // Represents the observations of a foo's current state. // Known .status.conditions.type are: \"Available\", \"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge // +listType=map // +listMapKey=type Conditions []metav1.Condition `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }" - type: object - required: - - lastTransitionTime - - message - - reason - - status - - type - properties: - lastTransitionTime: - 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. - type: string - format: date-time - message: - description: message is a human readable message indicating details about the transition. This may be an empty string. - type: string - maxLength: 32768 - observedGeneration: - 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: integer - format: int64 - minimum: 0 - reason: - 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 - maxLength: 1024 - minLength: 1 - pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ - status: - description: status of the condition, one of True, False, Unknown. - type: string - enum: - - "True" - - "False" - - Unknown - type: - description: type of condition in CamelCase or in foo.example.com/CamelCase. --- Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be useful (see .node.status.conditions), the ability to deconflict is important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) - type: string - maxLength: 316 - pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ - x-kubernetes-list-map-keys: - - type - x-kubernetes-list-type: map - release: - description: release is the target of the update. - type: object - properties: - channels: - description: channels is the set of Cincinnati channels to which the release currently belongs. - type: array - items: - type: string - image: - description: image is a container image location that contains the update. When this field is part of spec, image is optional if version is specified and the availableUpdates field contains a matching version. - type: string - url: - description: url contains information about this release. This URL is set by the 'url' metadata property on a release or the metadata returned by the update API and should be displayed as a link in user interfaces. The URL field may not be set for test or nightly releases. - type: string - version: - description: version is a semantic version identifying the update version. When this field is part of spec, version is optional if image is specified. - type: string - risks: - description: risks represents the range of issues associated with updating to the target release. The cluster-version operator will evaluate all entries, and only recommend the update if there is at least one entry and all entries recommend the update. - type: array - minItems: 1 - items: - description: ConditionalUpdateRisk represents a reason and cluster-state for not recommending a conditional update. - type: object - required: - - matchingRules - - message - - name - - url - properties: - matchingRules: - description: matchingRules is a slice of conditions for deciding which clusters match the risk and which do not. The slice is ordered by decreasing precedence. The cluster-version operator will walk the slice in order, and stop after the first it can successfully evaluate. If no condition can be successfully evaluated, the update will not be recommended. - type: array - minItems: 1 - items: - description: ClusterCondition is a union of typed cluster conditions. The 'type' property determines which of the type-specific properties are relevant. When evaluated on a cluster, the condition may match, not match, or fail to evaluate. - type: object - required: - - type - properties: - promql: - description: promQL represents a cluster condition based on PromQL. - type: object - required: - - promql - properties: - promql: - description: PromQL is a PromQL query classifying clusters. This query query should return a 1 in the match case and a 0 in the does-not-match case. Queries which return no time series, or which return values besides 0 or 1, are evaluation failures. - type: string - type: - description: type represents the cluster-condition type. This defines the members and semantics of any additional properties. - type: string - enum: - - Always - - PromQL - x-kubernetes-list-type: atomic - message: - description: message provides additional information about the risk of updating, in the event that matchingRules match the cluster state. This is only to be consumed by humans. It may contain Line Feed characters (U+000A), which should be rendered as new lines. - type: string - minLength: 1 - name: - description: name is the CamelCase reason for not recommending a conditional update, in the event that matchingRules match the cluster state. - type: string - minLength: 1 - url: - description: url contains information about this risk. - type: string - format: uri - minLength: 1 - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - x-kubernetes-list-type: atomic - conditions: - description: conditions provides information about the cluster version. The condition "Available" is set to true if the desiredUpdate has been reached. The condition "Progressing" is set to true if an update is being applied. The condition "Degraded" is set to true if an update is currently blocked by a temporary or permanent error. Conditions are only valid for the current desiredUpdate when metadata.generation is equal to status.generation. - type: array - items: - description: ClusterOperatorStatusCondition represents the state of the operator's managed and monitored components. - type: object - required: - - lastTransitionTime - - status - - type - properties: - lastTransitionTime: - description: lastTransitionTime is the time of the last update to the current status property. - type: string - format: date-time - message: - description: message provides additional information about the current condition. This is only to be consumed by humans. It may contain Line Feed characters (U+000A), which should be rendered as new lines. - type: string - reason: - description: reason is the CamelCase reason for the condition's current status. - type: string - status: - description: status of the condition, one of True, False, Unknown. - type: string - type: - description: type specifies the aspect reported by this condition. - type: string - desired: - description: desired is the version that the cluster is reconciling towards. If the cluster is not yet fully initialized desired will be set with the information available, which may be an image or a tag. - type: object - properties: - channels: - description: channels is the set of Cincinnati channels to which the release currently belongs. - type: array - items: - type: string - image: - description: image is a container image location that contains the update. When this field is part of spec, image is optional if version is specified and the availableUpdates field contains a matching version. - type: string - url: - description: url contains information about this release. This URL is set by the 'url' metadata property on a release or the metadata returned by the update API and should be displayed as a link in user interfaces. The URL field may not be set for test or nightly releases. - type: string - version: - description: version is a semantic version identifying the update version. When this field is part of spec, version is optional if image is specified. - type: string - history: - description: history contains a list of the most recent versions applied to the cluster. This value may be empty during cluster startup, and then will be updated when a new update is being applied. The newest update is first in the list and it is ordered by recency. Updates in the history have state Completed if the rollout completed - if an update was failing or halfway applied the state will be Partial. Only a limited amount of update history is preserved. - type: array - items: - description: UpdateHistory is a single attempted update to the cluster. - type: object - required: - - completionTime - - image - - startedTime - - state - - verified - properties: - acceptedRisks: - description: acceptedRisks records risks which were accepted to initiate the update. For example, it may menition an Upgradeable=False or missing signature that was overriden via desiredUpdate.force, or an update that was initiated despite not being in the availableUpdates set of recommended update targets. - type: string - completionTime: - description: completionTime, if set, is when the update was fully applied. The update that is currently being applied will have a null completion time. Completion time will always be set for entries that are not the current update (usually to the started time of the next update). - type: string - format: date-time - nullable: true - image: - description: image is a container image location that contains the update. This value is always populated. - type: string - startedTime: - description: startedTime is the time at which the update was started. - type: string - format: date-time - state: - description: state reflects whether the update was fully applied. The Partial state indicates the update is not fully applied, while the Completed state indicates the update was successfully rolled out at least once (all parts of the update successfully applied). - type: string - verified: - description: verified indicates whether the provided update was properly verified before it was installed. If this is false the cluster may not be trusted. Verified does not cover upgradeable checks that depend on the cluster state at the time when the update target was accepted. - type: boolean - version: - description: version is a semantic version identifying the update version. If the requested image does not define a version, or if a failure occurs retrieving the image, this value may be empty. - type: string - observedGeneration: - description: observedGeneration reports which version of the spec is being synced. If this value is not equal to metadata.generation, then the desired and conditions fields may represent a previous version. - type: integer - format: int64 - versionHash: - description: versionHash is a fingerprint of the content that the cluster will be updated with. It is used by the operator to avoid unnecessary work and is for internal use only. - type: string - served: true - storage: true - subresources: - status: {} diff --git a/vendor/github.com/openshift/api/config/v1/0000_03_config-operator_01_proxy.crd.yaml b/vendor/github.com/openshift/api/config/v1/0000_03_config-operator_01_proxy.crd.yaml deleted file mode 100644 index 3f58cbf69..000000000 --- a/vendor/github.com/openshift/api/config/v1/0000_03_config-operator_01_proxy.crd.yaml +++ /dev/null @@ -1,78 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - api-approved.openshift.io: https://github.com/openshift/api/pull/470 - include.release.openshift.io/ibm-cloud-managed: "true" - include.release.openshift.io/self-managed-high-availability: "true" - include.release.openshift.io/single-node-developer: "true" - name: proxies.config.openshift.io -spec: - group: config.openshift.io - names: - kind: Proxy - listKind: ProxyList - plural: proxies - singular: proxy - scope: Cluster - versions: - - name: v1 - schema: - openAPIV3Schema: - description: "Proxy holds cluster-wide information on how to configure default proxies for the cluster. The canonical name is `cluster` \n Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer)." - type: object - required: - - spec - properties: - apiVersion: - 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 - kind: - 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 - metadata: - type: object - spec: - description: Spec holds user-settable values for the proxy configuration - type: object - properties: - httpProxy: - description: httpProxy is the URL of the proxy for HTTP requests. Empty means unset and will not result in an env var. - type: string - httpsProxy: - description: httpsProxy is the URL of the proxy for HTTPS requests. Empty means unset and will not result in an env var. - type: string - noProxy: - description: noProxy is a comma-separated list of hostnames and/or CIDRs and/or IPs for which the proxy should not be used. Empty means unset and will not result in an env var. - type: string - readinessEndpoints: - description: readinessEndpoints is a list of endpoints used to verify readiness of the proxy. - type: array - items: - type: string - trustedCA: - description: "trustedCA is a reference to a ConfigMap containing a CA certificate bundle. The trustedCA field should only be consumed by a proxy validator. The validator is responsible for reading the certificate bundle from the required key \"ca-bundle.crt\", merging it with the system default trust bundle, and writing the merged trust bundle to a ConfigMap named \"trusted-ca-bundle\" in the \"openshift-config-managed\" namespace. Clients that expect to make proxy connections must use the trusted-ca-bundle for all HTTPS requests to the proxy, and may use the trusted-ca-bundle for non-proxy HTTPS requests as well. \n The namespace for the ConfigMap referenced by trustedCA is \"openshift-config\". Here is an example ConfigMap (in yaml): \n apiVersion: v1 kind: ConfigMap metadata: name: user-ca-bundle namespace: openshift-config data: ca-bundle.crt: | -----BEGIN CERTIFICATE----- Custom CA certificate bundle. -----END CERTIFICATE-----" - type: object - required: - - name - properties: - name: - description: name is the metadata.name of the referenced config map - type: string - status: - description: status holds observed values from the cluster. They may not be overridden. - type: object - properties: - httpProxy: - description: httpProxy is the URL of the proxy for HTTP requests. - type: string - httpsProxy: - description: httpsProxy is the URL of the proxy for HTTPS requests. - type: string - noProxy: - description: noProxy is a comma-separated list of hostnames and/or CIDRs for which the proxy should not be used. - type: string - served: true - storage: true - subresources: - status: {} diff --git a/vendor/github.com/openshift/api/config/v1/0000_03_marketplace-operator_01_operatorhub.crd.yaml b/vendor/github.com/openshift/api/config/v1/0000_03_marketplace-operator_01_operatorhub.crd.yaml deleted file mode 100644 index 6e82955fa..000000000 --- a/vendor/github.com/openshift/api/config/v1/0000_03_marketplace-operator_01_operatorhub.crd.yaml +++ /dev/null @@ -1,84 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - api-approved.openshift.io: https://github.com/openshift/api/pull/470 - capability.openshift.io/name: marketplace - include.release.openshift.io/ibm-cloud-managed: "true" - include.release.openshift.io/self-managed-high-availability: "true" - include.release.openshift.io/single-node-developer: "true" - name: operatorhubs.config.openshift.io -spec: - group: config.openshift.io - names: - kind: OperatorHub - listKind: OperatorHubList - plural: operatorhubs - singular: operatorhub - scope: Cluster - versions: - - name: v1 - schema: - openAPIV3Schema: - description: "OperatorHub is the Schema for the operatorhubs API. It can be used to change the state of the default hub sources for OperatorHub on the cluster from enabled to disabled and vice versa. \n Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer)." - type: object - properties: - apiVersion: - 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 - kind: - 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 - metadata: - type: object - spec: - description: OperatorHubSpec defines the desired state of OperatorHub - type: object - properties: - disableAllDefaultSources: - description: disableAllDefaultSources allows you to disable all the default hub sources. If this is true, a specific entry in sources can be used to enable a default source. If this is false, a specific entry in sources can be used to disable or enable a default source. - type: boolean - sources: - description: sources is the list of default hub sources and their configuration. If the list is empty, it implies that the default hub sources are enabled on the cluster unless disableAllDefaultSources is true. If disableAllDefaultSources is true and sources is not empty, the configuration present in sources will take precedence. The list of default hub sources and their current state will always be reflected in the status block. - type: array - items: - description: HubSource is used to specify the hub source and its configuration - type: object - properties: - disabled: - description: disabled is used to disable a default hub source on cluster - type: boolean - name: - description: name is the name of one of the default hub sources - type: string - maxLength: 253 - minLength: 1 - status: - description: OperatorHubStatus defines the observed state of OperatorHub. The current state of the default hub sources will always be reflected here. - type: object - properties: - sources: - description: sources encapsulates the result of applying the configuration for each hub source - type: array - items: - description: HubSourceStatus is used to reflect the current state of applying the configuration to a default source - type: object - properties: - disabled: - description: disabled is used to disable a default hub source on cluster - type: boolean - message: - description: message provides more information regarding failures - type: string - name: - description: name is the name of one of the default hub sources - type: string - maxLength: 253 - minLength: 1 - status: - description: status indicates success or failure in applying the configuration - type: string - served: true - storage: true - subresources: - status: {} diff --git a/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_apiserver-Default.crd.yaml b/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_apiserver-Default.crd.yaml deleted file mode 100644 index 7edc7f23a..000000000 --- a/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_apiserver-Default.crd.yaml +++ /dev/null @@ -1,179 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - api-approved.openshift.io: https://github.com/openshift/api/pull/470 - include.release.openshift.io/ibm-cloud-managed: "true" - include.release.openshift.io/self-managed-high-availability: "true" - include.release.openshift.io/single-node-developer: "true" - release.openshift.io/feature-set: Default - name: apiservers.config.openshift.io -spec: - group: config.openshift.io - names: - kind: APIServer - listKind: APIServerList - plural: apiservers - singular: apiserver - scope: Cluster - versions: - - name: v1 - schema: - openAPIV3Schema: - description: "APIServer holds configuration (like serving certificates, client CA and CORS domains) shared by all API servers in the system, among them especially kube-apiserver and openshift-apiserver. The canonical name of an instance is 'cluster'. \n Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer)." - type: object - required: - - spec - properties: - apiVersion: - 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 - kind: - 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 - metadata: - type: object - spec: - description: spec holds user settable values for configuration - type: object - properties: - additionalCORSAllowedOrigins: - description: additionalCORSAllowedOrigins lists additional, user-defined regular expressions describing hosts for which the API server allows access using the CORS headers. This may be needed to access the API and the integrated OAuth server from JavaScript applications. The values are regular expressions that correspond to the Golang regular expression language. - type: array - items: - type: string - audit: - description: audit specifies the settings for audit configuration to be applied to all OpenShift-provided API servers in the cluster. - type: object - default: - profile: Default - properties: - customRules: - description: customRules specify profiles per group. These profile take precedence over the top-level profile field if they apply. They are evaluation from top to bottom and the first one that matches, applies. - type: array - items: - description: AuditCustomRule describes a custom rule for an audit profile that takes precedence over the top-level profile. - type: object - required: - - group - - profile - properties: - group: - description: group is a name of group a request user must be member of in order to this profile to apply. - type: string - minLength: 1 - profile: - description: "profile specifies the name of the desired audit policy configuration to be deployed to all OpenShift-provided API servers in the cluster. \n The following profiles are provided: - Default: the existing default policy. - WriteRequestBodies: like 'Default', but logs request and response HTTP payloads for write requests (create, update, patch). - AllRequestBodies: like 'WriteRequestBodies', but also logs request and response HTTP payloads for read requests (get, list). - None: no requests are logged at all, not even oauthaccesstokens and oauthauthorizetokens. \n If unset, the 'Default' profile is used as the default." - type: string - enum: - - Default - - WriteRequestBodies - - AllRequestBodies - - None - x-kubernetes-list-map-keys: - - group - x-kubernetes-list-type: map - profile: - description: "profile specifies the name of the desired top-level audit profile to be applied to all requests sent to any of the OpenShift-provided API servers in the cluster (kube-apiserver, openshift-apiserver and oauth-apiserver), with the exception of those requests that match one or more of the customRules. \n The following profiles are provided: - Default: default policy which means MetaData level logging with the exception of events (not logged at all), oauthaccesstokens and oauthauthorizetokens (both logged at RequestBody level). - WriteRequestBodies: like 'Default', but logs request and response HTTP payloads for write requests (create, update, patch). - AllRequestBodies: like 'WriteRequestBodies', but also logs request and response HTTP payloads for read requests (get, list). - None: no requests are logged at all, not even oauthaccesstokens and oauthauthorizetokens. \n Warning: It is not recommended to disable audit logging by using the `None` profile unless you are fully aware of the risks of not logging data that can be beneficial when troubleshooting issues. If you disable audit logging and a support situation arises, you might need to enable audit logging and reproduce the issue in order to troubleshoot properly. \n If unset, the 'Default' profile is used as the default." - type: string - default: Default - enum: - - Default - - WriteRequestBodies - - AllRequestBodies - - None - clientCA: - description: 'clientCA references a ConfigMap containing a certificate bundle for the signers that will be recognized for incoming client certificates in addition to the operator managed signers. If this is empty, then only operator managed signers are valid. You usually only have to set this if you have your own PKI you wish to honor client certificates from. The ConfigMap must exist in the openshift-config namespace and contain the following required fields: - ConfigMap.Data["ca-bundle.crt"] - CA bundle.' - type: object - required: - - name - properties: - name: - description: name is the metadata.name of the referenced config map - type: string - encryption: - description: encryption allows the configuration of encryption of resources at the datastore layer. - type: object - properties: - type: - description: "type defines what encryption type should be used to encrypt resources at the datastore layer. When this field is unset (i.e. when it is set to the empty string), identity is implied. The behavior of unset can and will change over time. Even if encryption is enabled by default, the meaning of unset may change to a different encryption type based on changes in best practices. \n When encryption is enabled, all sensitive resources shipped with the platform are encrypted. This list of sensitive resources can and will change over time. The current authoritative list is: \n 1. secrets 2. configmaps 3. routes.route.openshift.io 4. oauthaccesstokens.oauth.openshift.io 5. oauthauthorizetokens.oauth.openshift.io" - type: string - enum: - - "" - - identity - - aescbc - - aesgcm - servingCerts: - description: servingCert is the TLS cert info for serving secure traffic. If not specified, operator managed certificates will be used for serving secure traffic. - type: object - properties: - namedCertificates: - description: namedCertificates references secrets containing the TLS cert info for serving secure traffic to specific hostnames. If no named certificates are provided, or no named certificates match the server name as understood by a client, the defaultServingCertificate will be used. - type: array - items: - description: APIServerNamedServingCert maps a server DNS name, as understood by a client, to a certificate. - type: object - properties: - names: - description: names is a optional list of explicit DNS names (leading wildcards allowed) that should use this certificate to serve secure traffic. If no names are provided, the implicit names will be extracted from the certificates. Exact names trump over wildcard names. Explicit names defined here trump over extracted implicit names. - type: array - items: - type: string - servingCertificate: - description: 'servingCertificate references a kubernetes.io/tls type secret containing the TLS cert info for serving secure traffic. The secret must exist in the openshift-config namespace and contain the following required fields: - Secret.Data["tls.key"] - TLS private key. - Secret.Data["tls.crt"] - TLS certificate.' - type: object - required: - - name - properties: - name: - description: name is the metadata.name of the referenced secret - type: string - tlsSecurityProfile: - description: "tlsSecurityProfile specifies settings for TLS connections for externally exposed servers. \n If unset, a default (which may change between releases) is chosen. Note that only Old, Intermediate and Custom profiles are currently supported, and the maximum available MinTLSVersions is VersionTLS12." - type: object - properties: - custom: - description: "custom is a user-defined TLS security profile. Be extremely careful using a custom profile as invalid configurations can be catastrophic. An example custom profile looks like this: \n ciphers: - ECDHE-ECDSA-CHACHA20-POLY1305 - ECDHE-RSA-CHACHA20-POLY1305 - ECDHE-RSA-AES128-GCM-SHA256 - ECDHE-ECDSA-AES128-GCM-SHA256 minTLSVersion: TLSv1.1" - type: object - properties: - ciphers: - description: "ciphers is used to specify the cipher algorithms that are negotiated during the TLS handshake. Operators may remove entries their operands do not support. For example, to use DES-CBC3-SHA (yaml): \n ciphers: - DES-CBC3-SHA" - type: array - items: - type: string - minTLSVersion: - description: "minTLSVersion is used to specify the minimal version of the TLS protocol that is negotiated during the TLS handshake. For example, to use TLS versions 1.1, 1.2 and 1.3 (yaml): \n minTLSVersion: TLSv1.1 \n NOTE: currently the highest minTLSVersion allowed is VersionTLS12" - type: string - enum: - - VersionTLS10 - - VersionTLS11 - - VersionTLS12 - - VersionTLS13 - nullable: true - intermediate: - description: "intermediate is a TLS security profile based on: \n https://wiki.mozilla.org/Security/Server_Side_TLS#Intermediate_compatibility_.28recommended.29 \n and looks like this (yaml): \n ciphers: - TLS_AES_128_GCM_SHA256 - TLS_AES_256_GCM_SHA384 - TLS_CHACHA20_POLY1305_SHA256 - ECDHE-ECDSA-AES128-GCM-SHA256 - ECDHE-RSA-AES128-GCM-SHA256 - ECDHE-ECDSA-AES256-GCM-SHA384 - ECDHE-RSA-AES256-GCM-SHA384 - ECDHE-ECDSA-CHACHA20-POLY1305 - ECDHE-RSA-CHACHA20-POLY1305 - DHE-RSA-AES128-GCM-SHA256 - DHE-RSA-AES256-GCM-SHA384 minTLSVersion: TLSv1.2" - type: object - nullable: true - modern: - description: "modern is a TLS security profile based on: \n https://wiki.mozilla.org/Security/Server_Side_TLS#Modern_compatibility \n and looks like this (yaml): \n ciphers: - TLS_AES_128_GCM_SHA256 - TLS_AES_256_GCM_SHA384 - TLS_CHACHA20_POLY1305_SHA256 minTLSVersion: TLSv1.3 \n NOTE: Currently unsupported." - type: object - nullable: true - old: - description: "old is a TLS security profile based on: \n https://wiki.mozilla.org/Security/Server_Side_TLS#Old_backward_compatibility \n and looks like this (yaml): \n ciphers: - TLS_AES_128_GCM_SHA256 - TLS_AES_256_GCM_SHA384 - TLS_CHACHA20_POLY1305_SHA256 - ECDHE-ECDSA-AES128-GCM-SHA256 - ECDHE-RSA-AES128-GCM-SHA256 - ECDHE-ECDSA-AES256-GCM-SHA384 - ECDHE-RSA-AES256-GCM-SHA384 - ECDHE-ECDSA-CHACHA20-POLY1305 - ECDHE-RSA-CHACHA20-POLY1305 - DHE-RSA-AES128-GCM-SHA256 - DHE-RSA-AES256-GCM-SHA384 - DHE-RSA-CHACHA20-POLY1305 - ECDHE-ECDSA-AES128-SHA256 - ECDHE-RSA-AES128-SHA256 - ECDHE-ECDSA-AES128-SHA - ECDHE-RSA-AES128-SHA - ECDHE-ECDSA-AES256-SHA384 - ECDHE-RSA-AES256-SHA384 - ECDHE-ECDSA-AES256-SHA - ECDHE-RSA-AES256-SHA - DHE-RSA-AES128-SHA256 - DHE-RSA-AES256-SHA256 - AES128-GCM-SHA256 - AES256-GCM-SHA384 - AES128-SHA256 - AES256-SHA256 - AES128-SHA - AES256-SHA - DES-CBC3-SHA minTLSVersion: TLSv1.0" - type: object - nullable: true - type: - description: "type is one of Old, Intermediate, Modern or Custom. Custom provides the ability to specify individual TLS security profile parameters. Old, Intermediate and Modern are TLS security profiles based on: \n https://wiki.mozilla.org/Security/Server_Side_TLS#Recommended_configurations \n The profiles are intent based, so they may change over time as new ciphers are developed and existing ciphers are found to be insecure. Depending on precisely which ciphers are available to a process, the list may be reduced. \n Note that the Modern profile is currently not supported because it is not yet well adopted by common software libraries." - type: string - enum: - - Old - - Intermediate - - Modern - - Custom - status: - description: status holds observed values from the cluster. They may not be overridden. - type: object - served: true - storage: true - subresources: - status: {} diff --git a/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_apiserver-TechPreviewNoUpgrade.crd.yaml b/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_apiserver-TechPreviewNoUpgrade.crd.yaml deleted file mode 100644 index 8ce5214c1..000000000 --- a/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_apiserver-TechPreviewNoUpgrade.crd.yaml +++ /dev/null @@ -1,179 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - api-approved.openshift.io: https://github.com/openshift/api/pull/470 - include.release.openshift.io/ibm-cloud-managed: "true" - include.release.openshift.io/self-managed-high-availability: "true" - include.release.openshift.io/single-node-developer: "true" - release.openshift.io/feature-set: TechPreviewNoUpgrade - name: apiservers.config.openshift.io -spec: - group: config.openshift.io - names: - kind: APIServer - listKind: APIServerList - plural: apiservers - singular: apiserver - scope: Cluster - versions: - - name: v1 - schema: - openAPIV3Schema: - description: "APIServer holds configuration (like serving certificates, client CA and CORS domains) shared by all API servers in the system, among them especially kube-apiserver and openshift-apiserver. The canonical name of an instance is 'cluster'. \n Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer)." - type: object - required: - - spec - properties: - apiVersion: - 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 - kind: - 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 - metadata: - type: object - spec: - description: spec holds user settable values for configuration - type: object - properties: - additionalCORSAllowedOrigins: - description: additionalCORSAllowedOrigins lists additional, user-defined regular expressions describing hosts for which the API server allows access using the CORS headers. This may be needed to access the API and the integrated OAuth server from JavaScript applications. The values are regular expressions that correspond to the Golang regular expression language. - type: array - items: - type: string - audit: - description: audit specifies the settings for audit configuration to be applied to all OpenShift-provided API servers in the cluster. - type: object - default: - profile: Default - properties: - customRules: - description: customRules specify profiles per group. These profile take precedence over the top-level profile field if they apply. They are evaluation from top to bottom and the first one that matches, applies. - type: array - items: - description: AuditCustomRule describes a custom rule for an audit profile that takes precedence over the top-level profile. - type: object - required: - - group - - profile - properties: - group: - description: group is a name of group a request user must be member of in order to this profile to apply. - type: string - minLength: 1 - profile: - description: "profile specifies the name of the desired audit policy configuration to be deployed to all OpenShift-provided API servers in the cluster. \n The following profiles are provided: - Default: the existing default policy. - WriteRequestBodies: like 'Default', but logs request and response HTTP payloads for write requests (create, update, patch). - AllRequestBodies: like 'WriteRequestBodies', but also logs request and response HTTP payloads for read requests (get, list). - None: no requests are logged at all, not even oauthaccesstokens and oauthauthorizetokens. \n If unset, the 'Default' profile is used as the default." - type: string - enum: - - Default - - WriteRequestBodies - - AllRequestBodies - - None - x-kubernetes-list-map-keys: - - group - x-kubernetes-list-type: map - profile: - description: "profile specifies the name of the desired top-level audit profile to be applied to all requests sent to any of the OpenShift-provided API servers in the cluster (kube-apiserver, openshift-apiserver and oauth-apiserver), with the exception of those requests that match one or more of the customRules. \n The following profiles are provided: - Default: default policy which means MetaData level logging with the exception of events (not logged at all), oauthaccesstokens and oauthauthorizetokens (both logged at RequestBody level). - WriteRequestBodies: like 'Default', but logs request and response HTTP payloads for write requests (create, update, patch). - AllRequestBodies: like 'WriteRequestBodies', but also logs request and response HTTP payloads for read requests (get, list). - None: no requests are logged at all, not even oauthaccesstokens and oauthauthorizetokens. \n Warning: It is not recommended to disable audit logging by using the `None` profile unless you are fully aware of the risks of not logging data that can be beneficial when troubleshooting issues. If you disable audit logging and a support situation arises, you might need to enable audit logging and reproduce the issue in order to troubleshoot properly. \n If unset, the 'Default' profile is used as the default." - type: string - default: Default - enum: - - Default - - WriteRequestBodies - - AllRequestBodies - - None - clientCA: - description: 'clientCA references a ConfigMap containing a certificate bundle for the signers that will be recognized for incoming client certificates in addition to the operator managed signers. If this is empty, then only operator managed signers are valid. You usually only have to set this if you have your own PKI you wish to honor client certificates from. The ConfigMap must exist in the openshift-config namespace and contain the following required fields: - ConfigMap.Data["ca-bundle.crt"] - CA bundle.' - type: object - required: - - name - properties: - name: - description: name is the metadata.name of the referenced config map - type: string - encryption: - description: encryption allows the configuration of encryption of resources at the datastore layer. - type: object - properties: - type: - description: "type defines what encryption type should be used to encrypt resources at the datastore layer. When this field is unset (i.e. when it is set to the empty string), identity is implied. The behavior of unset can and will change over time. Even if encryption is enabled by default, the meaning of unset may change to a different encryption type based on changes in best practices. \n When encryption is enabled, all sensitive resources shipped with the platform are encrypted. This list of sensitive resources can and will change over time. The current authoritative list is: \n 1. secrets 2. configmaps 3. routes.route.openshift.io 4. oauthaccesstokens.oauth.openshift.io 5. oauthauthorizetokens.oauth.openshift.io" - type: string - enum: - - "" - - identity - - aescbc - - aesgcm - servingCerts: - description: servingCert is the TLS cert info for serving secure traffic. If not specified, operator managed certificates will be used for serving secure traffic. - type: object - properties: - namedCertificates: - description: namedCertificates references secrets containing the TLS cert info for serving secure traffic to specific hostnames. If no named certificates are provided, or no named certificates match the server name as understood by a client, the defaultServingCertificate will be used. - type: array - items: - description: APIServerNamedServingCert maps a server DNS name, as understood by a client, to a certificate. - type: object - properties: - names: - description: names is a optional list of explicit DNS names (leading wildcards allowed) that should use this certificate to serve secure traffic. If no names are provided, the implicit names will be extracted from the certificates. Exact names trump over wildcard names. Explicit names defined here trump over extracted implicit names. - type: array - items: - type: string - servingCertificate: - description: 'servingCertificate references a kubernetes.io/tls type secret containing the TLS cert info for serving secure traffic. The secret must exist in the openshift-config namespace and contain the following required fields: - Secret.Data["tls.key"] - TLS private key. - Secret.Data["tls.crt"] - TLS certificate.' - type: object - required: - - name - properties: - name: - description: name is the metadata.name of the referenced secret - type: string - tlsSecurityProfile: - description: "tlsSecurityProfile specifies settings for TLS connections for externally exposed servers. \n If unset, a default (which may change between releases) is chosen. Note that only Old, Intermediate and Custom profiles are currently supported, and the maximum available MinTLSVersions is VersionTLS12." - type: object - properties: - custom: - description: "custom is a user-defined TLS security profile. Be extremely careful using a custom profile as invalid configurations can be catastrophic. An example custom profile looks like this: \n ciphers: - ECDHE-ECDSA-CHACHA20-POLY1305 - ECDHE-RSA-CHACHA20-POLY1305 - ECDHE-RSA-AES128-GCM-SHA256 - ECDHE-ECDSA-AES128-GCM-SHA256 minTLSVersion: TLSv1.1" - type: object - properties: - ciphers: - description: "ciphers is used to specify the cipher algorithms that are negotiated during the TLS handshake. Operators may remove entries their operands do not support. For example, to use DES-CBC3-SHA (yaml): \n ciphers: - DES-CBC3-SHA" - type: array - items: - type: string - minTLSVersion: - description: "minTLSVersion is used to specify the minimal version of the TLS protocol that is negotiated during the TLS handshake. For example, to use TLS versions 1.1, 1.2 and 1.3 (yaml): \n minTLSVersion: TLSv1.1 \n NOTE: currently the highest minTLSVersion allowed is VersionTLS12" - type: string - enum: - - VersionTLS10 - - VersionTLS11 - - VersionTLS12 - - VersionTLS13 - nullable: true - intermediate: - description: "intermediate is a TLS security profile based on: \n https://wiki.mozilla.org/Security/Server_Side_TLS#Intermediate_compatibility_.28recommended.29 \n and looks like this (yaml): \n ciphers: - TLS_AES_128_GCM_SHA256 - TLS_AES_256_GCM_SHA384 - TLS_CHACHA20_POLY1305_SHA256 - ECDHE-ECDSA-AES128-GCM-SHA256 - ECDHE-RSA-AES128-GCM-SHA256 - ECDHE-ECDSA-AES256-GCM-SHA384 - ECDHE-RSA-AES256-GCM-SHA384 - ECDHE-ECDSA-CHACHA20-POLY1305 - ECDHE-RSA-CHACHA20-POLY1305 - DHE-RSA-AES128-GCM-SHA256 - DHE-RSA-AES256-GCM-SHA384 minTLSVersion: TLSv1.2" - type: object - nullable: true - modern: - description: "modern is a TLS security profile based on: \n https://wiki.mozilla.org/Security/Server_Side_TLS#Modern_compatibility \n and looks like this (yaml): \n ciphers: - TLS_AES_128_GCM_SHA256 - TLS_AES_256_GCM_SHA384 - TLS_CHACHA20_POLY1305_SHA256 minTLSVersion: TLSv1.3 \n NOTE: Currently unsupported." - type: object - nullable: true - old: - description: "old is a TLS security profile based on: \n https://wiki.mozilla.org/Security/Server_Side_TLS#Old_backward_compatibility \n and looks like this (yaml): \n ciphers: - TLS_AES_128_GCM_SHA256 - TLS_AES_256_GCM_SHA384 - TLS_CHACHA20_POLY1305_SHA256 - ECDHE-ECDSA-AES128-GCM-SHA256 - ECDHE-RSA-AES128-GCM-SHA256 - ECDHE-ECDSA-AES256-GCM-SHA384 - ECDHE-RSA-AES256-GCM-SHA384 - ECDHE-ECDSA-CHACHA20-POLY1305 - ECDHE-RSA-CHACHA20-POLY1305 - DHE-RSA-AES128-GCM-SHA256 - DHE-RSA-AES256-GCM-SHA384 - DHE-RSA-CHACHA20-POLY1305 - ECDHE-ECDSA-AES128-SHA256 - ECDHE-RSA-AES128-SHA256 - ECDHE-ECDSA-AES128-SHA - ECDHE-RSA-AES128-SHA - ECDHE-ECDSA-AES256-SHA384 - ECDHE-RSA-AES256-SHA384 - ECDHE-ECDSA-AES256-SHA - ECDHE-RSA-AES256-SHA - DHE-RSA-AES128-SHA256 - DHE-RSA-AES256-SHA256 - AES128-GCM-SHA256 - AES256-GCM-SHA384 - AES128-SHA256 - AES256-SHA256 - AES128-SHA - AES256-SHA - DES-CBC3-SHA minTLSVersion: TLSv1.0" - type: object - nullable: true - type: - description: "type is one of Old, Intermediate, Modern or Custom. Custom provides the ability to specify individual TLS security profile parameters. Old, Intermediate and Modern are TLS security profiles based on: \n https://wiki.mozilla.org/Security/Server_Side_TLS#Recommended_configurations \n The profiles are intent based, so they may change over time as new ciphers are developed and existing ciphers are found to be insecure. Depending on precisely which ciphers are available to a process, the list may be reduced. \n Note that the Modern profile is currently not supported because it is not yet well adopted by common software libraries." - type: string - enum: - - Old - - Intermediate - - Modern - - Custom - status: - description: status holds observed values from the cluster. They may not be overridden. - type: object - served: true - storage: true - subresources: - status: {} diff --git a/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_authentication.crd.yaml b/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_authentication.crd.yaml deleted file mode 100644 index facf7c6b0..000000000 --- a/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_authentication.crd.yaml +++ /dev/null @@ -1,101 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - api-approved.openshift.io: https://github.com/openshift/api/pull/470 - include.release.openshift.io/ibm-cloud-managed: "true" - include.release.openshift.io/self-managed-high-availability: "true" - include.release.openshift.io/single-node-developer: "true" - name: authentications.config.openshift.io -spec: - group: config.openshift.io - names: - kind: Authentication - listKind: AuthenticationList - plural: authentications - singular: authentication - scope: Cluster - versions: - - name: v1 - schema: - openAPIV3Schema: - description: "Authentication specifies cluster-wide settings for authentication (like OAuth and webhook token authenticators). The canonical name of an instance is `cluster`. \n Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer)." - type: object - required: - - spec - properties: - apiVersion: - 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 - kind: - 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 - metadata: - type: object - spec: - description: spec holds user settable values for configuration - type: object - properties: - oauthMetadata: - description: 'oauthMetadata contains the discovery endpoint data for OAuth 2.0 Authorization Server Metadata for an external OAuth server. This discovery document can be viewed from its served location: oc get --raw ''/.well-known/oauth-authorization-server'' For further details, see the IETF Draft: https://tools.ietf.org/html/draft-ietf-oauth-discovery-04#section-2 If oauthMetadata.name is non-empty, this value has precedence over any metadata reference stored in status. The key "oauthMetadata" is used to locate the data. If specified and the config map or expected key is not found, no metadata is served. If the specified metadata is not valid, no metadata is served. The namespace for this config map is openshift-config.' - type: object - required: - - name - properties: - name: - description: name is the metadata.name of the referenced config map - type: string - serviceAccountIssuer: - description: 'serviceAccountIssuer is the identifier of the bound service account token issuer. The default is https://kubernetes.default.svc WARNING: Updating this field will not result in immediate invalidation of all bound tokens with the previous issuer value. Instead, the tokens issued by previous service account issuer will continue to be trusted for a time period chosen by the platform (currently set to 24h). This time period is subject to change over time. This allows internal components to transition to use new service account issuer without service distruption.' - type: string - type: - description: type identifies the cluster managed, user facing authentication mode in use. Specifically, it manages the component that responds to login attempts. The default is IntegratedOAuth. - type: string - webhookTokenAuthenticator: - description: webhookTokenAuthenticator configures a remote token reviewer. These remote authentication webhooks can be used to verify bearer tokens via the tokenreviews.authentication.k8s.io REST API. This is required to honor bearer tokens that are provisioned by an external authentication service. - type: object - required: - - kubeConfig - properties: - kubeConfig: - description: "kubeConfig references a secret that contains kube config file data which describes how to access the remote webhook service. The namespace for the referenced secret is openshift-config. \n For further details, see: \n https://kubernetes.io/docs/reference/access-authn-authz/authentication/#webhook-token-authentication \n The key \"kubeConfig\" is used to locate the data. If the secret or expected key is not found, the webhook is not honored. If the specified kube config data is not valid, the webhook is not honored." - type: object - required: - - name - properties: - name: - description: name is the metadata.name of the referenced secret - type: string - webhookTokenAuthenticators: - description: webhookTokenAuthenticators is DEPRECATED, setting it has no effect. - type: array - items: - description: deprecatedWebhookTokenAuthenticator holds the necessary configuration options for a remote token authenticator. It's the same as WebhookTokenAuthenticator but it's missing the 'required' validation on KubeConfig field. - type: object - properties: - kubeConfig: - description: 'kubeConfig contains kube config file data which describes how to access the remote webhook service. For further details, see: https://kubernetes.io/docs/reference/access-authn-authz/authentication/#webhook-token-authentication The key "kubeConfig" is used to locate the data. If the secret or expected key is not found, the webhook is not honored. If the specified kube config data is not valid, the webhook is not honored. The namespace for this secret is determined by the point of use.' - type: object - required: - - name - properties: - name: - description: name is the metadata.name of the referenced secret - type: string - status: - description: status holds observed values from the cluster. They may not be overridden. - type: object - properties: - integratedOAuthMetadata: - description: 'integratedOAuthMetadata contains the discovery endpoint data for OAuth 2.0 Authorization Server Metadata for the in-cluster integrated OAuth server. This discovery document can be viewed from its served location: oc get --raw ''/.well-known/oauth-authorization-server'' For further details, see the IETF Draft: https://tools.ietf.org/html/draft-ietf-oauth-discovery-04#section-2 This contains the observed value based on cluster state. An explicitly set value in spec.oauthMetadata has precedence over this field. This field has no meaning if authentication spec.type is not set to IntegratedOAuth. The key "oauthMetadata" is used to locate the data. If the config map or expected key is not found, no metadata is served. If the specified metadata is not valid, no metadata is served. The namespace for this config map is openshift-config-managed.' - type: object - required: - - name - properties: - name: - description: name is the metadata.name of the referenced config map - type: string - served: true - storage: true - subresources: - status: {} diff --git a/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_build.crd.yaml b/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_build.crd.yaml deleted file mode 100644 index 75166deb7..000000000 --- a/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_build.crd.yaml +++ /dev/null @@ -1,290 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - api-approved.openshift.io: https://github.com/openshift/api/pull/470 - include.release.openshift.io/ibm-cloud-managed: "true" - include.release.openshift.io/self-managed-high-availability: "true" - include.release.openshift.io/single-node-developer: "true" - name: builds.config.openshift.io -spec: - group: config.openshift.io - names: - kind: Build - listKind: BuildList - plural: builds - singular: build - preserveUnknownFields: false - scope: Cluster - versions: - - name: v1 - schema: - openAPIV3Schema: - description: "Build configures the behavior of OpenShift builds for the entire cluster. This includes default settings that can be overridden in BuildConfig objects, and overrides which are applied to all builds. \n The canonical name is \"cluster\" \n Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer)." - type: object - required: - - spec - properties: - apiVersion: - 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 - kind: - 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 - metadata: - type: object - spec: - description: Spec holds user-settable values for the build controller configuration - type: object - properties: - additionalTrustedCA: - description: "AdditionalTrustedCA is a reference to a ConfigMap containing additional CAs that should be trusted for image pushes and pulls during builds. The namespace for this config map is openshift-config. \n DEPRECATED: Additional CAs for image pull and push should be set on image.config.openshift.io/cluster instead." - type: object - required: - - name - properties: - name: - description: name is the metadata.name of the referenced config map - type: string - buildDefaults: - description: BuildDefaults controls the default information for Builds - type: object - properties: - defaultProxy: - description: "DefaultProxy contains the default proxy settings for all build operations, including image pull/push and source download. \n Values can be overrode by setting the `HTTP_PROXY`, `HTTPS_PROXY`, and `NO_PROXY` environment variables in the build config's strategy." - type: object - properties: - httpProxy: - description: httpProxy is the URL of the proxy for HTTP requests. Empty means unset and will not result in an env var. - type: string - httpsProxy: - description: httpsProxy is the URL of the proxy for HTTPS requests. Empty means unset and will not result in an env var. - type: string - noProxy: - description: noProxy is a comma-separated list of hostnames and/or CIDRs and/or IPs for which the proxy should not be used. Empty means unset and will not result in an env var. - type: string - readinessEndpoints: - description: readinessEndpoints is a list of endpoints used to verify readiness of the proxy. - type: array - items: - type: string - trustedCA: - description: "trustedCA is a reference to a ConfigMap containing a CA certificate bundle. The trustedCA field should only be consumed by a proxy validator. The validator is responsible for reading the certificate bundle from the required key \"ca-bundle.crt\", merging it with the system default trust bundle, and writing the merged trust bundle to a ConfigMap named \"trusted-ca-bundle\" in the \"openshift-config-managed\" namespace. Clients that expect to make proxy connections must use the trusted-ca-bundle for all HTTPS requests to the proxy, and may use the trusted-ca-bundle for non-proxy HTTPS requests as well. \n The namespace for the ConfigMap referenced by trustedCA is \"openshift-config\". Here is an example ConfigMap (in yaml): \n apiVersion: v1 kind: ConfigMap metadata: name: user-ca-bundle namespace: openshift-config data: ca-bundle.crt: | -----BEGIN CERTIFICATE----- Custom CA certificate bundle. -----END CERTIFICATE-----" - type: object - required: - - name - properties: - name: - description: name is the metadata.name of the referenced config map - type: string - env: - description: Env is a set of default environment variables that will be applied to the build if the specified variables do not exist on the build - type: array - items: - description: EnvVar represents an environment variable present in a Container. - type: object - required: - - name - properties: - name: - description: Name of the environment variable. Must be a C_IDENTIFIER. - type: string - value: - 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 - valueFrom: - description: Source for the environment variable's value. Cannot be used if value is not empty. - type: object - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - type: object - required: - - key - properties: - key: - description: The key to select. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - optional: - description: Specify whether the ConfigMap or its key must be defined - type: boolean - x-kubernetes-map-type: atomic - fieldRef: - 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.' - type: object - required: - - fieldPath - properties: - apiVersion: - description: Version of the schema the FieldPath is written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in the specified API version. - type: string - x-kubernetes-map-type: atomic - resourceFieldRef: - 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.' - type: object - required: - - resource - properties: - containerName: - description: 'Container name: required for volumes, optional for env vars' - type: string - divisor: - description: Specifies the output format of the exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - x-kubernetes-map-type: atomic - secretKeyRef: - description: Selects a key of a secret in the pod's namespace - type: object - required: - - key - properties: - key: - description: The key of the secret to select from. Must be a valid secret key. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - optional: - description: Specify whether the Secret or its key must be defined - type: boolean - x-kubernetes-map-type: atomic - gitProxy: - description: "GitProxy contains the proxy settings for git operations only. If set, this will override any Proxy settings for all git commands, such as git clone. \n Values that are not set here will be inherited from DefaultProxy." - type: object - properties: - httpProxy: - description: httpProxy is the URL of the proxy for HTTP requests. Empty means unset and will not result in an env var. - type: string - httpsProxy: - description: httpsProxy is the URL of the proxy for HTTPS requests. Empty means unset and will not result in an env var. - type: string - noProxy: - description: noProxy is a comma-separated list of hostnames and/or CIDRs and/or IPs for which the proxy should not be used. Empty means unset and will not result in an env var. - type: string - readinessEndpoints: - description: readinessEndpoints is a list of endpoints used to verify readiness of the proxy. - type: array - items: - type: string - trustedCA: - description: "trustedCA is a reference to a ConfigMap containing a CA certificate bundle. The trustedCA field should only be consumed by a proxy validator. The validator is responsible for reading the certificate bundle from the required key \"ca-bundle.crt\", merging it with the system default trust bundle, and writing the merged trust bundle to a ConfigMap named \"trusted-ca-bundle\" in the \"openshift-config-managed\" namespace. Clients that expect to make proxy connections must use the trusted-ca-bundle for all HTTPS requests to the proxy, and may use the trusted-ca-bundle for non-proxy HTTPS requests as well. \n The namespace for the ConfigMap referenced by trustedCA is \"openshift-config\". Here is an example ConfigMap (in yaml): \n apiVersion: v1 kind: ConfigMap metadata: name: user-ca-bundle namespace: openshift-config data: ca-bundle.crt: | -----BEGIN CERTIFICATE----- Custom CA certificate bundle. -----END CERTIFICATE-----" - type: object - required: - - name - properties: - name: - description: name is the metadata.name of the referenced config map - type: string - imageLabels: - description: ImageLabels is a list of docker labels that are applied to the resulting image. User can override a default label by providing a label with the same name in their Build/BuildConfig. - type: array - items: - type: object - properties: - name: - description: Name defines the name of the label. It must have non-zero length. - type: string - value: - description: Value defines the literal value of the label. - type: string - resources: - description: Resources defines resource requirements to execute the build. - type: object - properties: - claims: - description: "Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. \n This is an alpha field and requires enabling the DynamicResourceAllocation feature gate. \n This field is immutable. It can only be set for containers." - type: array - items: - description: ResourceClaim references one entry in PodSpec.ResourceClaims. - type: object - required: - - name - properties: - name: - description: Name must match the name of one entry in pod.spec.resourceClaims of the Pod where this field is used. It makes that resource available inside a container. - type: string - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - description: 'Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - additionalProperties: - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - requests: - 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. Requests cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - additionalProperties: - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - buildOverrides: - description: BuildOverrides controls override settings for builds - type: object - properties: - forcePull: - description: ForcePull overrides, if set, the equivalent value in the builds, i.e. false disables force pull for all builds, true enables force pull for all builds, independently of what each build specifies itself - type: boolean - imageLabels: - description: ImageLabels is a list of docker labels that are applied to the resulting image. If user provided a label in their Build/BuildConfig with the same name as one in this list, the user's label will be overwritten. - type: array - items: - type: object - properties: - name: - description: Name defines the name of the label. It must have non-zero length. - type: string - value: - description: Value defines the literal value of the label. - type: string - nodeSelector: - description: NodeSelector is a selector which must be true for the build pod to fit on a node - type: object - additionalProperties: - type: string - tolerations: - description: Tolerations is a list of Tolerations that will override any existing tolerations set on a build pod. - type: array - items: - description: The pod this Toleration is attached to tolerates any taint that matches the triple using the matching operator . - type: object - properties: - effect: - 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 - key: - 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 - operator: - 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 - tolerationSeconds: - 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: integer - format: int64 - value: - 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 - served: true - storage: true - subresources: - status: {} diff --git a/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_console.crd.yaml b/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_console.crd.yaml deleted file mode 100644 index 188b45e01..000000000 --- a/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_console.crd.yaml +++ /dev/null @@ -1,57 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - api-approved.openshift.io: https://github.com/openshift/api/pull/470 - include.release.openshift.io/ibm-cloud-managed: "true" - include.release.openshift.io/self-managed-high-availability: "true" - include.release.openshift.io/single-node-developer: "true" - name: consoles.config.openshift.io -spec: - group: config.openshift.io - names: - kind: Console - listKind: ConsoleList - plural: consoles - singular: console - scope: Cluster - versions: - - name: v1 - schema: - openAPIV3Schema: - description: "Console holds cluster-wide configuration for the web console, including the logout URL, and reports the public URL of the console. The canonical name is `cluster`. \n Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer)." - type: object - required: - - spec - properties: - apiVersion: - 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 - kind: - 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 - metadata: - type: object - spec: - description: spec holds user settable values for configuration - type: object - properties: - authentication: - description: ConsoleAuthentication defines a list of optional configuration for console authentication. - type: object - properties: - logoutRedirect: - description: 'An optional, absolute URL to redirect web browsers to after logging out of the console. If not specified, it will redirect to the default login page. This is required when using an identity provider that supports single sign-on (SSO) such as: - OpenID (Keycloak, Azure) - RequestHeader (GSSAPI, SSPI, SAML) - OAuth (GitHub, GitLab, Google) Logging out of the console will destroy the user''s token. The logoutRedirect provides the user the option to perform single logout (SLO) through the identity provider to destroy their single sign-on session.' - type: string - pattern: ^$|^((https):\/\/?)[^\s()<>]+(?:\([\w\d]+\)|([^[:punct:]\s]|\/?))$ - status: - description: status holds observed values from the cluster. They may not be overridden. - type: object - properties: - consoleURL: - description: The URL for the console. This will be derived from the host for the route that is created for the console. - type: string - served: true - storage: true - subresources: - status: {} diff --git a/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_dns.crd.yaml b/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_dns.crd.yaml deleted file mode 100644 index e4fa56eee..000000000 --- a/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_dns.crd.yaml +++ /dev/null @@ -1,72 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - api-approved.openshift.io: https://github.com/openshift/api/pull/470 - include.release.openshift.io/ibm-cloud-managed: "true" - include.release.openshift.io/self-managed-high-availability: "true" - include.release.openshift.io/single-node-developer: "true" - name: dnses.config.openshift.io -spec: - group: config.openshift.io - names: - kind: DNS - listKind: DNSList - plural: dnses - singular: dns - scope: Cluster - versions: - - name: v1 - schema: - openAPIV3Schema: - description: "DNS holds cluster-wide information about DNS. The canonical name is `cluster` \n Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer)." - type: object - required: - - spec - properties: - apiVersion: - 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 - kind: - 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 - metadata: - type: object - spec: - description: spec holds user settable values for configuration - type: object - properties: - baseDomain: - description: "baseDomain is the base domain of the cluster. All managed DNS records will be sub-domains of this base. \n For example, given the base domain `openshift.example.com`, an API server DNS record may be created for `cluster-api.openshift.example.com`. \n Once set, this field cannot be changed." - type: string - privateZone: - description: "privateZone is the location where all the DNS records that are only available internally to the cluster exist. \n If this field is nil, no private records should be created. \n Once set, this field cannot be changed." - type: object - properties: - id: - description: "id is the identifier that can be used to find the DNS hosted zone. \n on AWS zone can be fetched using `ID` as id in [1] on Azure zone can be fetched using `ID` as a pre-determined name in [2], on GCP zone can be fetched using `ID` as a pre-determined name in [3]. \n [1]: https://docs.aws.amazon.com/cli/latest/reference/route53/get-hosted-zone.html#options [2]: https://docs.microsoft.com/en-us/cli/azure/network/dns/zone?view=azure-cli-latest#az-network-dns-zone-show [3]: https://cloud.google.com/dns/docs/reference/v1/managedZones/get" - type: string - tags: - description: "tags can be used to query the DNS hosted zone. \n on AWS, resourcegroupstaggingapi [1] can be used to fetch a zone using `Tags` as tag-filters, \n [1]: https://docs.aws.amazon.com/cli/latest/reference/resourcegroupstaggingapi/get-resources.html#options" - type: object - additionalProperties: - type: string - publicZone: - description: "publicZone is the location where all the DNS records that are publicly accessible to the internet exist. \n If this field is nil, no public records should be created. \n Once set, this field cannot be changed." - type: object - properties: - id: - description: "id is the identifier that can be used to find the DNS hosted zone. \n on AWS zone can be fetched using `ID` as id in [1] on Azure zone can be fetched using `ID` as a pre-determined name in [2], on GCP zone can be fetched using `ID` as a pre-determined name in [3]. \n [1]: https://docs.aws.amazon.com/cli/latest/reference/route53/get-hosted-zone.html#options [2]: https://docs.microsoft.com/en-us/cli/azure/network/dns/zone?view=azure-cli-latest#az-network-dns-zone-show [3]: https://cloud.google.com/dns/docs/reference/v1/managedZones/get" - type: string - tags: - description: "tags can be used to query the DNS hosted zone. \n on AWS, resourcegroupstaggingapi [1] can be used to fetch a zone using `Tags` as tag-filters, \n [1]: https://docs.aws.amazon.com/cli/latest/reference/resourcegroupstaggingapi/get-resources.html#options" - type: object - additionalProperties: - type: string - status: - description: status holds observed values from the cluster. They may not be overridden. - type: object - served: true - storage: true - subresources: - status: {} diff --git a/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_featuregate.crd.yaml b/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_featuregate.crd.yaml deleted file mode 100644 index 77e01b8a7..000000000 --- a/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_featuregate.crd.yaml +++ /dev/null @@ -1,153 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - api-approved.openshift.io: https://github.com/openshift/api/pull/470 - include.release.openshift.io/ibm-cloud-managed: "true" - include.release.openshift.io/self-managed-high-availability: "true" - include.release.openshift.io/single-node-developer: "true" - name: featuregates.config.openshift.io -spec: - group: config.openshift.io - names: - kind: FeatureGate - listKind: FeatureGateList - plural: featuregates - singular: featuregate - scope: Cluster - versions: - - name: v1 - schema: - openAPIV3Schema: - description: "Feature holds cluster-wide information about feature gates. The canonical name is `cluster` \n Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer)." - type: object - required: - - spec - properties: - apiVersion: - 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 - kind: - 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 - metadata: - type: object - spec: - description: spec holds user settable values for configuration - type: object - properties: - customNoUpgrade: - description: customNoUpgrade allows the enabling or disabling of any feature. Turning this feature set on IS NOT SUPPORTED, CANNOT BE UNDONE, and PREVENTS UPGRADES. Because of its nature, this setting cannot be validated. If you have any typos or accidentally apply invalid combinations your cluster may fail in an unrecoverable way. featureSet must equal "CustomNoUpgrade" must be set to use this field. - type: object - properties: - disabled: - description: disabled is a list of all feature gates that you want to force off - type: array - items: - description: FeatureGateName is a string to enforce patterns on the name of a FeatureGate - type: string - pattern: ^([A-Za-z0-9-]+\.)*[A-Za-z0-9-]+\.?$ - enabled: - description: enabled is a list of all feature gates that you want to force on - type: array - items: - description: FeatureGateName is a string to enforce patterns on the name of a FeatureGate - type: string - pattern: ^([A-Za-z0-9-]+\.)*[A-Za-z0-9-]+\.?$ - nullable: true - featureSet: - description: featureSet changes the list of features in the cluster. The default is empty. Be very careful adjusting this setting. Turning on or off features may cause irreversible changes in your cluster which cannot be undone. - type: string - status: - description: status holds observed values from the cluster. They may not be overridden. - type: object - properties: - conditions: - description: 'conditions represent the observations of the current state. Known .status.conditions.type are: "DeterminationDegraded"' - type: array - items: - description: "Condition contains details for one aspect of the current state of this API Resource. --- This struct is intended for direct use as an array at the field path .status.conditions. For example, \n type FooStatus struct{ // Represents the observations of a foo's current state. // Known .status.conditions.type are: \"Available\", \"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge // +listType=map // +listMapKey=type Conditions []metav1.Condition `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }" - type: object - required: - - lastTransitionTime - - message - - reason - - status - - type - properties: - lastTransitionTime: - 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. - type: string - format: date-time - message: - description: message is a human readable message indicating details about the transition. This may be an empty string. - type: string - maxLength: 32768 - observedGeneration: - 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: integer - format: int64 - minimum: 0 - reason: - 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 - maxLength: 1024 - minLength: 1 - pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ - status: - description: status of the condition, one of True, False, Unknown. - type: string - enum: - - "True" - - "False" - - Unknown - type: - description: type of condition in CamelCase or in foo.example.com/CamelCase. --- Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be useful (see .node.status.conditions), the ability to deconflict is important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) - type: string - maxLength: 316 - pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ - x-kubernetes-list-map-keys: - - type - x-kubernetes-list-type: map - featureGates: - description: featureGates contains a list of enabled and disabled featureGates that are keyed by payloadVersion. Operators other than the CVO and cluster-config-operator, must read the .status.featureGates, locate the version they are managing, find the enabled/disabled featuregates and make the operand and operator match. The enabled/disabled values for a particular version may change during the life of the cluster as various .spec.featureSet values are selected. Operators may choose to restart their processes to pick up these changes, but remembering past enable/disable lists is beyond the scope of this API and is the responsibility of individual operators. Only featureGates with .version in the ClusterVersion.status will be present in this list. - type: array - items: - type: object - required: - - version - properties: - disabled: - description: disabled is a list of all feature gates that are disabled in the cluster for the named version. - type: array - items: - type: object - required: - - name - properties: - name: - description: name is the name of the FeatureGate. - type: string - pattern: ^([A-Za-z0-9-]+\.)*[A-Za-z0-9-]+\.?$ - enabled: - description: enabled is a list of all feature gates that are enabled in the cluster for the named version. - type: array - items: - type: object - required: - - name - properties: - name: - description: name is the name of the FeatureGate. - type: string - pattern: ^([A-Za-z0-9-]+\.)*[A-Za-z0-9-]+\.?$ - version: - description: version matches the version provided by the ClusterVersion and in the ClusterOperator.Status.Versions field. - type: string - x-kubernetes-list-map-keys: - - version - x-kubernetes-list-type: map - served: true - storage: true - subresources: - status: {} diff --git a/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_image.crd.yaml b/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_image.crd.yaml deleted file mode 100644 index a160fef40..000000000 --- a/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_image.crd.yaml +++ /dev/null @@ -1,108 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - api-approved.openshift.io: https://github.com/openshift/api/pull/470 - include.release.openshift.io/ibm-cloud-managed: "true" - include.release.openshift.io/self-managed-high-availability: "true" - include.release.openshift.io/single-node-developer: "true" - name: images.config.openshift.io -spec: - group: config.openshift.io - names: - kind: Image - listKind: ImageList - plural: images - singular: image - scope: Cluster - versions: - - name: v1 - schema: - openAPIV3Schema: - description: "Image governs policies related to imagestream imports and runtime configuration for external registries. It allows cluster admins to configure which registries OpenShift is allowed to import images from, extra CA trust bundles for external registries, and policies to block or allow registry hostnames. When exposing OpenShift's image registry to the public, this also lets cluster admins specify the external hostname. \n Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer)." - type: object - required: - - spec - properties: - apiVersion: - 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 - kind: - 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 - metadata: - type: object - spec: - description: spec holds user settable values for configuration - type: object - properties: - additionalTrustedCA: - description: additionalTrustedCA is a reference to a ConfigMap containing additional CAs that should be trusted during imagestream import, pod image pull, build image pull, and imageregistry pullthrough. The namespace for this config map is openshift-config. - type: object - required: - - name - properties: - name: - description: name is the metadata.name of the referenced config map - type: string - allowedRegistriesForImport: - description: allowedRegistriesForImport limits the container image registries that normal users may import images from. Set this list to the registries that you trust to contain valid Docker images and that you want applications to be able to import from. Users with permission to create Images or ImageStreamMappings via the API are not affected by this policy - typically only administrators or system integrations will have those permissions. - type: array - items: - description: RegistryLocation contains a location of the registry specified by the registry domain name. The domain name might include wildcards, like '*' or '??'. - type: object - properties: - domainName: - description: domainName specifies a domain name for the registry In case the registry use non-standard (80 or 443) port, the port should be included in the domain name as well. - type: string - insecure: - description: insecure indicates whether the registry is secure (https) or insecure (http) By default (if not specified) the registry is assumed as secure. - type: boolean - externalRegistryHostnames: - description: externalRegistryHostnames provides the hostnames for the default external image registry. The external hostname should be set only when the image registry is exposed externally. The first value is used in 'publicDockerImageRepository' field in ImageStreams. The value must be in "hostname[:port]" format. - type: array - items: - type: string - registrySources: - description: registrySources contains configuration that determines how the container runtime should treat individual registries when accessing images for builds+pods. (e.g. whether or not to allow insecure access). It does not contain configuration for the internal cluster registry. - type: object - properties: - allowedRegistries: - description: "allowedRegistries are the only registries permitted for image pull and push actions. All other registries are denied. \n Only one of BlockedRegistries or AllowedRegistries may be set." - type: array - items: - type: string - blockedRegistries: - description: "blockedRegistries cannot be used for image pull and push actions. All other registries are permitted. \n Only one of BlockedRegistries or AllowedRegistries may be set." - type: array - items: - type: string - containerRuntimeSearchRegistries: - description: 'containerRuntimeSearchRegistries are registries that will be searched when pulling images that do not have fully qualified domains in their pull specs. Registries will be searched in the order provided in the list. Note: this search list only works with the container runtime, i.e CRI-O. Will NOT work with builds or imagestream imports.' - type: array - format: hostname - minItems: 1 - items: - type: string - x-kubernetes-list-type: set - insecureRegistries: - description: insecureRegistries are registries which do not have a valid TLS certificates or only support HTTP connections. - type: array - items: - type: string - status: - description: status holds observed values from the cluster. They may not be overridden. - type: object - properties: - externalRegistryHostnames: - description: externalRegistryHostnames provides the hostnames for the default external image registry. The external hostname should be set only when the image registry is exposed externally. The first value is used in 'publicDockerImageRepository' field in ImageStreams. The value must be in "hostname[:port]" format. - type: array - items: - type: string - internalRegistryHostname: - description: internalRegistryHostname sets the hostname for the default internal image registry. The value must be in "hostname[:port]" format. This value is set by the image registry operator which controls the internal registry hostname. For backward compatibility, users can still use OPENSHIFT_DEFAULT_REGISTRY environment variable but this setting overrides the environment variable. - type: string - served: true - storage: true - subresources: - status: {} diff --git a/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_imagecontentpolicy.crd.yaml b/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_imagecontentpolicy.crd.yaml deleted file mode 100644 index 147c73c44..000000000 --- a/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_imagecontentpolicy.crd.yaml +++ /dev/null @@ -1,68 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - api-approved.openshift.io: https://github.com/openshift/api/pull/874 - include.release.openshift.io/ibm-cloud-managed: "true" - include.release.openshift.io/self-managed-high-availability: "true" - include.release.openshift.io/single-node-developer: "true" - name: imagecontentpolicies.config.openshift.io -spec: - group: config.openshift.io - names: - kind: ImageContentPolicy - listKind: ImageContentPolicyList - plural: imagecontentpolicies - singular: imagecontentpolicy - scope: Cluster - versions: - - name: v1 - schema: - openAPIV3Schema: - description: "ImageContentPolicy holds cluster-wide information about how to handle registry mirror rules. When multiple policies are defined, the outcome of the behavior is defined on each field. \n Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer)." - type: object - required: - - spec - properties: - apiVersion: - 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 - kind: - 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 - metadata: - type: object - spec: - description: spec holds user settable values for configuration - type: object - properties: - repositoryDigestMirrors: - description: "repositoryDigestMirrors allows images referenced by image digests in pods to be pulled from alternative mirrored repository locations. The image pull specification provided to the pod will be compared to the source locations described in RepositoryDigestMirrors and the image may be pulled down from any of the mirrors in the list instead of the specified repository allowing administrators to choose a potentially faster mirror. To pull image from mirrors by tags, should set the \"allowMirrorByTags\". \n Each “source” repository is treated independently; configurations for different “source” repositories don’t interact. \n If the \"mirrors\" is not specified, the image will continue to be pulled from the specified repository in the pull spec. \n When multiple policies are defined for the same “source” repository, the sets of defined mirrors will be merged together, preserving the relative order of the mirrors, if possible. For example, if policy A has mirrors `a, b, c` and policy B has mirrors `c, d, e`, the mirrors will be used in the order `a, b, c, d, e`. If the orders of mirror entries conflict (e.g. `a, b` vs. `b, a`) the configuration is not rejected but the resulting order is unspecified." - type: array - items: - description: RepositoryDigestMirrors holds cluster-wide information about how to handle mirrors in the registries config. - type: object - required: - - source - properties: - allowMirrorByTags: - description: allowMirrorByTags if true, the mirrors can be used to pull the images that are referenced by their tags. Default is false, the mirrors only work when pulling the images that are referenced by their digests. Pulling images by tag can potentially yield different images, depending on which endpoint we pull from. Forcing digest-pulls for mirrors avoids that issue. - type: boolean - mirrors: - description: mirrors is zero or more repositories that may also contain the same images. If the "mirrors" is not specified, the image will continue to be pulled from the specified repository in the pull spec. No mirror will be configured. The order of mirrors in this list is treated as the user's desired priority, while source is by default considered lower priority than all mirrors. Other cluster configuration, including (but not limited to) other repositoryDigestMirrors objects, may impact the exact order mirrors are contacted in, or some mirrors may be contacted in parallel, so this should be considered a preference rather than a guarantee of ordering. - type: array - items: - type: string - pattern: ^(([a-zA-Z]|[a-zA-Z][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z]|[A-Za-z][A-Za-z0-9\-]*[A-Za-z0-9])(:[0-9]+)?(\/[^\/:\n]+)*(\/[^\/:\n]+((:[^\/:\n]+)|(@[^\n]+)))?$ - x-kubernetes-list-type: set - source: - description: source is the repository that users refer to, e.g. in image pull specifications. - type: string - pattern: ^(([a-zA-Z]|[a-zA-Z][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z]|[A-Za-z][A-Za-z0-9\-]*[A-Za-z0-9])(:[0-9]+)?(\/[^\/:\n]+)*(\/[^\/:\n]+((:[^\/:\n]+)|(@[^\n]+)))?$ - x-kubernetes-list-map-keys: - - source - x-kubernetes-list-type: map - served: true - storage: true - subresources: - status: {} diff --git a/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_imagedigestmirrorset.crd.yaml b/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_imagedigestmirrorset.crd.yaml deleted file mode 100644 index 693a554e7..000000000 --- a/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_imagedigestmirrorset.crd.yaml +++ /dev/null @@ -1,74 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - api-approved.openshift.io: https://github.com/openshift/api/pull/1126 - include.release.openshift.io/ibm-cloud-managed: "true" - include.release.openshift.io/self-managed-high-availability: "true" - include.release.openshift.io/single-node-developer: "true" - name: imagedigestmirrorsets.config.openshift.io -spec: - group: config.openshift.io - names: - kind: ImageDigestMirrorSet - listKind: ImageDigestMirrorSetList - plural: imagedigestmirrorsets - shortNames: - - idms - singular: imagedigestmirrorset - scope: Cluster - versions: - - name: v1 - schema: - openAPIV3Schema: - description: "ImageDigestMirrorSet holds cluster-wide information about how to handle registry mirror rules on using digest pull specification. When multiple policies are defined, the outcome of the behavior is defined on each field. \n Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer)." - type: object - required: - - spec - properties: - apiVersion: - 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 - kind: - 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 - metadata: - type: object - spec: - description: spec holds user settable values for configuration - type: object - properties: - imageDigestMirrors: - description: "imageDigestMirrors allows images referenced by image digests in pods to be pulled from alternative mirrored repository locations. The image pull specification provided to the pod will be compared to the source locations described in imageDigestMirrors and the image may be pulled down from any of the mirrors in the list instead of the specified repository allowing administrators to choose a potentially faster mirror. To use mirrors to pull images using tag specification, users should configure a list of mirrors using \"ImageTagMirrorSet\" CRD. \n If the image pull specification matches the repository of \"source\" in multiple imagedigestmirrorset objects, only the objects which define the most specific namespace match will be used. For example, if there are objects using quay.io/libpod and quay.io/libpod/busybox as the \"source\", only the objects using quay.io/libpod/busybox are going to apply for pull specification quay.io/libpod/busybox. Each “source” repository is treated independently; configurations for different “source” repositories don’t interact. \n If the \"mirrors\" is not specified, the image will continue to be pulled from the specified repository in the pull spec. \n When multiple policies are defined for the same “source” repository, the sets of defined mirrors will be merged together, preserving the relative order of the mirrors, if possible. For example, if policy A has mirrors `a, b, c` and policy B has mirrors `c, d, e`, the mirrors will be used in the order `a, b, c, d, e`. If the orders of mirror entries conflict (e.g. `a, b` vs. `b, a`) the configuration is not rejected but the resulting order is unspecified. Users who want to use a specific order of mirrors, should configure them into one list of mirrors using the expected order." - type: array - items: - description: ImageDigestMirrors holds cluster-wide information about how to handle mirrors in the registries config. - type: object - required: - - source - properties: - mirrorSourcePolicy: - description: mirrorSourcePolicy defines the fallback policy if fails to pull image from the mirrors. If unset, the image will continue to be pulled from the the repository in the pull spec. sourcePolicy is valid configuration only when one or more mirrors are in the mirror list. - type: string - enum: - - NeverContactSource - - AllowContactingSource - mirrors: - description: 'mirrors is zero or more locations that may also contain the same images. No mirror will be configured if not specified. Images can be pulled from these mirrors only if they are referenced by their digests. The mirrored location is obtained by replacing the part of the input reference that matches source by the mirrors entry, e.g. for registry.redhat.io/product/repo reference, a (source, mirror) pair *.redhat.io, mirror.local/redhat causes a mirror.local/redhat/product/repo repository to be used. The order of mirrors in this list is treated as the user''s desired priority, while source is by default considered lower priority than all mirrors. If no mirror is specified or all image pulls from the mirror list fail, the image will continue to be pulled from the repository in the pull spec unless explicitly prohibited by "mirrorSourcePolicy" Other cluster configuration, including (but not limited to) other imageDigestMirrors objects, may impact the exact order mirrors are contacted in, or some mirrors may be contacted in parallel, so this should be considered a preference rather than a guarantee of ordering. "mirrors" uses one of the following formats: host[:port] host[:port]/namespace[/namespace…] host[:port]/namespace[/namespace…]/repo for more information about the format, see the document about the location field: https://github.com/containers/image/blob/main/docs/containers-registries.conf.5.md#choosing-a-registry-toml-table' - type: array - items: - type: string - pattern: ^((?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9])(?:(?:\.(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9]))+)?(?::[0-9]+)?)(?:(?:/[a-z0-9]+(?:(?:(?:[._]|__|[-]*)[a-z0-9]+)+)?)+)?$ - x-kubernetes-list-type: set - source: - description: 'source matches the repository that users refer to, e.g. in image pull specifications. Setting source to a registry hostname e.g. docker.io. quay.io, or registry.redhat.io, will match the image pull specification of corressponding registry. "source" uses one of the following formats: host[:port] host[:port]/namespace[/namespace…] host[:port]/namespace[/namespace…]/repo [*.]host for more information about the format, see the document about the location field: https://github.com/containers/image/blob/main/docs/containers-registries.conf.5.md#choosing-a-registry-toml-table' - type: string - pattern: ^\*(?:\.(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9]))+$|^((?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9])(?:(?:\.(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9]))+)?(?::[0-9]+)?)(?:(?:/[a-z0-9]+(?:(?:(?:[._]|__|[-]*)[a-z0-9]+)+)?)+)?$ - x-kubernetes-list-type: atomic - status: - description: status contains the observed state of the resource. - type: object - served: true - storage: true - subresources: - status: {} diff --git a/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_imagetagmirrorset.crd.yaml b/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_imagetagmirrorset.crd.yaml deleted file mode 100644 index 17a2d045b..000000000 --- a/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_imagetagmirrorset.crd.yaml +++ /dev/null @@ -1,74 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - api-approved.openshift.io: https://github.com/openshift/api/pull/1126 - include.release.openshift.io/ibm-cloud-managed: "true" - include.release.openshift.io/self-managed-high-availability: "true" - include.release.openshift.io/single-node-developer: "true" - name: imagetagmirrorsets.config.openshift.io -spec: - group: config.openshift.io - names: - kind: ImageTagMirrorSet - listKind: ImageTagMirrorSetList - plural: imagetagmirrorsets - shortNames: - - itms - singular: imagetagmirrorset - scope: Cluster - versions: - - name: v1 - schema: - openAPIV3Schema: - description: "ImageTagMirrorSet holds cluster-wide information about how to handle registry mirror rules on using tag pull specification. When multiple policies are defined, the outcome of the behavior is defined on each field. \n Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer)." - type: object - required: - - spec - properties: - apiVersion: - 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 - kind: - 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 - metadata: - type: object - spec: - description: spec holds user settable values for configuration - type: object - properties: - imageTagMirrors: - description: "imageTagMirrors allows images referenced by image tags in pods to be pulled from alternative mirrored repository locations. The image pull specification provided to the pod will be compared to the source locations described in imageTagMirrors and the image may be pulled down from any of the mirrors in the list instead of the specified repository allowing administrators to choose a potentially faster mirror. To use mirrors to pull images using digest specification only, users should configure a list of mirrors using \"ImageDigestMirrorSet\" CRD. \n If the image pull specification matches the repository of \"source\" in multiple imagetagmirrorset objects, only the objects which define the most specific namespace match will be used. For example, if there are objects using quay.io/libpod and quay.io/libpod/busybox as the \"source\", only the objects using quay.io/libpod/busybox are going to apply for pull specification quay.io/libpod/busybox. Each “source” repository is treated independently; configurations for different “source” repositories don’t interact. \n If the \"mirrors\" is not specified, the image will continue to be pulled from the specified repository in the pull spec. \n When multiple policies are defined for the same “source” repository, the sets of defined mirrors will be merged together, preserving the relative order of the mirrors, if possible. For example, if policy A has mirrors `a, b, c` and policy B has mirrors `c, d, e`, the mirrors will be used in the order `a, b, c, d, e`. If the orders of mirror entries conflict (e.g. `a, b` vs. `b, a`) the configuration is not rejected but the resulting order is unspecified. Users who want to use a deterministic order of mirrors, should configure them into one list of mirrors using the expected order." - type: array - items: - description: ImageTagMirrors holds cluster-wide information about how to handle mirrors in the registries config. - type: object - required: - - source - properties: - mirrorSourcePolicy: - description: mirrorSourcePolicy defines the fallback policy if fails to pull image from the mirrors. If unset, the image will continue to be pulled from the repository in the pull spec. sourcePolicy is valid configuration only when one or more mirrors are in the mirror list. - type: string - enum: - - NeverContactSource - - AllowContactingSource - mirrors: - description: 'mirrors is zero or more locations that may also contain the same images. No mirror will be configured if not specified. Images can be pulled from these mirrors only if they are referenced by their tags. The mirrored location is obtained by replacing the part of the input reference that matches source by the mirrors entry, e.g. for registry.redhat.io/product/repo reference, a (source, mirror) pair *.redhat.io, mirror.local/redhat causes a mirror.local/redhat/product/repo repository to be used. Pulling images by tag can potentially yield different images, depending on which endpoint we pull from. Configuring a list of mirrors using "ImageDigestMirrorSet" CRD and forcing digest-pulls for mirrors avoids that issue. The order of mirrors in this list is treated as the user''s desired priority, while source is by default considered lower priority than all mirrors. If no mirror is specified or all image pulls from the mirror list fail, the image will continue to be pulled from the repository in the pull spec unless explicitly prohibited by "mirrorSourcePolicy". Other cluster configuration, including (but not limited to) other imageTagMirrors objects, may impact the exact order mirrors are contacted in, or some mirrors may be contacted in parallel, so this should be considered a preference rather than a guarantee of ordering. "mirrors" uses one of the following formats: host[:port] host[:port]/namespace[/namespace…] host[:port]/namespace[/namespace…]/repo for more information about the format, see the document about the location field: https://github.com/containers/image/blob/main/docs/containers-registries.conf.5.md#choosing-a-registry-toml-table' - type: array - items: - type: string - pattern: ^((?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9])(?:(?:\.(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9]))+)?(?::[0-9]+)?)(?:(?:/[a-z0-9]+(?:(?:(?:[._]|__|[-]*)[a-z0-9]+)+)?)+)?$ - x-kubernetes-list-type: set - source: - description: 'source matches the repository that users refer to, e.g. in image pull specifications. Setting source to a registry hostname e.g. docker.io. quay.io, or registry.redhat.io, will match the image pull specification of corressponding registry. "source" uses one of the following formats: host[:port] host[:port]/namespace[/namespace…] host[:port]/namespace[/namespace…]/repo [*.]host for more information about the format, see the document about the location field: https://github.com/containers/image/blob/main/docs/containers-registries.conf.5.md#choosing-a-registry-toml-table' - type: string - pattern: ^\*(?:\.(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9]))+$|^((?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9])(?:(?:\.(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9]))+)?(?::[0-9]+)?)(?:(?:/[a-z0-9]+(?:(?:(?:[._]|__|[-]*)[a-z0-9]+)+)?)+)?$ - x-kubernetes-list-type: atomic - status: - description: status contains the observed state of the resource. - type: object - served: true - storage: true - subresources: - status: {} diff --git a/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_infrastructure-Default.crd.yaml b/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_infrastructure-Default.crd.yaml deleted file mode 100644 index bb8817110..000000000 --- a/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_infrastructure-Default.crd.yaml +++ /dev/null @@ -1,834 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - api-approved.openshift.io: https://github.com/openshift/api/pull/470 - include.release.openshift.io/ibm-cloud-managed: "true" - include.release.openshift.io/self-managed-high-availability: "true" - include.release.openshift.io/single-node-developer: "true" - release.openshift.io/feature-set: Default - name: infrastructures.config.openshift.io -spec: - group: config.openshift.io - names: - kind: Infrastructure - listKind: InfrastructureList - plural: infrastructures - singular: infrastructure - scope: Cluster - versions: - - name: v1 - schema: - openAPIV3Schema: - description: "Infrastructure holds cluster-wide information about Infrastructure. The canonical name is `cluster` \n Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer)." - properties: - apiVersion: - 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 - kind: - 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 - metadata: - type: object - spec: - description: spec holds user settable values for configuration - properties: - cloudConfig: - description: "cloudConfig is a reference to a ConfigMap containing the cloud provider configuration file. This configuration file is used to configure the Kubernetes cloud provider integration when using the built-in cloud provider integration or the external cloud controller manager. The namespace for this config map is openshift-config. \n cloudConfig should only be consumed by the kube_cloud_config controller. The controller is responsible for using the user configuration in the spec for various platforms and combining that with the user provided ConfigMap in this field to create a stitched kube cloud config. The controller generates a ConfigMap `kube-cloud-config` in `openshift-config-managed` namespace with the kube cloud config is stored in `cloud.conf` key. All the clients are expected to use the generated ConfigMap only." - properties: - key: - description: Key allows pointing to a specific key/value inside of the configmap. This is useful for logical file references. - type: string - name: - type: string - type: object - platformSpec: - description: platformSpec holds desired information specific to the underlying infrastructure provider. - properties: - alibabaCloud: - description: AlibabaCloud contains settings specific to the Alibaba Cloud infrastructure provider. - type: object - aws: - description: AWS contains settings specific to the Amazon Web Services infrastructure provider. - properties: - serviceEndpoints: - description: serviceEndpoints list contains custom endpoints which will override default service endpoint of AWS Services. There must be only one ServiceEndpoint for a service. - items: - description: AWSServiceEndpoint store the configuration of a custom url to override existing defaults of AWS Services. - properties: - name: - description: name is the name of the AWS service. The list of all the service names can be found at https://docs.aws.amazon.com/general/latest/gr/aws-service-information.html This must be provided and cannot be empty. - pattern: ^[a-z0-9-]+$ - type: string - url: - description: url is fully qualified URI with scheme https, that overrides the default generated endpoint for a client. This must be provided and cannot be empty. - pattern: ^https:// - type: string - type: object - type: array - type: object - azure: - description: Azure contains settings specific to the Azure infrastructure provider. - type: object - baremetal: - description: BareMetal contains settings specific to the BareMetal platform. - type: object - equinixMetal: - description: EquinixMetal contains settings specific to the Equinix Metal infrastructure provider. - type: object - external: - description: ExternalPlatformType represents generic infrastructure provider. Platform-specific components should be supplemented separately. - properties: - platformName: - default: Unknown - description: PlatformName holds the arbitrary string representing the infrastructure provider name, expected to be set at the installation time. This field is solely for informational and reporting purposes and is not expected to be used for decision-making. - type: string - x-kubernetes-validations: - - message: platform name cannot be changed once set - rule: oldSelf == 'Unknown' || self == oldSelf - type: object - gcp: - description: GCP contains settings specific to the Google Cloud Platform infrastructure provider. - type: object - ibmcloud: - description: IBMCloud contains settings specific to the IBMCloud infrastructure provider. - type: object - kubevirt: - description: Kubevirt contains settings specific to the kubevirt infrastructure provider. - type: object - nutanix: - description: Nutanix contains settings specific to the Nutanix infrastructure provider. - properties: - prismCentral: - description: prismCentral holds the endpoint address and port to access the Nutanix Prism Central. When a cluster-wide proxy is installed, by default, this endpoint will be accessed via the proxy. Should you wish for communication with this endpoint not to be proxied, please add the endpoint to the proxy spec.noProxy list. - properties: - address: - description: address is the endpoint address (DNS name or IP address) of the Nutanix Prism Central or Element (cluster) - maxLength: 256 - type: string - port: - description: port is the port number to access the Nutanix Prism Central or Element (cluster) - format: int32 - maximum: 65535 - minimum: 1 - type: integer - required: - - address - - port - type: object - prismElements: - description: prismElements holds one or more endpoint address and port data to access the Nutanix Prism Elements (clusters) of the Nutanix Prism Central. Currently we only support one Prism Element (cluster) for an OpenShift cluster, where all the Nutanix resources (VMs, subnets, volumes, etc.) used in the OpenShift cluster are located. In the future, we may support Nutanix resources (VMs, etc.) spread over multiple Prism Elements (clusters) of the Prism Central. - items: - description: NutanixPrismElementEndpoint holds the name and endpoint data for a Prism Element (cluster) - properties: - endpoint: - description: endpoint holds the endpoint address and port data of the Prism Element (cluster). When a cluster-wide proxy is installed, by default, this endpoint will be accessed via the proxy. Should you wish for communication with this endpoint not to be proxied, please add the endpoint to the proxy spec.noProxy list. - properties: - address: - description: address is the endpoint address (DNS name or IP address) of the Nutanix Prism Central or Element (cluster) - maxLength: 256 - type: string - port: - description: port is the port number to access the Nutanix Prism Central or Element (cluster) - format: int32 - maximum: 65535 - minimum: 1 - type: integer - required: - - address - - port - type: object - name: - description: name is the name of the Prism Element (cluster). This value will correspond with the cluster field configured on other resources (eg Machines, PVCs, etc). - maxLength: 256 - type: string - required: - - endpoint - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - required: - - prismCentral - - prismElements - type: object - openstack: - description: OpenStack contains settings specific to the OpenStack infrastructure provider. - type: object - ovirt: - description: Ovirt contains settings specific to the oVirt infrastructure provider. - type: object - powervs: - description: PowerVS contains settings specific to the IBM Power Systems Virtual Servers infrastructure provider. - properties: - serviceEndpoints: - description: serviceEndpoints is a list of custom endpoints which will override the default service endpoints of a Power VS service. - items: - description: PowervsServiceEndpoint stores the configuration of a custom url to override existing defaults of PowerVS Services. - properties: - name: - description: name is the name of the Power VS service. Few of the services are IAM - https://cloud.ibm.com/apidocs/iam-identity-token-api ResourceController - https://cloud.ibm.com/apidocs/resource-controller/resource-controller Power Cloud - https://cloud.ibm.com/apidocs/power-cloud - pattern: ^[a-z0-9-]+$ - type: string - url: - description: url is fully qualified URI with scheme https, that overrides the default generated endpoint for a client. This must be provided and cannot be empty. - format: uri - pattern: ^https:// - type: string - required: - - name - - url - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - type: object - type: - description: type is the underlying infrastructure provider for the cluster. This value controls whether infrastructure automation such as service load balancers, dynamic volume provisioning, machine creation and deletion, and other integrations are enabled. If None, no infrastructure automation is enabled. Allowed values are "AWS", "Azure", "BareMetal", "GCP", "Libvirt", "OpenStack", "VSphere", "oVirt", "KubeVirt", "EquinixMetal", "PowerVS", "AlibabaCloud", "Nutanix" and "None". Individual components may not support all platforms, and must handle unrecognized platforms as None if they do not support that platform. - enum: - - "" - - AWS - - Azure - - BareMetal - - GCP - - Libvirt - - OpenStack - - None - - VSphere - - oVirt - - IBMCloud - - KubeVirt - - EquinixMetal - - PowerVS - - AlibabaCloud - - Nutanix - - External - type: string - vsphere: - description: VSphere contains settings specific to the VSphere infrastructure provider. - properties: - failureDomains: - description: failureDomains contains the definition of region, zone and the vCenter topology. If this is omitted failure domains (regions and zones) will not be used. - items: - description: VSpherePlatformFailureDomainSpec holds the region and zone failure domain and the vCenter topology of that failure domain. - properties: - name: - description: name defines the arbitrary but unique name of a failure domain. - maxLength: 256 - minLength: 1 - type: string - region: - description: region defines the name of a region tag that will be attached to a vCenter datacenter. The tag category in vCenter must be named openshift-region. - maxLength: 80 - minLength: 1 - type: string - server: - anyOf: - - format: ipv4 - - format: ipv6 - - format: hostname - description: server is the fully-qualified domain name or the IP address of the vCenter server. --- - maxLength: 255 - minLength: 1 - type: string - topology: - description: Topology describes a given failure domain using vSphere constructs - properties: - computeCluster: - description: computeCluster the absolute path of the vCenter cluster in which virtual machine will be located. The absolute path is of the form //host/. The maximum length of the path is 2048 characters. - maxLength: 2048 - pattern: ^/.*?/host/.*? - type: string - datacenter: - description: datacenter is the name of vCenter datacenter in which virtual machines will be located. The maximum length of the datacenter name is 80 characters. - maxLength: 80 - type: string - datastore: - description: datastore is the absolute path of the datastore in which the virtual machine is located. The absolute path is of the form //datastore/ The maximum length of the path is 2048 characters. - maxLength: 2048 - pattern: ^/.*?/datastore/.*? - type: string - folder: - description: folder is the absolute path of the folder where virtual machines are located. The absolute path is of the form //vm/. The maximum length of the path is 2048 characters. - maxLength: 2048 - pattern: ^/.*?/vm/.*? - type: string - networks: - description: networks is the list of port group network names within this failure domain. Currently, we only support a single interface per RHCOS virtual machine. The available networks (port groups) can be listed using `govc ls 'network/*'` The single interface should be the absolute path of the form //network/. - items: - type: string - maxItems: 1 - minItems: 1 - type: array - resourcePool: - description: resourcePool is the absolute path of the resource pool where virtual machines will be created. The absolute path is of the form //host//Resources/. The maximum length of the path is 2048 characters. - maxLength: 2048 - pattern: ^/.*?/host/.*?/Resources.* - type: string - required: - - computeCluster - - datacenter - - datastore - - networks - type: object - zone: - description: zone defines the name of a zone tag that will be attached to a vCenter cluster. The tag category in vCenter must be named openshift-zone. - maxLength: 80 - minLength: 1 - type: string - required: - - name - - region - - server - - topology - - zone - type: object - type: array - nodeNetworking: - description: nodeNetworking contains the definition of internal and external network constraints for assigning the node's networking. If this field is omitted, networking defaults to the legacy address selection behavior which is to only support a single address and return the first one found. - properties: - external: - description: external represents the network configuration of the node that is externally routable. - properties: - excludeNetworkSubnetCidr: - description: excludeNetworkSubnetCidr IP addresses in subnet ranges will be excluded when selecting the IP address from the VirtualMachine's VM for use in the status.addresses fields. --- - items: - format: cidr - type: string - type: array - network: - description: network VirtualMachine's VM Network names that will be used to when searching for status.addresses fields. Note that if internal.networkSubnetCIDR and external.networkSubnetCIDR are not set, then the vNIC associated to this network must only have a single IP address assigned to it. The available networks (port groups) can be listed using `govc ls 'network/*'` - type: string - networkSubnetCidr: - description: networkSubnetCidr IP address on VirtualMachine's network interfaces included in the fields' CIDRs that will be used in respective status.addresses fields. --- - items: - format: cidr - type: string - type: array - type: object - internal: - description: internal represents the network configuration of the node that is routable only within the cluster. - properties: - excludeNetworkSubnetCidr: - description: excludeNetworkSubnetCidr IP addresses in subnet ranges will be excluded when selecting the IP address from the VirtualMachine's VM for use in the status.addresses fields. --- - items: - format: cidr - type: string - type: array - network: - description: network VirtualMachine's VM Network names that will be used to when searching for status.addresses fields. Note that if internal.networkSubnetCIDR and external.networkSubnetCIDR are not set, then the vNIC associated to this network must only have a single IP address assigned to it. The available networks (port groups) can be listed using `govc ls 'network/*'` - type: string - networkSubnetCidr: - description: networkSubnetCidr IP address on VirtualMachine's network interfaces included in the fields' CIDRs that will be used in respective status.addresses fields. --- - items: - format: cidr - type: string - type: array - type: object - type: object - vcenters: - description: vcenters holds the connection details for services to communicate with vCenter. Currently, only a single vCenter is supported. --- - items: - description: VSpherePlatformVCenterSpec stores the vCenter connection fields. This is used by the vSphere CCM. - properties: - datacenters: - description: The vCenter Datacenters in which the RHCOS vm guests are located. This field will be used by the Cloud Controller Manager. Each datacenter listed here should be used within a topology. - items: - type: string - minItems: 1 - type: array - port: - description: port is the TCP port that will be used to communicate to the vCenter endpoint. When omitted, this means the user has no opinion and it is up to the platform to choose a sensible default, which is subject to change over time. - format: int32 - maximum: 32767 - minimum: 1 - type: integer - server: - anyOf: - - format: ipv4 - - format: ipv6 - - format: hostname - description: server is the fully-qualified domain name or the IP address of the vCenter server. --- - maxLength: 255 - type: string - required: - - datacenters - - server - type: object - maxItems: 1 - minItems: 0 - type: array - type: object - type: object - type: object - status: - description: status holds observed values from the cluster. They may not be overridden. - properties: - apiServerInternalURI: - description: apiServerInternalURL is a valid URI with scheme 'https', address and optionally a port (defaulting to 443). apiServerInternalURL can be used by components like kubelets, to contact the Kubernetes API server using the infrastructure provider rather than Kubernetes networking. - type: string - apiServerURL: - description: apiServerURL is a valid URI with scheme 'https', address and optionally a port (defaulting to 443). apiServerURL can be used by components like the web console to tell users where to find the Kubernetes API. - type: string - controlPlaneTopology: - default: HighlyAvailable - description: controlPlaneTopology expresses the expectations for operands that normally run on control nodes. The default is 'HighlyAvailable', which represents the behavior operators have in a "normal" cluster. The 'SingleReplica' mode will be used in single-node deployments and the operators should not configure the operand for highly-available operation The 'External' mode indicates that the control plane is hosted externally to the cluster and that its components are not visible within the cluster. - enum: - - HighlyAvailable - - SingleReplica - - External - type: string - etcdDiscoveryDomain: - description: 'etcdDiscoveryDomain is the domain used to fetch the SRV records for discovering etcd servers and clients. For more info: https://github.com/etcd-io/etcd/blob/329be66e8b3f9e2e6af83c123ff89297e49ebd15/Documentation/op-guide/clustering.md#dns-discovery deprecated: as of 4.7, this field is no longer set or honored. It will be removed in a future release.' - type: string - infrastructureName: - description: infrastructureName uniquely identifies a cluster with a human friendly name. Once set it should not be changed. Must be of max length 27 and must have only alphanumeric or hyphen characters. - type: string - infrastructureTopology: - default: HighlyAvailable - description: 'infrastructureTopology expresses the expectations for infrastructure services that do not run on control plane nodes, usually indicated by a node selector for a `role` value other than `master`. The default is ''HighlyAvailable'', which represents the behavior operators have in a "normal" cluster. The ''SingleReplica'' mode will be used in single-node deployments and the operators should not configure the operand for highly-available operation NOTE: External topology mode is not applicable for this field.' - enum: - - HighlyAvailable - - SingleReplica - type: string - platform: - description: "platform is the underlying infrastructure provider for the cluster. \n Deprecated: Use platformStatus.type instead." - enum: - - "" - - AWS - - Azure - - BareMetal - - GCP - - Libvirt - - OpenStack - - None - - VSphere - - oVirt - - IBMCloud - - KubeVirt - - EquinixMetal - - PowerVS - - AlibabaCloud - - Nutanix - - External - type: string - platformStatus: - description: platformStatus holds status information specific to the underlying infrastructure provider. - properties: - alibabaCloud: - description: AlibabaCloud contains settings specific to the Alibaba Cloud infrastructure provider. - properties: - region: - description: region specifies the region for Alibaba Cloud resources created for the cluster. - pattern: ^[0-9A-Za-z-]+$ - type: string - resourceGroupID: - description: resourceGroupID is the ID of the resource group for the cluster. - pattern: ^(rg-[0-9A-Za-z]+)?$ - type: string - resourceTags: - description: resourceTags is a list of additional tags to apply to Alibaba Cloud resources created for the cluster. - items: - description: AlibabaCloudResourceTag is the set of tags to add to apply to resources. - properties: - key: - description: key is the key of the tag. - maxLength: 128 - minLength: 1 - type: string - value: - description: value is the value of the tag. - maxLength: 128 - minLength: 1 - type: string - required: - - key - - value - type: object - maxItems: 20 - type: array - x-kubernetes-list-map-keys: - - key - x-kubernetes-list-type: map - required: - - region - type: object - aws: - description: AWS contains settings specific to the Amazon Web Services infrastructure provider. - properties: - region: - description: region holds the default AWS region for new AWS resources created by the cluster. - type: string - resourceTags: - description: resourceTags is a list of additional tags to apply to AWS resources created for the cluster. See https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html for information on tagging AWS resources. AWS supports a maximum of 50 tags per resource. OpenShift reserves 25 tags for its use, leaving 25 tags available for the user. - items: - description: AWSResourceTag is a tag to apply to AWS resources created for the cluster. - properties: - key: - description: key is the key of the tag - maxLength: 128 - minLength: 1 - pattern: ^[0-9A-Za-z_.:/=+-@]+$ - type: string - value: - description: value is the value of the tag. Some AWS service do not support empty values. Since tags are added to resources in many services, the length of the tag value must meet the requirements of all services. - maxLength: 256 - minLength: 1 - pattern: ^[0-9A-Za-z_.:/=+-@]+$ - type: string - required: - - key - - value - type: object - maxItems: 25 - type: array - serviceEndpoints: - description: ServiceEndpoints list contains custom endpoints which will override default service endpoint of AWS Services. There must be only one ServiceEndpoint for a service. - items: - description: AWSServiceEndpoint store the configuration of a custom url to override existing defaults of AWS Services. - properties: - name: - description: name is the name of the AWS service. The list of all the service names can be found at https://docs.aws.amazon.com/general/latest/gr/aws-service-information.html This must be provided and cannot be empty. - pattern: ^[a-z0-9-]+$ - type: string - url: - description: url is fully qualified URI with scheme https, that overrides the default generated endpoint for a client. This must be provided and cannot be empty. - pattern: ^https:// - type: string - type: object - type: array - type: object - azure: - description: Azure contains settings specific to the Azure infrastructure provider. - properties: - armEndpoint: - description: armEndpoint specifies a URL to use for resource management in non-soverign clouds such as Azure Stack. - type: string - cloudName: - description: cloudName is the name of the Azure cloud environment which can be used to configure the Azure SDK with the appropriate Azure API endpoints. If empty, the value is equal to `AzurePublicCloud`. - enum: - - "" - - AzurePublicCloud - - AzureUSGovernmentCloud - - AzureChinaCloud - - AzureGermanCloud - - AzureStackCloud - type: string - networkResourceGroupName: - description: networkResourceGroupName is the Resource Group for network resources like the Virtual Network and Subnets used by the cluster. If empty, the value is same as ResourceGroupName. - type: string - resourceGroupName: - description: resourceGroupName is the Resource Group for new Azure resources created for the cluster. - type: string - resourceTags: - description: resourceTags is a list of additional tags to apply to Azure resources created for the cluster. See https://docs.microsoft.com/en-us/rest/api/resources/tags for information on tagging Azure resources. Due to limitations on Automation, Content Delivery Network, DNS Azure resources, a maximum of 15 tags may be applied. OpenShift reserves 5 tags for internal use, allowing 10 tags for user configuration. - items: - description: AzureResourceTag is a tag to apply to Azure resources created for the cluster. - properties: - key: - description: key is the key part of the tag. A tag key can have a maximum of 128 characters and cannot be empty. Key must begin with a letter, end with a letter, number or underscore, and must contain only alphanumeric characters and the following special characters `_ . -`. - maxLength: 128 - minLength: 1 - pattern: ^[a-zA-Z]([0-9A-Za-z_.-]*[0-9A-Za-z_])?$ - type: string - value: - description: 'value is the value part of the tag. A tag value can have a maximum of 256 characters and cannot be empty. Value must contain only alphanumeric characters and the following special characters `_ + , - . / : ; < = > ? @`.' - maxLength: 256 - minLength: 1 - pattern: ^[0-9A-Za-z_.=+-@]+$ - type: string - required: - - key - - value - type: object - maxItems: 10 - type: array - x-kubernetes-validations: - - message: resourceTags are immutable and may only be configured during installation - rule: self.all(x, x in oldSelf) && oldSelf.all(x, x in self) - type: object - x-kubernetes-validations: - - message: resourceTags may only be configured during installation - rule: '!has(oldSelf.resourceTags) && !has(self.resourceTags) || has(oldSelf.resourceTags) && has(self.resourceTags)' - baremetal: - description: BareMetal contains settings specific to the BareMetal platform. - properties: - apiServerInternalIP: - description: "apiServerInternalIP is an IP address to contact the Kubernetes API server that can be used by components inside the cluster, like kubelets using the infrastructure rather than Kubernetes networking. It is the IP that the Infrastructure.status.apiServerInternalURI points to. It is the IP for a self-hosted load balancer in front of the API servers. \n Deprecated: Use APIServerInternalIPs instead." - type: string - apiServerInternalIPs: - description: apiServerInternalIPs are the IP addresses to contact the Kubernetes API server that can be used by components inside the cluster, like kubelets using the infrastructure rather than Kubernetes networking. These are the IPs for a self-hosted load balancer in front of the API servers. In dual stack clusters this list contains two IPs otherwise only one. - format: ip - items: - type: string - maxItems: 2 - type: array - ingressIP: - description: "ingressIP is an external IP which routes to the default ingress controller. The IP is a suitable target of a wildcard DNS record used to resolve default route host names. \n Deprecated: Use IngressIPs instead." - type: string - ingressIPs: - description: ingressIPs are the external IPs which route to the default ingress controller. The IPs are suitable targets of a wildcard DNS record used to resolve default route host names. In dual stack clusters this list contains two IPs otherwise only one. - format: ip - items: - type: string - maxItems: 2 - type: array - nodeDNSIP: - description: nodeDNSIP is the IP address for the internal DNS used by the nodes. Unlike the one managed by the DNS operator, `NodeDNSIP` provides name resolution for the nodes themselves. There is no DNS-as-a-service for BareMetal deployments. In order to minimize necessary changes to the datacenter DNS, a DNS service is hosted as a static pod to serve those hostnames to the nodes in the cluster. - type: string - type: object - equinixMetal: - description: EquinixMetal contains settings specific to the Equinix Metal infrastructure provider. - properties: - apiServerInternalIP: - description: apiServerInternalIP is an IP address to contact the Kubernetes API server that can be used by components inside the cluster, like kubelets using the infrastructure rather than Kubernetes networking. It is the IP that the Infrastructure.status.apiServerInternalURI points to. It is the IP for a self-hosted load balancer in front of the API servers. - type: string - ingressIP: - description: ingressIP is an external IP which routes to the default ingress controller. The IP is a suitable target of a wildcard DNS record used to resolve default route host names. - type: string - type: object - external: - description: External contains settings specific to the generic External infrastructure provider. - type: object - gcp: - description: GCP contains settings specific to the Google Cloud Platform infrastructure provider. - properties: - projectID: - description: resourceGroupName is the Project ID for new GCP resources created for the cluster. - type: string - region: - description: region holds the region for new GCP resources created for the cluster. - type: string - type: object - ibmcloud: - description: IBMCloud contains settings specific to the IBMCloud infrastructure provider. - properties: - cisInstanceCRN: - description: CISInstanceCRN is the CRN of the Cloud Internet Services instance managing the DNS zone for the cluster's base domain - type: string - dnsInstanceCRN: - description: DNSInstanceCRN is the CRN of the DNS Services instance managing the DNS zone for the cluster's base domain - type: string - location: - description: Location is where the cluster has been deployed - type: string - providerType: - description: ProviderType indicates the type of cluster that was created - type: string - resourceGroupName: - description: ResourceGroupName is the Resource Group for new IBMCloud resources created for the cluster. - type: string - type: object - kubevirt: - description: Kubevirt contains settings specific to the kubevirt infrastructure provider. - properties: - apiServerInternalIP: - description: apiServerInternalIP is an IP address to contact the Kubernetes API server that can be used by components inside the cluster, like kubelets using the infrastructure rather than Kubernetes networking. It is the IP that the Infrastructure.status.apiServerInternalURI points to. It is the IP for a self-hosted load balancer in front of the API servers. - type: string - ingressIP: - description: ingressIP is an external IP which routes to the default ingress controller. The IP is a suitable target of a wildcard DNS record used to resolve default route host names. - type: string - type: object - nutanix: - description: Nutanix contains settings specific to the Nutanix infrastructure provider. - properties: - apiServerInternalIP: - description: "apiServerInternalIP is an IP address to contact the Kubernetes API server that can be used by components inside the cluster, like kubelets using the infrastructure rather than Kubernetes networking. It is the IP that the Infrastructure.status.apiServerInternalURI points to. It is the IP for a self-hosted load balancer in front of the API servers. \n Deprecated: Use APIServerInternalIPs instead." - type: string - apiServerInternalIPs: - description: apiServerInternalIPs are the IP addresses to contact the Kubernetes API server that can be used by components inside the cluster, like kubelets using the infrastructure rather than Kubernetes networking. These are the IPs for a self-hosted load balancer in front of the API servers. In dual stack clusters this list contains two IPs otherwise only one. - format: ip - items: - type: string - maxItems: 2 - type: array - ingressIP: - description: "ingressIP is an external IP which routes to the default ingress controller. The IP is a suitable target of a wildcard DNS record used to resolve default route host names. \n Deprecated: Use IngressIPs instead." - type: string - ingressIPs: - description: ingressIPs are the external IPs which route to the default ingress controller. The IPs are suitable targets of a wildcard DNS record used to resolve default route host names. In dual stack clusters this list contains two IPs otherwise only one. - format: ip - items: - type: string - maxItems: 2 - type: array - type: object - openstack: - description: OpenStack contains settings specific to the OpenStack infrastructure provider. - properties: - apiServerInternalIP: - description: "apiServerInternalIP is an IP address to contact the Kubernetes API server that can be used by components inside the cluster, like kubelets using the infrastructure rather than Kubernetes networking. It is the IP that the Infrastructure.status.apiServerInternalURI points to. It is the IP for a self-hosted load balancer in front of the API servers. \n Deprecated: Use APIServerInternalIPs instead." - type: string - apiServerInternalIPs: - description: apiServerInternalIPs are the IP addresses to contact the Kubernetes API server that can be used by components inside the cluster, like kubelets using the infrastructure rather than Kubernetes networking. These are the IPs for a self-hosted load balancer in front of the API servers. In dual stack clusters this list contains two IPs otherwise only one. - format: ip - items: - type: string - maxItems: 2 - type: array - cloudName: - description: cloudName is the name of the desired OpenStack cloud in the client configuration file (`clouds.yaml`). - type: string - ingressIP: - description: "ingressIP is an external IP which routes to the default ingress controller. The IP is a suitable target of a wildcard DNS record used to resolve default route host names. \n Deprecated: Use IngressIPs instead." - type: string - ingressIPs: - description: ingressIPs are the external IPs which route to the default ingress controller. The IPs are suitable targets of a wildcard DNS record used to resolve default route host names. In dual stack clusters this list contains two IPs otherwise only one. - format: ip - items: - type: string - maxItems: 2 - type: array - loadBalancer: - default: - type: OpenShiftManagedDefault - description: loadBalancer defines how the load balancer used by the cluster is configured. - properties: - type: - default: OpenShiftManagedDefault - description: type defines the type of load balancer used by the cluster on OpenStack platform which can be a user-managed or openshift-managed load balancer that is to be used for the OpenShift API and Ingress endpoints. When set to OpenShiftManagedDefault the static pods in charge of API and Ingress traffic load-balancing defined in the machine config operator will be deployed. When set to UserManaged these static pods will not be deployed and it is expected that the load balancer is configured out of band by the deployer. When omitted, this means no opinion and the platform is left to choose a reasonable default. The default value is OpenShiftManagedDefault. - enum: - - OpenShiftManagedDefault - - UserManaged - type: string - x-kubernetes-validations: - - message: type is immutable once set - rule: oldSelf == '' || self == oldSelf - type: object - nodeDNSIP: - description: nodeDNSIP is the IP address for the internal DNS used by the nodes. Unlike the one managed by the DNS operator, `NodeDNSIP` provides name resolution for the nodes themselves. There is no DNS-as-a-service for OpenStack deployments. In order to minimize necessary changes to the datacenter DNS, a DNS service is hosted as a static pod to serve those hostnames to the nodes in the cluster. - type: string - type: object - ovirt: - description: Ovirt contains settings specific to the oVirt infrastructure provider. - properties: - apiServerInternalIP: - description: "apiServerInternalIP is an IP address to contact the Kubernetes API server that can be used by components inside the cluster, like kubelets using the infrastructure rather than Kubernetes networking. It is the IP that the Infrastructure.status.apiServerInternalURI points to. It is the IP for a self-hosted load balancer in front of the API servers. \n Deprecated: Use APIServerInternalIPs instead." - type: string - apiServerInternalIPs: - description: apiServerInternalIPs are the IP addresses to contact the Kubernetes API server that can be used by components inside the cluster, like kubelets using the infrastructure rather than Kubernetes networking. These are the IPs for a self-hosted load balancer in front of the API servers. In dual stack clusters this list contains two IPs otherwise only one. - format: ip - items: - type: string - maxItems: 2 - type: array - ingressIP: - description: "ingressIP is an external IP which routes to the default ingress controller. The IP is a suitable target of a wildcard DNS record used to resolve default route host names. \n Deprecated: Use IngressIPs instead." - type: string - ingressIPs: - description: ingressIPs are the external IPs which route to the default ingress controller. The IPs are suitable targets of a wildcard DNS record used to resolve default route host names. In dual stack clusters this list contains two IPs otherwise only one. - format: ip - items: - type: string - maxItems: 2 - type: array - nodeDNSIP: - description: 'deprecated: as of 4.6, this field is no longer set or honored. It will be removed in a future release.' - type: string - type: object - powervs: - description: PowerVS contains settings specific to the Power Systems Virtual Servers infrastructure provider. - properties: - cisInstanceCRN: - description: CISInstanceCRN is the CRN of the Cloud Internet Services instance managing the DNS zone for the cluster's base domain - type: string - dnsInstanceCRN: - description: DNSInstanceCRN is the CRN of the DNS Services instance managing the DNS zone for the cluster's base domain - type: string - region: - description: region holds the default Power VS region for new Power VS resources created by the cluster. - type: string - resourceGroup: - description: 'resourceGroup is the resource group name for new IBMCloud resources created for a cluster. The resource group specified here will be used by cluster-image-registry-operator to set up a COS Instance in IBMCloud for the cluster registry. More about resource groups can be found here: https://cloud.ibm.com/docs/account?topic=account-rgs. When omitted, the image registry operator won''t be able to configure storage, which results in the image registry cluster operator not being in an available state.' - maxLength: 40 - pattern: ^[a-zA-Z0-9-_ ]+$ - type: string - x-kubernetes-validations: - - message: resourceGroup is immutable once set - rule: oldSelf == '' || self == oldSelf - serviceEndpoints: - description: serviceEndpoints is a list of custom endpoints which will override the default service endpoints of a Power VS service. - items: - description: PowervsServiceEndpoint stores the configuration of a custom url to override existing defaults of PowerVS Services. - properties: - name: - description: name is the name of the Power VS service. Few of the services are IAM - https://cloud.ibm.com/apidocs/iam-identity-token-api ResourceController - https://cloud.ibm.com/apidocs/resource-controller/resource-controller Power Cloud - https://cloud.ibm.com/apidocs/power-cloud - pattern: ^[a-z0-9-]+$ - type: string - url: - description: url is fully qualified URI with scheme https, that overrides the default generated endpoint for a client. This must be provided and cannot be empty. - format: uri - pattern: ^https:// - type: string - required: - - name - - url - type: object - type: array - zone: - description: 'zone holds the default zone for the new Power VS resources created by the cluster. Note: Currently only single-zone OCP clusters are supported' - type: string - type: object - x-kubernetes-validations: - - message: cannot unset resourceGroup once set - rule: '!has(oldSelf.resourceGroup) || has(self.resourceGroup)' - type: - description: "type is the underlying infrastructure provider for the cluster. This value controls whether infrastructure automation such as service load balancers, dynamic volume provisioning, machine creation and deletion, and other integrations are enabled. If None, no infrastructure automation is enabled. Allowed values are \"AWS\", \"Azure\", \"BareMetal\", \"GCP\", \"Libvirt\", \"OpenStack\", \"VSphere\", \"oVirt\", \"EquinixMetal\", \"PowerVS\", \"AlibabaCloud\", \"Nutanix\" and \"None\". Individual components may not support all platforms, and must handle unrecognized platforms as None if they do not support that platform. \n This value will be synced with to the `status.platform` and `status.platformStatus.type`. Currently this value cannot be changed once set." - enum: - - "" - - AWS - - Azure - - BareMetal - - GCP - - Libvirt - - OpenStack - - None - - VSphere - - oVirt - - IBMCloud - - KubeVirt - - EquinixMetal - - PowerVS - - AlibabaCloud - - Nutanix - - External - type: string - vsphere: - description: VSphere contains settings specific to the VSphere infrastructure provider. - properties: - apiServerInternalIP: - description: "apiServerInternalIP is an IP address to contact the Kubernetes API server that can be used by components inside the cluster, like kubelets using the infrastructure rather than Kubernetes networking. It is the IP that the Infrastructure.status.apiServerInternalURI points to. It is the IP for a self-hosted load balancer in front of the API servers. \n Deprecated: Use APIServerInternalIPs instead." - type: string - apiServerInternalIPs: - description: apiServerInternalIPs are the IP addresses to contact the Kubernetes API server that can be used by components inside the cluster, like kubelets using the infrastructure rather than Kubernetes networking. These are the IPs for a self-hosted load balancer in front of the API servers. In dual stack clusters this list contains two IPs otherwise only one. - format: ip - items: - type: string - maxItems: 2 - type: array - ingressIP: - description: "ingressIP is an external IP which routes to the default ingress controller. The IP is a suitable target of a wildcard DNS record used to resolve default route host names. \n Deprecated: Use IngressIPs instead." - type: string - ingressIPs: - description: ingressIPs are the external IPs which route to the default ingress controller. The IPs are suitable targets of a wildcard DNS record used to resolve default route host names. In dual stack clusters this list contains two IPs otherwise only one. - format: ip - items: - type: string - maxItems: 2 - type: array - nodeDNSIP: - description: nodeDNSIP is the IP address for the internal DNS used by the nodes. Unlike the one managed by the DNS operator, `NodeDNSIP` provides name resolution for the nodes themselves. There is no DNS-as-a-service for vSphere deployments. In order to minimize necessary changes to the datacenter DNS, a DNS service is hosted as a static pod to serve those hostnames to the nodes in the cluster. - type: string - type: object - type: object - type: object - required: - - spec - type: object - served: true - storage: true - subresources: - status: {} diff --git a/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_infrastructure-Default.crd.yaml-patch b/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_infrastructure-Default.crd.yaml-patch deleted file mode 100644 index d127130ad..000000000 --- a/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_infrastructure-Default.crd.yaml-patch +++ /dev/null @@ -1,24 +0,0 @@ -- op: add - path: /spec/versions/name=v1/schema/openAPIV3Schema/properties/spec/properties/platformSpec/properties/vsphere/properties/vcenters/items/properties/server/anyOf - value: - - format: ipv4 - - format: ipv6 - - format: hostname -- op: add - path: /spec/versions/name=v1/schema/openAPIV3Schema/properties/spec/properties/platformSpec/properties/vsphere/properties/failureDomains/items/properties/server/anyOf - value: - - format: ipv4 - - format: ipv6 - - format: hostname -- op: add - path: /spec/versions/name=v1/schema/openAPIV3Schema/properties/spec/properties/platformSpec/properties/vsphere/properties/nodeNetworking/properties/external/properties/excludeNetworkSubnetCidr/items/format - value: cidr -- op: add - path: /spec/versions/name=v1/schema/openAPIV3Schema/properties/spec/properties/platformSpec/properties/vsphere/properties/nodeNetworking/properties/external/properties/networkSubnetCidr/items/format - value: cidr -- op: add - path: /spec/versions/name=v1/schema/openAPIV3Schema/properties/spec/properties/platformSpec/properties/vsphere/properties/nodeNetworking/properties/internal/properties/excludeNetworkSubnetCidr/items/format - value: cidr -- op: add - path: /spec/versions/name=v1/schema/openAPIV3Schema/properties/spec/properties/platformSpec/properties/vsphere/properties/nodeNetworking/properties/internal/properties/networkSubnetCidr/items/format - value: cidr diff --git a/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_infrastructure-TechPreviewNoUpgrade.crd.yaml b/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_infrastructure-TechPreviewNoUpgrade.crd.yaml deleted file mode 100644 index 495e4a558..000000000 --- a/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_infrastructure-TechPreviewNoUpgrade.crd.yaml +++ /dev/null @@ -1,905 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - api-approved.openshift.io: https://github.com/openshift/api/pull/470 - include.release.openshift.io/ibm-cloud-managed: "true" - include.release.openshift.io/self-managed-high-availability: "true" - include.release.openshift.io/single-node-developer: "true" - release.openshift.io/feature-set: TechPreviewNoUpgrade - name: infrastructures.config.openshift.io -spec: - group: config.openshift.io - names: - kind: Infrastructure - listKind: InfrastructureList - plural: infrastructures - singular: infrastructure - scope: Cluster - versions: - - name: v1 - schema: - openAPIV3Schema: - description: "Infrastructure holds cluster-wide information about Infrastructure. The canonical name is `cluster` \n Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer)." - properties: - apiVersion: - 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 - kind: - 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 - metadata: - type: object - spec: - description: spec holds user settable values for configuration - properties: - cloudConfig: - description: "cloudConfig is a reference to a ConfigMap containing the cloud provider configuration file. This configuration file is used to configure the Kubernetes cloud provider integration when using the built-in cloud provider integration or the external cloud controller manager. The namespace for this config map is openshift-config. \n cloudConfig should only be consumed by the kube_cloud_config controller. The controller is responsible for using the user configuration in the spec for various platforms and combining that with the user provided ConfigMap in this field to create a stitched kube cloud config. The controller generates a ConfigMap `kube-cloud-config` in `openshift-config-managed` namespace with the kube cloud config is stored in `cloud.conf` key. All the clients are expected to use the generated ConfigMap only." - properties: - key: - description: Key allows pointing to a specific key/value inside of the configmap. This is useful for logical file references. - type: string - name: - type: string - type: object - platformSpec: - description: platformSpec holds desired information specific to the underlying infrastructure provider. - properties: - alibabaCloud: - description: AlibabaCloud contains settings specific to the Alibaba Cloud infrastructure provider. - type: object - aws: - description: AWS contains settings specific to the Amazon Web Services infrastructure provider. - properties: - serviceEndpoints: - description: serviceEndpoints list contains custom endpoints which will override default service endpoint of AWS Services. There must be only one ServiceEndpoint for a service. - items: - description: AWSServiceEndpoint store the configuration of a custom url to override existing defaults of AWS Services. - properties: - name: - description: name is the name of the AWS service. The list of all the service names can be found at https://docs.aws.amazon.com/general/latest/gr/aws-service-information.html This must be provided and cannot be empty. - pattern: ^[a-z0-9-]+$ - type: string - url: - description: url is fully qualified URI with scheme https, that overrides the default generated endpoint for a client. This must be provided and cannot be empty. - pattern: ^https:// - type: string - type: object - type: array - type: object - azure: - description: Azure contains settings specific to the Azure infrastructure provider. - type: object - baremetal: - description: BareMetal contains settings specific to the BareMetal platform. - type: object - equinixMetal: - description: EquinixMetal contains settings specific to the Equinix Metal infrastructure provider. - type: object - external: - description: ExternalPlatformType represents generic infrastructure provider. Platform-specific components should be supplemented separately. - properties: - platformName: - default: Unknown - description: PlatformName holds the arbitrary string representing the infrastructure provider name, expected to be set at the installation time. This field is solely for informational and reporting purposes and is not expected to be used for decision-making. - type: string - x-kubernetes-validations: - - message: platform name cannot be changed once set - rule: oldSelf == 'Unknown' || self == oldSelf - type: object - gcp: - description: GCP contains settings specific to the Google Cloud Platform infrastructure provider. - type: object - ibmcloud: - description: IBMCloud contains settings specific to the IBMCloud infrastructure provider. - type: object - kubevirt: - description: Kubevirt contains settings specific to the kubevirt infrastructure provider. - type: object - nutanix: - description: Nutanix contains settings specific to the Nutanix infrastructure provider. - properties: - prismCentral: - description: prismCentral holds the endpoint address and port to access the Nutanix Prism Central. When a cluster-wide proxy is installed, by default, this endpoint will be accessed via the proxy. Should you wish for communication with this endpoint not to be proxied, please add the endpoint to the proxy spec.noProxy list. - properties: - address: - description: address is the endpoint address (DNS name or IP address) of the Nutanix Prism Central or Element (cluster) - maxLength: 256 - type: string - port: - description: port is the port number to access the Nutanix Prism Central or Element (cluster) - format: int32 - maximum: 65535 - minimum: 1 - type: integer - required: - - address - - port - type: object - prismElements: - description: prismElements holds one or more endpoint address and port data to access the Nutanix Prism Elements (clusters) of the Nutanix Prism Central. Currently we only support one Prism Element (cluster) for an OpenShift cluster, where all the Nutanix resources (VMs, subnets, volumes, etc.) used in the OpenShift cluster are located. In the future, we may support Nutanix resources (VMs, etc.) spread over multiple Prism Elements (clusters) of the Prism Central. - items: - description: NutanixPrismElementEndpoint holds the name and endpoint data for a Prism Element (cluster) - properties: - endpoint: - description: endpoint holds the endpoint address and port data of the Prism Element (cluster). When a cluster-wide proxy is installed, by default, this endpoint will be accessed via the proxy. Should you wish for communication with this endpoint not to be proxied, please add the endpoint to the proxy spec.noProxy list. - properties: - address: - description: address is the endpoint address (DNS name or IP address) of the Nutanix Prism Central or Element (cluster) - maxLength: 256 - type: string - port: - description: port is the port number to access the Nutanix Prism Central or Element (cluster) - format: int32 - maximum: 65535 - minimum: 1 - type: integer - required: - - address - - port - type: object - name: - description: name is the name of the Prism Element (cluster). This value will correspond with the cluster field configured on other resources (eg Machines, PVCs, etc). - maxLength: 256 - type: string - required: - - endpoint - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - required: - - prismCentral - - prismElements - type: object - openstack: - description: OpenStack contains settings specific to the OpenStack infrastructure provider. - type: object - ovirt: - description: Ovirt contains settings specific to the oVirt infrastructure provider. - type: object - powervs: - description: PowerVS contains settings specific to the IBM Power Systems Virtual Servers infrastructure provider. - properties: - serviceEndpoints: - description: serviceEndpoints is a list of custom endpoints which will override the default service endpoints of a Power VS service. - items: - description: PowervsServiceEndpoint stores the configuration of a custom url to override existing defaults of PowerVS Services. - properties: - name: - description: name is the name of the Power VS service. Few of the services are IAM - https://cloud.ibm.com/apidocs/iam-identity-token-api ResourceController - https://cloud.ibm.com/apidocs/resource-controller/resource-controller Power Cloud - https://cloud.ibm.com/apidocs/power-cloud - pattern: ^[a-z0-9-]+$ - type: string - url: - description: url is fully qualified URI with scheme https, that overrides the default generated endpoint for a client. This must be provided and cannot be empty. - format: uri - pattern: ^https:// - type: string - required: - - name - - url - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - type: object - type: - description: type is the underlying infrastructure provider for the cluster. This value controls whether infrastructure automation such as service load balancers, dynamic volume provisioning, machine creation and deletion, and other integrations are enabled. If None, no infrastructure automation is enabled. Allowed values are "AWS", "Azure", "BareMetal", "GCP", "Libvirt", "OpenStack", "VSphere", "oVirt", "KubeVirt", "EquinixMetal", "PowerVS", "AlibabaCloud", "Nutanix" and "None". Individual components may not support all platforms, and must handle unrecognized platforms as None if they do not support that platform. - enum: - - "" - - AWS - - Azure - - BareMetal - - GCP - - Libvirt - - OpenStack - - None - - VSphere - - oVirt - - IBMCloud - - KubeVirt - - EquinixMetal - - PowerVS - - AlibabaCloud - - Nutanix - - External - type: string - vsphere: - description: VSphere contains settings specific to the VSphere infrastructure provider. - properties: - failureDomains: - description: failureDomains contains the definition of region, zone and the vCenter topology. If this is omitted failure domains (regions and zones) will not be used. - items: - description: VSpherePlatformFailureDomainSpec holds the region and zone failure domain and the vCenter topology of that failure domain. - properties: - name: - description: name defines the arbitrary but unique name of a failure domain. - maxLength: 256 - minLength: 1 - type: string - region: - description: region defines the name of a region tag that will be attached to a vCenter datacenter. The tag category in vCenter must be named openshift-region. - maxLength: 80 - minLength: 1 - type: string - server: - anyOf: - - format: ipv4 - - format: ipv6 - - format: hostname - description: server is the fully-qualified domain name or the IP address of the vCenter server. --- - maxLength: 255 - minLength: 1 - type: string - topology: - description: Topology describes a given failure domain using vSphere constructs - properties: - computeCluster: - description: computeCluster the absolute path of the vCenter cluster in which virtual machine will be located. The absolute path is of the form //host/. The maximum length of the path is 2048 characters. - maxLength: 2048 - pattern: ^/.*?/host/.*? - type: string - datacenter: - description: datacenter is the name of vCenter datacenter in which virtual machines will be located. The maximum length of the datacenter name is 80 characters. - maxLength: 80 - type: string - datastore: - description: datastore is the absolute path of the datastore in which the virtual machine is located. The absolute path is of the form //datastore/ The maximum length of the path is 2048 characters. - maxLength: 2048 - pattern: ^/.*?/datastore/.*? - type: string - folder: - description: folder is the absolute path of the folder where virtual machines are located. The absolute path is of the form //vm/. The maximum length of the path is 2048 characters. - maxLength: 2048 - pattern: ^/.*?/vm/.*? - type: string - networks: - description: networks is the list of port group network names within this failure domain. Currently, we only support a single interface per RHCOS virtual machine. The available networks (port groups) can be listed using `govc ls 'network/*'` The single interface should be the absolute path of the form //network/. - items: - type: string - maxItems: 1 - minItems: 1 - type: array - resourcePool: - description: resourcePool is the absolute path of the resource pool where virtual machines will be created. The absolute path is of the form //host//Resources/. The maximum length of the path is 2048 characters. - maxLength: 2048 - pattern: ^/.*?/host/.*?/Resources.* - type: string - required: - - computeCluster - - datacenter - - datastore - - networks - type: object - zone: - description: zone defines the name of a zone tag that will be attached to a vCenter cluster. The tag category in vCenter must be named openshift-zone. - maxLength: 80 - minLength: 1 - type: string - required: - - name - - region - - server - - topology - - zone - type: object - type: array - nodeNetworking: - description: nodeNetworking contains the definition of internal and external network constraints for assigning the node's networking. If this field is omitted, networking defaults to the legacy address selection behavior which is to only support a single address and return the first one found. - properties: - external: - description: external represents the network configuration of the node that is externally routable. - properties: - excludeNetworkSubnetCidr: - description: excludeNetworkSubnetCidr IP addresses in subnet ranges will be excluded when selecting the IP address from the VirtualMachine's VM for use in the status.addresses fields. --- - items: - format: cidr - type: string - type: array - network: - description: network VirtualMachine's VM Network names that will be used to when searching for status.addresses fields. Note that if internal.networkSubnetCIDR and external.networkSubnetCIDR are not set, then the vNIC associated to this network must only have a single IP address assigned to it. The available networks (port groups) can be listed using `govc ls 'network/*'` - type: string - networkSubnetCidr: - description: networkSubnetCidr IP address on VirtualMachine's network interfaces included in the fields' CIDRs that will be used in respective status.addresses fields. --- - items: - format: cidr - type: string - type: array - type: object - internal: - description: internal represents the network configuration of the node that is routable only within the cluster. - properties: - excludeNetworkSubnetCidr: - description: excludeNetworkSubnetCidr IP addresses in subnet ranges will be excluded when selecting the IP address from the VirtualMachine's VM for use in the status.addresses fields. --- - items: - format: cidr - type: string - type: array - network: - description: network VirtualMachine's VM Network names that will be used to when searching for status.addresses fields. Note that if internal.networkSubnetCIDR and external.networkSubnetCIDR are not set, then the vNIC associated to this network must only have a single IP address assigned to it. The available networks (port groups) can be listed using `govc ls 'network/*'` - type: string - networkSubnetCidr: - description: networkSubnetCidr IP address on VirtualMachine's network interfaces included in the fields' CIDRs that will be used in respective status.addresses fields. --- - items: - format: cidr - type: string - type: array - type: object - type: object - vcenters: - description: vcenters holds the connection details for services to communicate with vCenter. Currently, only a single vCenter is supported. --- - items: - description: VSpherePlatformVCenterSpec stores the vCenter connection fields. This is used by the vSphere CCM. - properties: - datacenters: - description: The vCenter Datacenters in which the RHCOS vm guests are located. This field will be used by the Cloud Controller Manager. Each datacenter listed here should be used within a topology. - items: - type: string - minItems: 1 - type: array - port: - description: port is the TCP port that will be used to communicate to the vCenter endpoint. When omitted, this means the user has no opinion and it is up to the platform to choose a sensible default, which is subject to change over time. - format: int32 - maximum: 32767 - minimum: 1 - type: integer - server: - anyOf: - - format: ipv4 - - format: ipv6 - - format: hostname - description: server is the fully-qualified domain name or the IP address of the vCenter server. --- - maxLength: 255 - type: string - required: - - datacenters - - server - type: object - maxItems: 1 - minItems: 0 - type: array - type: object - type: object - type: object - status: - description: status holds observed values from the cluster. They may not be overridden. - properties: - apiServerInternalURI: - description: apiServerInternalURL is a valid URI with scheme 'https', address and optionally a port (defaulting to 443). apiServerInternalURL can be used by components like kubelets, to contact the Kubernetes API server using the infrastructure provider rather than Kubernetes networking. - type: string - apiServerURL: - description: apiServerURL is a valid URI with scheme 'https', address and optionally a port (defaulting to 443). apiServerURL can be used by components like the web console to tell users where to find the Kubernetes API. - type: string - controlPlaneTopology: - default: HighlyAvailable - description: controlPlaneTopology expresses the expectations for operands that normally run on control nodes. The default is 'HighlyAvailable', which represents the behavior operators have in a "normal" cluster. The 'SingleReplica' mode will be used in single-node deployments and the operators should not configure the operand for highly-available operation The 'External' mode indicates that the control plane is hosted externally to the cluster and that its components are not visible within the cluster. - enum: - - HighlyAvailable - - SingleReplica - - External - type: string - cpuPartitioning: - default: None - description: cpuPartitioning expresses if CPU partitioning is a currently enabled feature in the cluster. CPU Partitioning means that this cluster can support partitioning workloads to specific CPU Sets. Valid values are "None" and "AllNodes". When omitted, the default value is "None". The default value of "None" indicates that no nodes will be setup with CPU partitioning. The "AllNodes" value indicates that all nodes have been setup with CPU partitioning, and can then be further configured via the PerformanceProfile API. - enum: - - None - - AllNodes - type: string - etcdDiscoveryDomain: - description: 'etcdDiscoveryDomain is the domain used to fetch the SRV records for discovering etcd servers and clients. For more info: https://github.com/etcd-io/etcd/blob/329be66e8b3f9e2e6af83c123ff89297e49ebd15/Documentation/op-guide/clustering.md#dns-discovery deprecated: as of 4.7, this field is no longer set or honored. It will be removed in a future release.' - type: string - infrastructureName: - description: infrastructureName uniquely identifies a cluster with a human friendly name. Once set it should not be changed. Must be of max length 27 and must have only alphanumeric or hyphen characters. - type: string - infrastructureTopology: - default: HighlyAvailable - description: 'infrastructureTopology expresses the expectations for infrastructure services that do not run on control plane nodes, usually indicated by a node selector for a `role` value other than `master`. The default is ''HighlyAvailable'', which represents the behavior operators have in a "normal" cluster. The ''SingleReplica'' mode will be used in single-node deployments and the operators should not configure the operand for highly-available operation NOTE: External topology mode is not applicable for this field.' - enum: - - HighlyAvailable - - SingleReplica - type: string - platform: - description: "platform is the underlying infrastructure provider for the cluster. \n Deprecated: Use platformStatus.type instead." - enum: - - "" - - AWS - - Azure - - BareMetal - - GCP - - Libvirt - - OpenStack - - None - - VSphere - - oVirt - - IBMCloud - - KubeVirt - - EquinixMetal - - PowerVS - - AlibabaCloud - - Nutanix - - External - type: string - platformStatus: - description: platformStatus holds status information specific to the underlying infrastructure provider. - properties: - alibabaCloud: - description: AlibabaCloud contains settings specific to the Alibaba Cloud infrastructure provider. - properties: - region: - description: region specifies the region for Alibaba Cloud resources created for the cluster. - pattern: ^[0-9A-Za-z-]+$ - type: string - resourceGroupID: - description: resourceGroupID is the ID of the resource group for the cluster. - pattern: ^(rg-[0-9A-Za-z]+)?$ - type: string - resourceTags: - description: resourceTags is a list of additional tags to apply to Alibaba Cloud resources created for the cluster. - items: - description: AlibabaCloudResourceTag is the set of tags to add to apply to resources. - properties: - key: - description: key is the key of the tag. - maxLength: 128 - minLength: 1 - type: string - value: - description: value is the value of the tag. - maxLength: 128 - minLength: 1 - type: string - required: - - key - - value - type: object - maxItems: 20 - type: array - x-kubernetes-list-map-keys: - - key - x-kubernetes-list-type: map - required: - - region - type: object - aws: - description: AWS contains settings specific to the Amazon Web Services infrastructure provider. - properties: - region: - description: region holds the default AWS region for new AWS resources created by the cluster. - type: string - resourceTags: - description: resourceTags is a list of additional tags to apply to AWS resources created for the cluster. See https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html for information on tagging AWS resources. AWS supports a maximum of 50 tags per resource. OpenShift reserves 25 tags for its use, leaving 25 tags available for the user. - items: - description: AWSResourceTag is a tag to apply to AWS resources created for the cluster. - properties: - key: - description: key is the key of the tag - maxLength: 128 - minLength: 1 - pattern: ^[0-9A-Za-z_.:/=+-@]+$ - type: string - value: - description: value is the value of the tag. Some AWS service do not support empty values. Since tags are added to resources in many services, the length of the tag value must meet the requirements of all services. - maxLength: 256 - minLength: 1 - pattern: ^[0-9A-Za-z_.:/=+-@]+$ - type: string - required: - - key - - value - type: object - maxItems: 25 - type: array - serviceEndpoints: - description: ServiceEndpoints list contains custom endpoints which will override default service endpoint of AWS Services. There must be only one ServiceEndpoint for a service. - items: - description: AWSServiceEndpoint store the configuration of a custom url to override existing defaults of AWS Services. - properties: - name: - description: name is the name of the AWS service. The list of all the service names can be found at https://docs.aws.amazon.com/general/latest/gr/aws-service-information.html This must be provided and cannot be empty. - pattern: ^[a-z0-9-]+$ - type: string - url: - description: url is fully qualified URI with scheme https, that overrides the default generated endpoint for a client. This must be provided and cannot be empty. - pattern: ^https:// - type: string - type: object - type: array - type: object - azure: - description: Azure contains settings specific to the Azure infrastructure provider. - properties: - armEndpoint: - description: armEndpoint specifies a URL to use for resource management in non-soverign clouds such as Azure Stack. - type: string - cloudName: - description: cloudName is the name of the Azure cloud environment which can be used to configure the Azure SDK with the appropriate Azure API endpoints. If empty, the value is equal to `AzurePublicCloud`. - enum: - - "" - - AzurePublicCloud - - AzureUSGovernmentCloud - - AzureChinaCloud - - AzureGermanCloud - - AzureStackCloud - type: string - networkResourceGroupName: - description: networkResourceGroupName is the Resource Group for network resources like the Virtual Network and Subnets used by the cluster. If empty, the value is same as ResourceGroupName. - type: string - resourceGroupName: - description: resourceGroupName is the Resource Group for new Azure resources created for the cluster. - type: string - resourceTags: - description: resourceTags is a list of additional tags to apply to Azure resources created for the cluster. See https://docs.microsoft.com/en-us/rest/api/resources/tags for information on tagging Azure resources. Due to limitations on Automation, Content Delivery Network, DNS Azure resources, a maximum of 15 tags may be applied. OpenShift reserves 5 tags for internal use, allowing 10 tags for user configuration. - items: - description: AzureResourceTag is a tag to apply to Azure resources created for the cluster. - properties: - key: - description: key is the key part of the tag. A tag key can have a maximum of 128 characters and cannot be empty. Key must begin with a letter, end with a letter, number or underscore, and must contain only alphanumeric characters and the following special characters `_ . -`. - maxLength: 128 - minLength: 1 - pattern: ^[a-zA-Z]([0-9A-Za-z_.-]*[0-9A-Za-z_])?$ - type: string - value: - description: 'value is the value part of the tag. A tag value can have a maximum of 256 characters and cannot be empty. Value must contain only alphanumeric characters and the following special characters `_ + , - . / : ; < = > ? @`.' - maxLength: 256 - minLength: 1 - pattern: ^[0-9A-Za-z_.=+-@]+$ - type: string - required: - - key - - value - type: object - maxItems: 10 - type: array - x-kubernetes-validations: - - message: resourceTags are immutable and may only be configured during installation - rule: self.all(x, x in oldSelf) && oldSelf.all(x, x in self) - type: object - x-kubernetes-validations: - - message: resourceTags may only be configured during installation - rule: '!has(oldSelf.resourceTags) && !has(self.resourceTags) || has(oldSelf.resourceTags) && has(self.resourceTags)' - baremetal: - description: BareMetal contains settings specific to the BareMetal platform. - properties: - apiServerInternalIP: - description: "apiServerInternalIP is an IP address to contact the Kubernetes API server that can be used by components inside the cluster, like kubelets using the infrastructure rather than Kubernetes networking. It is the IP that the Infrastructure.status.apiServerInternalURI points to. It is the IP for a self-hosted load balancer in front of the API servers. \n Deprecated: Use APIServerInternalIPs instead." - type: string - apiServerInternalIPs: - description: apiServerInternalIPs are the IP addresses to contact the Kubernetes API server that can be used by components inside the cluster, like kubelets using the infrastructure rather than Kubernetes networking. These are the IPs for a self-hosted load balancer in front of the API servers. In dual stack clusters this list contains two IPs otherwise only one. - format: ip - items: - type: string - maxItems: 2 - type: array - ingressIP: - description: "ingressIP is an external IP which routes to the default ingress controller. The IP is a suitable target of a wildcard DNS record used to resolve default route host names. \n Deprecated: Use IngressIPs instead." - type: string - ingressIPs: - description: ingressIPs are the external IPs which route to the default ingress controller. The IPs are suitable targets of a wildcard DNS record used to resolve default route host names. In dual stack clusters this list contains two IPs otherwise only one. - format: ip - items: - type: string - maxItems: 2 - type: array - loadBalancer: - default: - type: OpenShiftManagedDefault - description: loadBalancer defines how the load balancer used by the cluster is configured. - properties: - type: - default: OpenShiftManagedDefault - description: type defines the type of load balancer used by the cluster on BareMetal platform which can be a user-managed or openshift-managed load balancer that is to be used for the OpenShift API and Ingress endpoints. When set to OpenShiftManagedDefault the static pods in charge of API and Ingress traffic load-balancing defined in the machine config operator will be deployed. When set to UserManaged these static pods will not be deployed and it is expected that the load balancer is configured out of band by the deployer. When omitted, this means no opinion and the platform is left to choose a reasonable default. The default value is OpenShiftManagedDefault. - enum: - - OpenShiftManagedDefault - - UserManaged - type: string - x-kubernetes-validations: - - message: type is immutable once set - rule: oldSelf == '' || self == oldSelf - type: object - nodeDNSIP: - description: nodeDNSIP is the IP address for the internal DNS used by the nodes. Unlike the one managed by the DNS operator, `NodeDNSIP` provides name resolution for the nodes themselves. There is no DNS-as-a-service for BareMetal deployments. In order to minimize necessary changes to the datacenter DNS, a DNS service is hosted as a static pod to serve those hostnames to the nodes in the cluster. - type: string - type: object - equinixMetal: - description: EquinixMetal contains settings specific to the Equinix Metal infrastructure provider. - properties: - apiServerInternalIP: - description: apiServerInternalIP is an IP address to contact the Kubernetes API server that can be used by components inside the cluster, like kubelets using the infrastructure rather than Kubernetes networking. It is the IP that the Infrastructure.status.apiServerInternalURI points to. It is the IP for a self-hosted load balancer in front of the API servers. - type: string - ingressIP: - description: ingressIP is an external IP which routes to the default ingress controller. The IP is a suitable target of a wildcard DNS record used to resolve default route host names. - type: string - type: object - external: - description: External contains settings specific to the generic External infrastructure provider. - type: object - gcp: - description: GCP contains settings specific to the Google Cloud Platform infrastructure provider. - properties: - projectID: - description: resourceGroupName is the Project ID for new GCP resources created for the cluster. - type: string - region: - description: region holds the region for new GCP resources created for the cluster. - type: string - type: object - ibmcloud: - description: IBMCloud contains settings specific to the IBMCloud infrastructure provider. - properties: - cisInstanceCRN: - description: CISInstanceCRN is the CRN of the Cloud Internet Services instance managing the DNS zone for the cluster's base domain - type: string - dnsInstanceCRN: - description: DNSInstanceCRN is the CRN of the DNS Services instance managing the DNS zone for the cluster's base domain - type: string - location: - description: Location is where the cluster has been deployed - type: string - providerType: - description: ProviderType indicates the type of cluster that was created - type: string - resourceGroupName: - description: ResourceGroupName is the Resource Group for new IBMCloud resources created for the cluster. - type: string - type: object - kubevirt: - description: Kubevirt contains settings specific to the kubevirt infrastructure provider. - properties: - apiServerInternalIP: - description: apiServerInternalIP is an IP address to contact the Kubernetes API server that can be used by components inside the cluster, like kubelets using the infrastructure rather than Kubernetes networking. It is the IP that the Infrastructure.status.apiServerInternalURI points to. It is the IP for a self-hosted load balancer in front of the API servers. - type: string - ingressIP: - description: ingressIP is an external IP which routes to the default ingress controller. The IP is a suitable target of a wildcard DNS record used to resolve default route host names. - type: string - type: object - nutanix: - description: Nutanix contains settings specific to the Nutanix infrastructure provider. - properties: - apiServerInternalIP: - description: "apiServerInternalIP is an IP address to contact the Kubernetes API server that can be used by components inside the cluster, like kubelets using the infrastructure rather than Kubernetes networking. It is the IP that the Infrastructure.status.apiServerInternalURI points to. It is the IP for a self-hosted load balancer in front of the API servers. \n Deprecated: Use APIServerInternalIPs instead." - type: string - apiServerInternalIPs: - description: apiServerInternalIPs are the IP addresses to contact the Kubernetes API server that can be used by components inside the cluster, like kubelets using the infrastructure rather than Kubernetes networking. These are the IPs for a self-hosted load balancer in front of the API servers. In dual stack clusters this list contains two IPs otherwise only one. - format: ip - items: - type: string - maxItems: 2 - type: array - ingressIP: - description: "ingressIP is an external IP which routes to the default ingress controller. The IP is a suitable target of a wildcard DNS record used to resolve default route host names. \n Deprecated: Use IngressIPs instead." - type: string - ingressIPs: - description: ingressIPs are the external IPs which route to the default ingress controller. The IPs are suitable targets of a wildcard DNS record used to resolve default route host names. In dual stack clusters this list contains two IPs otherwise only one. - format: ip - items: - type: string - maxItems: 2 - type: array - loadBalancer: - default: - type: OpenShiftManagedDefault - description: loadBalancer defines how the load balancer used by the cluster is configured. - properties: - type: - default: OpenShiftManagedDefault - description: type defines the type of load balancer used by the cluster on Nutanix platform which can be a user-managed or openshift-managed load balancer that is to be used for the OpenShift API and Ingress endpoints. When set to OpenShiftManagedDefault the static pods in charge of API and Ingress traffic load-balancing defined in the machine config operator will be deployed. When set to UserManaged these static pods will not be deployed and it is expected that the load balancer is configured out of band by the deployer. When omitted, this means no opinion and the platform is left to choose a reasonable default. The default value is OpenShiftManagedDefault. - enum: - - OpenShiftManagedDefault - - UserManaged - type: string - x-kubernetes-validations: - - message: type is immutable once set - rule: oldSelf == '' || self == oldSelf - type: object - type: object - openstack: - description: OpenStack contains settings specific to the OpenStack infrastructure provider. - properties: - apiServerInternalIP: - description: "apiServerInternalIP is an IP address to contact the Kubernetes API server that can be used by components inside the cluster, like kubelets using the infrastructure rather than Kubernetes networking. It is the IP that the Infrastructure.status.apiServerInternalURI points to. It is the IP for a self-hosted load balancer in front of the API servers. \n Deprecated: Use APIServerInternalIPs instead." - type: string - apiServerInternalIPs: - description: apiServerInternalIPs are the IP addresses to contact the Kubernetes API server that can be used by components inside the cluster, like kubelets using the infrastructure rather than Kubernetes networking. These are the IPs for a self-hosted load balancer in front of the API servers. In dual stack clusters this list contains two IPs otherwise only one. - format: ip - items: - type: string - maxItems: 2 - type: array - cloudName: - description: cloudName is the name of the desired OpenStack cloud in the client configuration file (`clouds.yaml`). - type: string - ingressIP: - description: "ingressIP is an external IP which routes to the default ingress controller. The IP is a suitable target of a wildcard DNS record used to resolve default route host names. \n Deprecated: Use IngressIPs instead." - type: string - ingressIPs: - description: ingressIPs are the external IPs which route to the default ingress controller. The IPs are suitable targets of a wildcard DNS record used to resolve default route host names. In dual stack clusters this list contains two IPs otherwise only one. - format: ip - items: - type: string - maxItems: 2 - type: array - loadBalancer: - default: - type: OpenShiftManagedDefault - description: loadBalancer defines how the load balancer used by the cluster is configured. - properties: - type: - default: OpenShiftManagedDefault - description: type defines the type of load balancer used by the cluster on OpenStack platform which can be a user-managed or openshift-managed load balancer that is to be used for the OpenShift API and Ingress endpoints. When set to OpenShiftManagedDefault the static pods in charge of API and Ingress traffic load-balancing defined in the machine config operator will be deployed. When set to UserManaged these static pods will not be deployed and it is expected that the load balancer is configured out of band by the deployer. When omitted, this means no opinion and the platform is left to choose a reasonable default. The default value is OpenShiftManagedDefault. - enum: - - OpenShiftManagedDefault - - UserManaged - type: string - x-kubernetes-validations: - - message: type is immutable once set - rule: oldSelf == '' || self == oldSelf - type: object - nodeDNSIP: - description: nodeDNSIP is the IP address for the internal DNS used by the nodes. Unlike the one managed by the DNS operator, `NodeDNSIP` provides name resolution for the nodes themselves. There is no DNS-as-a-service for OpenStack deployments. In order to minimize necessary changes to the datacenter DNS, a DNS service is hosted as a static pod to serve those hostnames to the nodes in the cluster. - type: string - type: object - ovirt: - description: Ovirt contains settings specific to the oVirt infrastructure provider. - properties: - apiServerInternalIP: - description: "apiServerInternalIP is an IP address to contact the Kubernetes API server that can be used by components inside the cluster, like kubelets using the infrastructure rather than Kubernetes networking. It is the IP that the Infrastructure.status.apiServerInternalURI points to. It is the IP for a self-hosted load balancer in front of the API servers. \n Deprecated: Use APIServerInternalIPs instead." - type: string - apiServerInternalIPs: - description: apiServerInternalIPs are the IP addresses to contact the Kubernetes API server that can be used by components inside the cluster, like kubelets using the infrastructure rather than Kubernetes networking. These are the IPs for a self-hosted load balancer in front of the API servers. In dual stack clusters this list contains two IPs otherwise only one. - format: ip - items: - type: string - maxItems: 2 - type: array - ingressIP: - description: "ingressIP is an external IP which routes to the default ingress controller. The IP is a suitable target of a wildcard DNS record used to resolve default route host names. \n Deprecated: Use IngressIPs instead." - type: string - ingressIPs: - description: ingressIPs are the external IPs which route to the default ingress controller. The IPs are suitable targets of a wildcard DNS record used to resolve default route host names. In dual stack clusters this list contains two IPs otherwise only one. - format: ip - items: - type: string - maxItems: 2 - type: array - loadBalancer: - default: - type: OpenShiftManagedDefault - description: loadBalancer defines how the load balancer used by the cluster is configured. - properties: - type: - default: OpenShiftManagedDefault - description: type defines the type of load balancer used by the cluster on Ovirt platform which can be a user-managed or openshift-managed load balancer that is to be used for the OpenShift API and Ingress endpoints. When set to OpenShiftManagedDefault the static pods in charge of API and Ingress traffic load-balancing defined in the machine config operator will be deployed. When set to UserManaged these static pods will not be deployed and it is expected that the load balancer is configured out of band by the deployer. When omitted, this means no opinion and the platform is left to choose a reasonable default. The default value is OpenShiftManagedDefault. - enum: - - OpenShiftManagedDefault - - UserManaged - type: string - x-kubernetes-validations: - - message: type is immutable once set - rule: oldSelf == '' || self == oldSelf - type: object - nodeDNSIP: - description: 'deprecated: as of 4.6, this field is no longer set or honored. It will be removed in a future release.' - type: string - type: object - powervs: - description: PowerVS contains settings specific to the Power Systems Virtual Servers infrastructure provider. - properties: - cisInstanceCRN: - description: CISInstanceCRN is the CRN of the Cloud Internet Services instance managing the DNS zone for the cluster's base domain - type: string - dnsInstanceCRN: - description: DNSInstanceCRN is the CRN of the DNS Services instance managing the DNS zone for the cluster's base domain - type: string - region: - description: region holds the default Power VS region for new Power VS resources created by the cluster. - type: string - resourceGroup: - description: 'resourceGroup is the resource group name for new IBMCloud resources created for a cluster. The resource group specified here will be used by cluster-image-registry-operator to set up a COS Instance in IBMCloud for the cluster registry. More about resource groups can be found here: https://cloud.ibm.com/docs/account?topic=account-rgs. When omitted, the image registry operator won''t be able to configure storage, which results in the image registry cluster operator not being in an available state.' - maxLength: 40 - pattern: ^[a-zA-Z0-9-_ ]+$ - type: string - x-kubernetes-validations: - - message: resourceGroup is immutable once set - rule: oldSelf == '' || self == oldSelf - serviceEndpoints: - description: serviceEndpoints is a list of custom endpoints which will override the default service endpoints of a Power VS service. - items: - description: PowervsServiceEndpoint stores the configuration of a custom url to override existing defaults of PowerVS Services. - properties: - name: - description: name is the name of the Power VS service. Few of the services are IAM - https://cloud.ibm.com/apidocs/iam-identity-token-api ResourceController - https://cloud.ibm.com/apidocs/resource-controller/resource-controller Power Cloud - https://cloud.ibm.com/apidocs/power-cloud - pattern: ^[a-z0-9-]+$ - type: string - url: - description: url is fully qualified URI with scheme https, that overrides the default generated endpoint for a client. This must be provided and cannot be empty. - format: uri - pattern: ^https:// - type: string - required: - - name - - url - type: object - type: array - zone: - description: 'zone holds the default zone for the new Power VS resources created by the cluster. Note: Currently only single-zone OCP clusters are supported' - type: string - type: object - x-kubernetes-validations: - - message: cannot unset resourceGroup once set - rule: '!has(oldSelf.resourceGroup) || has(self.resourceGroup)' - type: - description: "type is the underlying infrastructure provider for the cluster. This value controls whether infrastructure automation such as service load balancers, dynamic volume provisioning, machine creation and deletion, and other integrations are enabled. If None, no infrastructure automation is enabled. Allowed values are \"AWS\", \"Azure\", \"BareMetal\", \"GCP\", \"Libvirt\", \"OpenStack\", \"VSphere\", \"oVirt\", \"EquinixMetal\", \"PowerVS\", \"AlibabaCloud\", \"Nutanix\" and \"None\". Individual components may not support all platforms, and must handle unrecognized platforms as None if they do not support that platform. \n This value will be synced with to the `status.platform` and `status.platformStatus.type`. Currently this value cannot be changed once set." - enum: - - "" - - AWS - - Azure - - BareMetal - - GCP - - Libvirt - - OpenStack - - None - - VSphere - - oVirt - - IBMCloud - - KubeVirt - - EquinixMetal - - PowerVS - - AlibabaCloud - - Nutanix - - External - type: string - vsphere: - description: VSphere contains settings specific to the VSphere infrastructure provider. - properties: - apiServerInternalIP: - description: "apiServerInternalIP is an IP address to contact the Kubernetes API server that can be used by components inside the cluster, like kubelets using the infrastructure rather than Kubernetes networking. It is the IP that the Infrastructure.status.apiServerInternalURI points to. It is the IP for a self-hosted load balancer in front of the API servers. \n Deprecated: Use APIServerInternalIPs instead." - type: string - apiServerInternalIPs: - description: apiServerInternalIPs are the IP addresses to contact the Kubernetes API server that can be used by components inside the cluster, like kubelets using the infrastructure rather than Kubernetes networking. These are the IPs for a self-hosted load balancer in front of the API servers. In dual stack clusters this list contains two IPs otherwise only one. - format: ip - items: - type: string - maxItems: 2 - type: array - ingressIP: - description: "ingressIP is an external IP which routes to the default ingress controller. The IP is a suitable target of a wildcard DNS record used to resolve default route host names. \n Deprecated: Use IngressIPs instead." - type: string - ingressIPs: - description: ingressIPs are the external IPs which route to the default ingress controller. The IPs are suitable targets of a wildcard DNS record used to resolve default route host names. In dual stack clusters this list contains two IPs otherwise only one. - format: ip - items: - type: string - maxItems: 2 - type: array - loadBalancer: - default: - type: OpenShiftManagedDefault - description: loadBalancer defines how the load balancer used by the cluster is configured. - properties: - type: - default: OpenShiftManagedDefault - description: type defines the type of load balancer used by the cluster on VSphere platform which can be a user-managed or openshift-managed load balancer that is to be used for the OpenShift API and Ingress endpoints. When set to OpenShiftManagedDefault the static pods in charge of API and Ingress traffic load-balancing defined in the machine config operator will be deployed. When set to UserManaged these static pods will not be deployed and it is expected that the load balancer is configured out of band by the deployer. When omitted, this means no opinion and the platform is left to choose a reasonable default. The default value is OpenShiftManagedDefault. - enum: - - OpenShiftManagedDefault - - UserManaged - type: string - x-kubernetes-validations: - - message: type is immutable once set - rule: oldSelf == '' || self == oldSelf - type: object - nodeDNSIP: - description: nodeDNSIP is the IP address for the internal DNS used by the nodes. Unlike the one managed by the DNS operator, `NodeDNSIP` provides name resolution for the nodes themselves. There is no DNS-as-a-service for vSphere deployments. In order to minimize necessary changes to the datacenter DNS, a DNS service is hosted as a static pod to serve those hostnames to the nodes in the cluster. - type: string - type: object - type: object - type: object - required: - - spec - type: object - served: true - storage: true - subresources: - status: {} diff --git a/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_infrastructure-TechPreviewNoUpgrade.crd.yaml-patch b/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_infrastructure-TechPreviewNoUpgrade.crd.yaml-patch deleted file mode 100644 index d127130ad..000000000 --- a/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_infrastructure-TechPreviewNoUpgrade.crd.yaml-patch +++ /dev/null @@ -1,24 +0,0 @@ -- op: add - path: /spec/versions/name=v1/schema/openAPIV3Schema/properties/spec/properties/platformSpec/properties/vsphere/properties/vcenters/items/properties/server/anyOf - value: - - format: ipv4 - - format: ipv6 - - format: hostname -- op: add - path: /spec/versions/name=v1/schema/openAPIV3Schema/properties/spec/properties/platformSpec/properties/vsphere/properties/failureDomains/items/properties/server/anyOf - value: - - format: ipv4 - - format: ipv6 - - format: hostname -- op: add - path: /spec/versions/name=v1/schema/openAPIV3Schema/properties/spec/properties/platformSpec/properties/vsphere/properties/nodeNetworking/properties/external/properties/excludeNetworkSubnetCidr/items/format - value: cidr -- op: add - path: /spec/versions/name=v1/schema/openAPIV3Schema/properties/spec/properties/platformSpec/properties/vsphere/properties/nodeNetworking/properties/external/properties/networkSubnetCidr/items/format - value: cidr -- op: add - path: /spec/versions/name=v1/schema/openAPIV3Schema/properties/spec/properties/platformSpec/properties/vsphere/properties/nodeNetworking/properties/internal/properties/excludeNetworkSubnetCidr/items/format - value: cidr -- op: add - path: /spec/versions/name=v1/schema/openAPIV3Schema/properties/spec/properties/platformSpec/properties/vsphere/properties/nodeNetworking/properties/internal/properties/networkSubnetCidr/items/format - value: cidr diff --git a/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_ingress.crd.yaml b/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_ingress.crd.yaml deleted file mode 100644 index 0d7dec19e..000000000 --- a/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_ingress.crd.yaml +++ /dev/null @@ -1,334 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - api-approved.openshift.io: https://github.com/openshift/api/pull/470 - include.release.openshift.io/ibm-cloud-managed: "true" - include.release.openshift.io/self-managed-high-availability: "true" - include.release.openshift.io/single-node-developer: "true" - name: ingresses.config.openshift.io -spec: - group: config.openshift.io - names: - kind: Ingress - listKind: IngressList - plural: ingresses - singular: ingress - scope: Cluster - versions: - - name: v1 - schema: - openAPIV3Schema: - description: "Ingress holds cluster-wide information about ingress, including the default ingress domain used for routes. The canonical name is `cluster`. \n Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer)." - type: object - required: - - spec - properties: - apiVersion: - 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 - kind: - 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 - metadata: - type: object - spec: - description: spec holds user settable values for configuration - type: object - properties: - appsDomain: - description: appsDomain is an optional domain to use instead of the one specified in the domain field when a Route is created without specifying an explicit host. If appsDomain is nonempty, this value is used to generate default host values for Route. Unlike domain, appsDomain may be modified after installation. This assumes a new ingresscontroller has been setup with a wildcard certificate. - type: string - componentRoutes: - description: "componentRoutes is an optional list of routes that are managed by OpenShift components that a cluster-admin is able to configure the hostname and serving certificate for. The namespace and name of each route in this list should match an existing entry in the status.componentRoutes list. \n To determine the set of configurable Routes, look at namespace and name of entries in the .status.componentRoutes list, where participating operators write the status of configurable routes." - type: array - items: - description: ComponentRouteSpec allows for configuration of a route's hostname and serving certificate. - type: object - required: - - hostname - - name - - namespace - properties: - hostname: - description: hostname is the hostname that should be used by the route. - type: string - pattern: ^([a-zA-Z0-9\p{S}\p{L}]((-?[a-zA-Z0-9\p{S}\p{L}]{0,62})?)|([a-zA-Z0-9\p{S}\p{L}](([a-zA-Z0-9-\p{S}\p{L}]{0,61}[a-zA-Z0-9\p{S}\p{L}])?)(\.)){1,}([a-zA-Z\p{L}]){2,63})$|^(([a-z0-9][-a-z0-9]{0,61}[a-z0-9]|[a-z0-9]{1,63})[\.]){0,}([a-z0-9][-a-z0-9]{0,61}[a-z0-9]|[a-z0-9]{1,63})$ - name: - description: "name is the logical name of the route to customize. \n The namespace and name of this componentRoute must match a corresponding entry in the list of status.componentRoutes if the route is to be customized." - type: string - maxLength: 256 - minLength: 1 - namespace: - description: "namespace is the namespace of the route to customize. \n The namespace and name of this componentRoute must match a corresponding entry in the list of status.componentRoutes if the route is to be customized." - type: string - maxLength: 63 - minLength: 1 - pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ - servingCertKeyPairSecret: - description: servingCertKeyPairSecret is a reference to a secret of type `kubernetes.io/tls` in the openshift-config namespace. The serving cert/key pair must match and will be used by the operator to fulfill the intent of serving with this name. If the custom hostname uses the default routing suffix of the cluster, the Secret specification for a serving certificate will not be needed. - type: object - required: - - name - properties: - name: - description: name is the metadata.name of the referenced secret - type: string - x-kubernetes-list-map-keys: - - namespace - - name - x-kubernetes-list-type: map - domain: - description: "domain is used to generate a default host name for a route when the route's host name is empty. The generated host name will follow this pattern: \"..\". \n It is also used as the default wildcard domain suffix for ingress. The default ingresscontroller domain will follow this pattern: \"*.\". \n Once set, changing domain is not currently supported." - type: string - loadBalancer: - description: loadBalancer contains the load balancer details in general which are not only specific to the underlying infrastructure provider of the current cluster and are required for Ingress Controller to work on OpenShift. - type: object - properties: - platform: - description: platform holds configuration specific to the underlying infrastructure provider for the ingress load balancers. When omitted, this means the user has no opinion and the platform is left to choose reasonable defaults. These defaults are subject to change over time. - type: object - properties: - aws: - description: aws contains settings specific to the Amazon Web Services infrastructure provider. - type: object - required: - - type - properties: - type: - description: "type allows user to set a load balancer type. When this field is set the default ingresscontroller will get created using the specified LBType. If this field is not set then the default ingress controller of LBType Classic will be created. Valid values are: \n * \"Classic\": A Classic Load Balancer that makes routing decisions at either the transport layer (TCP/SSL) or the application layer (HTTP/HTTPS). See the following for additional details: \n https://docs.aws.amazon.com/AmazonECS/latest/developerguide/load-balancer-types.html#clb \n * \"NLB\": A Network Load Balancer that makes routing decisions at the transport layer (TCP/SSL). See the following for additional details: \n https://docs.aws.amazon.com/AmazonECS/latest/developerguide/load-balancer-types.html#nlb" - type: string - enum: - - NLB - - Classic - type: - description: type is the underlying infrastructure provider for the cluster. Allowed values are "AWS", "Azure", "BareMetal", "GCP", "Libvirt", "OpenStack", "VSphere", "oVirt", "KubeVirt", "EquinixMetal", "PowerVS", "AlibabaCloud", "Nutanix" and "None". Individual components may not support all platforms, and must handle unrecognized platforms as None if they do not support that platform. - type: string - enum: - - "" - - AWS - - Azure - - BareMetal - - GCP - - Libvirt - - OpenStack - - None - - VSphere - - oVirt - - IBMCloud - - KubeVirt - - EquinixMetal - - PowerVS - - AlibabaCloud - - Nutanix - - External - requiredHSTSPolicies: - description: "requiredHSTSPolicies specifies HSTS policies that are required to be set on newly created or updated routes matching the domainPattern/s and namespaceSelector/s that are specified in the policy. Each requiredHSTSPolicy must have at least a domainPattern and a maxAge to validate a route HSTS Policy route annotation, and affect route admission. \n A candidate route is checked for HSTS Policies if it has the HSTS Policy route annotation: \"haproxy.router.openshift.io/hsts_header\" E.g. haproxy.router.openshift.io/hsts_header: max-age=31536000;preload;includeSubDomains \n - For each candidate route, if it matches a requiredHSTSPolicy domainPattern and optional namespaceSelector, then the maxAge, preloadPolicy, and includeSubdomainsPolicy must be valid to be admitted. Otherwise, the route is rejected. - The first match, by domainPattern and optional namespaceSelector, in the ordering of the RequiredHSTSPolicies determines the route's admission status. - If the candidate route doesn't match any requiredHSTSPolicy domainPattern and optional namespaceSelector, then it may use any HSTS Policy annotation. \n The HSTS policy configuration may be changed after routes have already been created. An update to a previously admitted route may then fail if the updated route does not conform to the updated HSTS policy configuration. However, changing the HSTS policy configuration will not cause a route that is already admitted to stop working. \n Note that if there are no RequiredHSTSPolicies, any HSTS Policy annotation on the route is valid." - type: array - items: - type: object - required: - - domainPatterns - properties: - domainPatterns: - description: "domainPatterns is a list of domains for which the desired HSTS annotations are required. If domainPatterns is specified and a route is created with a spec.host matching one of the domains, the route must specify the HSTS Policy components described in the matching RequiredHSTSPolicy. \n The use of wildcards is allowed like this: *.foo.com matches everything under foo.com. foo.com only matches foo.com, so to cover foo.com and everything under it, you must specify *both*." - type: array - minItems: 1 - items: - type: string - includeSubDomainsPolicy: - description: 'includeSubDomainsPolicy means the HSTS Policy should apply to any subdomains of the host''s domain name. Thus, for the host bar.foo.com, if includeSubDomainsPolicy was set to RequireIncludeSubDomains: - the host app.bar.foo.com would inherit the HSTS Policy of bar.foo.com - the host bar.foo.com would inherit the HSTS Policy of bar.foo.com - the host foo.com would NOT inherit the HSTS Policy of bar.foo.com - the host def.foo.com would NOT inherit the HSTS Policy of bar.foo.com' - type: string - enum: - - RequireIncludeSubDomains - - RequireNoIncludeSubDomains - - NoOpinion - maxAge: - description: maxAge is the delta time range in seconds during which hosts are regarded as HSTS hosts. If set to 0, it negates the effect, and hosts are removed as HSTS hosts. If set to 0 and includeSubdomains is specified, all subdomains of the host are also removed as HSTS hosts. maxAge is a time-to-live value, and if this policy is not refreshed on a client, the HSTS policy will eventually expire on that client. - type: object - properties: - largestMaxAge: - description: The largest allowed value (in seconds) of the RequiredHSTSPolicy max-age This value can be left unspecified, in which case no upper limit is enforced. - type: integer - format: int32 - maximum: 2147483647 - minimum: 0 - smallestMaxAge: - description: The smallest allowed value (in seconds) of the RequiredHSTSPolicy max-age Setting max-age=0 allows the deletion of an existing HSTS header from a host. This is a necessary tool for administrators to quickly correct mistakes. This value can be left unspecified, in which case no lower limit is enforced. - type: integer - format: int32 - maximum: 2147483647 - minimum: 0 - namespaceSelector: - description: namespaceSelector specifies a label selector such that the policy applies only to those routes that are in namespaces with labels that match the selector, and are in one of the DomainPatterns. Defaults to the empty LabelSelector, which matches everything. - type: object - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - type: array - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - type: object - required: - - key - - operator - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - 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: array - items: - type: string - matchLabels: - 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: object - additionalProperties: - type: string - x-kubernetes-map-type: atomic - preloadPolicy: - description: preloadPolicy directs the client to include hosts in its host preload list so that it never needs to do an initial load to get the HSTS header (note that this is not defined in RFC 6797 and is therefore client implementation-dependent). - type: string - enum: - - RequirePreload - - RequireNoPreload - - NoOpinion - status: - description: status holds observed values from the cluster. They may not be overridden. - type: object - properties: - componentRoutes: - description: componentRoutes is where participating operators place the current route status for routes whose hostnames and serving certificates can be customized by the cluster-admin. - type: array - items: - description: ComponentRouteStatus contains information allowing configuration of a route's hostname and serving certificate. - type: object - required: - - defaultHostname - - name - - namespace - - relatedObjects - properties: - conditions: - description: "conditions are used to communicate the state of the componentRoutes entry. \n Supported conditions include Available, Degraded and Progressing. \n If available is true, the content served by the route can be accessed by users. This includes cases where a default may continue to serve content while the customized route specified by the cluster-admin is being configured. \n If Degraded is true, that means something has gone wrong trying to handle the componentRoutes entry. The currentHostnames field may or may not be in effect. \n If Progressing is true, that means the component is taking some action related to the componentRoutes entry." - type: array - items: - description: "Condition contains details for one aspect of the current state of this API Resource. --- This struct is intended for direct use as an array at the field path .status.conditions. For example, \n type FooStatus struct{ // Represents the observations of a foo's current state. // Known .status.conditions.type are: \"Available\", \"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge // +listType=map // +listMapKey=type Conditions []metav1.Condition `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }" - type: object - required: - - lastTransitionTime - - message - - reason - - status - - type - properties: - lastTransitionTime: - 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. - type: string - format: date-time - message: - description: message is a human readable message indicating details about the transition. This may be an empty string. - type: string - maxLength: 32768 - observedGeneration: - 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: integer - format: int64 - minimum: 0 - reason: - 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 - maxLength: 1024 - minLength: 1 - pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ - status: - description: status of the condition, one of True, False, Unknown. - type: string - enum: - - "True" - - "False" - - Unknown - type: - description: type of condition in CamelCase or in foo.example.com/CamelCase. --- Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be useful (see .node.status.conditions), the ability to deconflict is important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) - type: string - maxLength: 316 - pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ - x-kubernetes-list-map-keys: - - type - x-kubernetes-list-type: map - consumingUsers: - description: consumingUsers is a slice of ServiceAccounts that need to have read permission on the servingCertKeyPairSecret secret. - type: array - maxItems: 5 - items: - description: ConsumingUser is an alias for string which we add validation to. Currently only service accounts are supported. - type: string - maxLength: 512 - minLength: 1 - pattern: ^system:serviceaccount:[a-z0-9]([-a-z0-9]*[a-z0-9])?:[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ - currentHostnames: - description: currentHostnames is the list of current names used by the route. Typically, this list should consist of a single hostname, but if multiple hostnames are supported by the route the operator may write multiple entries to this list. - type: array - minItems: 1 - items: - description: "Hostname is an alias for hostname string validation. \n The left operand of the | is the original kubebuilder hostname validation format, which is incorrect because it allows upper case letters, disallows hyphen or number in the TLD, and allows labels to start/end in non-alphanumeric characters. See https://bugzilla.redhat.com/show_bug.cgi?id=2039256. ^([a-zA-Z0-9\\p{S}\\p{L}]((-?[a-zA-Z0-9\\p{S}\\p{L}]{0,62})?)|([a-zA-Z0-9\\p{S}\\p{L}](([a-zA-Z0-9-\\p{S}\\p{L}]{0,61}[a-zA-Z0-9\\p{S}\\p{L}])?)(\\.)){1,}([a-zA-Z\\p{L}]){2,63})$ \n The right operand of the | is a new pattern that mimics the current API route admission validation on hostname, except that it allows hostnames longer than the maximum length: ^(([a-z0-9][-a-z0-9]{0,61}[a-z0-9]|[a-z0-9]{1,63})[\\.]){0,}([a-z0-9][-a-z0-9]{0,61}[a-z0-9]|[a-z0-9]{1,63})$ \n Both operand patterns are made available so that modifications on ingress spec can still happen after an invalid hostname was saved via validation by the incorrect left operand of the | operator." - type: string - pattern: ^([a-zA-Z0-9\p{S}\p{L}]((-?[a-zA-Z0-9\p{S}\p{L}]{0,62})?)|([a-zA-Z0-9\p{S}\p{L}](([a-zA-Z0-9-\p{S}\p{L}]{0,61}[a-zA-Z0-9\p{S}\p{L}])?)(\.)){1,}([a-zA-Z\p{L}]){2,63})$|^(([a-z0-9][-a-z0-9]{0,61}[a-z0-9]|[a-z0-9]{1,63})[\.]){0,}([a-z0-9][-a-z0-9]{0,61}[a-z0-9]|[a-z0-9]{1,63})$ - defaultHostname: - description: defaultHostname is the hostname of this route prior to customization. - type: string - pattern: ^([a-zA-Z0-9\p{S}\p{L}]((-?[a-zA-Z0-9\p{S}\p{L}]{0,62})?)|([a-zA-Z0-9\p{S}\p{L}](([a-zA-Z0-9-\p{S}\p{L}]{0,61}[a-zA-Z0-9\p{S}\p{L}])?)(\.)){1,}([a-zA-Z\p{L}]){2,63})$|^(([a-z0-9][-a-z0-9]{0,61}[a-z0-9]|[a-z0-9]{1,63})[\.]){0,}([a-z0-9][-a-z0-9]{0,61}[a-z0-9]|[a-z0-9]{1,63})$ - name: - description: "name is the logical name of the route to customize. It does not have to be the actual name of a route resource but it cannot be renamed. \n The namespace and name of this componentRoute must match a corresponding entry in the list of spec.componentRoutes if the route is to be customized." - type: string - maxLength: 256 - minLength: 1 - namespace: - description: "namespace is the namespace of the route to customize. It must be a real namespace. Using an actual namespace ensures that no two components will conflict and the same component can be installed multiple times. \n The namespace and name of this componentRoute must match a corresponding entry in the list of spec.componentRoutes if the route is to be customized." - type: string - maxLength: 63 - minLength: 1 - pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ - relatedObjects: - description: relatedObjects is a list of resources which are useful when debugging or inspecting how spec.componentRoutes is applied. - type: array - minItems: 1 - items: - description: ObjectReference contains enough information to let you inspect or modify the referred object. - type: object - required: - - group - - name - - resource - properties: - group: - description: group of the referent. - type: string - name: - description: name of the referent. - type: string - namespace: - description: namespace of the referent. - type: string - resource: - description: resource of the referent. - type: string - x-kubernetes-list-map-keys: - - namespace - - name - x-kubernetes-list-type: map - defaultPlacement: - description: "defaultPlacement is set at installation time to control which nodes will host the ingress router pods by default. The options are control-plane nodes or worker nodes. \n This field works by dictating how the Cluster Ingress Operator will consider unset replicas and nodePlacement fields in IngressController resources when creating the corresponding Deployments. \n See the documentation for the IngressController replicas and nodePlacement fields for more information. \n When omitted, the default value is Workers" - type: string - enum: - - ControlPlane - - Workers - - "" - served: true - storage: true - subresources: - status: {} diff --git a/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_network.crd.yaml b/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_network.crd.yaml deleted file mode 100644 index c01178506..000000000 --- a/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_network.crd.yaml +++ /dev/null @@ -1,163 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - api-approved.openshift.io: https://github.com/openshift/api/pull/470 - include.release.openshift.io/ibm-cloud-managed: "true" - include.release.openshift.io/self-managed-high-availability: "true" - include.release.openshift.io/single-node-developer: "true" - name: networks.config.openshift.io -spec: - group: config.openshift.io - names: - kind: Network - listKind: NetworkList - plural: networks - singular: network - preserveUnknownFields: false - scope: Cluster - versions: - - name: v1 - schema: - openAPIV3Schema: - description: "Network holds cluster-wide information about Network. The canonical name is `cluster`. It is used to configure the desired network configuration, such as: IP address pools for services/pod IPs, network plugin, etc. Please view network.spec for an explanation on what applies when configuring this resource. \n Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer)." - type: object - required: - - spec - properties: - apiVersion: - 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 - kind: - 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 - metadata: - type: object - spec: - description: spec holds user settable values for configuration. As a general rule, this SHOULD NOT be read directly. Instead, you should consume the NetworkStatus, as it indicates the currently deployed configuration. Currently, most spec fields are immutable after installation. Please view the individual ones for further details on each. - type: object - properties: - clusterNetwork: - description: IP address pool to use for pod IPs. This field is immutable after installation. - type: array - items: - description: ClusterNetworkEntry is a contiguous block of IP addresses from which pod IPs are allocated. - type: object - properties: - cidr: - description: The complete block for pod IPs. - type: string - hostPrefix: - description: The size (prefix) of block to allocate to each node. If this field is not used by the plugin, it can be left unset. - type: integer - format: int32 - minimum: 0 - externalIP: - description: externalIP defines configuration for controllers that affect Service.ExternalIP. If nil, then ExternalIP is not allowed to be set. - type: object - properties: - autoAssignCIDRs: - description: autoAssignCIDRs is a list of CIDRs from which to automatically assign Service.ExternalIP. These are assigned when the service is of type LoadBalancer. In general, this is only useful for bare-metal clusters. In Openshift 3.x, this was misleadingly called "IngressIPs". Automatically assigned External IPs are not affected by any ExternalIPPolicy rules. Currently, only one entry may be provided. - type: array - items: - type: string - policy: - description: policy is a set of restrictions applied to the ExternalIP field. If nil or empty, then ExternalIP is not allowed to be set. - type: object - properties: - allowedCIDRs: - description: allowedCIDRs is the list of allowed CIDRs. - type: array - items: - type: string - rejectedCIDRs: - description: rejectedCIDRs is the list of disallowed CIDRs. These take precedence over allowedCIDRs. - type: array - items: - type: string - networkType: - description: 'NetworkType is the plugin that is to be deployed (e.g. OpenShiftSDN). This should match a value that the cluster-network-operator understands, or else no networking will be installed. Currently supported values are: - OpenShiftSDN This field is immutable after installation.' - type: string - serviceNetwork: - description: IP address pool for services. Currently, we only support a single entry here. This field is immutable after installation. - type: array - items: - type: string - serviceNodePortRange: - description: The port range allowed for Services of type NodePort. If not specified, the default of 30000-32767 will be used. Such Services without a NodePort specified will have one automatically allocated from this range. This parameter can be updated after the cluster is installed. - type: string - pattern: ^([0-9]{1,4}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])-([0-9]{1,4}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])$ - status: - description: status holds observed values from the cluster. They may not be overridden. - type: object - properties: - clusterNetwork: - description: IP address pool to use for pod IPs. - type: array - items: - description: ClusterNetworkEntry is a contiguous block of IP addresses from which pod IPs are allocated. - type: object - properties: - cidr: - description: The complete block for pod IPs. - type: string - hostPrefix: - description: The size (prefix) of block to allocate to each node. If this field is not used by the plugin, it can be left unset. - type: integer - format: int32 - minimum: 0 - clusterNetworkMTU: - description: ClusterNetworkMTU is the MTU for inter-pod networking. - type: integer - migration: - description: Migration contains the cluster network migration configuration. - type: object - properties: - mtu: - description: MTU contains the MTU migration configuration. - type: object - properties: - machine: - description: Machine contains MTU migration configuration for the machine's uplink. - type: object - properties: - from: - description: From is the MTU to migrate from. - type: integer - format: int32 - minimum: 0 - to: - description: To is the MTU to migrate to. - type: integer - format: int32 - minimum: 0 - network: - description: Network contains MTU migration configuration for the default network. - type: object - properties: - from: - description: From is the MTU to migrate from. - type: integer - format: int32 - minimum: 0 - to: - description: To is the MTU to migrate to. - type: integer - format: int32 - minimum: 0 - networkType: - description: 'NetworkType is the target plugin that is to be deployed. Currently supported values are: OpenShiftSDN, OVNKubernetes' - type: string - enum: - - OpenShiftSDN - - OVNKubernetes - networkType: - description: NetworkType is the plugin that is deployed (e.g. OpenShiftSDN). - type: string - serviceNetwork: - description: IP address pool for services. Currently, we only support a single entry here. - type: array - items: - type: string - served: true - storage: true diff --git a/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_node.crd.yaml b/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_node.crd.yaml deleted file mode 100644 index a4ef368c2..000000000 --- a/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_node.crd.yaml +++ /dev/null @@ -1,59 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - api-approved.openshift.io: https://github.com/openshift/api/pull/1107 - include.release.openshift.io/ibm-cloud-managed: "true" - include.release.openshift.io/self-managed-high-availability: "true" - include.release.openshift.io/single-node-developer: "true" - name: nodes.config.openshift.io -spec: - group: config.openshift.io - names: - kind: Node - listKind: NodeList - plural: nodes - singular: node - scope: Cluster - versions: - - name: v1 - schema: - openAPIV3Schema: - description: "Node holds cluster-wide information about node specific features. \n Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer)." - type: object - required: - - spec - properties: - apiVersion: - 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 - kind: - 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 - metadata: - type: object - spec: - description: spec holds user settable values for configuration - type: object - properties: - cgroupMode: - description: CgroupMode determines the cgroups version on the node - type: string - enum: - - v1 - - v2 - - "" - workerLatencyProfile: - description: WorkerLatencyProfile determins the how fast the kubelet is updating the status and corresponding reaction of the cluster - type: string - enum: - - Default - - MediumUpdateAverageReaction - - LowUpdateSlowReaction - status: - description: status holds observed values. - type: object - served: true - storage: true - subresources: - status: {} diff --git a/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_oauth.crd.yaml b/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_oauth.crd.yaml deleted file mode 100644 index ba5ab8327..000000000 --- a/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_oauth.crd.yaml +++ /dev/null @@ -1,444 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - api-approved.openshift.io: https://github.com/openshift/api/pull/470 - include.release.openshift.io/ibm-cloud-managed: "true" - include.release.openshift.io/self-managed-high-availability: "true" - include.release.openshift.io/single-node-developer: "true" - name: oauths.config.openshift.io -spec: - group: config.openshift.io - names: - kind: OAuth - listKind: OAuthList - plural: oauths - singular: oauth - scope: Cluster - versions: - - name: v1 - schema: - openAPIV3Schema: - description: "OAuth holds cluster-wide information about OAuth. The canonical name is `cluster`. It is used to configure the integrated OAuth server. This configuration is only honored when the top level Authentication config has type set to IntegratedOAuth. \n Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer)." - type: object - required: - - spec - properties: - apiVersion: - 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 - kind: - 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 - metadata: - type: object - spec: - description: spec holds user settable values for configuration - type: object - properties: - identityProviders: - description: identityProviders is an ordered list of ways for a user to identify themselves. When this list is empty, no identities are provisioned for users. - type: array - items: - description: IdentityProvider provides identities for users authenticating using credentials - type: object - properties: - basicAuth: - description: basicAuth contains configuration options for the BasicAuth IdP - type: object - properties: - ca: - description: ca is an optional reference to a config map by name containing the PEM-encoded CA bundle. It is used as a trust anchor to validate the TLS certificate presented by the remote server. The key "ca.crt" is used to locate the data. If specified and the config map or expected key is not found, the identity provider is not honored. If the specified ca data is not valid, the identity provider is not honored. If empty, the default system roots are used. The namespace for this config map is openshift-config. - type: object - required: - - name - properties: - name: - description: name is the metadata.name of the referenced config map - type: string - tlsClientCert: - description: tlsClientCert is an optional reference to a secret by name that contains the PEM-encoded TLS client certificate to present when connecting to the server. The key "tls.crt" is used to locate the data. If specified and the secret or expected key is not found, the identity provider is not honored. If the specified certificate data is not valid, the identity provider is not honored. The namespace for this secret is openshift-config. - type: object - required: - - name - properties: - name: - description: name is the metadata.name of the referenced secret - type: string - tlsClientKey: - description: tlsClientKey is an optional reference to a secret by name that contains the PEM-encoded TLS private key for the client certificate referenced in tlsClientCert. The key "tls.key" is used to locate the data. If specified and the secret or expected key is not found, the identity provider is not honored. If the specified certificate data is not valid, the identity provider is not honored. The namespace for this secret is openshift-config. - type: object - required: - - name - properties: - name: - description: name is the metadata.name of the referenced secret - type: string - url: - description: url is the remote URL to connect to - type: string - github: - description: github enables user authentication using GitHub credentials - type: object - properties: - ca: - description: ca is an optional reference to a config map by name containing the PEM-encoded CA bundle. It is used as a trust anchor to validate the TLS certificate presented by the remote server. The key "ca.crt" is used to locate the data. If specified and the config map or expected key is not found, the identity provider is not honored. If the specified ca data is not valid, the identity provider is not honored. If empty, the default system roots are used. This can only be configured when hostname is set to a non-empty value. The namespace for this config map is openshift-config. - type: object - required: - - name - properties: - name: - description: name is the metadata.name of the referenced config map - type: string - clientID: - description: clientID is the oauth client ID - type: string - clientSecret: - description: clientSecret is a required reference to the secret by name containing the oauth client secret. The key "clientSecret" is used to locate the data. If the secret or expected key is not found, the identity provider is not honored. The namespace for this secret is openshift-config. - type: object - required: - - name - properties: - name: - description: name is the metadata.name of the referenced secret - type: string - hostname: - description: hostname is the optional domain (e.g. "mycompany.com") for use with a hosted instance of GitHub Enterprise. It must match the GitHub Enterprise settings value configured at /setup/settings#hostname. - type: string - organizations: - description: organizations optionally restricts which organizations are allowed to log in - type: array - items: - type: string - teams: - description: teams optionally restricts which teams are allowed to log in. Format is /. - type: array - items: - type: string - gitlab: - description: gitlab enables user authentication using GitLab credentials - type: object - properties: - ca: - description: ca is an optional reference to a config map by name containing the PEM-encoded CA bundle. It is used as a trust anchor to validate the TLS certificate presented by the remote server. The key "ca.crt" is used to locate the data. If specified and the config map or expected key is not found, the identity provider is not honored. If the specified ca data is not valid, the identity provider is not honored. If empty, the default system roots are used. The namespace for this config map is openshift-config. - type: object - required: - - name - properties: - name: - description: name is the metadata.name of the referenced config map - type: string - clientID: - description: clientID is the oauth client ID - type: string - clientSecret: - description: clientSecret is a required reference to the secret by name containing the oauth client secret. The key "clientSecret" is used to locate the data. If the secret or expected key is not found, the identity provider is not honored. The namespace for this secret is openshift-config. - type: object - required: - - name - properties: - name: - description: name is the metadata.name of the referenced secret - type: string - url: - description: url is the oauth server base URL - type: string - google: - description: google enables user authentication using Google credentials - type: object - properties: - clientID: - description: clientID is the oauth client ID - type: string - clientSecret: - description: clientSecret is a required reference to the secret by name containing the oauth client secret. The key "clientSecret" is used to locate the data. If the secret or expected key is not found, the identity provider is not honored. The namespace for this secret is openshift-config. - type: object - required: - - name - properties: - name: - description: name is the metadata.name of the referenced secret - type: string - hostedDomain: - description: hostedDomain is the optional Google App domain (e.g. "mycompany.com") to restrict logins to - type: string - htpasswd: - description: htpasswd enables user authentication using an HTPasswd file to validate credentials - type: object - properties: - fileData: - description: fileData is a required reference to a secret by name containing the data to use as the htpasswd file. The key "htpasswd" is used to locate the data. If the secret or expected key is not found, the identity provider is not honored. If the specified htpasswd data is not valid, the identity provider is not honored. The namespace for this secret is openshift-config. - type: object - required: - - name - properties: - name: - description: name is the metadata.name of the referenced secret - type: string - keystone: - description: keystone enables user authentication using keystone password credentials - type: object - properties: - ca: - description: ca is an optional reference to a config map by name containing the PEM-encoded CA bundle. It is used as a trust anchor to validate the TLS certificate presented by the remote server. The key "ca.crt" is used to locate the data. If specified and the config map or expected key is not found, the identity provider is not honored. If the specified ca data is not valid, the identity provider is not honored. If empty, the default system roots are used. The namespace for this config map is openshift-config. - type: object - required: - - name - properties: - name: - description: name is the metadata.name of the referenced config map - type: string - domainName: - description: domainName is required for keystone v3 - type: string - tlsClientCert: - description: tlsClientCert is an optional reference to a secret by name that contains the PEM-encoded TLS client certificate to present when connecting to the server. The key "tls.crt" is used to locate the data. If specified and the secret or expected key is not found, the identity provider is not honored. If the specified certificate data is not valid, the identity provider is not honored. The namespace for this secret is openshift-config. - type: object - required: - - name - properties: - name: - description: name is the metadata.name of the referenced secret - type: string - tlsClientKey: - description: tlsClientKey is an optional reference to a secret by name that contains the PEM-encoded TLS private key for the client certificate referenced in tlsClientCert. The key "tls.key" is used to locate the data. If specified and the secret or expected key is not found, the identity provider is not honored. If the specified certificate data is not valid, the identity provider is not honored. The namespace for this secret is openshift-config. - type: object - required: - - name - properties: - name: - description: name is the metadata.name of the referenced secret - type: string - url: - description: url is the remote URL to connect to - type: string - ldap: - description: ldap enables user authentication using LDAP credentials - type: object - properties: - attributes: - description: attributes maps LDAP attributes to identities - type: object - properties: - email: - description: email is the list of attributes whose values should be used as the email address. Optional. If unspecified, no email is set for the identity - type: array - items: - type: string - id: - description: id is the list of attributes whose values should be used as the user ID. Required. First non-empty attribute is used. At least one attribute is required. If none of the listed attribute have a value, authentication fails. LDAP standard identity attribute is "dn" - type: array - items: - type: string - name: - description: name is the list of attributes whose values should be used as the display name. Optional. If unspecified, no display name is set for the identity LDAP standard display name attribute is "cn" - type: array - items: - type: string - preferredUsername: - description: preferredUsername is the list of attributes whose values should be used as the preferred username. LDAP standard login attribute is "uid" - type: array - items: - type: string - bindDN: - description: bindDN is an optional DN to bind with during the search phase. - type: string - bindPassword: - description: bindPassword is an optional reference to a secret by name containing a password to bind with during the search phase. The key "bindPassword" is used to locate the data. If specified and the secret or expected key is not found, the identity provider is not honored. The namespace for this secret is openshift-config. - type: object - required: - - name - properties: - name: - description: name is the metadata.name of the referenced secret - type: string - ca: - description: ca is an optional reference to a config map by name containing the PEM-encoded CA bundle. It is used as a trust anchor to validate the TLS certificate presented by the remote server. The key "ca.crt" is used to locate the data. If specified and the config map or expected key is not found, the identity provider is not honored. If the specified ca data is not valid, the identity provider is not honored. If empty, the default system roots are used. The namespace for this config map is openshift-config. - type: object - required: - - name - properties: - name: - description: name is the metadata.name of the referenced config map - type: string - insecure: - description: 'insecure, if true, indicates the connection should not use TLS WARNING: Should not be set to `true` with the URL scheme "ldaps://" as "ldaps://" URLs always attempt to connect using TLS, even when `insecure` is set to `true` When `true`, "ldap://" URLS connect insecurely. When `false`, "ldap://" URLs are upgraded to a TLS connection using StartTLS as specified in https://tools.ietf.org/html/rfc2830.' - type: boolean - url: - description: 'url is an RFC 2255 URL which specifies the LDAP search parameters to use. The syntax of the URL is: ldap://host:port/basedn?attribute?scope?filter' - type: string - mappingMethod: - description: mappingMethod determines how identities from this provider are mapped to users Defaults to "claim" - type: string - name: - description: 'name is used to qualify the identities returned by this provider. - It MUST be unique and not shared by any other identity provider used - It MUST be a valid path segment: name cannot equal "." or ".." or contain "/" or "%" or ":" Ref: https://godoc.org/github.com/openshift/origin/pkg/user/apis/user/validation#ValidateIdentityProviderName' - type: string - openID: - description: openID enables user authentication using OpenID credentials - type: object - properties: - ca: - description: ca is an optional reference to a config map by name containing the PEM-encoded CA bundle. It is used as a trust anchor to validate the TLS certificate presented by the remote server. The key "ca.crt" is used to locate the data. If specified and the config map or expected key is not found, the identity provider is not honored. If the specified ca data is not valid, the identity provider is not honored. If empty, the default system roots are used. The namespace for this config map is openshift-config. - type: object - required: - - name - properties: - name: - description: name is the metadata.name of the referenced config map - type: string - claims: - description: claims mappings - type: object - properties: - email: - description: email is the list of claims whose values should be used as the email address. Optional. If unspecified, no email is set for the identity - type: array - items: - type: string - x-kubernetes-list-type: atomic - groups: - description: groups is the list of claims value of which should be used to synchronize groups from the OIDC provider to OpenShift for the user. If multiple claims are specified, the first one with a non-empty value is used. - type: array - items: - description: OpenIDClaim represents a claim retrieved from an OpenID provider's tokens or userInfo responses - type: string - minLength: 1 - x-kubernetes-list-type: atomic - name: - description: name is the list of claims whose values should be used as the display name. Optional. If unspecified, no display name is set for the identity - type: array - items: - type: string - x-kubernetes-list-type: atomic - preferredUsername: - description: preferredUsername is the list of claims whose values should be used as the preferred username. If unspecified, the preferred username is determined from the value of the sub claim - type: array - items: - type: string - x-kubernetes-list-type: atomic - clientID: - description: clientID is the oauth client ID - type: string - clientSecret: - description: clientSecret is a required reference to the secret by name containing the oauth client secret. The key "clientSecret" is used to locate the data. If the secret or expected key is not found, the identity provider is not honored. The namespace for this secret is openshift-config. - type: object - required: - - name - properties: - name: - description: name is the metadata.name of the referenced secret - type: string - extraAuthorizeParameters: - description: extraAuthorizeParameters are any custom parameters to add to the authorize request. - type: object - additionalProperties: - type: string - extraScopes: - description: extraScopes are any scopes to request in addition to the standard "openid" scope. - type: array - items: - type: string - issuer: - description: issuer is the URL that the OpenID Provider asserts as its Issuer Identifier. It must use the https scheme with no query or fragment component. - type: string - requestHeader: - description: requestHeader enables user authentication using request header credentials - type: object - properties: - ca: - description: ca is a required reference to a config map by name containing the PEM-encoded CA bundle. It is used as a trust anchor to validate the TLS certificate presented by the remote server. Specifically, it allows verification of incoming requests to prevent header spoofing. The key "ca.crt" is used to locate the data. If the config map or expected key is not found, the identity provider is not honored. If the specified ca data is not valid, the identity provider is not honored. The namespace for this config map is openshift-config. - type: object - required: - - name - properties: - name: - description: name is the metadata.name of the referenced config map - type: string - challengeURL: - description: challengeURL is a URL to redirect unauthenticated /authorize requests to Unauthenticated requests from OAuth clients which expect WWW-Authenticate challenges will be redirected here. ${url} is replaced with the current URL, escaped to be safe in a query parameter https://www.example.com/sso-login?then=${url} ${query} is replaced with the current query string https://www.example.com/auth-proxy/oauth/authorize?${query} Required when challenge is set to true. - type: string - clientCommonNames: - description: clientCommonNames is an optional list of common names to require a match from. If empty, any client certificate validated against the clientCA bundle is considered authoritative. - type: array - items: - type: string - emailHeaders: - description: emailHeaders is the set of headers to check for the email address - type: array - items: - type: string - headers: - description: headers is the set of headers to check for identity information - type: array - items: - type: string - loginURL: - description: loginURL is a URL to redirect unauthenticated /authorize requests to Unauthenticated requests from OAuth clients which expect interactive logins will be redirected here ${url} is replaced with the current URL, escaped to be safe in a query parameter https://www.example.com/sso-login?then=${url} ${query} is replaced with the current query string https://www.example.com/auth-proxy/oauth/authorize?${query} Required when login is set to true. - type: string - nameHeaders: - description: nameHeaders is the set of headers to check for the display name - type: array - items: - type: string - preferredUsernameHeaders: - description: preferredUsernameHeaders is the set of headers to check for the preferred username - type: array - items: - type: string - type: - description: type identifies the identity provider type for this entry. - type: string - x-kubernetes-list-type: atomic - templates: - description: templates allow you to customize pages like the login page. - type: object - properties: - error: - description: error is the name of a secret that specifies a go template to use to render error pages during the authentication or grant flow. The key "errors.html" is used to locate the template data. If specified and the secret or expected key is not found, the default error page is used. If the specified template is not valid, the default error page is used. If unspecified, the default error page is used. The namespace for this secret is openshift-config. - type: object - required: - - name - properties: - name: - description: name is the metadata.name of the referenced secret - type: string - login: - description: login is the name of a secret that specifies a go template to use to render the login page. The key "login.html" is used to locate the template data. If specified and the secret or expected key is not found, the default login page is used. If the specified template is not valid, the default login page is used. If unspecified, the default login page is used. The namespace for this secret is openshift-config. - type: object - required: - - name - properties: - name: - description: name is the metadata.name of the referenced secret - type: string - providerSelection: - description: providerSelection is the name of a secret that specifies a go template to use to render the provider selection page. The key "providers.html" is used to locate the template data. If specified and the secret or expected key is not found, the default provider selection page is used. If the specified template is not valid, the default provider selection page is used. If unspecified, the default provider selection page is used. The namespace for this secret is openshift-config. - type: object - required: - - name - properties: - name: - description: name is the metadata.name of the referenced secret - type: string - tokenConfig: - description: tokenConfig contains options for authorization and access tokens - type: object - properties: - accessTokenInactivityTimeout: - description: "accessTokenInactivityTimeout defines the token inactivity timeout for tokens granted by any client. The value represents the maximum amount of time that can occur between consecutive uses of the token. Tokens become invalid if they are not used within this temporal window. The user will need to acquire a new token to regain access once a token times out. Takes valid time duration string such as \"5m\", \"1.5h\" or \"2h45m\". The minimum allowed value for duration is 300s (5 minutes). If the timeout is configured per client, then that value takes precedence. If the timeout value is not specified and the client does not override the value, then tokens are valid until their lifetime. \n WARNING: existing tokens' timeout will not be affected (lowered) by changing this value" - type: string - accessTokenInactivityTimeoutSeconds: - description: 'accessTokenInactivityTimeoutSeconds - DEPRECATED: setting this field has no effect.' - type: integer - format: int32 - accessTokenMaxAgeSeconds: - description: accessTokenMaxAgeSeconds defines the maximum age of access tokens - type: integer - format: int32 - status: - description: status holds observed values from the cluster. They may not be overridden. - type: object - served: true - storage: true - subresources: - status: {} diff --git a/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_project.crd.yaml b/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_project.crd.yaml deleted file mode 100644 index 42f745c67..000000000 --- a/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_project.crd.yaml +++ /dev/null @@ -1,55 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - api-approved.openshift.io: https://github.com/openshift/api/pull/470 - include.release.openshift.io/ibm-cloud-managed: "true" - include.release.openshift.io/self-managed-high-availability: "true" - include.release.openshift.io/single-node-developer: "true" - name: projects.config.openshift.io -spec: - group: config.openshift.io - names: - kind: Project - listKind: ProjectList - plural: projects - singular: project - scope: Cluster - versions: - - name: v1 - schema: - openAPIV3Schema: - description: "Project holds cluster-wide information about Project. The canonical name is `cluster` \n Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer)." - type: object - required: - - spec - properties: - apiVersion: - 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 - kind: - 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 - metadata: - type: object - spec: - description: spec holds user settable values for configuration - type: object - properties: - projectRequestMessage: - description: projectRequestMessage is the string presented to a user if they are unable to request a project via the projectrequest api endpoint - type: string - projectRequestTemplate: - description: projectRequestTemplate is the template to use for creating projects in response to projectrequest. This must point to a template in 'openshift-config' namespace. It is optional. If it is not specified, a default template is used. - type: object - properties: - name: - description: name is the metadata.name of the referenced project request template - type: string - status: - description: status holds observed values from the cluster. They may not be overridden. - type: object - served: true - storage: true - subresources: - status: {} diff --git a/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_scheduler.crd.yaml b/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_scheduler.crd.yaml deleted file mode 100644 index f161bc432..000000000 --- a/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_scheduler.crd.yaml +++ /dev/null @@ -1,68 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - api-approved.openshift.io: https://github.com/openshift/api/pull/470 - include.release.openshift.io/ibm-cloud-managed: "true" - include.release.openshift.io/self-managed-high-availability: "true" - include.release.openshift.io/single-node-developer: "true" - name: schedulers.config.openshift.io -spec: - group: config.openshift.io - names: - kind: Scheduler - listKind: SchedulerList - plural: schedulers - singular: scheduler - scope: Cluster - versions: - - name: v1 - schema: - openAPIV3Schema: - description: "Scheduler holds cluster-wide config information to run the Kubernetes Scheduler and influence its placement decisions. The canonical name for this config is `cluster`. \n Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer)." - type: object - required: - - spec - properties: - apiVersion: - 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 - kind: - 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 - metadata: - type: object - spec: - description: spec holds user settable values for configuration - type: object - properties: - defaultNodeSelector: - description: 'defaultNodeSelector helps set the cluster-wide default node selector to restrict pod placement to specific nodes. This is applied to the pods created in all namespaces and creates an intersection with any existing nodeSelectors already set on a pod, additionally constraining that pod''s selector. For example, defaultNodeSelector: "type=user-node,region=east" would set nodeSelector field in pod spec to "type=user-node,region=east" to all pods created in all namespaces. Namespaces having project-wide node selectors won''t be impacted even if this field is set. This adds an annotation section to the namespace. For example, if a new namespace is created with node-selector=''type=user-node,region=east'', the annotation openshift.io/node-selector: type=user-node,region=east gets added to the project. When the openshift.io/node-selector annotation is set on the project the value is used in preference to the value we are setting for defaultNodeSelector field. For instance, openshift.io/node-selector: "type=user-node,region=west" means that the default of "type=user-node,region=east" set in defaultNodeSelector would not be applied.' - type: string - mastersSchedulable: - description: 'MastersSchedulable allows masters nodes to be schedulable. When this flag is turned on, all the master nodes in the cluster will be made schedulable, so that workload pods can run on them. The default value for this field is false, meaning none of the master nodes are schedulable. Important Note: Once the workload pods start running on the master nodes, extreme care must be taken to ensure that cluster-critical control plane components are not impacted. Please turn on this field after doing due diligence.' - type: boolean - policy: - description: 'DEPRECATED: the scheduler Policy API has been deprecated and will be removed in a future release. policy is a reference to a ConfigMap containing scheduler policy which has user specified predicates and priorities. If this ConfigMap is not available scheduler will default to use DefaultAlgorithmProvider. The namespace for this configmap is openshift-config.' - type: object - required: - - name - properties: - name: - description: name is the metadata.name of the referenced config map - type: string - profile: - description: "profile sets which scheduling profile should be set in order to configure scheduling decisions for new pods. \n Valid values are \"LowNodeUtilization\", \"HighNodeUtilization\", \"NoScoring\" Defaults to \"LowNodeUtilization\"" - type: string - enum: - - "" - - LowNodeUtilization - - HighNodeUtilization - - NoScoring - status: - description: status holds observed values from the cluster. They may not be overridden. - type: object - served: true - storage: true - subresources: - status: {} diff --git a/vendor/github.com/openshift/api/config/v1/Makefile b/vendor/github.com/openshift/api/config/v1/Makefile deleted file mode 100644 index 66bf63630..000000000 --- a/vendor/github.com/openshift/api/config/v1/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -.PHONY: test -test: - make -C ../../tests test GINKGO_EXTRA_ARGS=--focus="config.openshift.io/v1" diff --git a/vendor/github.com/openshift/api/config/v1/doc.go b/vendor/github.com/openshift/api/config/v1/doc.go deleted file mode 100644 index 4ff5208f2..000000000 --- a/vendor/github.com/openshift/api/config/v1/doc.go +++ /dev/null @@ -1,8 +0,0 @@ -// +k8s:deepcopy-gen=package,register -// +k8s:defaulter-gen=TypeMeta -// +k8s:openapi-gen=true - -// +kubebuilder:validation:Optional -// +groupName=config.openshift.io -// Package v1 is the v1 version of the API. -package v1 diff --git a/vendor/github.com/openshift/api/config/v1/feature_gates.go b/vendor/github.com/openshift/api/config/v1/feature_gates.go deleted file mode 100644 index 04e081e0a..000000000 --- a/vendor/github.com/openshift/api/config/v1/feature_gates.go +++ /dev/null @@ -1,185 +0,0 @@ -package v1 - -// FeatureGateDescription is a golang-only interface used to contains details for a feature gate. -type FeatureGateDescription struct { - // FeatureGateAttributes is the information that appears in the API - FeatureGateAttributes FeatureGateAttributes - - // OwningJiraComponent is the jira component that owns most of the impl and first assignment for the bug. - // This is the team that owns the feature long term. - OwningJiraComponent string - // ResponsiblePerson is the person who is on the hook for first contact. This is often, but not always, a team lead. - // It is someone who can make the promise on the behalf of the team. - ResponsiblePerson string - // OwningProduct is the product that owns the lifecycle of the gate. - OwningProduct OwningProduct -} - -type OwningProduct string - -var ( - ocpSpecific = OwningProduct("OCP") - kubernetes = OwningProduct("Kubernetes") -) - -var ( - FeatureGateGatewayAPI = FeatureGateName("GatewayAPI") - gateGatewayAPI = FeatureGateDescription{ - FeatureGateAttributes: FeatureGateAttributes{ - Name: FeatureGateGatewayAPI, - }, - OwningJiraComponent: "Routing", - ResponsiblePerson: "miciah", - OwningProduct: ocpSpecific, - } - - FeatureGateOpenShiftPodSecurityAdmission = FeatureGateName("OpenShiftPodSecurityAdmission") - openShiftPodSecurityAdmission = FeatureGateDescription{ - FeatureGateAttributes: FeatureGateAttributes{ - Name: FeatureGateOpenShiftPodSecurityAdmission, - }, - OwningJiraComponent: "auth", - ResponsiblePerson: "stlaz", - OwningProduct: ocpSpecific, - } - - FeatureGateRetroactiveDefaultStorageClass = FeatureGateName("RetroactiveDefaultStorageClass") - retroactiveDefaultStorageClass = FeatureGateDescription{ - FeatureGateAttributes: FeatureGateAttributes{ - Name: FeatureGateRetroactiveDefaultStorageClass, - }, - OwningJiraComponent: "storage", - ResponsiblePerson: "RomanBednar", - OwningProduct: kubernetes, - } - - FeatureGateExternalCloudProvider = FeatureGateName("ExternalCloudProvider") - externalCloudProvider = FeatureGateDescription{ - FeatureGateAttributes: FeatureGateAttributes{ - Name: FeatureGateExternalCloudProvider, - }, - OwningJiraComponent: "cloud-provider", - ResponsiblePerson: "jspeed", - OwningProduct: ocpSpecific, - } - - FeatureGateExternalCloudProviderAzure = FeatureGateName("ExternalCloudProviderAzure") - externalCloudProviderAzure = FeatureGateDescription{ - FeatureGateAttributes: FeatureGateAttributes{ - Name: FeatureGateExternalCloudProviderAzure, - }, - OwningJiraComponent: "cloud-provider", - ResponsiblePerson: "jspeed", - OwningProduct: ocpSpecific, - } - - FeatureGateExternalCloudProviderGCP = FeatureGateName("ExternalCloudProviderGCP") - externalCloudProviderGCP = FeatureGateDescription{ - FeatureGateAttributes: FeatureGateAttributes{ - Name: FeatureGateExternalCloudProviderGCP, - }, - OwningJiraComponent: "cloud-provider", - ResponsiblePerson: "jspeed", - OwningProduct: ocpSpecific, - } - - FeatureGateCSIDriverSharedResource = FeatureGateName("CSIDriverSharedResource") - csiDriverSharedResource = FeatureGateDescription{ - FeatureGateAttributes: FeatureGateAttributes{ - Name: FeatureGateCSIDriverSharedResource, - }, - OwningJiraComponent: "builds", - ResponsiblePerson: "adkaplan", - OwningProduct: ocpSpecific, - } - - FeatureGateBuildCSIVolumes = FeatureGateName("BuildCSIVolumes") - buildCSIVolumes = FeatureGateDescription{ - FeatureGateAttributes: FeatureGateAttributes{ - Name: FeatureGateBuildCSIVolumes, - }, - OwningJiraComponent: "builds", - ResponsiblePerson: "adkaplan", - OwningProduct: ocpSpecific, - } - - FeatureGateNodeSwap = FeatureGateName("NodeSwap") - nodeSwap = FeatureGateDescription{ - FeatureGateAttributes: FeatureGateAttributes{ - Name: FeatureGateNodeSwap, - }, - OwningJiraComponent: "node", - ResponsiblePerson: "ehashman", - OwningProduct: kubernetes, - } - - FeatureGateMachineAPIProviderOpenStack = FeatureGateName("MachineAPIProviderOpenStack") - machineAPIProviderOpenStack = FeatureGateDescription{ - FeatureGateAttributes: FeatureGateAttributes{ - Name: FeatureGateMachineAPIProviderOpenStack, - }, - OwningJiraComponent: "openstack", - ResponsiblePerson: "egarcia", - OwningProduct: ocpSpecific, - } - - FeatureGateInsightsConfigAPI = FeatureGateName("InsightsConfigAPI") - insightsConfigAPI = FeatureGateDescription{ - FeatureGateAttributes: FeatureGateAttributes{ - Name: FeatureGateInsightsConfigAPI, - }, - OwningJiraComponent: "insights", - ResponsiblePerson: "tremes", - OwningProduct: ocpSpecific, - } - - FeatureGateMatchLabelKeysInPodTopologySpread = FeatureGateName("MatchLabelKeysInPodTopologySpread") - matchLabelKeysInPodTopologySpread = FeatureGateDescription{ - FeatureGateAttributes: FeatureGateAttributes{ - Name: FeatureGateMatchLabelKeysInPodTopologySpread, - }, - OwningJiraComponent: "scheduling", - ResponsiblePerson: "ingvagabund", - OwningProduct: kubernetes, - } - - FeatureGatePDBUnhealthyPodEvictionPolicy = FeatureGateName("PDBUnhealthyPodEvictionPolicy") - pdbUnhealthyPodEvictionPolicy = FeatureGateDescription{ - FeatureGateAttributes: FeatureGateAttributes{ - Name: FeatureGatePDBUnhealthyPodEvictionPolicy, - }, - OwningJiraComponent: "apps", - ResponsiblePerson: "atiratree", - OwningProduct: kubernetes, - } - - FeatureGateDynamicResourceAllocation = FeatureGateName("DynamicResourceAllocation") - dynamicResourceAllocation = FeatureGateDescription{ - FeatureGateAttributes: FeatureGateAttributes{ - Name: FeatureGateDynamicResourceAllocation, - }, - OwningJiraComponent: "scheduling", - ResponsiblePerson: "jchaloup", - OwningProduct: kubernetes, - } - - FeatureGateAdmissionWebhookMatchConditions = FeatureGateName("AdmissionWebhookMatchConditions") - admissionWebhookMatchConditions = FeatureGateDescription{ - FeatureGateAttributes: FeatureGateAttributes{ - Name: FeatureGateAdmissionWebhookMatchConditions, - }, - OwningJiraComponent: "kube-apiserver", - ResponsiblePerson: "benluddy", - OwningProduct: kubernetes, - } - - FeatureGateAzureWorkloadIdentity = FeatureGateName("AzureWorkloadIdentity") - azureWorkloadIdentity = FeatureGateDescription{ - FeatureGateAttributes: FeatureGateAttributes{ - Name: FeatureGateAzureWorkloadIdentity, - }, - OwningJiraComponent: "cloud-credential-operator", - ResponsiblePerson: "abutcher", - OwningProduct: ocpSpecific, - } -) diff --git a/vendor/github.com/openshift/api/config/v1/register.go b/vendor/github.com/openshift/api/config/v1/register.go deleted file mode 100644 index 61302592e..000000000 --- a/vendor/github.com/openshift/api/config/v1/register.go +++ /dev/null @@ -1,78 +0,0 @@ -package v1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -var ( - GroupName = "config.openshift.io" - GroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"} - schemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) - // Install is a function which adds this version to a scheme - Install = schemeBuilder.AddToScheme - - // SchemeGroupVersion generated code relies on this name - // Deprecated - SchemeGroupVersion = GroupVersion - // AddToScheme exists solely to keep the old generators creating valid code - // DEPRECATED - AddToScheme = schemeBuilder.AddToScheme -) - -// Resource generated code relies on this being here, but it logically belongs to the group -// DEPRECATED -func Resource(resource string) schema.GroupResource { - return schema.GroupResource{Group: GroupName, Resource: resource} -} - -// Adds the list of known types to api.Scheme. -func addKnownTypes(scheme *runtime.Scheme) error { - scheme.AddKnownTypes(GroupVersion, - &APIServer{}, - &APIServerList{}, - &Authentication{}, - &AuthenticationList{}, - &Build{}, - &BuildList{}, - &ClusterOperator{}, - &ClusterOperatorList{}, - &ClusterVersion{}, - &ClusterVersionList{}, - &Console{}, - &ConsoleList{}, - &DNS{}, - &DNSList{}, - &FeatureGate{}, - &FeatureGateList{}, - &Image{}, - &ImageList{}, - &Infrastructure{}, - &InfrastructureList{}, - &Ingress{}, - &IngressList{}, - &Node{}, - &NodeList{}, - &Network{}, - &NetworkList{}, - &OAuth{}, - &OAuthList{}, - &OperatorHub{}, - &OperatorHubList{}, - &Project{}, - &ProjectList{}, - &Proxy{}, - &ProxyList{}, - &Scheduler{}, - &SchedulerList{}, - &ImageContentPolicy{}, - &ImageContentPolicyList{}, - &ImageDigestMirrorSet{}, - &ImageDigestMirrorSetList{}, - &ImageTagMirrorSet{}, - &ImageTagMirrorSetList{}, - ) - metav1.AddToGroupVersion(scheme, GroupVersion) - return nil -} diff --git a/vendor/github.com/openshift/api/config/v1/stable.apiserver.testsuite.yaml b/vendor/github.com/openshift/api/config/v1/stable.apiserver.testsuite.yaml deleted file mode 100644 index 75f846a3d..000000000 --- a/vendor/github.com/openshift/api/config/v1/stable.apiserver.testsuite.yaml +++ /dev/null @@ -1,36 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 # Hack because controller-gen complains if we don't have this -name: "[Stable] APIServer" -crd: 0000_10_config-operator_01_apiserver-Default.crd.yaml -tests: - onCreate: - - name: Should be able to create encrypt with aescbc - initial: | - apiVersion: config.openshift.io/v1 - kind: APIServer - spec: - encryption: - type: aescbc - expected: | - apiVersion: config.openshift.io/v1 - kind: APIServer - spec: - audit: - profile: Default - encryption: - type: aescbc - - name: Should be able to create encrypt with aesgcm - initial: | - apiVersion: config.openshift.io/v1 - kind: APIServer - spec: - encryption: - type: aesgcm - expected: | - apiVersion: config.openshift.io/v1 - kind: APIServer - spec: - audit: - profile: Default - encryption: - type: aesgcm - diff --git a/vendor/github.com/openshift/api/config/v1/stable.authentication.testsuite.yaml b/vendor/github.com/openshift/api/config/v1/stable.authentication.testsuite.yaml deleted file mode 100644 index dec366756..000000000 --- a/vendor/github.com/openshift/api/config/v1/stable.authentication.testsuite.yaml +++ /dev/null @@ -1,14 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 # Hack because controller-gen complains if we don't have this -name: "[Stable] Authentication" -crd: 0000_10_config-operator_01_authentication.crd.yaml -tests: - onCreate: - - name: Should be able to create a minimal Authentication - initial: | - apiVersion: config.openshift.io/v1 - kind: Authentication - spec: {} # No spec is required for a Authentication - expected: | - apiVersion: config.openshift.io/v1 - kind: Authentication - spec: {} diff --git a/vendor/github.com/openshift/api/config/v1/stable.build.testsuite.yaml b/vendor/github.com/openshift/api/config/v1/stable.build.testsuite.yaml deleted file mode 100644 index cdd8a9b70..000000000 --- a/vendor/github.com/openshift/api/config/v1/stable.build.testsuite.yaml +++ /dev/null @@ -1,14 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 # Hack because controller-gen complains if we don't have this -name: "[Stable] Build" -crd: 0000_10_config-operator_01_build.crd.yaml -tests: - onCreate: - - name: Should be able to create a minimal Build - initial: | - apiVersion: config.openshift.io/v1 - kind: Build - spec: {} # No spec is required for a Build - expected: | - apiVersion: config.openshift.io/v1 - kind: Build - spec: {} diff --git a/vendor/github.com/openshift/api/config/v1/stable.clusteroperator.testsuite.yaml b/vendor/github.com/openshift/api/config/v1/stable.clusteroperator.testsuite.yaml deleted file mode 100644 index 177e8f691..000000000 --- a/vendor/github.com/openshift/api/config/v1/stable.clusteroperator.testsuite.yaml +++ /dev/null @@ -1,14 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 # Hack because controller-gen complains if we don't have this -name: "[Stable] ClusterOperator" -crd: 0000_00_cluster-version-operator_01_clusteroperator.crd.yaml -tests: - onCreate: - - name: Should be able to create a minimal ClusterOperator - initial: | - apiVersion: config.openshift.io/v1 - kind: ClusterOperator - spec: {} # No spec is required for a ClusterOperator - expected: | - apiVersion: config.openshift.io/v1 - kind: ClusterOperator - spec: {} diff --git a/vendor/github.com/openshift/api/config/v1/stable.clusterversion.testsuite.yaml b/vendor/github.com/openshift/api/config/v1/stable.clusterversion.testsuite.yaml deleted file mode 100644 index b966b29a8..000000000 --- a/vendor/github.com/openshift/api/config/v1/stable.clusterversion.testsuite.yaml +++ /dev/null @@ -1,138 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 # Hack because controller-gen complains if we don't have this -name: "[Stable] ClusterVersion" -crd: 0000_00_cluster-version-operator_01_clusterversion.crd.yaml -tests: - onCreate: - - name: Should be able to create a minimal ClusterVersion - initial: | - apiVersion: config.openshift.io/v1 - kind: ClusterVersion - spec: - clusterID: foo - expected: | - apiVersion: config.openshift.io/v1 - kind: ClusterVersion - spec: - clusterID: foo - - name: Should allow image to be set - initial: | - apiVersion: config.openshift.io/v1 - kind: ClusterVersion - spec: - clusterID: foo - desiredUpdate: - image: bar - expected: | - apiVersion: config.openshift.io/v1 - kind: ClusterVersion - spec: - clusterID: foo - desiredUpdate: - image: bar - - name: Should allow version to be set - initial: | - apiVersion: config.openshift.io/v1 - kind: ClusterVersion - spec: - clusterID: foo - desiredUpdate: - version: 4.11.1 - expected: | - apiVersion: config.openshift.io/v1 - kind: ClusterVersion - spec: - clusterID: foo - desiredUpdate: - version: 4.11.1 - - name: Should allow architecture to be empty - initial: | - apiVersion: config.openshift.io/v1 - kind: ClusterVersion - spec: - clusterID: foo - desiredUpdate: - architecture: "" - version: 4.11.1 - expected: | - apiVersion: config.openshift.io/v1 - kind: ClusterVersion - spec: - clusterID: foo - desiredUpdate: - architecture: "" - version: 4.11.1 - - name: Should allow architecture and version to be set - initial: | - apiVersion: config.openshift.io/v1 - kind: ClusterVersion - spec: - clusterID: foo - desiredUpdate: - architecture: Multi - version: 4.11.1 - expected: | - apiVersion: config.openshift.io/v1 - kind: ClusterVersion - spec: - clusterID: foo - desiredUpdate: - architecture: Multi - version: 4.11.1 - - name: Version must be set if architecture is set - initial: | - apiVersion: config.openshift.io/v1 - kind: ClusterVersion - spec: - clusterID: foo - desiredUpdate: - architecture: Multi - expectedError: "Version must be set if Architecture is set" - - name: Should not allow image and architecture to be set - initial: | - apiVersion: config.openshift.io/v1 - kind: ClusterVersion - spec: - clusterID: foo - desiredUpdate: - architecture: Multi - version: 4.11.1 - image: bar - expectedError: "cannot set both Architecture and Image" - onUpdate: - - name: Should not allow image to be set if architecture set - initial: | - apiVersion: config.openshift.io/v1 - kind: ClusterVersion - spec: - clusterID: foo - desiredUpdate: - architecture: Multi - version: 4.11.1 - updated: | - apiVersion: config.openshift.io/v1 - kind: ClusterVersion - spec: - clusterID: foo - desiredUpdate: - architecture: Multi - version: 4.11.1 - image: bar - expectedError: "cannot set both Architecture and Image" - - name: Should not allow architecture to be set if image set - initial: | - apiVersion: config.openshift.io/v1 - kind: ClusterVersion - spec: - clusterID: foo - desiredUpdate: - image: bar - updated: | - apiVersion: config.openshift.io/v1 - kind: ClusterVersion - spec: - clusterID: foo - desiredUpdate: - architecture: Multi - version: 4.11.1 - image: bar - expectedError: "cannot set both Architecture and Image" diff --git a/vendor/github.com/openshift/api/config/v1/stable.console.testsuite.yaml b/vendor/github.com/openshift/api/config/v1/stable.console.testsuite.yaml deleted file mode 100644 index 0081816fc..000000000 --- a/vendor/github.com/openshift/api/config/v1/stable.console.testsuite.yaml +++ /dev/null @@ -1,14 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 # Hack because controller-gen complains if we don't have this -name: "[Stable] Console" -crd: 0000_10_config-operator_01_console.crd.yaml -tests: - onCreate: - - name: Should be able to create a minimal Console - initial: | - apiVersion: config.openshift.io/v1 - kind: Console - spec: {} # No spec is required for a Console - expected: | - apiVersion: config.openshift.io/v1 - kind: Console - spec: {} diff --git a/vendor/github.com/openshift/api/config/v1/stable.dns.testsuite.yaml b/vendor/github.com/openshift/api/config/v1/stable.dns.testsuite.yaml deleted file mode 100644 index c69f50050..000000000 --- a/vendor/github.com/openshift/api/config/v1/stable.dns.testsuite.yaml +++ /dev/null @@ -1,14 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 # Hack because controller-gen complains if we don't have this -name: "[Stable] DNS" -crd: 0000_10_config-operator_01_dns.crd.yaml -tests: - onCreate: - - name: Should be able to create a minimal DNS - initial: | - apiVersion: config.openshift.io/v1 - kind: DNS - spec: {} # No spec is required for a DNS - expected: | - apiVersion: config.openshift.io/v1 - kind: DNS - spec: {} diff --git a/vendor/github.com/openshift/api/config/v1/stable.featuregate.testsuite.yaml b/vendor/github.com/openshift/api/config/v1/stable.featuregate.testsuite.yaml deleted file mode 100644 index 6b6a4327a..000000000 --- a/vendor/github.com/openshift/api/config/v1/stable.featuregate.testsuite.yaml +++ /dev/null @@ -1,14 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 # Hack because controller-gen complains if we don't have this -name: "[Stable] FeatureGate" -crd: 0000_10_config-operator_01_featuregate.crd.yaml -tests: - onCreate: - - name: Should be able to create a minimal FeatureGate - initial: | - apiVersion: config.openshift.io/v1 - kind: FeatureGate - spec: {} # No spec is required for a FeatureGate - expected: | - apiVersion: config.openshift.io/v1 - kind: FeatureGate - spec: {} diff --git a/vendor/github.com/openshift/api/config/v1/stable.image.testsuite.yaml b/vendor/github.com/openshift/api/config/v1/stable.image.testsuite.yaml deleted file mode 100644 index 6bfbb820f..000000000 --- a/vendor/github.com/openshift/api/config/v1/stable.image.testsuite.yaml +++ /dev/null @@ -1,14 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 # Hack because controller-gen complains if we don't have this -name: "[Stable] Image" -crd: 0000_10_config-operator_01_image.crd.yaml -tests: - onCreate: - - name: Should be able to create a minimal Image - initial: | - apiVersion: config.openshift.io/v1 - kind: Image - spec: {} # No spec is required for a Image - expected: | - apiVersion: config.openshift.io/v1 - kind: Image - spec: {} diff --git a/vendor/github.com/openshift/api/config/v1/stable.imagecontentpolicy.testsuite.yaml b/vendor/github.com/openshift/api/config/v1/stable.imagecontentpolicy.testsuite.yaml deleted file mode 100644 index bffdb6bcd..000000000 --- a/vendor/github.com/openshift/api/config/v1/stable.imagecontentpolicy.testsuite.yaml +++ /dev/null @@ -1,14 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 # Hack because controller-gen complains if we don't have this -name: "[Stable] ImageContentPolicy" -crd: 0000_10_config-operator_01_imagecontentpolicy.crd.yaml -tests: - onCreate: - - name: Should be able to create a minimal ImageContentPolicy - initial: | - apiVersion: config.openshift.io/v1 - kind: ImageContentPolicy - spec: {} # No spec is required for a ImageContentPolicy - expected: | - apiVersion: config.openshift.io/v1 - kind: ImageContentPolicy - spec: {} diff --git a/vendor/github.com/openshift/api/config/v1/stable.imagedigestmirrorset.testsuite.yaml b/vendor/github.com/openshift/api/config/v1/stable.imagedigestmirrorset.testsuite.yaml deleted file mode 100644 index c25b1696b..000000000 --- a/vendor/github.com/openshift/api/config/v1/stable.imagedigestmirrorset.testsuite.yaml +++ /dev/null @@ -1,14 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 # Hack because controller-gen complains if we don't have this -name: "[Stable] ImageDigestMirrorSet" -crd: 0000_10_config-operator_01_imagedigestmirrorset.crd.yaml -tests: - onCreate: - - name: Should be able to create a minimal ImageDigestMirrorSet - initial: | - apiVersion: config.openshift.io/v1 - kind: ImageDigestMirrorSet - spec: {} # No spec is required for a ImageDigestMirrorSet - expected: | - apiVersion: config.openshift.io/v1 - kind: ImageDigestMirrorSet - spec: {} diff --git a/vendor/github.com/openshift/api/config/v1/stable.imagetagmirrorset.testsuite.yaml b/vendor/github.com/openshift/api/config/v1/stable.imagetagmirrorset.testsuite.yaml deleted file mode 100644 index de91eb2c5..000000000 --- a/vendor/github.com/openshift/api/config/v1/stable.imagetagmirrorset.testsuite.yaml +++ /dev/null @@ -1,14 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 # Hack because controller-gen complains if we don't have this -name: "[Stable] ImageTagMirrorSet" -crd: 0000_10_config-operator_01_imagetagmirrorset.crd.yaml -tests: - onCreate: - - name: Should be able to create a minimal ImageTagMirrorSet - initial: | - apiVersion: config.openshift.io/v1 - kind: ImageTagMirrorSet - spec: {} # No spec is required for a ImageTagMirrorSet - expected: | - apiVersion: config.openshift.io/v1 - kind: ImageTagMirrorSet - spec: {} diff --git a/vendor/github.com/openshift/api/config/v1/stable.infrastructure.testsuite.yaml b/vendor/github.com/openshift/api/config/v1/stable.infrastructure.testsuite.yaml deleted file mode 100644 index 4266122b0..000000000 --- a/vendor/github.com/openshift/api/config/v1/stable.infrastructure.testsuite.yaml +++ /dev/null @@ -1,476 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 # Hack because controller-gen complains if we don't have this -name: "[Stable] Infrastructure" -crd: 0000_10_config-operator_01_infrastructure-Default.crd.yaml -tests: - onCreate: - - name: Should be able to create a minimal Infrastructure - initial: | - apiVersion: config.openshift.io/v1 - kind: Infrastructure - spec: {} # No spec is required for a Infrastructure - expected: | - apiVersion: config.openshift.io/v1 - kind: Infrastructure - spec: {} - onUpdate: - - name: Should be able to change External platformName from unknown to something else - initial: | - apiVersion: config.openshift.io/v1 - kind: Infrastructure - spec: - platformSpec: - type: External - external: - platformName: Unknown - updated: | - apiVersion: config.openshift.io/v1 - kind: Infrastructure - spec: - platformSpec: - type: External - external: - platformName: M&PCloud - expected: | - apiVersion: config.openshift.io/v1 - kind: Infrastructure - spec: - platformSpec: - type: External - external: - platformName: M&PCloud - - name: Should not be able to change External platformName once it was set - initial: | - apiVersion: config.openshift.io/v1 - kind: Infrastructure - spec: - platformSpec: - type: External - external: - platformName: M&PCloud - updated: | - apiVersion: config.openshift.io/v1 - kind: Infrastructure - spec: - platformSpec: - type: External - external: - platformName: SomeOtherCoolplatformName - expectedError: " spec.platformSpec.external.platformName: Invalid value: \"string\": platform name cannot be changed once set" - - name: Should not be able to modify an existing Azure ResourceTags Tag - initial: | - apiVersion: config.openshift.io/v1 - kind: Infrastructure - spec: {} - status: - controlPlaneTopology: "HighlyAvailable" - infrastructureTopology: "HighlyAvailable" - platform: Azure - platformStatus: - type: Azure - azure: - resourceTags: - - {key: "key", value: "value"} - updated: | - apiVersion: config.openshift.io/v1 - kind: Infrastructure - spec: {} - status: - platform: Azure - platformStatus: - type: Azure - azure: - resourceTags: - - {key: "key", value: "changed"} - expectedStatusError: "status.platformStatus.azure.resourceTags: Invalid value: \"array\": resourceTags are immutable and may only be configured during installation" - - name: Should not be able to add a Tag to an existing Azure ResourceTags - initial: | - apiVersion: config.openshift.io/v1 - kind: Infrastructure - spec: {} - status: - controlPlaneTopology: "HighlyAvailable" - infrastructureTopology: "HighlyAvailable" - platform: Azure - platformStatus: - type: Azure - azure: - resourceTags: - - {key: "key", value: "value"} - updated: | - apiVersion: config.openshift.io/v1 - kind: Infrastructure - spec: {} - status: - platform: Azure - platformStatus: - type: Azure - azure: - resourceTags: - - {key: "key", value: "value"} - - {key: "new", value: "entry"} - expectedStatusError: "status.platformStatus.azure.resourceTags: Invalid value: \"array\": resourceTags are immutable and may only be configured during installation" - - name: Should not be able to remove a Tag from an existing Azure ResourceTags - initial: | - apiVersion: config.openshift.io/v1 - kind: Infrastructure - spec: {} - status: - platform: Azure - platformStatus: - type: Azure - azure: - resourceTags: - - {key: "key", value: "value"} - - {key: "new", value: "entry"} - updated: | - apiVersion: config.openshift.io/v1 - kind: Infrastructure - spec: {} - status: - platform: Azure - platformStatus: - type: Azure - azure: - resourceTags: - - {key: "key", value: "value"} - expectedStatusError: "status.platformStatus.azure.resourceTags: Invalid value: \"array\": resourceTags are immutable and may only be configured during installation" - - name: Should not be able to add Azure ResourceTags to an empty platformStatus.azure - initial: | - apiVersion: config.openshift.io/v1 - kind: Infrastructure - spec: {} - status: - platform: Azure - platformStatus: - type: Azure - azure: {} - updated: | - apiVersion: config.openshift.io/v1 - kind: Infrastructure - spec: {} - status: - platform: Azure - platformStatus: - azure: - resourceTags: - - {key: "key", value: "value"} - expectedStatusError: "status.platformStatus.azure: Invalid value: \"object\": resourceTags may only be configured during installation" - - name: Should not be able to remove Azure ResourceTags from platformStatus.azure - initial: | - apiVersion: config.openshift.io/v1 - kind: Infrastructure - spec: {} - status: - platform: Azure - platformStatus: - type: Azure - azure: - resourceTags: - - {key: "key", value: "value"} - updated: | - apiVersion: config.openshift.io/v1 - kind: Infrastructure - spec: {} - status: - platform: Azure - platformStatus: - type: Azure - azure: {} - expectedStatusError: "status.platformStatus.azure: Invalid value: \"object\": resourceTags may only be configured during installation" - - name: Should be able to modify the ResourceGroupName while Azure ResourceTags are present - initial: | - apiVersion: config.openshift.io/v1 - kind: Infrastructure - spec: {} - status: - platform: Azure - platformStatus: - type: Azure - azure: - resourceGroupName: foo - resourceTags: - - {key: "key", value: "value"} - updated: | - apiVersion: config.openshift.io/v1 - kind: Infrastructure - spec: {} - status: - platform: Azure - platformStatus: - azure: - resourceGroupName: bar - resourceTags: - - {key: "key", value: "value"} - expected: | - apiVersion: config.openshift.io/v1 - kind: Infrastructure - spec: {} - status: - controlPlaneTopology: "HighlyAvailable" - infrastructureTopology: "HighlyAvailable" - platform: Azure - platformStatus: - azure: - resourceGroupName: bar - resourceTags: - - {key: "key", value: "value"} - - name: PowerVS platform status's resourceGroup length should not exceed the max length set - initial: | - apiVersion: config.openshift.io/v1 - kind: Infrastructure - spec: - platformSpec: - type: PowerVS - status: - platform: PowerVS - platformStatus: - powervs: - resourceGroup: resource-group - updated: | - apiVersion: config.openshift.io/v1 - kind: Infrastructure - spec: - platformSpec: - type: PowerVS - status: - platform: PowerVS - platformStatus: - powervs: - resourceGroup: resource-group-should-not-accept-the-string-that-exceeds-max-length-set - expectedStatusError: "status.platformStatus.powervs.resourceGroup: Too long: may not be longer than 40" - - name: PowerVS platform status's resourceGroup should match the regex configured - initial: | - apiVersion: config.openshift.io/v1 - kind: Infrastructure - spec: - platformSpec: - type: PowerVS - status: - platform: PowerVS - platformStatus: - powervs: - resourceGroup: resource-group - updated: | - apiVersion: config.openshift.io/v1 - kind: Infrastructure - spec: - platformSpec: - type: PowerVS - status: - platform: PowerVS - platformStatus: - powervs: - resourceGroup: re$ource-group - expectedStatusError: "status.platformStatus.powervs.resourceGroup in body should match '^[a-zA-Z0-9-_ ]+$'" - - name: Should not be able to change PowerVS platform status's resourceGroup once it was set - initial: | - apiVersion: config.openshift.io/v1 - kind: Infrastructure - spec: - platformSpec: - type: PowerVS - status: - platform: PowerVS - platformStatus: - powervs: - resourceGroup: resource-group - updated: | - apiVersion: config.openshift.io/v1 - kind: Infrastructure - spec: - platformSpec: - type: PowerVS - status: - platform: PowerVS - platformStatus: - powervs: - resourceGroup: other-resource-group-name - expectedStatusError: "status.platformStatus.powervs.resourceGroup: Invalid value: \"string\": resourceGroup is immutable once set" - - name: Should not be able to unset PowerVS platform status's resourceGroup once it was set - initial: | - apiVersion: config.openshift.io/v1 - kind: Infrastructure - spec: - platformSpec: - type: PowerVS - status: - platform: PowerVS - platformStatus: - powervs: - region: some-region - resourceGroup: resource-group - updated: | - apiVersion: config.openshift.io/v1 - kind: Infrastructure - spec: - platformSpec: - type: PowerVS - status: - platform: PowerVS - platformStatus: - powervs: - region: some-region - expectedStatusError: "status.platformStatus.powervs: Invalid value: \"object\": cannot unset resourceGroup once set" - - name: Should set load balancer type to OpenShiftManagedDefault if not specified - initial: | - apiVersion: config.openshift.io/v1 - kind: Infrastructure - spec: - platformSpec: - openstack: {} - type: OpenStack - updated: | - apiVersion: config.openshift.io/v1 - kind: Infrastructure - spec: - platformSpec: - openstack: {} - type: OpenStack - status: - platform: OpenStack - platformStatus: - openstack: {} - type: OpenStack - expected: | - apiVersion: config.openshift.io/v1 - kind: Infrastructure - spec: - platformSpec: - openstack: {} - type: OpenStack - status: - controlPlaneTopology: HighlyAvailable - infrastructureTopology: HighlyAvailable - platform: OpenStack - platformStatus: - openstack: - loadBalancer: - type: OpenShiftManagedDefault - type: OpenStack - - name: Should be able to override the default load balancer with a valid value - initial: | - apiVersion: config.openshift.io/v1 - kind: Infrastructure - spec: - platformSpec: - openstack: {} - type: OpenStack - updated: | - apiVersion: config.openshift.io/v1 - kind: Infrastructure - spec: - platformSpec: - openstack: {} - type: OpenStack - status: - platform: OpenStack - platformStatus: - openstack: - loadBalancer: - type: UserManaged - type: OpenStack - expected: | - apiVersion: config.openshift.io/v1 - kind: Infrastructure - spec: - platformSpec: - openstack: {} - type: OpenStack - status: - controlPlaneTopology: HighlyAvailable - infrastructureTopology: HighlyAvailable - platform: OpenStack - platformStatus: - openstack: - loadBalancer: - type: UserManaged - type: OpenStack - - name: Should not allow changing the immutable load balancer type field - initial: | - apiVersion: config.openshift.io/v1 - kind: Infrastructure - spec: - platformSpec: - openstack: {} - type: OpenStack - status: - controlPlaneTopology: HighlyAvailable - infrastructureTopology: HighlyAvailable - platform: OpenStack - platformStatus: - openstack: - loadBalancer: - type: OpenShiftManagedDefault - type: OpenStack - updated: | - apiVersion: config.openshift.io/v1 - kind: Infrastructure - spec: - platformSpec: - type: OpenStack - openstack: {} - status: - controlPlaneTopology: HighlyAvailable - infrastructureTopology: HighlyAvailable - platform: OpenStack - platformStatus: - openstack: - loadBalancer: - type: UserManaged - type: OpenStack - expectedStatusError: "status.platformStatus.openstack.loadBalancer.type: Invalid value: \"string\": type is immutable once set" - - name: Should not allow removing the immutable load balancer type field that was initially set - initial: | - apiVersion: config.openshift.io/v1 - kind: Infrastructure - spec: - platformSpec: - openstack: {} - type: OpenStack - status: - controlPlaneTopology: HighlyAvailable - infrastructureTopology: HighlyAvailable - platform: OpenStack - platformStatus: - openstack: - loadBalancer: - type: UserManaged - type: OpenStack - updated: | - apiVersion: config.openshift.io/v1 - kind: Infrastructure - spec: - platformSpec: - type: OpenStack - openstack: {} - status: - controlPlaneTopology: HighlyAvailable - infrastructureTopology: HighlyAvailable - platform: OpenStack - platformStatus: - openstack: {} - type: OpenStack - expectedStatusError: "status.platformStatus.openstack.loadBalancer.type: Invalid value: \"string\": type is immutable once set" - - name: Should not allow setting the load balancer type to a wrong value - initial: | - apiVersion: config.openshift.io/v1 - kind: Infrastructure - spec: - platformSpec: - openstack: {} - type: OpenStack - updated: | - apiVersion: config.openshift.io/v1 - kind: Infrastructure - spec: - platformSpec: - openstack: {} - type: OpenStack - status: - platform: OpenStack - platformStatus: - openstack: - loadBalancer: - type: FooBar - type: OpenStack - expectedStatusError: "status.platformStatus.openstack.loadBalancer.type: Unsupported value: \"FooBar\": supported values: \"OpenShiftManagedDefault\", \"UserManaged\"" diff --git a/vendor/github.com/openshift/api/config/v1/stable.ingress.testsuite.yaml b/vendor/github.com/openshift/api/config/v1/stable.ingress.testsuite.yaml deleted file mode 100644 index 90d48e896..000000000 --- a/vendor/github.com/openshift/api/config/v1/stable.ingress.testsuite.yaml +++ /dev/null @@ -1,14 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 # Hack because controller-gen complains if we don't have this -name: "[Stable] Ingress" -crd: 0000_10_config-operator_01_ingress.crd.yaml -tests: - onCreate: - - name: Should be able to create a minimal Ingress - initial: | - apiVersion: config.openshift.io/v1 - kind: Ingress - spec: {} # No spec is required for a Ingress - expected: | - apiVersion: config.openshift.io/v1 - kind: Ingress - spec: {} diff --git a/vendor/github.com/openshift/api/config/v1/stable.network.testsuite.yaml b/vendor/github.com/openshift/api/config/v1/stable.network.testsuite.yaml deleted file mode 100644 index e8a8bcfaf..000000000 --- a/vendor/github.com/openshift/api/config/v1/stable.network.testsuite.yaml +++ /dev/null @@ -1,14 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 # Hack because controller-gen complains if we don't have this -name: "[Stable] Network" -crd: 0000_10_config-operator_01_network.crd.yaml -tests: - onCreate: - - name: Should be able to create a minimal Network - initial: | - apiVersion: config.openshift.io/v1 - kind: Network - spec: {} # No spec is required for a Network - expected: | - apiVersion: config.openshift.io/v1 - kind: Network - spec: {} diff --git a/vendor/github.com/openshift/api/config/v1/stable.node.testsuite.yaml b/vendor/github.com/openshift/api/config/v1/stable.node.testsuite.yaml deleted file mode 100644 index d6502600b..000000000 --- a/vendor/github.com/openshift/api/config/v1/stable.node.testsuite.yaml +++ /dev/null @@ -1,14 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 # Hack because controller-gen complains if we don't have this -name: "[Stable] Node" -crd: 0000_10_config-operator_01_node.crd.yaml -tests: - onCreate: - - name: Should be able to create a minimal Node - initial: | - apiVersion: config.openshift.io/v1 - kind: Node - spec: {} # No spec is required for a Node - expected: | - apiVersion: config.openshift.io/v1 - kind: Node - spec: {} diff --git a/vendor/github.com/openshift/api/config/v1/stable.oauth.testsuite.yaml b/vendor/github.com/openshift/api/config/v1/stable.oauth.testsuite.yaml deleted file mode 100644 index d33d2bc1b..000000000 --- a/vendor/github.com/openshift/api/config/v1/stable.oauth.testsuite.yaml +++ /dev/null @@ -1,14 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 # Hack because controller-gen complains if we don't have this -name: "[Stable] OAuth" -crd: 0000_10_config-operator_01_oauth.crd.yaml -tests: - onCreate: - - name: Should be able to create a minimal OAuth - initial: | - apiVersion: config.openshift.io/v1 - kind: OAuth - spec: {} # No spec is required for a OAuth - expected: | - apiVersion: config.openshift.io/v1 - kind: OAuth - spec: {} diff --git a/vendor/github.com/openshift/api/config/v1/stable.operatorhub.testsuite.yaml b/vendor/github.com/openshift/api/config/v1/stable.operatorhub.testsuite.yaml deleted file mode 100644 index 9dd7a4c6d..000000000 --- a/vendor/github.com/openshift/api/config/v1/stable.operatorhub.testsuite.yaml +++ /dev/null @@ -1,14 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 # Hack because controller-gen complains if we don't have this -name: "[Stable] OperatorHub" -crd: 0000_03_marketplace-operator_01_operatorhub.crd.yaml -tests: - onCreate: - - name: Should be able to create a minimal OperatorHub - initial: | - apiVersion: config.openshift.io/v1 - kind: OperatorHub - spec: {} # No spec is required for a OperatorHub - expected: | - apiVersion: config.openshift.io/v1 - kind: OperatorHub - spec: {} diff --git a/vendor/github.com/openshift/api/config/v1/stable.project.testsuite.yaml b/vendor/github.com/openshift/api/config/v1/stable.project.testsuite.yaml deleted file mode 100644 index 0144ad32f..000000000 --- a/vendor/github.com/openshift/api/config/v1/stable.project.testsuite.yaml +++ /dev/null @@ -1,14 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 # Hack because controller-gen complains if we don't have this -name: "[Stable] Project" -crd: 0000_10_config-operator_01_project.crd.yaml -tests: - onCreate: - - name: Should be able to create a minimal Project - initial: | - apiVersion: config.openshift.io/v1 - kind: Project - spec: {} # No spec is required for a Project - expected: | - apiVersion: config.openshift.io/v1 - kind: Project - spec: {} diff --git a/vendor/github.com/openshift/api/config/v1/stable.proxy.testsuite.yaml b/vendor/github.com/openshift/api/config/v1/stable.proxy.testsuite.yaml deleted file mode 100644 index d49b83247..000000000 --- a/vendor/github.com/openshift/api/config/v1/stable.proxy.testsuite.yaml +++ /dev/null @@ -1,14 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 # Hack because controller-gen complains if we don't have this -name: "[Stable] Proxy" -crd: 0000_03_config-operator_01_proxy.crd.yaml -tests: - onCreate: - - name: Should be able to create a minimal Proxy - initial: | - apiVersion: config.openshift.io/v1 - kind: Proxy - spec: {} # No spec is required for a Proxy - expected: | - apiVersion: config.openshift.io/v1 - kind: Proxy - spec: {} diff --git a/vendor/github.com/openshift/api/config/v1/stable.scheduler.testsuite.yaml b/vendor/github.com/openshift/api/config/v1/stable.scheduler.testsuite.yaml deleted file mode 100644 index d9333b558..000000000 --- a/vendor/github.com/openshift/api/config/v1/stable.scheduler.testsuite.yaml +++ /dev/null @@ -1,14 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 # Hack because controller-gen complains if we don't have this -name: "[Stable] Scheduler" -crd: 0000_10_config-operator_01_scheduler.crd.yaml -tests: - onCreate: - - name: Should be able to create a minimal Scheduler - initial: | - apiVersion: config.openshift.io/v1 - kind: Scheduler - spec: {} # No spec is required for a Scheduler - expected: | - apiVersion: config.openshift.io/v1 - kind: Scheduler - spec: {} diff --git a/vendor/github.com/openshift/api/config/v1/stringsource.go b/vendor/github.com/openshift/api/config/v1/stringsource.go deleted file mode 100644 index 6a5718c1d..000000000 --- a/vendor/github.com/openshift/api/config/v1/stringsource.go +++ /dev/null @@ -1,31 +0,0 @@ -package v1 - -import "encoding/json" - -// UnmarshalJSON implements the json.Unmarshaller interface. -// If the value is a string, it sets the Value field of the StringSource. -// Otherwise, it is unmarshaled into the StringSourceSpec struct -func (s *StringSource) UnmarshalJSON(value []byte) error { - // If we can unmarshal to a simple string, just set the value - var simpleValue string - if err := json.Unmarshal(value, &simpleValue); err == nil { - s.Value = simpleValue - return nil - } - - // Otherwise do the full struct unmarshal - return json.Unmarshal(value, &s.StringSourceSpec) -} - -// MarshalJSON implements the json.Marshaller interface. -// If the StringSource contains only a string Value (or is empty), it is marshaled as a JSON string. -// Otherwise, the StringSourceSpec struct is marshaled as a JSON object. -func (s *StringSource) MarshalJSON() ([]byte, error) { - // If we have only a cleartext value set, do a simple string marshal - if s.StringSourceSpec == (StringSourceSpec{Value: s.Value}) { - return json.Marshal(s.Value) - } - - // Otherwise do the full struct marshal of the externalized bits - return json.Marshal(s.StringSourceSpec) -} diff --git a/vendor/github.com/openshift/api/config/v1/techpreview.apiserver.testsuite.yaml b/vendor/github.com/openshift/api/config/v1/techpreview.apiserver.testsuite.yaml deleted file mode 100644 index 74aa92b47..000000000 --- a/vendor/github.com/openshift/api/config/v1/techpreview.apiserver.testsuite.yaml +++ /dev/null @@ -1,35 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 # Hack because controller-gen complains if we don't have this -name: "[TechPreviewNoUpgrade] APIServer" -crd: 0000_10_config-operator_01_apiserver-TechPreviewNoUpgrade.crd.yaml -tests: - onCreate: - - name: Should be able to create encrypt with aescbc - initial: | - apiVersion: config.openshift.io/v1 - kind: APIServer - spec: - encryption: - type: aescbc - expected: | - apiVersion: config.openshift.io/v1 - kind: APIServer - spec: - audit: - profile: Default - encryption: - type: aescbc - - name: Should be able to create encrypt with aesgcm - initial: | - apiVersion: config.openshift.io/v1 - kind: APIServer - spec: - encryption: - type: aesgcm - expected: | - apiVersion: config.openshift.io/v1 - kind: APIServer - spec: - audit: - profile: Default - encryption: - type: aesgcm diff --git a/vendor/github.com/openshift/api/config/v1/techpreview.infrastructure.testsuite.yaml b/vendor/github.com/openshift/api/config/v1/techpreview.infrastructure.testsuite.yaml deleted file mode 100644 index f9829b9a3..000000000 --- a/vendor/github.com/openshift/api/config/v1/techpreview.infrastructure.testsuite.yaml +++ /dev/null @@ -1,213 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 # Hack because controller-gen complains if we don't have this -name: "[TechPreviewNoUpgrade] Infrastructure" -crd: 0000_10_config-operator_01_infrastructure-TechPreviewNoUpgrade.crd.yaml -tests: - onCreate: - - name: Should be able to create a minimal Infrastructure - initial: | - apiVersion: config.openshift.io/v1 - kind: Infrastructure - spec: {} # No spec is required for a Infrastructure - expected: | - apiVersion: config.openshift.io/v1 - kind: Infrastructure - spec: {} - onUpdate: - - name: Status Should contain default fields - initial: | - apiVersion: config.openshift.io/v1 - kind: Infrastructure - spec: {} - status: {} - updated: | - apiVersion: config.openshift.io/v1 - kind: Infrastructure - spec: {} - status: {} - expected: | - apiVersion: config.openshift.io/v1 - kind: Infrastructure - spec: {} - status: - cpuPartitioning: None - infrastructureTopology: HighlyAvailable - controlPlaneTopology: HighlyAvailable - - name: Status update cpuPartitioning should fail validation check - initial: | - apiVersion: config.openshift.io/v1 - kind: Infrastructure - spec: {} - status: - cpuPartitioning: None - updated: | - apiVersion: config.openshift.io/v1 - kind: Infrastructure - spec: {} - status: - cpuPartitioning: "Invalid" - expectedStatusError: 'status.cpuPartitioning: Unsupported value: "Invalid": supported values: "None", "AllNodes"' - - name: Should set load balancer type to OpenShiftManagedDefault if not specified - initial: | - apiVersion: config.openshift.io/v1 - kind: Infrastructure - spec: - platformSpec: - baremetal: {} - type: BareMetal - updated: | - apiVersion: config.openshift.io/v1 - kind: Infrastructure - spec: - platformSpec: - baremetal: {} - type: BareMetal - status: - platform: BareMetal - platformStatus: - baremetal: {} - type: BareMetal - expected: | - apiVersion: config.openshift.io/v1 - kind: Infrastructure - spec: - platformSpec: - baremetal: {} - type: BareMetal - status: - controlPlaneTopology: HighlyAvailable - cpuPartitioning: None - infrastructureTopology: HighlyAvailable - platform: BareMetal - platformStatus: - baremetal: - loadBalancer: - type: OpenShiftManagedDefault - type: BareMetal - - name: Should be able to override the default load balancer with a valid value - initial: | - apiVersion: config.openshift.io/v1 - kind: Infrastructure - spec: - platformSpec: - baremetal: {} - type: BareMetal - updated: | - apiVersion: config.openshift.io/v1 - kind: Infrastructure - spec: - platformSpec: - baremetal: {} - type: BareMetal - status: - platform: BareMetal - platformStatus: - baremetal: - loadBalancer: - type: UserManaged - type: BareMetal - expected: | - apiVersion: config.openshift.io/v1 - kind: Infrastructure - spec: - platformSpec: - baremetal: {} - type: BareMetal - status: - controlPlaneTopology: HighlyAvailable - cpuPartitioning: None - infrastructureTopology: HighlyAvailable - platform: BareMetal - platformStatus: - baremetal: - loadBalancer: - type: UserManaged - type: BareMetal - - name: Should not allow changing the immutable load balancer type field - initial: | - apiVersion: config.openshift.io/v1 - kind: Infrastructure - spec: - platformSpec: - baremetal: {} - type: BareMetal - status: - controlPlaneTopology: HighlyAvailable - infrastructureTopology: HighlyAvailable - platform: BareMetal - platformStatus: - baremetal: - loadBalancer: - type: OpenShiftManagedDefault - type: BareMetal - updated: | - apiVersion: config.openshift.io/v1 - kind: Infrastructure - spec: - platformSpec: - type: BareMetal - baremetal: {} - status: - controlPlaneTopology: HighlyAvailable - infrastructureTopology: HighlyAvailable - platform: BareMetal - platformStatus: - baremetal: - loadBalancer: - type: UserManaged - type: BareMetal - expectedStatusError: "status.platformStatus.baremetal.loadBalancer.type: Invalid value: \"string\": type is immutable once set" - - name: Should not allow removing the immutable load balancer type field that was initially set - initial: | - apiVersion: config.openshift.io/v1 - kind: Infrastructure - spec: - platformSpec: - baremetal: {} - type: BareMetal - status: - controlPlaneTopology: HighlyAvailable - infrastructureTopology: HighlyAvailable - platform: BareMetal - platformStatus: - baremetal: - loadBalancer: - type: UserManaged - type: BareMetal - updated: | - apiVersion: config.openshift.io/v1 - kind: Infrastructure - spec: - platformSpec: - type: BareMetal - baremetal: {} - status: - controlPlaneTopology: HighlyAvailable - infrastructureTopology: HighlyAvailable - platform: BareMetal - platformStatus: - baremetal: {} - type: BareMetal - expectedStatusError: "status.platformStatus.baremetal.loadBalancer.type: Invalid value: \"string\": type is immutable once set" - - name: Should not allow setting the load balancer type to a wrong value - initial: | - apiVersion: config.openshift.io/v1 - kind: Infrastructure - spec: - platformSpec: - baremetal: {} - type: BareMetal - updated: | - apiVersion: config.openshift.io/v1 - kind: Infrastructure - spec: - platformSpec: - baremetal: {} - type: BareMetal - status: - platform: BareMetal - platformStatus: - baremetal: - loadBalancer: - type: FooBar - type: BareMetal - expectedStatusError: "status.platformStatus.baremetal.loadBalancer.type: Unsupported value: \"FooBar\": supported values: \"OpenShiftManagedDefault\", \"UserManaged\"" diff --git a/vendor/github.com/openshift/api/config/v1/types.go b/vendor/github.com/openshift/api/config/v1/types.go deleted file mode 100644 index 56d00648e..000000000 --- a/vendor/github.com/openshift/api/config/v1/types.go +++ /dev/null @@ -1,400 +0,0 @@ -package v1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" -) - -// ConfigMapFileReference references a config map in a specific namespace. -// The namespace must be specified at the point of use. -type ConfigMapFileReference struct { - Name string `json:"name"` - // Key allows pointing to a specific key/value inside of the configmap. This is useful for logical file references. - Key string `json:"key,omitempty"` -} - -// ConfigMapNameReference references a config map in a specific namespace. -// The namespace must be specified at the point of use. -type ConfigMapNameReference struct { - // name is the metadata.name of the referenced config map - // +kubebuilder:validation:Required - // +required - Name string `json:"name"` -} - -// SecretNameReference references a secret in a specific namespace. -// The namespace must be specified at the point of use. -type SecretNameReference struct { - // name is the metadata.name of the referenced secret - // +kubebuilder:validation:Required - // +required - Name string `json:"name"` -} - -// HTTPServingInfo holds configuration for serving HTTP -type HTTPServingInfo struct { - // ServingInfo is the HTTP serving information - ServingInfo `json:",inline"` - // MaxRequestsInFlight is the number of concurrent requests allowed to the server. If zero, no limit. - MaxRequestsInFlight int64 `json:"maxRequestsInFlight"` - // RequestTimeoutSeconds is the number of seconds before requests are timed out. The default is 60 minutes, if - // -1 there is no limit on requests. - RequestTimeoutSeconds int64 `json:"requestTimeoutSeconds"` -} - -// ServingInfo holds information about serving web pages -type ServingInfo struct { - // BindAddress is the ip:port to serve on - BindAddress string `json:"bindAddress"` - // BindNetwork is the type of network to bind to - defaults to "tcp4", accepts "tcp", - // "tcp4", and "tcp6" - BindNetwork string `json:"bindNetwork"` - // CertInfo is the TLS cert info for serving secure traffic. - // this is anonymous so that we can inline it for serialization - CertInfo `json:",inline"` - // ClientCA is the certificate bundle for all the signers that you'll recognize for incoming client certificates - // +optional - ClientCA string `json:"clientCA,omitempty"` - // NamedCertificates is a list of certificates to use to secure requests to specific hostnames - NamedCertificates []NamedCertificate `json:"namedCertificates,omitempty"` - // MinTLSVersion is the minimum TLS version supported. - // Values must match version names from https://golang.org/pkg/crypto/tls/#pkg-constants - MinTLSVersion string `json:"minTLSVersion,omitempty"` - // CipherSuites contains an overridden list of ciphers for the server to support. - // Values must match cipher suite IDs from https://golang.org/pkg/crypto/tls/#pkg-constants - CipherSuites []string `json:"cipherSuites,omitempty"` -} - -// CertInfo relates a certificate with a private key -type CertInfo struct { - // CertFile is a file containing a PEM-encoded certificate - CertFile string `json:"certFile"` - // KeyFile is a file containing a PEM-encoded private key for the certificate specified by CertFile - KeyFile string `json:"keyFile"` -} - -// NamedCertificate specifies a certificate/key, and the names it should be served for -type NamedCertificate struct { - // Names is a list of DNS names this certificate should be used to secure - // A name can be a normal DNS name, or can contain leading wildcard segments. - Names []string `json:"names,omitempty"` - // CertInfo is the TLS cert info for serving secure traffic - CertInfo `json:",inline"` -} - -// LeaderElection provides information to elect a leader -type LeaderElection struct { - // disable allows leader election to be suspended while allowing a fully defaulted "normal" startup case. - Disable bool `json:"disable,omitempty"` - // namespace indicates which namespace the resource is in - Namespace string `json:"namespace,omitempty"` - // name indicates what name to use for the resource - Name string `json:"name,omitempty"` - - // leaseDuration is the duration that non-leader candidates will wait - // after observing a leadership renewal until attempting to acquire - // leadership of a led but unrenewed leader slot. This is effectively the - // maximum duration that a leader can be stopped before it is replaced - // by another candidate. This is only applicable if leader election is - // enabled. - // +nullable - LeaseDuration metav1.Duration `json:"leaseDuration"` - // renewDeadline is the interval between attempts by the acting master to - // renew a leadership slot before it stops leading. This must be less - // than or equal to the lease duration. This is only applicable if leader - // election is enabled. - // +nullable - RenewDeadline metav1.Duration `json:"renewDeadline"` - // retryPeriod is the duration the clients should wait between attempting - // acquisition and renewal of a leadership. This is only applicable if - // leader election is enabled. - // +nullable - RetryPeriod metav1.Duration `json:"retryPeriod"` -} - -// StringSource allows specifying a string inline, or externally via env var or file. -// When it contains only a string value, it marshals to a simple JSON string. -type StringSource struct { - // StringSourceSpec specifies the string value, or external location - StringSourceSpec `json:",inline"` -} - -// StringSourceSpec specifies a string value, or external location -type StringSourceSpec struct { - // Value specifies the cleartext value, or an encrypted value if keyFile is specified. - Value string `json:"value"` - - // Env specifies an envvar containing the cleartext value, or an encrypted value if the keyFile is specified. - Env string `json:"env"` - - // File references a file containing the cleartext value, or an encrypted value if a keyFile is specified. - File string `json:"file"` - - // KeyFile references a file containing the key to use to decrypt the value. - KeyFile string `json:"keyFile"` -} - -// RemoteConnectionInfo holds information necessary for establishing a remote connection -type RemoteConnectionInfo struct { - // URL is the remote URL to connect to - URL string `json:"url"` - // CA is the CA for verifying TLS connections - CA string `json:"ca"` - // CertInfo is the TLS client cert information to present - // this is anonymous so that we can inline it for serialization - CertInfo `json:",inline"` -} - -type AdmissionConfig struct { - PluginConfig map[string]AdmissionPluginConfig `json:"pluginConfig,omitempty"` - - // enabledPlugins is a list of admission plugins that must be on in addition to the default list. - // Some admission plugins are disabled by default, but certain configurations require them. This is fairly uncommon - // and can result in performance penalties and unexpected behavior. - EnabledAdmissionPlugins []string `json:"enabledPlugins,omitempty"` - - // disabledPlugins is a list of admission plugins that must be off. Putting something in this list - // is almost always a mistake and likely to result in cluster instability. - DisabledAdmissionPlugins []string `json:"disabledPlugins,omitempty"` -} - -// AdmissionPluginConfig holds the necessary configuration options for admission plugins -type AdmissionPluginConfig struct { - // Location is the path to a configuration file that contains the plugin's - // configuration - Location string `json:"location"` - - // Configuration is an embedded configuration object to be used as the plugin's - // configuration. If present, it will be used instead of the path to the configuration file. - // +nullable - // +kubebuilder:pruning:PreserveUnknownFields - Configuration runtime.RawExtension `json:"configuration"` -} - -type LogFormatType string - -type WebHookModeType string - -const ( - // LogFormatLegacy saves event in 1-line text format. - LogFormatLegacy LogFormatType = "legacy" - // LogFormatJson saves event in structured json format. - LogFormatJson LogFormatType = "json" - - // WebHookModeBatch indicates that the webhook should buffer audit events - // internally, sending batch updates either once a certain number of - // events have been received or a certain amount of time has passed. - WebHookModeBatch WebHookModeType = "batch" - // WebHookModeBlocking causes the webhook to block on every attempt to process - // a set of events. This causes requests to the API server to wait for a - // round trip to the external audit service before sending a response. - WebHookModeBlocking WebHookModeType = "blocking" -) - -// AuditConfig holds configuration for the audit capabilities -type AuditConfig struct { - // If this flag is set, audit log will be printed in the logs. - // The logs contains, method, user and a requested URL. - Enabled bool `json:"enabled"` - // All requests coming to the apiserver will be logged to this file. - AuditFilePath string `json:"auditFilePath"` - // Maximum number of days to retain old log files based on the timestamp encoded in their filename. - MaximumFileRetentionDays int32 `json:"maximumFileRetentionDays"` - // Maximum number of old log files to retain. - MaximumRetainedFiles int32 `json:"maximumRetainedFiles"` - // Maximum size in megabytes of the log file before it gets rotated. Defaults to 100MB. - MaximumFileSizeMegabytes int32 `json:"maximumFileSizeMegabytes"` - - // PolicyFile is a path to the file that defines the audit policy configuration. - PolicyFile string `json:"policyFile"` - // PolicyConfiguration is an embedded policy configuration object to be used - // as the audit policy configuration. If present, it will be used instead of - // the path to the policy file. - // +nullable - // +kubebuilder:pruning:PreserveUnknownFields - PolicyConfiguration runtime.RawExtension `json:"policyConfiguration"` - - // Format of saved audits (legacy or json). - LogFormat LogFormatType `json:"logFormat"` - - // Path to a .kubeconfig formatted file that defines the audit webhook configuration. - WebHookKubeConfig string `json:"webHookKubeConfig"` - // Strategy for sending audit events (block or batch). - WebHookMode WebHookModeType `json:"webHookMode"` -} - -// EtcdConnectionInfo holds information necessary for connecting to an etcd server -type EtcdConnectionInfo struct { - // URLs are the URLs for etcd - URLs []string `json:"urls,omitempty"` - // CA is a file containing trusted roots for the etcd server certificates - CA string `json:"ca"` - // CertInfo is the TLS client cert information for securing communication to etcd - // this is anonymous so that we can inline it for serialization - CertInfo `json:",inline"` -} - -type EtcdStorageConfig struct { - EtcdConnectionInfo `json:",inline"` - - // StoragePrefix is the path within etcd that the OpenShift resources will - // be rooted under. This value, if changed, will mean existing objects in etcd will - // no longer be located. - StoragePrefix string `json:"storagePrefix"` -} - -// GenericAPIServerConfig is an inline-able struct for aggregated apiservers that need to store data in etcd -type GenericAPIServerConfig struct { - // servingInfo describes how to start serving - ServingInfo HTTPServingInfo `json:"servingInfo"` - - // corsAllowedOrigins - CORSAllowedOrigins []string `json:"corsAllowedOrigins"` - - // auditConfig describes how to configure audit information - AuditConfig AuditConfig `json:"auditConfig"` - - // storageConfig contains information about how to use - StorageConfig EtcdStorageConfig `json:"storageConfig"` - - // admissionConfig holds information about how to configure admission. - AdmissionConfig AdmissionConfig `json:"admission"` - - KubeClientConfig KubeClientConfig `json:"kubeClientConfig"` -} - -type KubeClientConfig struct { - // kubeConfig is a .kubeconfig filename for going to the owning kube-apiserver. Empty uses an in-cluster-config - KubeConfig string `json:"kubeConfig"` - - // connectionOverrides specifies client overrides for system components to loop back to this master. - ConnectionOverrides ClientConnectionOverrides `json:"connectionOverrides"` -} - -type ClientConnectionOverrides struct { - // acceptContentTypes defines the Accept header sent by clients when connecting to a server, overriding the - // default value of 'application/json'. This field will control all connections to the server used by a particular - // client. - AcceptContentTypes string `json:"acceptContentTypes"` - // contentType is the content type used when sending data to the server from this client. - ContentType string `json:"contentType"` - - // qps controls the number of queries per second allowed for this connection. - QPS float32 `json:"qps"` - // burst allows extra queries to accumulate when a client is exceeding its rate. - Burst int32 `json:"burst"` -} - -// GenericControllerConfig provides information to configure a controller -type GenericControllerConfig struct { - // ServingInfo is the HTTP serving information for the controller's endpoints - ServingInfo HTTPServingInfo `json:"servingInfo"` - - // leaderElection provides information to elect a leader. Only override this if you have a specific need - LeaderElection LeaderElection `json:"leaderElection"` - - // authentication allows configuration of authentication for the endpoints - Authentication DelegatedAuthentication `json:"authentication"` - // authorization allows configuration of authentication for the endpoints - Authorization DelegatedAuthorization `json:"authorization"` -} - -// DelegatedAuthentication allows authentication to be disabled. -type DelegatedAuthentication struct { - // disabled indicates that authentication should be disabled. By default it will use delegated authentication. - Disabled bool `json:"disabled,omitempty"` -} - -// DelegatedAuthorization allows authorization to be disabled. -type DelegatedAuthorization struct { - // disabled indicates that authorization should be disabled. By default it will use delegated authorization. - Disabled bool `json:"disabled,omitempty"` -} -type RequiredHSTSPolicy struct { - // namespaceSelector specifies a label selector such that the policy applies only to those routes that - // are in namespaces with labels that match the selector, and are in one of the DomainPatterns. - // Defaults to the empty LabelSelector, which matches everything. - // +optional - NamespaceSelector *metav1.LabelSelector `json:"namespaceSelector,omitempty"` - - // domainPatterns is a list of domains for which the desired HSTS annotations are required. - // If domainPatterns is specified and a route is created with a spec.host matching one of the domains, - // the route must specify the HSTS Policy components described in the matching RequiredHSTSPolicy. - // - // The use of wildcards is allowed like this: *.foo.com matches everything under foo.com. - // foo.com only matches foo.com, so to cover foo.com and everything under it, you must specify *both*. - // +kubebuilder:validation:MinItems=1 - // +kubebuilder:validation:Required - // +required - DomainPatterns []string `json:"domainPatterns"` - - // maxAge is the delta time range in seconds during which hosts are regarded as HSTS hosts. - // If set to 0, it negates the effect, and hosts are removed as HSTS hosts. - // If set to 0 and includeSubdomains is specified, all subdomains of the host are also removed as HSTS hosts. - // maxAge is a time-to-live value, and if this policy is not refreshed on a client, the HSTS - // policy will eventually expire on that client. - MaxAge MaxAgePolicy `json:"maxAge"` - - // preloadPolicy directs the client to include hosts in its host preload list so that - // it never needs to do an initial load to get the HSTS header (note that this is not defined - // in RFC 6797 and is therefore client implementation-dependent). - // +optional - PreloadPolicy PreloadPolicy `json:"preloadPolicy,omitempty"` - - // includeSubDomainsPolicy means the HSTS Policy should apply to any subdomains of the host's - // domain name. Thus, for the host bar.foo.com, if includeSubDomainsPolicy was set to RequireIncludeSubDomains: - // - the host app.bar.foo.com would inherit the HSTS Policy of bar.foo.com - // - the host bar.foo.com would inherit the HSTS Policy of bar.foo.com - // - the host foo.com would NOT inherit the HSTS Policy of bar.foo.com - // - the host def.foo.com would NOT inherit the HSTS Policy of bar.foo.com - // +optional - IncludeSubDomainsPolicy IncludeSubDomainsPolicy `json:"includeSubDomainsPolicy,omitempty"` -} - -// MaxAgePolicy contains a numeric range for specifying a compliant HSTS max-age for the enclosing RequiredHSTSPolicy -type MaxAgePolicy struct { - // The largest allowed value (in seconds) of the RequiredHSTSPolicy max-age - // This value can be left unspecified, in which case no upper limit is enforced. - // +kubebuilder:validation:Minimum=0 - // +kubebuilder:validation:Maximum=2147483647 - LargestMaxAge *int32 `json:"largestMaxAge,omitempty"` - - // The smallest allowed value (in seconds) of the RequiredHSTSPolicy max-age - // Setting max-age=0 allows the deletion of an existing HSTS header from a host. This is a necessary - // tool for administrators to quickly correct mistakes. - // This value can be left unspecified, in which case no lower limit is enforced. - // +kubebuilder:validation:Minimum=0 - // +kubebuilder:validation:Maximum=2147483647 - SmallestMaxAge *int32 `json:"smallestMaxAge,omitempty"` -} - -// PreloadPolicy contains a value for specifying a compliant HSTS preload policy for the enclosing RequiredHSTSPolicy -// +kubebuilder:validation:Enum=RequirePreload;RequireNoPreload;NoOpinion -type PreloadPolicy string - -const ( - // RequirePreloadPolicy means HSTS "preload" is required by the RequiredHSTSPolicy - RequirePreloadPolicy PreloadPolicy = "RequirePreload" - - // RequireNoPreloadPolicy means HSTS "preload" is forbidden by the RequiredHSTSPolicy - RequireNoPreloadPolicy PreloadPolicy = "RequireNoPreload" - - // NoOpinionPreloadPolicy means HSTS "preload" doesn't matter to the RequiredHSTSPolicy - NoOpinionPreloadPolicy PreloadPolicy = "NoOpinion" -) - -// IncludeSubDomainsPolicy contains a value for specifying a compliant HSTS includeSubdomains policy -// for the enclosing RequiredHSTSPolicy -// +kubebuilder:validation:Enum=RequireIncludeSubDomains;RequireNoIncludeSubDomains;NoOpinion -type IncludeSubDomainsPolicy string - -const ( - // RequireIncludeSubDomains means HSTS "includeSubDomains" is required by the RequiredHSTSPolicy - RequireIncludeSubDomains IncludeSubDomainsPolicy = "RequireIncludeSubDomains" - - // RequireNoIncludeSubDomains means HSTS "includeSubDomains" is forbidden by the RequiredHSTSPolicy - RequireNoIncludeSubDomains IncludeSubDomainsPolicy = "RequireNoIncludeSubDomains" - - // NoOpinionIncludeSubDomains means HSTS "includeSubDomains" doesn't matter to the RequiredHSTSPolicy - NoOpinionIncludeSubDomains IncludeSubDomainsPolicy = "NoOpinion" -) diff --git a/vendor/github.com/openshift/api/config/v1/types_apiserver.go b/vendor/github.com/openshift/api/config/v1/types_apiserver.go deleted file mode 100644 index 5d18860c3..000000000 --- a/vendor/github.com/openshift/api/config/v1/types_apiserver.go +++ /dev/null @@ -1,221 +0,0 @@ -package v1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// +genclient -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// APIServer holds configuration (like serving certificates, client CA and CORS domains) -// shared by all API servers in the system, among them especially kube-apiserver -// and openshift-apiserver. The canonical name of an instance is 'cluster'. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type APIServer struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata,omitempty"` - // spec holds user settable values for configuration - // +kubebuilder:validation:Required - // +required - Spec APIServerSpec `json:"spec"` - // status holds observed values from the cluster. They may not be overridden. - // +optional - Status APIServerStatus `json:"status"` -} - -type APIServerSpec struct { - // servingCert is the TLS cert info for serving secure traffic. If not specified, operator managed certificates - // will be used for serving secure traffic. - // +optional - ServingCerts APIServerServingCerts `json:"servingCerts"` - // clientCA references a ConfigMap containing a certificate bundle for the signers that will be recognized for - // incoming client certificates in addition to the operator managed signers. If this is empty, then only operator managed signers are valid. - // You usually only have to set this if you have your own PKI you wish to honor client certificates from. - // The ConfigMap must exist in the openshift-config namespace and contain the following required fields: - // - ConfigMap.Data["ca-bundle.crt"] - CA bundle. - // +optional - ClientCA ConfigMapNameReference `json:"clientCA"` - // additionalCORSAllowedOrigins lists additional, user-defined regular expressions describing hosts for which the - // API server allows access using the CORS headers. This may be needed to access the API and the integrated OAuth - // server from JavaScript applications. - // The values are regular expressions that correspond to the Golang regular expression language. - // +optional - AdditionalCORSAllowedOrigins []string `json:"additionalCORSAllowedOrigins,omitempty"` - // encryption allows the configuration of encryption of resources at the datastore layer. - // +optional - Encryption APIServerEncryption `json:"encryption"` - // tlsSecurityProfile specifies settings for TLS connections for externally exposed servers. - // - // If unset, a default (which may change between releases) is chosen. Note that only Old, - // Intermediate and Custom profiles are currently supported, and the maximum available - // MinTLSVersions is VersionTLS12. - // +optional - TLSSecurityProfile *TLSSecurityProfile `json:"tlsSecurityProfile,omitempty"` - // audit specifies the settings for audit configuration to be applied to all OpenShift-provided - // API servers in the cluster. - // +optional - // +kubebuilder:default={profile: Default} - Audit Audit `json:"audit"` -} - -// AuditProfileType defines the audit policy profile type. -// +kubebuilder:validation:Enum=Default;WriteRequestBodies;AllRequestBodies;None -type AuditProfileType string - -const ( - // "None" disables audit logs. - NoneAuditProfileType AuditProfileType = "None" - - // "Default" is the existing default audit configuration policy. - DefaultAuditProfileType AuditProfileType = "Default" - - // "WriteRequestBodies" is similar to Default but it logs request and response - // HTTP payloads for write requests (create, update, patch) - WriteRequestBodiesAuditProfileType AuditProfileType = "WriteRequestBodies" - - // "AllRequestBodies" is similar to WriteRequestBodies, but also logs request - // and response HTTP payloads for read requests (get, list). - AllRequestBodiesAuditProfileType AuditProfileType = "AllRequestBodies" -) - -type Audit struct { - // profile specifies the name of the desired top-level audit profile to be applied to all requests - // sent to any of the OpenShift-provided API servers in the cluster (kube-apiserver, - // openshift-apiserver and oauth-apiserver), with the exception of those requests that match - // one or more of the customRules. - // - // The following profiles are provided: - // - Default: default policy which means MetaData level logging with the exception of events - // (not logged at all), oauthaccesstokens and oauthauthorizetokens (both logged at RequestBody - // level). - // - WriteRequestBodies: like 'Default', but logs request and response HTTP payloads for - // write requests (create, update, patch). - // - AllRequestBodies: like 'WriteRequestBodies', but also logs request and response - // HTTP payloads for read requests (get, list). - // - None: no requests are logged at all, not even oauthaccesstokens and oauthauthorizetokens. - // - // Warning: It is not recommended to disable audit logging by using the `None` profile unless you - // are fully aware of the risks of not logging data that can be beneficial when troubleshooting issues. - // If you disable audit logging and a support situation arises, you might need to enable audit logging - // and reproduce the issue in order to troubleshoot properly. - // - // If unset, the 'Default' profile is used as the default. - // - // +kubebuilder:default=Default - Profile AuditProfileType `json:"profile,omitempty"` - // customRules specify profiles per group. These profile take precedence over the - // top-level profile field if they apply. They are evaluation from top to bottom and - // the first one that matches, applies. - // +listType=map - // +listMapKey=group - // +optional - CustomRules []AuditCustomRule `json:"customRules,omitempty"` -} - -// AuditCustomRule describes a custom rule for an audit profile that takes precedence over -// the top-level profile. -type AuditCustomRule struct { - // group is a name of group a request user must be member of in order to this profile to apply. - // - // +kubebuilder:validation:Required - // +kubebuilder:validation:MinLength=1 - // +required - Group string `json:"group"` - // profile specifies the name of the desired audit policy configuration to be deployed to - // all OpenShift-provided API servers in the cluster. - // - // The following profiles are provided: - // - Default: the existing default policy. - // - WriteRequestBodies: like 'Default', but logs request and response HTTP payloads for - // write requests (create, update, patch). - // - AllRequestBodies: like 'WriteRequestBodies', but also logs request and response - // HTTP payloads for read requests (get, list). - // - None: no requests are logged at all, not even oauthaccesstokens and oauthauthorizetokens. - // - // If unset, the 'Default' profile is used as the default. - // - // +kubebuilder:validation:Required - // +required - Profile AuditProfileType `json:"profile,omitempty"` -} - -type APIServerServingCerts struct { - // namedCertificates references secrets containing the TLS cert info for serving secure traffic to specific hostnames. - // If no named certificates are provided, or no named certificates match the server name as understood by a client, - // the defaultServingCertificate will be used. - // +optional - NamedCertificates []APIServerNamedServingCert `json:"namedCertificates,omitempty"` -} - -// APIServerNamedServingCert maps a server DNS name, as understood by a client, to a certificate. -type APIServerNamedServingCert struct { - // names is a optional list of explicit DNS names (leading wildcards allowed) that should use this certificate to - // serve secure traffic. If no names are provided, the implicit names will be extracted from the certificates. - // Exact names trump over wildcard names. Explicit names defined here trump over extracted implicit names. - // +optional - Names []string `json:"names,omitempty"` - // servingCertificate references a kubernetes.io/tls type secret containing the TLS cert info for serving secure traffic. - // The secret must exist in the openshift-config namespace and contain the following required fields: - // - Secret.Data["tls.key"] - TLS private key. - // - Secret.Data["tls.crt"] - TLS certificate. - ServingCertificate SecretNameReference `json:"servingCertificate"` -} - -type APIServerEncryption struct { - // type defines what encryption type should be used to encrypt resources at the datastore layer. - // When this field is unset (i.e. when it is set to the empty string), identity is implied. - // The behavior of unset can and will change over time. Even if encryption is enabled by default, - // the meaning of unset may change to a different encryption type based on changes in best practices. - // - // When encryption is enabled, all sensitive resources shipped with the platform are encrypted. - // This list of sensitive resources can and will change over time. The current authoritative list is: - // - // 1. secrets - // 2. configmaps - // 3. routes.route.openshift.io - // 4. oauthaccesstokens.oauth.openshift.io - // 5. oauthauthorizetokens.oauth.openshift.io - // - // +unionDiscriminator - // +optional - Type EncryptionType `json:"type,omitempty"` -} - -// +kubebuilder:validation:Enum="";identity;aescbc;aesgcm -type EncryptionType string - -const ( - // identity refers to a type where no encryption is performed at the datastore layer. - // Resources are written as-is without encryption. - EncryptionTypeIdentity EncryptionType = "identity" - - // aescbc refers to a type where AES-CBC with PKCS#7 padding and a 32-byte key - // is used to perform encryption at the datastore layer. - EncryptionTypeAESCBC EncryptionType = "aescbc" - - // aesgcm refers to a type where AES-GCM with random nonce and a 32-byte key - // is used to perform encryption at the datastore layer. - EncryptionTypeAESGCM EncryptionType = "aesgcm" -) - -type APIServerStatus struct { -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type APIServerList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata"` - Items []APIServer `json:"items"` -} diff --git a/vendor/github.com/openshift/api/config/v1/types_authentication.go b/vendor/github.com/openshift/api/config/v1/types_authentication.go deleted file mode 100644 index dd2ef6e0a..000000000 --- a/vendor/github.com/openshift/api/config/v1/types_authentication.go +++ /dev/null @@ -1,161 +0,0 @@ -package v1 - -import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - -// +genclient -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// Authentication specifies cluster-wide settings for authentication (like OAuth and -// webhook token authenticators). The canonical name of an instance is `cluster`. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type Authentication struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata,omitempty"` - - // spec holds user settable values for configuration - // +kubebuilder:validation:Required - // +required - Spec AuthenticationSpec `json:"spec"` - // status holds observed values from the cluster. They may not be overridden. - // +optional - Status AuthenticationStatus `json:"status"` -} - -type AuthenticationSpec struct { - // type identifies the cluster managed, user facing authentication mode in use. - // Specifically, it manages the component that responds to login attempts. - // The default is IntegratedOAuth. - // +optional - Type AuthenticationType `json:"type"` - - // oauthMetadata contains the discovery endpoint data for OAuth 2.0 - // Authorization Server Metadata for an external OAuth server. - // This discovery document can be viewed from its served location: - // oc get --raw '/.well-known/oauth-authorization-server' - // For further details, see the IETF Draft: - // https://tools.ietf.org/html/draft-ietf-oauth-discovery-04#section-2 - // If oauthMetadata.name is non-empty, this value has precedence - // over any metadata reference stored in status. - // The key "oauthMetadata" is used to locate the data. - // If specified and the config map or expected key is not found, no metadata is served. - // If the specified metadata is not valid, no metadata is served. - // The namespace for this config map is openshift-config. - // +optional - OAuthMetadata ConfigMapNameReference `json:"oauthMetadata"` - - // webhookTokenAuthenticators is DEPRECATED, setting it has no effect. - WebhookTokenAuthenticators []DeprecatedWebhookTokenAuthenticator `json:"webhookTokenAuthenticators,omitempty"` - - // webhookTokenAuthenticator configures a remote token reviewer. - // These remote authentication webhooks can be used to verify bearer tokens - // via the tokenreviews.authentication.k8s.io REST API. This is required to - // honor bearer tokens that are provisioned by an external authentication service. - // +optional - WebhookTokenAuthenticator *WebhookTokenAuthenticator `json:"webhookTokenAuthenticator,omitempty"` - - // serviceAccountIssuer is the identifier of the bound service account token - // issuer. - // The default is https://kubernetes.default.svc - // WARNING: Updating this field will not result in immediate invalidation of all bound tokens with the - // previous issuer value. Instead, the tokens issued by previous service account issuer will continue to - // be trusted for a time period chosen by the platform (currently set to 24h). - // This time period is subject to change over time. - // This allows internal components to transition to use new service account issuer without service distruption. - // +optional - ServiceAccountIssuer string `json:"serviceAccountIssuer"` -} - -type AuthenticationStatus struct { - // integratedOAuthMetadata contains the discovery endpoint data for OAuth 2.0 - // Authorization Server Metadata for the in-cluster integrated OAuth server. - // This discovery document can be viewed from its served location: - // oc get --raw '/.well-known/oauth-authorization-server' - // For further details, see the IETF Draft: - // https://tools.ietf.org/html/draft-ietf-oauth-discovery-04#section-2 - // This contains the observed value based on cluster state. - // An explicitly set value in spec.oauthMetadata has precedence over this field. - // This field has no meaning if authentication spec.type is not set to IntegratedOAuth. - // The key "oauthMetadata" is used to locate the data. - // If the config map or expected key is not found, no metadata is served. - // If the specified metadata is not valid, no metadata is served. - // The namespace for this config map is openshift-config-managed. - IntegratedOAuthMetadata ConfigMapNameReference `json:"integratedOAuthMetadata"` - - // TODO if we add support for an in-cluster operator managed Keycloak instance - // KeycloakOAuthMetadata ConfigMapNameReference `json:"keycloakOAuthMetadata"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type AuthenticationList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata"` - - Items []Authentication `json:"items"` -} - -type AuthenticationType string - -const ( - // None means that no cluster managed authentication system is in place. - // Note that user login will only work if a manually configured system is in place and - // referenced in authentication spec via oauthMetadata and webhookTokenAuthenticators. - AuthenticationTypeNone AuthenticationType = "None" - - // IntegratedOAuth refers to the cluster managed OAuth server. - // It is configured via the top level OAuth config. - AuthenticationTypeIntegratedOAuth AuthenticationType = "IntegratedOAuth" - - // TODO if we add support for an in-cluster operator managed Keycloak instance - // AuthenticationTypeKeycloak AuthenticationType = "Keycloak" -) - -// deprecatedWebhookTokenAuthenticator holds the necessary configuration options for a remote token authenticator. -// It's the same as WebhookTokenAuthenticator but it's missing the 'required' validation on KubeConfig field. -type DeprecatedWebhookTokenAuthenticator struct { - // kubeConfig contains kube config file data which describes how to access the remote webhook service. - // For further details, see: - // https://kubernetes.io/docs/reference/access-authn-authz/authentication/#webhook-token-authentication - // The key "kubeConfig" is used to locate the data. - // If the secret or expected key is not found, the webhook is not honored. - // If the specified kube config data is not valid, the webhook is not honored. - // The namespace for this secret is determined by the point of use. - KubeConfig SecretNameReference `json:"kubeConfig"` -} - -// webhookTokenAuthenticator holds the necessary configuration options for a remote token authenticator -type WebhookTokenAuthenticator struct { - // kubeConfig references a secret that contains kube config file data which - // describes how to access the remote webhook service. - // The namespace for the referenced secret is openshift-config. - // - // For further details, see: - // - // https://kubernetes.io/docs/reference/access-authn-authz/authentication/#webhook-token-authentication - // - // The key "kubeConfig" is used to locate the data. - // If the secret or expected key is not found, the webhook is not honored. - // If the specified kube config data is not valid, the webhook is not honored. - // +kubebuilder:validation:Required - // +required - KubeConfig SecretNameReference `json:"kubeConfig"` -} - -const ( - // OAuthMetadataKey is the key for the oauth authorization server metadata - OAuthMetadataKey = "oauthMetadata" - - // KubeConfigKey is the key for the kube config file data in a secret - KubeConfigKey = "kubeConfig" -) diff --git a/vendor/github.com/openshift/api/config/v1/types_build.go b/vendor/github.com/openshift/api/config/v1/types_build.go deleted file mode 100644 index e9aef0375..000000000 --- a/vendor/github.com/openshift/api/config/v1/types_build.go +++ /dev/null @@ -1,127 +0,0 @@ -package v1 - -import ( - corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// +genclient -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// Build configures the behavior of OpenShift builds for the entire cluster. -// This includes default settings that can be overridden in BuildConfig objects, and overrides which are applied to all builds. -// -// The canonical name is "cluster" -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type Build struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata,omitempty"` - - // Spec holds user-settable values for the build controller configuration - // +kubebuilder:validation:Required - // +required - Spec BuildSpec `json:"spec"` -} - -type BuildSpec struct { - // AdditionalTrustedCA is a reference to a ConfigMap containing additional CAs that - // should be trusted for image pushes and pulls during builds. - // The namespace for this config map is openshift-config. - // - // DEPRECATED: Additional CAs for image pull and push should be set on - // image.config.openshift.io/cluster instead. - // - // +optional - AdditionalTrustedCA ConfigMapNameReference `json:"additionalTrustedCA"` - // BuildDefaults controls the default information for Builds - // +optional - BuildDefaults BuildDefaults `json:"buildDefaults"` - // BuildOverrides controls override settings for builds - // +optional - BuildOverrides BuildOverrides `json:"buildOverrides"` -} - -type BuildDefaults struct { - // DefaultProxy contains the default proxy settings for all build operations, including image pull/push - // and source download. - // - // Values can be overrode by setting the `HTTP_PROXY`, `HTTPS_PROXY`, and `NO_PROXY` environment variables - // in the build config's strategy. - // +optional - DefaultProxy *ProxySpec `json:"defaultProxy,omitempty"` - - // GitProxy contains the proxy settings for git operations only. If set, this will override - // any Proxy settings for all git commands, such as git clone. - // - // Values that are not set here will be inherited from DefaultProxy. - // +optional - GitProxy *ProxySpec `json:"gitProxy,omitempty"` - - // Env is a set of default environment variables that will be applied to the - // build if the specified variables do not exist on the build - // +optional - Env []corev1.EnvVar `json:"env,omitempty"` - - // ImageLabels is a list of docker labels that are applied to the resulting image. - // User can override a default label by providing a label with the same name in their - // Build/BuildConfig. - // +optional - ImageLabels []ImageLabel `json:"imageLabels,omitempty"` - - // Resources defines resource requirements to execute the build. - // +optional - Resources corev1.ResourceRequirements `json:"resources"` -} - -type ImageLabel struct { - // Name defines the name of the label. It must have non-zero length. - Name string `json:"name"` - - // Value defines the literal value of the label. - // +optional - Value string `json:"value,omitempty"` -} - -type BuildOverrides struct { - // ImageLabels is a list of docker labels that are applied to the resulting image. - // If user provided a label in their Build/BuildConfig with the same name as one in this - // list, the user's label will be overwritten. - // +optional - ImageLabels []ImageLabel `json:"imageLabels,omitempty"` - - // NodeSelector is a selector which must be true for the build pod to fit on a node - // +optional - NodeSelector map[string]string `json:"nodeSelector,omitempty"` - - // Tolerations is a list of Tolerations that will override any existing - // tolerations set on a build pod. - // +optional - Tolerations []corev1.Toleration `json:"tolerations,omitempty"` - - // ForcePull overrides, if set, the equivalent value in the builds, - // i.e. false disables force pull for all builds, - // true enables force pull for all builds, - // independently of what each build specifies itself - // +optional - ForcePull *bool `json:"forcePull,omitempty"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type BuildList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata"` - - Items []Build `json:"items"` -} diff --git a/vendor/github.com/openshift/api/config/v1/types_cluster_operator.go b/vendor/github.com/openshift/api/config/v1/types_cluster_operator.go deleted file mode 100644 index 78666bb1e..000000000 --- a/vendor/github.com/openshift/api/config/v1/types_cluster_operator.go +++ /dev/null @@ -1,216 +0,0 @@ -package v1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// +genclient -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// ClusterOperator is the Custom Resource object which holds the current state -// of an operator. This object is used by operators to convey their state to -// the rest of the cluster. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type ClusterOperator struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata"` - - // spec holds configuration that could apply to any operator. - // +kubebuilder:validation:Required - // +required - Spec ClusterOperatorSpec `json:"spec"` - - // status holds the information about the state of an operator. It is consistent with status information across - // the Kubernetes ecosystem. - // +optional - Status ClusterOperatorStatus `json:"status"` -} - -// ClusterOperatorSpec is empty for now, but you could imagine holding information like "pause". -type ClusterOperatorSpec struct { -} - -// ClusterOperatorStatus provides information about the status of the operator. -// +k8s:deepcopy-gen=true -type ClusterOperatorStatus struct { - // conditions describes the state of the operator's managed and monitored components. - // +patchMergeKey=type - // +patchStrategy=merge - // +optional - Conditions []ClusterOperatorStatusCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"` - - // versions is a slice of operator and operand version tuples. Operators which manage multiple operands will have multiple - // operand entries in the array. Available operators must report the version of the operator itself with the name "operator". - // An operator reports a new "operator" version when it has rolled out the new version to all of its operands. - // +optional - Versions []OperandVersion `json:"versions,omitempty"` - - // relatedObjects is a list of objects that are "interesting" or related to this operator. Common uses are: - // 1. the detailed resource driving the operator - // 2. operator namespaces - // 3. operand namespaces - // +optional - RelatedObjects []ObjectReference `json:"relatedObjects,omitempty"` - - // extension contains any additional status information specific to the - // operator which owns this status object. - // +nullable - // +optional - // +kubebuilder:pruning:PreserveUnknownFields - Extension runtime.RawExtension `json:"extension"` -} - -type OperandVersion struct { - // name is the name of the particular operand this version is for. It usually matches container images, not operators. - // +kubebuilder:validation:Required - // +required - Name string `json:"name"` - - // version indicates which version of a particular operand is currently being managed. It must always match the Available - // operand. If 1.0.0 is Available, then this must indicate 1.0.0 even if the operator is trying to rollout - // 1.1.0 - // +kubebuilder:validation:Required - // +required - Version string `json:"version"` -} - -// ObjectReference contains enough information to let you inspect or modify the referred object. -type ObjectReference struct { - // group of the referent. - // +kubebuilder:validation:Required - // +required - Group string `json:"group"` - // resource of the referent. - // +kubebuilder:validation:Required - // +required - Resource string `json:"resource"` - // namespace of the referent. - // +optional - Namespace string `json:"namespace,omitempty"` - // name of the referent. - // +kubebuilder:validation:Required - // +required - Name string `json:"name"` -} - -type ConditionStatus string - -// These are valid condition statuses. "ConditionTrue" means a resource is in the condition. -// "ConditionFalse" means a resource is not in the condition. "ConditionUnknown" means kubernetes -// can't decide if a resource is in the condition or not. In the future, we could add other -// intermediate conditions, e.g. ConditionDegraded. -const ( - ConditionTrue ConditionStatus = "True" - ConditionFalse ConditionStatus = "False" - ConditionUnknown ConditionStatus = "Unknown" -) - -// ClusterOperatorStatusCondition represents the state of the operator's -// managed and monitored components. -// +k8s:deepcopy-gen=true -type ClusterOperatorStatusCondition struct { - // type specifies the aspect reported by this condition. - // +kubebuilder:validation:Required - // +required - Type ClusterStatusConditionType `json:"type"` - - // status of the condition, one of True, False, Unknown. - // +kubebuilder:validation:Required - // +required - Status ConditionStatus `json:"status"` - - // lastTransitionTime is the time of the last update to the current status property. - // +kubebuilder:validation:Required - // +required - LastTransitionTime metav1.Time `json:"lastTransitionTime"` - - // reason is the CamelCase reason for the condition's current status. - // +optional - Reason string `json:"reason,omitempty"` - - // message provides additional information about the current condition. - // This is only to be consumed by humans. It may contain Line Feed - // characters (U+000A), which should be rendered as new lines. - // +optional - Message string `json:"message,omitempty"` -} - -// ClusterStatusConditionType is an aspect of operator state. -type ClusterStatusConditionType string - -const ( - // Available indicates that the component (operator and all configured operands) - // is functional and available in the cluster. Available=False means at least - // part of the component is non-functional, and that the condition requires - // immediate administrator intervention. - OperatorAvailable ClusterStatusConditionType = "Available" - - // Progressing indicates that the component (operator and all configured operands) - // is actively rolling out new code, propagating config changes, or otherwise - // moving from one steady state to another. Operators should not report - // progressing when they are reconciling (without action) a previously known - // state. If the observed cluster state has changed and the component is - // reacting to it (scaling up for instance), Progressing should become true - // since it is moving from one steady state to another. - OperatorProgressing ClusterStatusConditionType = "Progressing" - - // Degraded indicates that the component (operator and all configured operands) - // does not match its desired state over a period of time resulting in a lower - // quality of service. The period of time may vary by component, but a Degraded - // state represents persistent observation of a condition. As a result, a - // component should not oscillate in and out of Degraded state. A component may - // be Available even if its degraded. For example, a component may desire 3 - // running pods, but 1 pod is crash-looping. The component is Available but - // Degraded because it may have a lower quality of service. A component may be - // Progressing but not Degraded because the transition from one state to - // another does not persist over a long enough period to report Degraded. A - // component should not report Degraded during the course of a normal upgrade. - // A component may report Degraded in response to a persistent infrastructure - // failure that requires eventual administrator intervention. For example, if - // a control plane host is unhealthy and must be replaced. A component should - // report Degraded if unexpected errors occur over a period, but the - // expectation is that all unexpected errors are handled as operators mature. - OperatorDegraded ClusterStatusConditionType = "Degraded" - - // Upgradeable indicates whether the component (operator and all configured - // operands) is safe to upgrade based on the current cluster state. When - // Upgradeable is False, the cluster-version operator will prevent the - // cluster from performing impacted updates unless forced. When set on - // ClusterVersion, the message will explain which updates (minor or patch) - // are impacted. When set on ClusterOperator, False will block minor - // OpenShift updates. The message field should contain a human readable - // description of what the administrator should do to allow the cluster or - // component to successfully update. The cluster-version operator will - // allow updates when this condition is not False, including when it is - // missing, True, or Unknown. - OperatorUpgradeable ClusterStatusConditionType = "Upgradeable" - - // EvaluationConditionsDetected is used to indicate the result of the detection - // logic that was added to a component to evaluate the introduction of an - // invasive change that could potentially result in highly visible alerts, - // breakages or upgrade failures. You can concatenate multiple Reason using - // the "::" delimiter if you need to evaluate the introduction of multiple changes. - EvaluationConditionsDetected ClusterStatusConditionType = "EvaluationConditionsDetected" -) - -// ClusterOperatorList is a list of OperatorStatus resources. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +openshift:compatibility-gen:level=1 -type ClusterOperatorList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata"` - - Items []ClusterOperator `json:"items"` -} diff --git a/vendor/github.com/openshift/api/config/v1/types_cluster_version.go b/vendor/github.com/openshift/api/config/v1/types_cluster_version.go deleted file mode 100644 index 8126626c0..000000000 --- a/vendor/github.com/openshift/api/config/v1/types_cluster_version.go +++ /dev/null @@ -1,650 +0,0 @@ -package v1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// +genclient -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// ClusterVersion is the configuration for the ClusterVersionOperator. This is where -// parameters related to automatic updates can be set. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type ClusterVersion struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata,omitempty"` - - // spec is the desired state of the cluster version - the operator will work - // to ensure that the desired version is applied to the cluster. - // +kubebuilder:validation:Required - // +required - Spec ClusterVersionSpec `json:"spec"` - // status contains information about the available updates and any in-progress - // updates. - // +optional - Status ClusterVersionStatus `json:"status"` -} - -// ClusterVersionSpec is the desired version state of the cluster. It includes -// the version the cluster should be at, how the cluster is identified, and -// where the cluster should look for version updates. -// +k8s:deepcopy-gen=true -type ClusterVersionSpec struct { - // clusterID uniquely identifies this cluster. This is expected to be - // an RFC4122 UUID value (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx in - // hexadecimal values). This is a required field. - // +kubebuilder:validation:Required - // +required - ClusterID ClusterID `json:"clusterID"` - - // desiredUpdate is an optional field that indicates the desired value of - // the cluster version. Setting this value will trigger an upgrade (if - // the current version does not match the desired version). The set of - // recommended update values is listed as part of available updates in - // status, and setting values outside that range may cause the upgrade - // to fail. - // - // Some of the fields are inter-related with restrictions and meanings described here. - // 1. image is specified, version is specified, architecture is specified. API validation error. - // 2. image is specified, version is specified, architecture is not specified. You should not do this. version is silently ignored and image is used. - // 3. image is specified, version is not specified, architecture is specified. API validation error. - // 4. image is specified, version is not specified, architecture is not specified. image is used. - // 5. image is not specified, version is specified, architecture is specified. version and desired architecture are used to select an image. - // 6. image is not specified, version is specified, architecture is not specified. version and current architecture are used to select an image. - // 7. image is not specified, version is not specified, architecture is specified. API validation error. - // 8. image is not specified, version is not specified, architecture is not specified. API validation error. - // - // If an upgrade fails the operator will halt and report status - // about the failing component. Setting the desired update value back to - // the previous version will cause a rollback to be attempted. Not all - // rollbacks will succeed. - // - // +optional - DesiredUpdate *Update `json:"desiredUpdate,omitempty"` - - // upstream may be used to specify the preferred update server. By default - // it will use the appropriate update server for the cluster and region. - // - // +optional - Upstream URL `json:"upstream,omitempty"` - // channel is an identifier for explicitly requesting that a non-default - // set of updates be applied to this cluster. The default channel will be - // contain stable updates that are appropriate for production clusters. - // - // +optional - Channel string `json:"channel,omitempty"` - - // capabilities configures the installation of optional, core - // cluster components. A null value here is identical to an - // empty object; see the child properties for default semantics. - // +optional - Capabilities *ClusterVersionCapabilitiesSpec `json:"capabilities,omitempty"` - - // overrides is list of overides for components that are managed by - // cluster version operator. Marking a component unmanaged will prevent - // the operator from creating or updating the object. - // +optional - Overrides []ComponentOverride `json:"overrides,omitempty"` -} - -// ClusterVersionStatus reports the status of the cluster versioning, -// including any upgrades that are in progress. The current field will -// be set to whichever version the cluster is reconciling to, and the -// conditions array will report whether the update succeeded, is in -// progress, or is failing. -// +k8s:deepcopy-gen=true -type ClusterVersionStatus struct { - // desired is the version that the cluster is reconciling towards. - // If the cluster is not yet fully initialized desired will be set - // with the information available, which may be an image or a tag. - // +kubebuilder:validation:Required - // +required - Desired Release `json:"desired"` - - // history contains a list of the most recent versions applied to the cluster. - // This value may be empty during cluster startup, and then will be updated - // when a new update is being applied. The newest update is first in the - // list and it is ordered by recency. Updates in the history have state - // Completed if the rollout completed - if an update was failing or halfway - // applied the state will be Partial. Only a limited amount of update history - // is preserved. - // +optional - History []UpdateHistory `json:"history,omitempty"` - - // observedGeneration reports which version of the spec is being synced. - // If this value is not equal to metadata.generation, then the desired - // and conditions fields may represent a previous version. - // +kubebuilder:validation:Required - // +required - ObservedGeneration int64 `json:"observedGeneration"` - - // versionHash is a fingerprint of the content that the cluster will be - // updated with. It is used by the operator to avoid unnecessary work - // and is for internal use only. - // +kubebuilder:validation:Required - // +required - VersionHash string `json:"versionHash"` - - // capabilities describes the state of optional, core cluster components. - Capabilities ClusterVersionCapabilitiesStatus `json:"capabilities"` - - // conditions provides information about the cluster version. The condition - // "Available" is set to true if the desiredUpdate has been reached. The - // condition "Progressing" is set to true if an update is being applied. - // The condition "Degraded" is set to true if an update is currently blocked - // by a temporary or permanent error. Conditions are only valid for the - // current desiredUpdate when metadata.generation is equal to - // status.generation. - // +optional - Conditions []ClusterOperatorStatusCondition `json:"conditions,omitempty"` - - // availableUpdates contains updates recommended for this - // cluster. Updates which appear in conditionalUpdates but not in - // availableUpdates may expose this cluster to known issues. This list - // may be empty if no updates are recommended, if the update service - // is unavailable, or if an invalid channel has been specified. - // +nullable - // +kubebuilder:validation:Required - // +required - AvailableUpdates []Release `json:"availableUpdates"` - - // conditionalUpdates contains the list of updates that may be - // recommended for this cluster if it meets specific required - // conditions. Consumers interested in the set of updates that are - // actually recommended for this cluster should use - // availableUpdates. This list may be empty if no updates are - // recommended, if the update service is unavailable, or if an empty - // or invalid channel has been specified. - // +listType=atomic - // +optional - ConditionalUpdates []ConditionalUpdate `json:"conditionalUpdates,omitempty"` -} - -// UpdateState is a constant representing whether an update was successfully -// applied to the cluster or not. -type UpdateState string - -const ( - // CompletedUpdate indicates an update was successfully applied - // to the cluster (all resource updates were successful). - CompletedUpdate UpdateState = "Completed" - // PartialUpdate indicates an update was never completely applied - // or is currently being applied. - PartialUpdate UpdateState = "Partial" -) - -// UpdateHistory is a single attempted update to the cluster. -type UpdateHistory struct { - // state reflects whether the update was fully applied. The Partial state - // indicates the update is not fully applied, while the Completed state - // indicates the update was successfully rolled out at least once (all - // parts of the update successfully applied). - // +kubebuilder:validation:Required - // +required - State UpdateState `json:"state"` - - // startedTime is the time at which the update was started. - // +kubebuilder:validation:Required - // +required - StartedTime metav1.Time `json:"startedTime"` - - // completionTime, if set, is when the update was fully applied. The update - // that is currently being applied will have a null completion time. - // Completion time will always be set for entries that are not the current - // update (usually to the started time of the next update). - // +kubebuilder:validation:Required - // +required - // +nullable - CompletionTime *metav1.Time `json:"completionTime"` - - // version is a semantic version identifying the update version. If the - // requested image does not define a version, or if a failure occurs - // retrieving the image, this value may be empty. - // - // +optional - Version string `json:"version"` - - // image is a container image location that contains the update. This value - // is always populated. - // +kubebuilder:validation:Required - // +required - Image string `json:"image"` - - // verified indicates whether the provided update was properly verified - // before it was installed. If this is false the cluster may not be trusted. - // Verified does not cover upgradeable checks that depend on the cluster - // state at the time when the update target was accepted. - // +kubebuilder:validation:Required - // +required - Verified bool `json:"verified"` - - // acceptedRisks records risks which were accepted to initiate the update. - // For example, it may menition an Upgradeable=False or missing signature - // that was overriden via desiredUpdate.force, or an update that was - // initiated despite not being in the availableUpdates set of recommended - // update targets. - // +optional - AcceptedRisks string `json:"acceptedRisks,omitempty"` -} - -// ClusterID is string RFC4122 uuid. -type ClusterID string - -// ClusterVersionArchitecture enumerates valid cluster architectures. -// +kubebuilder:validation:Enum="Multi";"" -type ClusterVersionArchitecture string - -const ( - // ClusterVersionArchitectureMulti identifies a multi architecture. A multi - // architecture cluster is capable of running nodes with multiple architectures. - ClusterVersionArchitectureMulti ClusterVersionArchitecture = "Multi" -) - -// ClusterVersionCapability enumerates optional, core cluster components. -// +kubebuilder:validation:Enum=openshift-samples;baremetal;marketplace;Console;Insights;Storage;CSISnapshot;NodeTuning -type ClusterVersionCapability string - -const ( - // ClusterVersionCapabilityOpenShiftSamples manages the sample - // image streams and templates stored in the openshift - // namespace, and any registry credentials, stored as a secret, - // needed for the image streams to import the images they - // reference. - ClusterVersionCapabilityOpenShiftSamples ClusterVersionCapability = "openshift-samples" - - // ClusterVersionCapabilityBaremetal manages the cluster - // baremetal operator which is responsible for running the metal3 - // deployment. - ClusterVersionCapabilityBaremetal ClusterVersionCapability = "baremetal" - - // ClusterVersionCapabilityMarketplace manages the Marketplace operator which - // supplies Operator Lifecycle Manager (OLM) users with default catalogs of - // "optional" operators. - ClusterVersionCapabilityMarketplace ClusterVersionCapability = "marketplace" - - // ClusterVersionCapabilityConsole manages the Console operator which - // installs and maintains the web console. - ClusterVersionCapabilityConsole ClusterVersionCapability = "Console" - - // ClusterVersionCapabilityInsights manages the Insights operator which - // collects anonymized information about the cluster to generate - // recommendations for possible cluster issues. - ClusterVersionCapabilityInsights ClusterVersionCapability = "Insights" - - // ClusterVersionCapabilityStorage manages the storage operator which - // is responsible for providing cluster-wide storage defaults - // WARNING: Do not disable this capability when deployed to - // RHEV and OpenStack without reading the docs. - // These clusters heavily rely on that capability and may cause - // damage to the cluster. - ClusterVersionCapabilityStorage ClusterVersionCapability = "Storage" - - // ClusterVersionCapabilityCSISnapshot manages the csi snapshot - // controller operator which is responsible for watching the - // VolumeSnapshot CRD objects and manages the creation and deletion - // lifecycle of volume snapshots - ClusterVersionCapabilityCSISnapshot ClusterVersionCapability = "CSISnapshot" - - // ClusterVersionCapabilityNodeTuning manages the Node Tuning Operator - // which is responsible for watching the Tuned and Profile CRD - // objects and manages the containerized TuneD daemon which controls - // system level tuning of Nodes - ClusterVersionCapabilityNodeTuning ClusterVersionCapability = "NodeTuning" -) - -// KnownClusterVersionCapabilities includes all known optional, core cluster components. -var KnownClusterVersionCapabilities = []ClusterVersionCapability{ - ClusterVersionCapabilityBaremetal, - ClusterVersionCapabilityConsole, - ClusterVersionCapabilityInsights, - ClusterVersionCapabilityMarketplace, - ClusterVersionCapabilityStorage, - ClusterVersionCapabilityOpenShiftSamples, - ClusterVersionCapabilityCSISnapshot, - ClusterVersionCapabilityNodeTuning, -} - -// ClusterVersionCapabilitySet defines sets of cluster version capabilities. -// +kubebuilder:validation:Enum=None;v4.11;v4.12;v4.13;vCurrent -type ClusterVersionCapabilitySet string - -const ( - // ClusterVersionCapabilitySetNone is an empty set enabling - // no optional capabilities. - ClusterVersionCapabilitySetNone ClusterVersionCapabilitySet = "None" - - // ClusterVersionCapabilitySet4_11 is the recommended set of - // optional capabilities to enable for the 4.11 version of - // OpenShift. This list will remain the same no matter which - // version of OpenShift is installed. - ClusterVersionCapabilitySet4_11 ClusterVersionCapabilitySet = "v4.11" - - // ClusterVersionCapabilitySet4_12 is the recommended set of - // optional capabilities to enable for the 4.12 version of - // OpenShift. This list will remain the same no matter which - // version of OpenShift is installed. - ClusterVersionCapabilitySet4_12 ClusterVersionCapabilitySet = "v4.12" - - // ClusterVersionCapabilitySet4_13 is the recommended set of - // optional capabilities to enable for the 4.13 version of - // OpenShift. This list will remain the same no matter which - // version of OpenShift is installed. - ClusterVersionCapabilitySet4_13 ClusterVersionCapabilitySet = "v4.13" - - // ClusterVersionCapabilitySetCurrent is the recommended set - // of optional capabilities to enable for the cluster's - // current version of OpenShift. - ClusterVersionCapabilitySetCurrent ClusterVersionCapabilitySet = "vCurrent" -) - -// ClusterVersionCapabilitySets defines sets of cluster version capabilities. -var ClusterVersionCapabilitySets = map[ClusterVersionCapabilitySet][]ClusterVersionCapability{ - ClusterVersionCapabilitySetNone: {}, - ClusterVersionCapabilitySet4_11: { - ClusterVersionCapabilityBaremetal, - ClusterVersionCapabilityMarketplace, - ClusterVersionCapabilityOpenShiftSamples, - }, - ClusterVersionCapabilitySet4_12: { - ClusterVersionCapabilityBaremetal, - ClusterVersionCapabilityConsole, - ClusterVersionCapabilityInsights, - ClusterVersionCapabilityMarketplace, - ClusterVersionCapabilityStorage, - ClusterVersionCapabilityOpenShiftSamples, - ClusterVersionCapabilityCSISnapshot, - }, - ClusterVersionCapabilitySet4_13: { - ClusterVersionCapabilityBaremetal, - ClusterVersionCapabilityConsole, - ClusterVersionCapabilityInsights, - ClusterVersionCapabilityMarketplace, - ClusterVersionCapabilityStorage, - ClusterVersionCapabilityOpenShiftSamples, - ClusterVersionCapabilityCSISnapshot, - ClusterVersionCapabilityNodeTuning, - }, - ClusterVersionCapabilitySetCurrent: { - ClusterVersionCapabilityBaremetal, - ClusterVersionCapabilityConsole, - ClusterVersionCapabilityInsights, - ClusterVersionCapabilityMarketplace, - ClusterVersionCapabilityStorage, - ClusterVersionCapabilityOpenShiftSamples, - ClusterVersionCapabilityCSISnapshot, - ClusterVersionCapabilityNodeTuning, - }, -} - -// ClusterVersionCapabilitiesSpec selects the managed set of -// optional, core cluster components. -// +k8s:deepcopy-gen=true -type ClusterVersionCapabilitiesSpec struct { - // baselineCapabilitySet selects an initial set of - // optional capabilities to enable, which can be extended via - // additionalEnabledCapabilities. If unset, the cluster will - // choose a default, and the default may change over time. - // The current default is vCurrent. - // +optional - BaselineCapabilitySet ClusterVersionCapabilitySet `json:"baselineCapabilitySet,omitempty"` - - // additionalEnabledCapabilities extends the set of managed - // capabilities beyond the baseline defined in - // baselineCapabilitySet. The default is an empty set. - // +listType=atomic - // +optional - AdditionalEnabledCapabilities []ClusterVersionCapability `json:"additionalEnabledCapabilities,omitempty"` -} - -// ClusterVersionCapabilitiesStatus describes the state of optional, -// core cluster components. -// +k8s:deepcopy-gen=true -type ClusterVersionCapabilitiesStatus struct { - // enabledCapabilities lists all the capabilities that are currently managed. - // +listType=atomic - // +optional - EnabledCapabilities []ClusterVersionCapability `json:"enabledCapabilities,omitempty"` - - // knownCapabilities lists all the capabilities known to the current cluster. - // +listType=atomic - // +optional - KnownCapabilities []ClusterVersionCapability `json:"knownCapabilities,omitempty"` -} - -// ComponentOverride allows overriding cluster version operator's behavior -// for a component. -// +k8s:deepcopy-gen=true -type ComponentOverride struct { - // kind indentifies which object to override. - // +kubebuilder:validation:Required - // +required - Kind string `json:"kind"` - // group identifies the API group that the kind is in. - // +kubebuilder:validation:Required - // +required - Group string `json:"group"` - - // namespace is the component's namespace. If the resource is cluster - // scoped, the namespace should be empty. - // +kubebuilder:validation:Required - // +required - Namespace string `json:"namespace"` - // name is the component's name. - // +kubebuilder:validation:Required - // +required - Name string `json:"name"` - - // unmanaged controls if cluster version operator should stop managing the - // resources in this cluster. - // Default: false - // +kubebuilder:validation:Required - // +required - Unmanaged bool `json:"unmanaged"` -} - -// URL is a thin wrapper around string that ensures the string is a valid URL. -type URL string - -// Update represents an administrator update request. -// +kubebuilder:validation:XValidation:rule="has(self.architecture) && has(self.image) ? (self.architecture == '' || self.image == '') : true",message="cannot set both Architecture and Image" -// +kubebuilder:validation:XValidation:rule="has(self.architecture) && self.architecture != '' ? self.version != '' : true",message="Version must be set if Architecture is set" -// +k8s:deepcopy-gen=true -type Update struct { - // architecture is an optional field that indicates the desired - // value of the cluster architecture. In this context cluster - // architecture means either a single architecture or a multi - // architecture. architecture can only be set to Multi thereby - // only allowing updates from single to multi architecture. If - // architecture is set, image cannot be set and version must be - // set. - // Valid values are 'Multi' and empty. - // - // +optional - Architecture ClusterVersionArchitecture `json:"architecture"` - - // version is a semantic version identifying the update version. - // version is ignored if image is specified and required if - // architecture is specified. - // - // +optional - Version string `json:"version"` - - // image is a container image location that contains the update. - // image should be used when the desired version does not exist in availableUpdates or history. - // When image is set, version is ignored. When image is set, version should be empty. - // When image is set, architecture cannot be specified. - // - // +optional - Image string `json:"image"` - - // force allows an administrator to update to an image that has failed - // verification or upgradeable checks. This option should only - // be used when the authenticity of the provided image has been verified out - // of band because the provided image will run with full administrative access - // to the cluster. Do not use this flag with images that comes from unknown - // or potentially malicious sources. - // - // +optional - Force bool `json:"force"` -} - -// Release represents an OpenShift release image and associated metadata. -// +k8s:deepcopy-gen=true -type Release struct { - // version is a semantic version identifying the update version. When this - // field is part of spec, version is optional if image is specified. - // +required - Version string `json:"version"` - - // image is a container image location that contains the update. When this - // field is part of spec, image is optional if version is specified and the - // availableUpdates field contains a matching version. - // +required - Image string `json:"image"` - - // url contains information about this release. This URL is set by - // the 'url' metadata property on a release or the metadata returned by - // the update API and should be displayed as a link in user - // interfaces. The URL field may not be set for test or nightly - // releases. - // +optional - URL URL `json:"url,omitempty"` - - // channels is the set of Cincinnati channels to which the release - // currently belongs. - // +optional - Channels []string `json:"channels,omitempty"` -} - -// RetrievedUpdates reports whether available updates have been retrieved from -// the upstream update server. The condition is Unknown before retrieval, False -// if the updates could not be retrieved or recently failed, or True if the -// availableUpdates field is accurate and recent. -const RetrievedUpdates ClusterStatusConditionType = "RetrievedUpdates" - -// ConditionalUpdate represents an update which is recommended to some -// clusters on the version the current cluster is reconciling, but which -// may not be recommended for the current cluster. -type ConditionalUpdate struct { - // release is the target of the update. - // +kubebuilder:validation:Required - // +required - Release Release `json:"release"` - - // risks represents the range of issues associated with - // updating to the target release. The cluster-version - // operator will evaluate all entries, and only recommend the - // update if there is at least one entry and all entries - // recommend the update. - // +kubebuilder:validation:Required - // +kubebuilder:validation:MinItems=1 - // +patchMergeKey=name - // +patchStrategy=merge - // +listType=map - // +listMapKey=name - // +required - Risks []ConditionalUpdateRisk `json:"risks" patchStrategy:"merge" patchMergeKey:"name"` - - // conditions represents the observations of the conditional update's - // current status. Known types are: - // * Evaluating, for whether the cluster-version operator will attempt to evaluate any risks[].matchingRules. - // * Recommended, for whether the update is recommended for the current cluster. - // +patchMergeKey=type - // +patchStrategy=merge - // +listType=map - // +listMapKey=type - Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"` -} - -// ConditionalUpdateRisk represents a reason and cluster-state -// for not recommending a conditional update. -// +k8s:deepcopy-gen=true -type ConditionalUpdateRisk struct { - // url contains information about this risk. - // +kubebuilder:validation:Required - // +kubebuilder:validation:Format=uri - // +kubebuilder:validation:MinLength=1 - // +required - URL string `json:"url"` - - // name is the CamelCase reason for not recommending a - // conditional update, in the event that matchingRules match the - // cluster state. - // +kubebuilder:validation:Required - // +kubebuilder:validation:MinLength=1 - // +required - Name string `json:"name"` - - // message provides additional information about the risk of - // updating, in the event that matchingRules match the cluster - // state. This is only to be consumed by humans. It may - // contain Line Feed characters (U+000A), which should be - // rendered as new lines. - // +kubebuilder:validation:Required - // +kubebuilder:validation:MinLength=1 - // +required - Message string `json:"message"` - - // matchingRules is a slice of conditions for deciding which - // clusters match the risk and which do not. The slice is - // ordered by decreasing precedence. The cluster-version - // operator will walk the slice in order, and stop after the - // first it can successfully evaluate. If no condition can be - // successfully evaluated, the update will not be recommended. - // +kubebuilder:validation:Required - // +kubebuilder:validation:MinItems=1 - // +listType=atomic - // +required - MatchingRules []ClusterCondition `json:"matchingRules"` -} - -// ClusterCondition is a union of typed cluster conditions. The 'type' -// property determines which of the type-specific properties are relevant. -// When evaluated on a cluster, the condition may match, not match, or -// fail to evaluate. -// +k8s:deepcopy-gen=true -type ClusterCondition struct { - // type represents the cluster-condition type. This defines - // the members and semantics of any additional properties. - // +kubebuilder:validation:Required - // +kubebuilder:validation:Enum={"Always","PromQL"} - // +required - Type string `json:"type"` - - // promQL represents a cluster condition based on PromQL. - // +optional - PromQL *PromQLClusterCondition `json:"promql,omitempty"` -} - -// PromQLClusterCondition represents a cluster condition based on PromQL. -type PromQLClusterCondition struct { - // PromQL is a PromQL query classifying clusters. This query - // query should return a 1 in the match case and a 0 in the - // does-not-match case. Queries which return no time - // series, or which return values besides 0 or 1, are - // evaluation failures. - // +kubebuilder:validation:Required - // +required - PromQL string `json:"promql"` -} - -// ClusterVersionList is a list of ClusterVersion resources. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +openshift:compatibility-gen:level=1 -type ClusterVersionList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata"` - - Items []ClusterVersion `json:"items"` -} diff --git a/vendor/github.com/openshift/api/config/v1/types_console.go b/vendor/github.com/openshift/api/config/v1/types_console.go deleted file mode 100644 index 928181849..000000000 --- a/vendor/github.com/openshift/api/config/v1/types_console.go +++ /dev/null @@ -1,75 +0,0 @@ -package v1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// +genclient -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// Console holds cluster-wide configuration for the web console, including the -// logout URL, and reports the public URL of the console. The canonical name is -// `cluster`. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type Console struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata,omitempty"` - - // spec holds user settable values for configuration - // +kubebuilder:validation:Required - // +required - Spec ConsoleSpec `json:"spec"` - // status holds observed values from the cluster. They may not be overridden. - // +optional - Status ConsoleStatus `json:"status"` -} - -// ConsoleSpec is the specification of the desired behavior of the Console. -type ConsoleSpec struct { - // +optional - Authentication ConsoleAuthentication `json:"authentication"` -} - -// ConsoleStatus defines the observed status of the Console. -type ConsoleStatus struct { - // The URL for the console. This will be derived from the host for the route that - // is created for the console. - ConsoleURL string `json:"consoleURL"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type ConsoleList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata"` - - Items []Console `json:"items"` -} - -// ConsoleAuthentication defines a list of optional configuration for console authentication. -type ConsoleAuthentication struct { - // An optional, absolute URL to redirect web browsers to after logging out of - // the console. If not specified, it will redirect to the default login page. - // This is required when using an identity provider that supports single - // sign-on (SSO) such as: - // - OpenID (Keycloak, Azure) - // - RequestHeader (GSSAPI, SSPI, SAML) - // - OAuth (GitHub, GitLab, Google) - // Logging out of the console will destroy the user's token. The logoutRedirect - // provides the user the option to perform single logout (SLO) through the identity - // provider to destroy their single sign-on session. - // +optional - // +kubebuilder:validation:Pattern=`^$|^((https):\/\/?)[^\s()<>]+(?:\([\w\d]+\)|([^[:punct:]\s]|\/?))$` - LogoutRedirect string `json:"logoutRedirect,omitempty"` -} diff --git a/vendor/github.com/openshift/api/config/v1/types_dns.go b/vendor/github.com/openshift/api/config/v1/types_dns.go deleted file mode 100644 index 6283a2997..000000000 --- a/vendor/github.com/openshift/api/config/v1/types_dns.go +++ /dev/null @@ -1,98 +0,0 @@ -package v1 - -import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - -// +genclient -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// DNS holds cluster-wide information about DNS. The canonical name is `cluster` -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type DNS struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata,omitempty"` - - // spec holds user settable values for configuration - // +kubebuilder:validation:Required - // +required - Spec DNSSpec `json:"spec"` - // status holds observed values from the cluster. They may not be overridden. - // +optional - Status DNSStatus `json:"status"` -} - -type DNSSpec struct { - // baseDomain is the base domain of the cluster. All managed DNS records will - // be sub-domains of this base. - // - // For example, given the base domain `openshift.example.com`, an API server - // DNS record may be created for `cluster-api.openshift.example.com`. - // - // Once set, this field cannot be changed. - BaseDomain string `json:"baseDomain"` - // publicZone is the location where all the DNS records that are publicly accessible to - // the internet exist. - // - // If this field is nil, no public records should be created. - // - // Once set, this field cannot be changed. - // - // +optional - PublicZone *DNSZone `json:"publicZone,omitempty"` - // privateZone is the location where all the DNS records that are only available internally - // to the cluster exist. - // - // If this field is nil, no private records should be created. - // - // Once set, this field cannot be changed. - // - // +optional - PrivateZone *DNSZone `json:"privateZone,omitempty"` -} - -// DNSZone is used to define a DNS hosted zone. -// A zone can be identified by an ID or tags. -type DNSZone struct { - // id is the identifier that can be used to find the DNS hosted zone. - // - // on AWS zone can be fetched using `ID` as id in [1] - // on Azure zone can be fetched using `ID` as a pre-determined name in [2], - // on GCP zone can be fetched using `ID` as a pre-determined name in [3]. - // - // [1]: https://docs.aws.amazon.com/cli/latest/reference/route53/get-hosted-zone.html#options - // [2]: https://docs.microsoft.com/en-us/cli/azure/network/dns/zone?view=azure-cli-latest#az-network-dns-zone-show - // [3]: https://cloud.google.com/dns/docs/reference/v1/managedZones/get - // +optional - ID string `json:"id,omitempty"` - - // tags can be used to query the DNS hosted zone. - // - // on AWS, resourcegroupstaggingapi [1] can be used to fetch a zone using `Tags` as tag-filters, - // - // [1]: https://docs.aws.amazon.com/cli/latest/reference/resourcegroupstaggingapi/get-resources.html#options - // +optional - Tags map[string]string `json:"tags,omitempty"` -} - -type DNSStatus struct { - // dnsSuffix (service-ca amongst others) -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type DNSList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata"` - - Items []DNS `json:"items"` -} diff --git a/vendor/github.com/openshift/api/config/v1/types_feature.go b/vendor/github.com/openshift/api/config/v1/types_feature.go deleted file mode 100644 index c2f8c47e5..000000000 --- a/vendor/github.com/openshift/api/config/v1/types_feature.go +++ /dev/null @@ -1,283 +0,0 @@ -package v1 - -import ( - "fmt" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// +genclient -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// Feature holds cluster-wide information about feature gates. The canonical name is `cluster` -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type FeatureGate struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata,omitempty"` - - // spec holds user settable values for configuration - // +kubebuilder:validation:Required - // +required - Spec FeatureGateSpec `json:"spec"` - // status holds observed values from the cluster. They may not be overridden. - // +optional - Status FeatureGateStatus `json:"status"` -} - -type FeatureSet string - -var ( - // Default feature set that allows upgrades. - Default FeatureSet = "" - - // TechPreviewNoUpgrade turns on tech preview features that are not part of the normal supported platform. Turning - // this feature set on CANNOT BE UNDONE and PREVENTS UPGRADES. - TechPreviewNoUpgrade FeatureSet = "TechPreviewNoUpgrade" - - // CustomNoUpgrade allows the enabling or disabling of any feature. Turning this feature set on IS NOT SUPPORTED, CANNOT BE UNDONE, and PREVENTS UPGRADES. - // Because of its nature, this setting cannot be validated. If you have any typos or accidentally apply invalid combinations - // your cluster may fail in an unrecoverable way. - CustomNoUpgrade FeatureSet = "CustomNoUpgrade" - - // TopologyManager enables ToplogyManager support. Upgrades are enabled with this feature. - LatencySensitive FeatureSet = "LatencySensitive" -) - -type FeatureGateSpec struct { - FeatureGateSelection `json:",inline"` -} - -// +union -type FeatureGateSelection struct { - // featureSet changes the list of features in the cluster. The default is empty. Be very careful adjusting this setting. - // Turning on or off features may cause irreversible changes in your cluster which cannot be undone. - // +unionDiscriminator - // +optional - FeatureSet FeatureSet `json:"featureSet,omitempty"` - - // customNoUpgrade allows the enabling or disabling of any feature. Turning this feature set on IS NOT SUPPORTED, CANNOT BE UNDONE, and PREVENTS UPGRADES. - // Because of its nature, this setting cannot be validated. If you have any typos or accidentally apply invalid combinations - // your cluster may fail in an unrecoverable way. featureSet must equal "CustomNoUpgrade" must be set to use this field. - // +optional - // +nullable - CustomNoUpgrade *CustomFeatureGates `json:"customNoUpgrade,omitempty"` -} - -type CustomFeatureGates struct { - // enabled is a list of all feature gates that you want to force on - // +optional - Enabled []FeatureGateName `json:"enabled,omitempty"` - // disabled is a list of all feature gates that you want to force off - // +optional - Disabled []FeatureGateName `json:"disabled,omitempty"` -} - -// FeatureGateName is a string to enforce patterns on the name of a FeatureGate -// +kubebuilder:validation:Pattern=`^([A-Za-z0-9-]+\.)*[A-Za-z0-9-]+\.?$` -type FeatureGateName string - -type FeatureGateStatus struct { - // conditions represent the observations of the current state. - // Known .status.conditions.type are: "DeterminationDegraded" - // +listType=map - // +listMapKey=type - Conditions []metav1.Condition `json:"conditions,omitempty"` - - // featureGates contains a list of enabled and disabled featureGates that are keyed by payloadVersion. - // Operators other than the CVO and cluster-config-operator, must read the .status.featureGates, locate - // the version they are managing, find the enabled/disabled featuregates and make the operand and operator match. - // The enabled/disabled values for a particular version may change during the life of the cluster as various - // .spec.featureSet values are selected. - // Operators may choose to restart their processes to pick up these changes, but remembering past enable/disable - // lists is beyond the scope of this API and is the responsibility of individual operators. - // Only featureGates with .version in the ClusterVersion.status will be present in this list. - // +listType=map - // +listMapKey=version - FeatureGates []FeatureGateDetails `json:"featureGates"` -} - -type FeatureGateDetails struct { - // version matches the version provided by the ClusterVersion and in the ClusterOperator.Status.Versions field. - // +kubebuilder:validation:Required - // +required - Version string `json:"version"` - // enabled is a list of all feature gates that are enabled in the cluster for the named version. - // +optional - Enabled []FeatureGateAttributes `json:"enabled"` - // disabled is a list of all feature gates that are disabled in the cluster for the named version. - // +optional - Disabled []FeatureGateAttributes `json:"disabled"` -} - -type FeatureGateAttributes struct { - // name is the name of the FeatureGate. - // +kubebuilder:validation:Required - Name FeatureGateName `json:"name"` - - // possible (probable?) future additions include - // 1. support level (Stable, ServiceDeliveryOnly, TechPreview, DevPreview) - // 2. description -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type FeatureGateList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata"` - - Items []FeatureGate `json:"items"` -} - -type FeatureGateEnabledDisabled struct { - Enabled []FeatureGateDescription - Disabled []FeatureGateDescription -} - -// FeatureSets Contains a map of Feature names to Enabled/Disabled Feature. -// -// NOTE: The caller needs to make sure to check for the existence of the value -// using golang's existence field. A possible scenario is an upgrade where new -// FeatureSets are added and a controller has not been upgraded with a newer -// version of this file. In this upgrade scenario the map could return nil. -// -// example: -// -// if featureSet, ok := FeatureSets["SomeNewFeature"]; ok { } -// -// If you put an item in either of these lists, put your area and name on it so we can find owners. -var FeatureSets = map[FeatureSet]*FeatureGateEnabledDisabled{ - Default: defaultFeatures, - CustomNoUpgrade: { - Enabled: []FeatureGateDescription{}, - Disabled: []FeatureGateDescription{}, - }, - TechPreviewNoUpgrade: newDefaultFeatures(). - with(externalCloudProvider). - with(externalCloudProviderAzure). - with(externalCloudProviderGCP). - with(csiDriverSharedResource). - with(buildCSIVolumes). - with(nodeSwap). - with(machineAPIProviderOpenStack). - with(insightsConfigAPI). - with(matchLabelKeysInPodTopologySpread). - with(retroactiveDefaultStorageClass). - with(pdbUnhealthyPodEvictionPolicy). - with(dynamicResourceAllocation). - with(admissionWebhookMatchConditions). - with(azureWorkloadIdentity). - with(gateGatewayAPI). - toFeatures(defaultFeatures), - LatencySensitive: newDefaultFeatures(). - toFeatures(defaultFeatures), -} - -var defaultFeatures = &FeatureGateEnabledDisabled{ - Enabled: []FeatureGateDescription{ - openShiftPodSecurityAdmission, - }, - Disabled: []FeatureGateDescription{ - retroactiveDefaultStorageClass, - }, -} - -type featureSetBuilder struct { - forceOn []FeatureGateDescription - forceOff []FeatureGateDescription -} - -func newDefaultFeatures() *featureSetBuilder { - return &featureSetBuilder{} -} - -func (f *featureSetBuilder) with(forceOn FeatureGateDescription) *featureSetBuilder { - for _, curr := range f.forceOn { - if curr.FeatureGateAttributes.Name == forceOn.FeatureGateAttributes.Name { - panic(fmt.Errorf("coding error: %q enabled twice", forceOn.FeatureGateAttributes.Name)) - } - } - f.forceOn = append(f.forceOn, forceOn) - return f -} - -func (f *featureSetBuilder) without(forceOff FeatureGateDescription) *featureSetBuilder { - for _, curr := range f.forceOff { - if curr.FeatureGateAttributes.Name == forceOff.FeatureGateAttributes.Name { - panic(fmt.Errorf("coding error: %q disabled twice", forceOff.FeatureGateAttributes.Name)) - } - } - f.forceOff = append(f.forceOff, forceOff) - return f -} - -func (f *featureSetBuilder) isForcedOff(needle FeatureGateDescription) bool { - for _, forcedOff := range f.forceOff { - if needle.FeatureGateAttributes.Name == forcedOff.FeatureGateAttributes.Name { - return true - } - } - return false -} - -func (f *featureSetBuilder) isForcedOn(needle FeatureGateDescription) bool { - for _, forceOn := range f.forceOn { - if needle.FeatureGateAttributes.Name == forceOn.FeatureGateAttributes.Name { - return true - } - } - return false -} - -func (f *featureSetBuilder) toFeatures(defaultFeatures *FeatureGateEnabledDisabled) *FeatureGateEnabledDisabled { - finalOn := []FeatureGateDescription{} - finalOff := []FeatureGateDescription{} - - // only add the default enabled features if they haven't been explicitly set off - for _, defaultOn := range defaultFeatures.Enabled { - if !f.isForcedOff(defaultOn) { - finalOn = append(finalOn, defaultOn) - } - } - for _, currOn := range f.forceOn { - if f.isForcedOff(currOn) { - panic("coding error, you can't have features both on and off") - } - found := false - for _, alreadyOn := range finalOn { - if alreadyOn.FeatureGateAttributes.Name == currOn.FeatureGateAttributes.Name { - found = true - } - } - if found { - continue - } - - finalOn = append(finalOn, currOn) - } - - // only add the default disabled features if they haven't been explicitly set on - for _, defaultOff := range defaultFeatures.Disabled { - if !f.isForcedOn(defaultOff) { - finalOff = append(finalOff, defaultOff) - } - } - for _, currOff := range f.forceOff { - finalOff = append(finalOff, currOff) - } - - return &FeatureGateEnabledDisabled{ - Enabled: finalOn, - Disabled: finalOff, - } -} diff --git a/vendor/github.com/openshift/api/config/v1/types_image.go b/vendor/github.com/openshift/api/config/v1/types_image.go deleted file mode 100644 index eb7643f2b..000000000 --- a/vendor/github.com/openshift/api/config/v1/types_image.go +++ /dev/null @@ -1,134 +0,0 @@ -package v1 - -import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - -// +genclient -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// Image governs policies related to imagestream imports and runtime configuration -// for external registries. It allows cluster admins to configure which registries -// OpenShift is allowed to import images from, extra CA trust bundles for external -// registries, and policies to block or allow registry hostnames. -// When exposing OpenShift's image registry to the public, this also lets cluster -// admins specify the external hostname. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type Image struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata,omitempty"` - - // spec holds user settable values for configuration - // +kubebuilder:validation:Required - // +required - Spec ImageSpec `json:"spec"` - // status holds observed values from the cluster. They may not be overridden. - // +optional - Status ImageStatus `json:"status"` -} - -type ImageSpec struct { - // allowedRegistriesForImport limits the container image registries that normal users may import - // images from. Set this list to the registries that you trust to contain valid Docker - // images and that you want applications to be able to import from. Users with - // permission to create Images or ImageStreamMappings via the API are not affected by - // this policy - typically only administrators or system integrations will have those - // permissions. - // +optional - AllowedRegistriesForImport []RegistryLocation `json:"allowedRegistriesForImport,omitempty"` - - // externalRegistryHostnames provides the hostnames for the default external image - // registry. The external hostname should be set only when the image registry - // is exposed externally. The first value is used in 'publicDockerImageRepository' - // field in ImageStreams. The value must be in "hostname[:port]" format. - // +optional - ExternalRegistryHostnames []string `json:"externalRegistryHostnames,omitempty"` - - // additionalTrustedCA is a reference to a ConfigMap containing additional CAs that - // should be trusted during imagestream import, pod image pull, build image pull, and - // imageregistry pullthrough. - // The namespace for this config map is openshift-config. - // +optional - AdditionalTrustedCA ConfigMapNameReference `json:"additionalTrustedCA"` - - // registrySources contains configuration that determines how the container runtime - // should treat individual registries when accessing images for builds+pods. (e.g. - // whether or not to allow insecure access). It does not contain configuration for the - // internal cluster registry. - // +optional - RegistrySources RegistrySources `json:"registrySources"` -} - -type ImageStatus struct { - - // internalRegistryHostname sets the hostname for the default internal image - // registry. The value must be in "hostname[:port]" format. - // This value is set by the image registry operator which controls the internal registry - // hostname. For backward compatibility, users can still use OPENSHIFT_DEFAULT_REGISTRY - // environment variable but this setting overrides the environment variable. - // +optional - InternalRegistryHostname string `json:"internalRegistryHostname,omitempty"` - - // externalRegistryHostnames provides the hostnames for the default external image - // registry. The external hostname should be set only when the image registry - // is exposed externally. The first value is used in 'publicDockerImageRepository' - // field in ImageStreams. The value must be in "hostname[:port]" format. - // +optional - ExternalRegistryHostnames []string `json:"externalRegistryHostnames,omitempty"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type ImageList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata"` - - Items []Image `json:"items"` -} - -// RegistryLocation contains a location of the registry specified by the registry domain -// name. The domain name might include wildcards, like '*' or '??'. -type RegistryLocation struct { - // domainName specifies a domain name for the registry - // In case the registry use non-standard (80 or 443) port, the port should be included - // in the domain name as well. - DomainName string `json:"domainName"` - // insecure indicates whether the registry is secure (https) or insecure (http) - // By default (if not specified) the registry is assumed as secure. - // +optional - Insecure bool `json:"insecure,omitempty"` -} - -// RegistrySources holds cluster-wide information about how to handle the registries config. -type RegistrySources struct { - // insecureRegistries are registries which do not have a valid TLS certificates or only support HTTP connections. - // +optional - InsecureRegistries []string `json:"insecureRegistries,omitempty"` - // blockedRegistries cannot be used for image pull and push actions. All other registries are permitted. - // - // Only one of BlockedRegistries or AllowedRegistries may be set. - // +optional - BlockedRegistries []string `json:"blockedRegistries,omitempty"` - // allowedRegistries are the only registries permitted for image pull and push actions. All other registries are denied. - // - // Only one of BlockedRegistries or AllowedRegistries may be set. - // +optional - AllowedRegistries []string `json:"allowedRegistries,omitempty"` - // containerRuntimeSearchRegistries are registries that will be searched when pulling images that do not have fully qualified - // domains in their pull specs. Registries will be searched in the order provided in the list. - // Note: this search list only works with the container runtime, i.e CRI-O. Will NOT work with builds or imagestream imports. - // +optional - // +kubebuilder:validation:MinItems=1 - // +kubebuilder:validation:Format=hostname - // +listType=set - ContainerRuntimeSearchRegistries []string `json:"containerRuntimeSearchRegistries,omitempty"` -} diff --git a/vendor/github.com/openshift/api/config/v1/types_image_content_policy.go b/vendor/github.com/openshift/api/config/v1/types_image_content_policy.go deleted file mode 100644 index 3dc315f68..000000000 --- a/vendor/github.com/openshift/api/config/v1/types_image_content_policy.go +++ /dev/null @@ -1,95 +0,0 @@ -package v1 - -import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - -// +genclient -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// ImageContentPolicy holds cluster-wide information about how to handle registry mirror rules. -// When multiple policies are defined, the outcome of the behavior is defined on each field. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type ImageContentPolicy struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata,omitempty"` - - // spec holds user settable values for configuration - // +kubebuilder:validation:Required - // +required - Spec ImageContentPolicySpec `json:"spec"` -} - -// ImageContentPolicySpec is the specification of the ImageContentPolicy CRD. -type ImageContentPolicySpec struct { - // repositoryDigestMirrors allows images referenced by image digests in pods to be - // pulled from alternative mirrored repository locations. The image pull specification - // provided to the pod will be compared to the source locations described in RepositoryDigestMirrors - // and the image may be pulled down from any of the mirrors in the list instead of the - // specified repository allowing administrators to choose a potentially faster mirror. - // To pull image from mirrors by tags, should set the "allowMirrorByTags". - // - // Each “source” repository is treated independently; configurations for different “source” - // repositories don’t interact. - // - // If the "mirrors" is not specified, the image will continue to be pulled from the specified - // repository in the pull spec. - // - // When multiple policies are defined for the same “source” repository, the sets of defined - // mirrors will be merged together, preserving the relative order of the mirrors, if possible. - // For example, if policy A has mirrors `a, b, c` and policy B has mirrors `c, d, e`, the - // mirrors will be used in the order `a, b, c, d, e`. If the orders of mirror entries conflict - // (e.g. `a, b` vs. `b, a`) the configuration is not rejected but the resulting order is unspecified. - // +optional - // +listType=map - // +listMapKey=source - RepositoryDigestMirrors []RepositoryDigestMirrors `json:"repositoryDigestMirrors"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// ImageContentPolicyList lists the items in the ImageContentPolicy CRD. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type ImageContentPolicyList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata"` - - Items []ImageContentPolicy `json:"items"` -} - -// RepositoryDigestMirrors holds cluster-wide information about how to handle mirrors in the registries config. -type RepositoryDigestMirrors struct { - // source is the repository that users refer to, e.g. in image pull specifications. - // +required - // +kubebuilder:validation:Required - // +kubebuilder:validation:Pattern=`^(([a-zA-Z]|[a-zA-Z][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z]|[A-Za-z][A-Za-z0-9\-]*[A-Za-z0-9])(:[0-9]+)?(\/[^\/:\n]+)*(\/[^\/:\n]+((:[^\/:\n]+)|(@[^\n]+)))?$` - Source string `json:"source"` - // allowMirrorByTags if true, the mirrors can be used to pull the images that are referenced by their tags. Default is false, the mirrors only work when pulling the images that are referenced by their digests. - // Pulling images by tag can potentially yield different images, depending on which endpoint - // we pull from. Forcing digest-pulls for mirrors avoids that issue. - // +optional - AllowMirrorByTags bool `json:"allowMirrorByTags,omitempty"` - // mirrors is zero or more repositories that may also contain the same images. - // If the "mirrors" is not specified, the image will continue to be pulled from the specified - // repository in the pull spec. No mirror will be configured. - // The order of mirrors in this list is treated as the user's desired priority, while source - // is by default considered lower priority than all mirrors. Other cluster configuration, - // including (but not limited to) other repositoryDigestMirrors objects, - // may impact the exact order mirrors are contacted in, or some mirrors may be contacted - // in parallel, so this should be considered a preference rather than a guarantee of ordering. - // +optional - // +listType=set - Mirrors []Mirror `json:"mirrors,omitempty"` -} - -// +kubebuilder:validation:Pattern=`^(([a-zA-Z]|[a-zA-Z][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z]|[A-Za-z][A-Za-z0-9\-]*[A-Za-z0-9])(:[0-9]+)?(\/[^\/:\n]+)*(\/[^\/:\n]+((:[^\/:\n]+)|(@[^\n]+)))?$` -type Mirror string diff --git a/vendor/github.com/openshift/api/config/v1/types_image_digest_mirror_set.go b/vendor/github.com/openshift/api/config/v1/types_image_digest_mirror_set.go deleted file mode 100644 index 987c6cfdc..000000000 --- a/vendor/github.com/openshift/api/config/v1/types_image_digest_mirror_set.go +++ /dev/null @@ -1,137 +0,0 @@ -package v1 - -import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - -// +genclient -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// ImageDigestMirrorSet holds cluster-wide information about how to handle registry mirror rules on using digest pull specification. -// When multiple policies are defined, the outcome of the behavior is defined on each field. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type ImageDigestMirrorSet struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata,omitempty"` - - // spec holds user settable values for configuration - // +kubebuilder:validation:Required - // +required - Spec ImageDigestMirrorSetSpec `json:"spec"` - // status contains the observed state of the resource. - // +optional - Status ImageDigestMirrorSetStatus `json:"status,omitempty"` -} - -// ImageDigestMirrorSetSpec is the specification of the ImageDigestMirrorSet CRD. -type ImageDigestMirrorSetSpec struct { - // imageDigestMirrors allows images referenced by image digests in pods to be - // pulled from alternative mirrored repository locations. The image pull specification - // provided to the pod will be compared to the source locations described in imageDigestMirrors - // and the image may be pulled down from any of the mirrors in the list instead of the - // specified repository allowing administrators to choose a potentially faster mirror. - // To use mirrors to pull images using tag specification, users should configure - // a list of mirrors using "ImageTagMirrorSet" CRD. - // - // If the image pull specification matches the repository of "source" in multiple imagedigestmirrorset objects, - // only the objects which define the most specific namespace match will be used. - // For example, if there are objects using quay.io/libpod and quay.io/libpod/busybox as - // the "source", only the objects using quay.io/libpod/busybox are going to apply - // for pull specification quay.io/libpod/busybox. - // Each “source” repository is treated independently; configurations for different “source” - // repositories don’t interact. - // - // If the "mirrors" is not specified, the image will continue to be pulled from the specified - // repository in the pull spec. - // - // When multiple policies are defined for the same “source” repository, the sets of defined - // mirrors will be merged together, preserving the relative order of the mirrors, if possible. - // For example, if policy A has mirrors `a, b, c` and policy B has mirrors `c, d, e`, the - // mirrors will be used in the order `a, b, c, d, e`. If the orders of mirror entries conflict - // (e.g. `a, b` vs. `b, a`) the configuration is not rejected but the resulting order is unspecified. - // Users who want to use a specific order of mirrors, should configure them into one list of mirrors using the expected order. - // +optional - // +listType=atomic - ImageDigestMirrors []ImageDigestMirrors `json:"imageDigestMirrors"` -} - -type ImageDigestMirrorSetStatus struct{} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// ImageDigestMirrorSetList lists the items in the ImageDigestMirrorSet CRD. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type ImageDigestMirrorSetList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata"` - - Items []ImageDigestMirrorSet `json:"items"` -} - -// +kubebuilder:validation:Pattern=`^((?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9])(?:(?:\.(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9]))+)?(?::[0-9]+)?)(?:(?:/[a-z0-9]+(?:(?:(?:[._]|__|[-]*)[a-z0-9]+)+)?)+)?$` -type ImageMirror string - -// MirrorSourcePolicy defines the fallback policy if fails to pull image from the mirrors. -// +kubebuilder:validation:Enum=NeverContactSource;AllowContactingSource -type MirrorSourcePolicy string - -const ( - // NeverContactSource prevents image pull from the specified repository in the pull spec if the image pull from the mirror list fails. - NeverContactSource MirrorSourcePolicy = "NeverContactSource" - - // AllowContactingSource allows falling back to the specified repository in the pull spec if the image pull from the mirror list fails. - AllowContactingSource MirrorSourcePolicy = "AllowContactingSource" -) - -// ImageDigestMirrors holds cluster-wide information about how to handle mirrors in the registries config. -type ImageDigestMirrors struct { - // source matches the repository that users refer to, e.g. in image pull specifications. Setting source to a registry hostname - // e.g. docker.io. quay.io, or registry.redhat.io, will match the image pull specification of corressponding registry. - // "source" uses one of the following formats: - // host[:port] - // host[:port]/namespace[/namespace…] - // host[:port]/namespace[/namespace…]/repo - // [*.]host - // for more information about the format, see the document about the location field: - // https://github.com/containers/image/blob/main/docs/containers-registries.conf.5.md#choosing-a-registry-toml-table - // +required - // +kubebuilder:validation:Required - // +kubebuilder:validation:Pattern=`^\*(?:\.(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9]))+$|^((?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9])(?:(?:\.(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9]))+)?(?::[0-9]+)?)(?:(?:/[a-z0-9]+(?:(?:(?:[._]|__|[-]*)[a-z0-9]+)+)?)+)?$` - Source string `json:"source"` - // mirrors is zero or more locations that may also contain the same images. No mirror will be configured if not specified. - // Images can be pulled from these mirrors only if they are referenced by their digests. - // The mirrored location is obtained by replacing the part of the input reference that - // matches source by the mirrors entry, e.g. for registry.redhat.io/product/repo reference, - // a (source, mirror) pair *.redhat.io, mirror.local/redhat causes a mirror.local/redhat/product/repo - // repository to be used. - // The order of mirrors in this list is treated as the user's desired priority, while source - // is by default considered lower priority than all mirrors. - // If no mirror is specified or all image pulls from the mirror list fail, the image will continue to be - // pulled from the repository in the pull spec unless explicitly prohibited by "mirrorSourcePolicy" - // Other cluster configuration, including (but not limited to) other imageDigestMirrors objects, - // may impact the exact order mirrors are contacted in, or some mirrors may be contacted - // in parallel, so this should be considered a preference rather than a guarantee of ordering. - // "mirrors" uses one of the following formats: - // host[:port] - // host[:port]/namespace[/namespace…] - // host[:port]/namespace[/namespace…]/repo - // for more information about the format, see the document about the location field: - // https://github.com/containers/image/blob/main/docs/containers-registries.conf.5.md#choosing-a-registry-toml-table - // +optional - // +listType=set - Mirrors []ImageMirror `json:"mirrors,omitempty"` - // mirrorSourcePolicy defines the fallback policy if fails to pull image from the mirrors. - // If unset, the image will continue to be pulled from the the repository in the pull spec. - // sourcePolicy is valid configuration only when one or more mirrors are in the mirror list. - // +optional - MirrorSourcePolicy MirrorSourcePolicy `json:"mirrorSourcePolicy,omitempty"` -} diff --git a/vendor/github.com/openshift/api/config/v1/types_image_tag_mirror_set.go b/vendor/github.com/openshift/api/config/v1/types_image_tag_mirror_set.go deleted file mode 100644 index 295522e59..000000000 --- a/vendor/github.com/openshift/api/config/v1/types_image_tag_mirror_set.go +++ /dev/null @@ -1,124 +0,0 @@ -package v1 - -import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - -// +genclient -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// ImageTagMirrorSet holds cluster-wide information about how to handle registry mirror rules on using tag pull specification. -// When multiple policies are defined, the outcome of the behavior is defined on each field. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type ImageTagMirrorSet struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata,omitempty"` - - // spec holds user settable values for configuration - // +kubebuilder:validation:Required - // +required - Spec ImageTagMirrorSetSpec `json:"spec"` - // status contains the observed state of the resource. - // +optional - Status ImageTagMirrorSetStatus `json:"status,omitempty"` -} - -// ImageTagMirrorSetSpec is the specification of the ImageTagMirrorSet CRD. -type ImageTagMirrorSetSpec struct { - // imageTagMirrors allows images referenced by image tags in pods to be - // pulled from alternative mirrored repository locations. The image pull specification - // provided to the pod will be compared to the source locations described in imageTagMirrors - // and the image may be pulled down from any of the mirrors in the list instead of the - // specified repository allowing administrators to choose a potentially faster mirror. - // To use mirrors to pull images using digest specification only, users should configure - // a list of mirrors using "ImageDigestMirrorSet" CRD. - // - // If the image pull specification matches the repository of "source" in multiple imagetagmirrorset objects, - // only the objects which define the most specific namespace match will be used. - // For example, if there are objects using quay.io/libpod and quay.io/libpod/busybox as - // the "source", only the objects using quay.io/libpod/busybox are going to apply - // for pull specification quay.io/libpod/busybox. - // Each “source” repository is treated independently; configurations for different “source” - // repositories don’t interact. - // - // If the "mirrors" is not specified, the image will continue to be pulled from the specified - // repository in the pull spec. - // - // When multiple policies are defined for the same “source” repository, the sets of defined - // mirrors will be merged together, preserving the relative order of the mirrors, if possible. - // For example, if policy A has mirrors `a, b, c` and policy B has mirrors `c, d, e`, the - // mirrors will be used in the order `a, b, c, d, e`. If the orders of mirror entries conflict - // (e.g. `a, b` vs. `b, a`) the configuration is not rejected but the resulting order is unspecified. - // Users who want to use a deterministic order of mirrors, should configure them into one list of mirrors using the expected order. - // +optional - // +listType=atomic - ImageTagMirrors []ImageTagMirrors `json:"imageTagMirrors"` -} - -type ImageTagMirrorSetStatus struct{} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// ImageTagMirrorSetList lists the items in the ImageTagMirrorSet CRD. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type ImageTagMirrorSetList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata"` - - Items []ImageTagMirrorSet `json:"items"` -} - -// ImageTagMirrors holds cluster-wide information about how to handle mirrors in the registries config. -type ImageTagMirrors struct { - // source matches the repository that users refer to, e.g. in image pull specifications. Setting source to a registry hostname - // e.g. docker.io. quay.io, or registry.redhat.io, will match the image pull specification of corressponding registry. - // "source" uses one of the following formats: - // host[:port] - // host[:port]/namespace[/namespace…] - // host[:port]/namespace[/namespace…]/repo - // [*.]host - // for more information about the format, see the document about the location field: - // https://github.com/containers/image/blob/main/docs/containers-registries.conf.5.md#choosing-a-registry-toml-table - // +required - // +kubebuilder:validation:Required - // +kubebuilder:validation:Pattern=`^\*(?:\.(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9]))+$|^((?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9])(?:(?:\.(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9]))+)?(?::[0-9]+)?)(?:(?:/[a-z0-9]+(?:(?:(?:[._]|__|[-]*)[a-z0-9]+)+)?)+)?$` - Source string `json:"source"` - // mirrors is zero or more locations that may also contain the same images. No mirror will be configured if not specified. - // Images can be pulled from these mirrors only if they are referenced by their tags. - // The mirrored location is obtained by replacing the part of the input reference that - // matches source by the mirrors entry, e.g. for registry.redhat.io/product/repo reference, - // a (source, mirror) pair *.redhat.io, mirror.local/redhat causes a mirror.local/redhat/product/repo - // repository to be used. - // Pulling images by tag can potentially yield different images, depending on which endpoint we pull from. - // Configuring a list of mirrors using "ImageDigestMirrorSet" CRD and forcing digest-pulls for mirrors avoids that issue. - // The order of mirrors in this list is treated as the user's desired priority, while source - // is by default considered lower priority than all mirrors. - // If no mirror is specified or all image pulls from the mirror list fail, the image will continue to be - // pulled from the repository in the pull spec unless explicitly prohibited by "mirrorSourcePolicy". - // Other cluster configuration, including (but not limited to) other imageTagMirrors objects, - // may impact the exact order mirrors are contacted in, or some mirrors may be contacted - // in parallel, so this should be considered a preference rather than a guarantee of ordering. - // "mirrors" uses one of the following formats: - // host[:port] - // host[:port]/namespace[/namespace…] - // host[:port]/namespace[/namespace…]/repo - // for more information about the format, see the document about the location field: - // https://github.com/containers/image/blob/main/docs/containers-registries.conf.5.md#choosing-a-registry-toml-table - // +optional - // +listType=set - Mirrors []ImageMirror `json:"mirrors,omitempty"` - // mirrorSourcePolicy defines the fallback policy if fails to pull image from the mirrors. - // If unset, the image will continue to be pulled from the repository in the pull spec. - // sourcePolicy is valid configuration only when one or more mirrors are in the mirror list. - // +optional - MirrorSourcePolicy MirrorSourcePolicy `json:"mirrorSourcePolicy,omitempty"` -} diff --git a/vendor/github.com/openshift/api/config/v1/types_infrastructure.go b/vendor/github.com/openshift/api/config/v1/types_infrastructure.go deleted file mode 100644 index d47acdb77..000000000 --- a/vendor/github.com/openshift/api/config/v1/types_infrastructure.go +++ /dev/null @@ -1,1342 +0,0 @@ -package v1 - -import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - -// +genclient -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +kubebuilder:subresource:status - -// Infrastructure holds cluster-wide information about Infrastructure. The canonical name is `cluster` -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type Infrastructure struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata,omitempty"` - - // spec holds user settable values for configuration - // +kubebuilder:validation:Required - // +required - Spec InfrastructureSpec `json:"spec"` - // status holds observed values from the cluster. They may not be overridden. - // +optional - Status InfrastructureStatus `json:"status"` -} - -// InfrastructureSpec contains settings that apply to the cluster infrastructure. -type InfrastructureSpec struct { - // cloudConfig is a reference to a ConfigMap containing the cloud provider configuration file. - // This configuration file is used to configure the Kubernetes cloud provider integration - // when using the built-in cloud provider integration or the external cloud controller manager. - // The namespace for this config map is openshift-config. - // - // cloudConfig should only be consumed by the kube_cloud_config controller. - // The controller is responsible for using the user configuration in the spec - // for various platforms and combining that with the user provided ConfigMap in this field - // to create a stitched kube cloud config. - // The controller generates a ConfigMap `kube-cloud-config` in `openshift-config-managed` namespace - // with the kube cloud config is stored in `cloud.conf` key. - // All the clients are expected to use the generated ConfigMap only. - // - // +optional - CloudConfig ConfigMapFileReference `json:"cloudConfig"` - - // platformSpec holds desired information specific to the underlying - // infrastructure provider. - PlatformSpec PlatformSpec `json:"platformSpec,omitempty"` -} - -// InfrastructureStatus describes the infrastructure the cluster is leveraging. -type InfrastructureStatus struct { - // infrastructureName uniquely identifies a cluster with a human friendly name. - // Once set it should not be changed. Must be of max length 27 and must have only - // alphanumeric or hyphen characters. - InfrastructureName string `json:"infrastructureName"` - - // platform is the underlying infrastructure provider for the cluster. - // - // Deprecated: Use platformStatus.type instead. - Platform PlatformType `json:"platform,omitempty"` - - // platformStatus holds status information specific to the underlying - // infrastructure provider. - // +optional - PlatformStatus *PlatformStatus `json:"platformStatus,omitempty"` - - // etcdDiscoveryDomain is the domain used to fetch the SRV records for discovering - // etcd servers and clients. - // For more info: https://github.com/etcd-io/etcd/blob/329be66e8b3f9e2e6af83c123ff89297e49ebd15/Documentation/op-guide/clustering.md#dns-discovery - // deprecated: as of 4.7, this field is no longer set or honored. It will be removed in a future release. - EtcdDiscoveryDomain string `json:"etcdDiscoveryDomain"` - - // apiServerURL is a valid URI with scheme 'https', address and - // optionally a port (defaulting to 443). apiServerURL can be used by components like the web console - // to tell users where to find the Kubernetes API. - APIServerURL string `json:"apiServerURL"` - - // apiServerInternalURL is a valid URI with scheme 'https', - // address and optionally a port (defaulting to 443). apiServerInternalURL can be used by components - // like kubelets, to contact the Kubernetes API server using the - // infrastructure provider rather than Kubernetes networking. - APIServerInternalURL string `json:"apiServerInternalURI"` - - // controlPlaneTopology expresses the expectations for operands that normally run on control nodes. - // The default is 'HighlyAvailable', which represents the behavior operators have in a "normal" cluster. - // The 'SingleReplica' mode will be used in single-node deployments - // and the operators should not configure the operand for highly-available operation - // The 'External' mode indicates that the control plane is hosted externally to the cluster and that - // its components are not visible within the cluster. - // +kubebuilder:default=HighlyAvailable - // +kubebuilder:validation:Enum=HighlyAvailable;SingleReplica;External - ControlPlaneTopology TopologyMode `json:"controlPlaneTopology"` - - // infrastructureTopology expresses the expectations for infrastructure services that do not run on control - // plane nodes, usually indicated by a node selector for a `role` value - // other than `master`. - // The default is 'HighlyAvailable', which represents the behavior operators have in a "normal" cluster. - // The 'SingleReplica' mode will be used in single-node deployments - // and the operators should not configure the operand for highly-available operation - // NOTE: External topology mode is not applicable for this field. - // +kubebuilder:default=HighlyAvailable - // +kubebuilder:validation:Enum=HighlyAvailable;SingleReplica - InfrastructureTopology TopologyMode `json:"infrastructureTopology"` - - // cpuPartitioning expresses if CPU partitioning is a currently enabled feature in the cluster. - // CPU Partitioning means that this cluster can support partitioning workloads to specific CPU Sets. - // Valid values are "None" and "AllNodes". When omitted, the default value is "None". - // The default value of "None" indicates that no nodes will be setup with CPU partitioning. - // The "AllNodes" value indicates that all nodes have been setup with CPU partitioning, - // and can then be further configured via the PerformanceProfile API. - // +kubebuilder:default=None - // +default="None" - // +kubebuilder:validation:Enum=None;AllNodes - // +openshift:enable:FeatureSets=TechPreviewNoUpgrade - // +optional - CPUPartitioning CPUPartitioningMode `json:"cpuPartitioning,omitempty"` -} - -// TopologyMode defines the topology mode of the control/infra nodes. -// NOTE: Enum validation is specified in each field that uses this type, -// given that External value is not applicable to the InfrastructureTopology -// field. -type TopologyMode string - -const ( - // "HighlyAvailable" is for operators to configure high-availability as much as possible. - HighlyAvailableTopologyMode TopologyMode = "HighlyAvailable" - - // "SingleReplica" is for operators to avoid spending resources for high-availability purpose. - SingleReplicaTopologyMode TopologyMode = "SingleReplica" - - // "External" indicates that the component is running externally to the cluster. When specified - // as the control plane topology, operators should avoid scheduling workloads to masters or assume - // that any of the control plane components such as kubernetes API server or etcd are visible within - // the cluster. - ExternalTopologyMode TopologyMode = "External" -) - -// CPUPartitioningMode defines the mode for CPU partitioning -type CPUPartitioningMode string - -const ( - // CPUPartitioningNone means that no CPU Partitioning is on in this cluster infrastructure - CPUPartitioningNone CPUPartitioningMode = "None" - - // CPUPartitioningAllNodes means that all nodes are configured with CPU Partitioning in this cluster - CPUPartitioningAllNodes CPUPartitioningMode = "AllNodes" -) - -// PlatformLoadBalancerType defines the type of load balancer used by the cluster. -type PlatformLoadBalancerType string - -const ( - // LoadBalancerTypeUserManaged is a load balancer with control-plane VIPs managed outside of the cluster by the customer. - LoadBalancerTypeUserManaged PlatformLoadBalancerType = "UserManaged" - - // LoadBalancerTypeOpenShiftManagedDefault is the default load balancer with control-plane VIPs managed by the OpenShift cluster. - LoadBalancerTypeOpenShiftManagedDefault PlatformLoadBalancerType = "OpenShiftManagedDefault" -) - -// PlatformType is a specific supported infrastructure provider. -// +kubebuilder:validation:Enum="";AWS;Azure;BareMetal;GCP;Libvirt;OpenStack;None;VSphere;oVirt;IBMCloud;KubeVirt;EquinixMetal;PowerVS;AlibabaCloud;Nutanix;External -type PlatformType string - -const ( - // AWSPlatformType represents Amazon Web Services infrastructure. - AWSPlatformType PlatformType = "AWS" - - // AzurePlatformType represents Microsoft Azure infrastructure. - AzurePlatformType PlatformType = "Azure" - - // BareMetalPlatformType represents managed bare metal infrastructure. - BareMetalPlatformType PlatformType = "BareMetal" - - // GCPPlatformType represents Google Cloud Platform infrastructure. - GCPPlatformType PlatformType = "GCP" - - // LibvirtPlatformType represents libvirt infrastructure. - LibvirtPlatformType PlatformType = "Libvirt" - - // OpenStackPlatformType represents OpenStack infrastructure. - OpenStackPlatformType PlatformType = "OpenStack" - - // NonePlatformType means there is no infrastructure provider. - NonePlatformType PlatformType = "None" - - // VSpherePlatformType represents VMWare vSphere infrastructure. - VSpherePlatformType PlatformType = "VSphere" - - // OvirtPlatformType represents oVirt/RHV infrastructure. - OvirtPlatformType PlatformType = "oVirt" - - // IBMCloudPlatformType represents IBM Cloud infrastructure. - IBMCloudPlatformType PlatformType = "IBMCloud" - - // KubevirtPlatformType represents KubeVirt/Openshift Virtualization infrastructure. - KubevirtPlatformType PlatformType = "KubeVirt" - - // EquinixMetalPlatformType represents Equinix Metal infrastructure. - EquinixMetalPlatformType PlatformType = "EquinixMetal" - - // PowerVSPlatformType represents IBM Power Systems Virtual Servers infrastructure. - PowerVSPlatformType PlatformType = "PowerVS" - - // AlibabaCloudPlatformType represents Alibaba Cloud infrastructure. - AlibabaCloudPlatformType PlatformType = "AlibabaCloud" - - // NutanixPlatformType represents Nutanix infrastructure. - NutanixPlatformType PlatformType = "Nutanix" - - // ExternalPlatformType represents generic infrastructure provider. Platform-specific components should be supplemented separately. - ExternalPlatformType PlatformType = "External" -) - -// IBMCloudProviderType is a specific supported IBM Cloud provider cluster type -type IBMCloudProviderType string - -const ( - // Classic means that the IBM Cloud cluster is using classic infrastructure - IBMCloudProviderTypeClassic IBMCloudProviderType = "Classic" - - // VPC means that the IBM Cloud cluster is using VPC infrastructure - IBMCloudProviderTypeVPC IBMCloudProviderType = "VPC" - - // IBMCloudProviderTypeUPI means that the IBM Cloud cluster is using user provided infrastructure. - // This is utilized in IBM Cloud Satellite environments. - IBMCloudProviderTypeUPI IBMCloudProviderType = "UPI" -) - -// ExternalPlatformSpec holds the desired state for the generic External infrastructure provider. -type ExternalPlatformSpec struct { - // PlatformName holds the arbitrary string representing the infrastructure provider name, expected to be set at the installation time. - // This field is solely for informational and reporting purposes and is not expected to be used for decision-making. - // +kubebuilder:default:="Unknown" - // +default="Unknown" - // +kubebuilder:validation:XValidation:rule="oldSelf == 'Unknown' || self == oldSelf",message="platform name cannot be changed once set" - // +optional - PlatformName string `json:"platformName,omitempty"` -} - -// PlatformSpec holds the desired state specific to the underlying infrastructure provider -// of the current cluster. Since these are used at spec-level for the underlying cluster, it -// is supposed that only one of the spec structs is set. -type PlatformSpec struct { - // type is the underlying infrastructure provider for the cluster. This - // value controls whether infrastructure automation such as service load - // balancers, dynamic volume provisioning, machine creation and deletion, and - // other integrations are enabled. If None, no infrastructure automation is - // enabled. Allowed values are "AWS", "Azure", "BareMetal", "GCP", "Libvirt", - // "OpenStack", "VSphere", "oVirt", "KubeVirt", "EquinixMetal", "PowerVS", - // "AlibabaCloud", "Nutanix" and "None". Individual components may not support all platforms, - // and must handle unrecognized platforms as None if they do not support that platform. - // - // +unionDiscriminator - Type PlatformType `json:"type"` - - // AWS contains settings specific to the Amazon Web Services infrastructure provider. - // +optional - AWS *AWSPlatformSpec `json:"aws,omitempty"` - - // Azure contains settings specific to the Azure infrastructure provider. - // +optional - Azure *AzurePlatformSpec `json:"azure,omitempty"` - - // GCP contains settings specific to the Google Cloud Platform infrastructure provider. - // +optional - GCP *GCPPlatformSpec `json:"gcp,omitempty"` - - // BareMetal contains settings specific to the BareMetal platform. - // +optional - BareMetal *BareMetalPlatformSpec `json:"baremetal,omitempty"` - - // OpenStack contains settings specific to the OpenStack infrastructure provider. - // +optional - OpenStack *OpenStackPlatformSpec `json:"openstack,omitempty"` - - // Ovirt contains settings specific to the oVirt infrastructure provider. - // +optional - Ovirt *OvirtPlatformSpec `json:"ovirt,omitempty"` - - // VSphere contains settings specific to the VSphere infrastructure provider. - // +optional - VSphere *VSpherePlatformSpec `json:"vsphere,omitempty"` - - // IBMCloud contains settings specific to the IBMCloud infrastructure provider. - // +optional - IBMCloud *IBMCloudPlatformSpec `json:"ibmcloud,omitempty"` - - // Kubevirt contains settings specific to the kubevirt infrastructure provider. - // +optional - Kubevirt *KubevirtPlatformSpec `json:"kubevirt,omitempty"` - - // EquinixMetal contains settings specific to the Equinix Metal infrastructure provider. - // +optional - EquinixMetal *EquinixMetalPlatformSpec `json:"equinixMetal,omitempty"` - - // PowerVS contains settings specific to the IBM Power Systems Virtual Servers infrastructure provider. - // +optional - PowerVS *PowerVSPlatformSpec `json:"powervs,omitempty"` - - // AlibabaCloud contains settings specific to the Alibaba Cloud infrastructure provider. - // +optional - AlibabaCloud *AlibabaCloudPlatformSpec `json:"alibabaCloud,omitempty"` - - // Nutanix contains settings specific to the Nutanix infrastructure provider. - // +optional - Nutanix *NutanixPlatformSpec `json:"nutanix,omitempty"` - - // ExternalPlatformType represents generic infrastructure provider. - // Platform-specific components should be supplemented separately. - // +optional - External *ExternalPlatformSpec `json:"external,omitempty"` -} - -// ExternalPlatformStatus holds the current status of the generic External infrastructure provider. -type ExternalPlatformStatus struct{} - -// PlatformStatus holds the current status specific to the underlying infrastructure provider -// of the current cluster. Since these are used at status-level for the underlying cluster, it -// is supposed that only one of the status structs is set. -type PlatformStatus struct { - // type is the underlying infrastructure provider for the cluster. This - // value controls whether infrastructure automation such as service load - // balancers, dynamic volume provisioning, machine creation and deletion, and - // other integrations are enabled. If None, no infrastructure automation is - // enabled. Allowed values are "AWS", "Azure", "BareMetal", "GCP", "Libvirt", - // "OpenStack", "VSphere", "oVirt", "EquinixMetal", "PowerVS", "AlibabaCloud", "Nutanix" and "None". - // Individual components may not support all platforms, and must handle - // unrecognized platforms as None if they do not support that platform. - // - // This value will be synced with to the `status.platform` and `status.platformStatus.type`. - // Currently this value cannot be changed once set. - Type PlatformType `json:"type"` - - // AWS contains settings specific to the Amazon Web Services infrastructure provider. - // +optional - AWS *AWSPlatformStatus `json:"aws,omitempty"` - - // Azure contains settings specific to the Azure infrastructure provider. - // +optional - Azure *AzurePlatformStatus `json:"azure,omitempty"` - - // GCP contains settings specific to the Google Cloud Platform infrastructure provider. - // +optional - GCP *GCPPlatformStatus `json:"gcp,omitempty"` - - // BareMetal contains settings specific to the BareMetal platform. - // +optional - BareMetal *BareMetalPlatformStatus `json:"baremetal,omitempty"` - - // OpenStack contains settings specific to the OpenStack infrastructure provider. - // +optional - OpenStack *OpenStackPlatformStatus `json:"openstack,omitempty"` - - // Ovirt contains settings specific to the oVirt infrastructure provider. - // +optional - Ovirt *OvirtPlatformStatus `json:"ovirt,omitempty"` - - // VSphere contains settings specific to the VSphere infrastructure provider. - // +optional - VSphere *VSpherePlatformStatus `json:"vsphere,omitempty"` - - // IBMCloud contains settings specific to the IBMCloud infrastructure provider. - // +optional - IBMCloud *IBMCloudPlatformStatus `json:"ibmcloud,omitempty"` - - // Kubevirt contains settings specific to the kubevirt infrastructure provider. - // +optional - Kubevirt *KubevirtPlatformStatus `json:"kubevirt,omitempty"` - - // EquinixMetal contains settings specific to the Equinix Metal infrastructure provider. - // +optional - EquinixMetal *EquinixMetalPlatformStatus `json:"equinixMetal,omitempty"` - - // PowerVS contains settings specific to the Power Systems Virtual Servers infrastructure provider. - // +optional - PowerVS *PowerVSPlatformStatus `json:"powervs,omitempty"` - - // AlibabaCloud contains settings specific to the Alibaba Cloud infrastructure provider. - // +optional - AlibabaCloud *AlibabaCloudPlatformStatus `json:"alibabaCloud,omitempty"` - - // Nutanix contains settings specific to the Nutanix infrastructure provider. - // +optional - Nutanix *NutanixPlatformStatus `json:"nutanix,omitempty"` - - // External contains settings specific to the generic External infrastructure provider. - // +optional - External *ExternalPlatformStatus `json:"external,omitempty"` -} - -// AWSServiceEndpoint store the configuration of a custom url to -// override existing defaults of AWS Services. -type AWSServiceEndpoint struct { - // name is the name of the AWS service. - // The list of all the service names can be found at https://docs.aws.amazon.com/general/latest/gr/aws-service-information.html - // This must be provided and cannot be empty. - // - // +kubebuilder:validation:Pattern=`^[a-z0-9-]+$` - Name string `json:"name"` - - // url is fully qualified URI with scheme https, that overrides the default generated - // endpoint for a client. - // This must be provided and cannot be empty. - // - // +kubebuilder:validation:Pattern=`^https://` - URL string `json:"url"` -} - -// AWSPlatformSpec holds the desired state of the Amazon Web Services infrastructure provider. -// This only includes fields that can be modified in the cluster. -type AWSPlatformSpec struct { - // serviceEndpoints list contains custom endpoints which will override default - // service endpoint of AWS Services. - // There must be only one ServiceEndpoint for a service. - // +optional - ServiceEndpoints []AWSServiceEndpoint `json:"serviceEndpoints,omitempty"` -} - -// AWSPlatformStatus holds the current status of the Amazon Web Services infrastructure provider. -type AWSPlatformStatus struct { - // region holds the default AWS region for new AWS resources created by the cluster. - Region string `json:"region"` - - // ServiceEndpoints list contains custom endpoints which will override default - // service endpoint of AWS Services. - // There must be only one ServiceEndpoint for a service. - // +optional - ServiceEndpoints []AWSServiceEndpoint `json:"serviceEndpoints,omitempty"` - - // resourceTags is a list of additional tags to apply to AWS resources created for the cluster. - // See https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html for information on tagging AWS resources. - // AWS supports a maximum of 50 tags per resource. OpenShift reserves 25 tags for its use, leaving 25 tags - // available for the user. - // +kubebuilder:validation:MaxItems=25 - // +optional - ResourceTags []AWSResourceTag `json:"resourceTags,omitempty"` -} - -// AWSResourceTag is a tag to apply to AWS resources created for the cluster. -type AWSResourceTag struct { - // key is the key of the tag - // +kubebuilder:validation:Required - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:MaxLength=128 - // +kubebuilder:validation:Pattern=`^[0-9A-Za-z_.:/=+-@]+$` - // +required - Key string `json:"key"` - // value is the value of the tag. - // Some AWS service do not support empty values. Since tags are added to resources in many services, the - // length of the tag value must meet the requirements of all services. - // +kubebuilder:validation:Required - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:MaxLength=256 - // +kubebuilder:validation:Pattern=`^[0-9A-Za-z_.:/=+-@]+$` - // +required - Value string `json:"value"` -} - -// AzurePlatformSpec holds the desired state of the Azure infrastructure provider. -// This only includes fields that can be modified in the cluster. -type AzurePlatformSpec struct{} - -// AzurePlatformStatus holds the current status of the Azure infrastructure provider. -// +kubebuilder:validation:XValidation:rule="!has(oldSelf.resourceTags) && !has(self.resourceTags) || has(oldSelf.resourceTags) && has(self.resourceTags)",message="resourceTags may only be configured during installation" -type AzurePlatformStatus struct { - // resourceGroupName is the Resource Group for new Azure resources created for the cluster. - ResourceGroupName string `json:"resourceGroupName"` - - // networkResourceGroupName is the Resource Group for network resources like the Virtual Network and Subnets used by the cluster. - // If empty, the value is same as ResourceGroupName. - // +optional - NetworkResourceGroupName string `json:"networkResourceGroupName,omitempty"` - - // cloudName is the name of the Azure cloud environment which can be used to configure the Azure SDK - // with the appropriate Azure API endpoints. - // If empty, the value is equal to `AzurePublicCloud`. - // +optional - CloudName AzureCloudEnvironment `json:"cloudName,omitempty"` - - // armEndpoint specifies a URL to use for resource management in non-soverign clouds such as Azure Stack. - // +optional - ARMEndpoint string `json:"armEndpoint,omitempty"` - - // resourceTags is a list of additional tags to apply to Azure resources created for the cluster. - // See https://docs.microsoft.com/en-us/rest/api/resources/tags for information on tagging Azure resources. - // Due to limitations on Automation, Content Delivery Network, DNS Azure resources, a maximum of 15 tags - // may be applied. OpenShift reserves 5 tags for internal use, allowing 10 tags for user configuration. - // +kubebuilder:validation:MaxItems=10 - // +kubebuilder:validation:XValidation:rule="self.all(x, x in oldSelf) && oldSelf.all(x, x in self)",message="resourceTags are immutable and may only be configured during installation" - // +optional - ResourceTags []AzureResourceTag `json:"resourceTags,omitempty"` -} - -// AzureResourceTag is a tag to apply to Azure resources created for the cluster. -type AzureResourceTag struct { - // key is the key part of the tag. A tag key can have a maximum of 128 characters and cannot be empty. Key - // must begin with a letter, end with a letter, number or underscore, and must contain only alphanumeric - // characters and the following special characters `_ . -`. - // +kubebuilder:validation:Required - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:MaxLength=128 - // +kubebuilder:validation:Pattern=`^[a-zA-Z]([0-9A-Za-z_.-]*[0-9A-Za-z_])?$` - Key string `json:"key"` - // value is the value part of the tag. A tag value can have a maximum of 256 characters and cannot be empty. Value - // must contain only alphanumeric characters and the following special characters `_ + , - . / : ; < = > ? @`. - // +kubebuilder:validation:Required - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:MaxLength=256 - // +kubebuilder:validation:Pattern=`^[0-9A-Za-z_.=+-@]+$` - Value string `json:"value"` -} - -// AzureCloudEnvironment is the name of the Azure cloud environment -// +kubebuilder:validation:Enum="";AzurePublicCloud;AzureUSGovernmentCloud;AzureChinaCloud;AzureGermanCloud;AzureStackCloud -type AzureCloudEnvironment string - -const ( - // AzurePublicCloud is the general-purpose, public Azure cloud environment. - AzurePublicCloud AzureCloudEnvironment = "AzurePublicCloud" - - // AzureUSGovernmentCloud is the Azure cloud environment for the US government. - AzureUSGovernmentCloud AzureCloudEnvironment = "AzureUSGovernmentCloud" - - // AzureChinaCloud is the Azure cloud environment used in China. - AzureChinaCloud AzureCloudEnvironment = "AzureChinaCloud" - - // AzureGermanCloud is the Azure cloud environment used in Germany. - AzureGermanCloud AzureCloudEnvironment = "AzureGermanCloud" - - // AzureStackCloud is the Azure cloud environment used at the edge and on premises. - AzureStackCloud AzureCloudEnvironment = "AzureStackCloud" -) - -// GCPPlatformSpec holds the desired state of the Google Cloud Platform infrastructure provider. -// This only includes fields that can be modified in the cluster. -type GCPPlatformSpec struct{} - -// GCPPlatformStatus holds the current status of the Google Cloud Platform infrastructure provider. -type GCPPlatformStatus struct { - // resourceGroupName is the Project ID for new GCP resources created for the cluster. - ProjectID string `json:"projectID"` - - // region holds the region for new GCP resources created for the cluster. - Region string `json:"region"` -} - -// BareMetalPlatformLoadBalancer defines the load balancer used by the cluster on BareMetal platform. -// +union -type BareMetalPlatformLoadBalancer struct { - // type defines the type of load balancer used by the cluster on BareMetal platform - // which can be a user-managed or openshift-managed load balancer - // that is to be used for the OpenShift API and Ingress endpoints. - // When set to OpenShiftManagedDefault the static pods in charge of API and Ingress traffic load-balancing - // defined in the machine config operator will be deployed. - // When set to UserManaged these static pods will not be deployed and it is expected that - // the load balancer is configured out of band by the deployer. - // When omitted, this means no opinion and the platform is left to choose a reasonable default. - // The default value is OpenShiftManagedDefault. - // +default="OpenShiftManagedDefault" - // +kubebuilder:default:="OpenShiftManagedDefault" - // +kubebuilder:validation:Enum:="OpenShiftManagedDefault";"UserManaged" - // +kubebuilder:validation:XValidation:rule="oldSelf == '' || self == oldSelf",message="type is immutable once set" - // +optional - // +unionDiscriminator - Type PlatformLoadBalancerType `json:"type,omitempty"` -} - -// BareMetalPlatformSpec holds the desired state of the BareMetal infrastructure provider. -// This only includes fields that can be modified in the cluster. -type BareMetalPlatformSpec struct{} - -// BareMetalPlatformStatus holds the current status of the BareMetal infrastructure provider. -// For more information about the network architecture used with the BareMetal platform type, see: -// https://github.com/openshift/installer/blob/master/docs/design/baremetal/networking-infrastructure.md -type BareMetalPlatformStatus struct { - // apiServerInternalIP is an IP address to contact the Kubernetes API server that can be used - // by components inside the cluster, like kubelets using the infrastructure rather - // than Kubernetes networking. It is the IP that the Infrastructure.status.apiServerInternalURI - // points to. It is the IP for a self-hosted load balancer in front of the API servers. - // - // Deprecated: Use APIServerInternalIPs instead. - APIServerInternalIP string `json:"apiServerInternalIP,omitempty"` - - // apiServerInternalIPs are the IP addresses to contact the Kubernetes API - // server that can be used by components inside the cluster, like kubelets - // using the infrastructure rather than Kubernetes networking. These are the - // IPs for a self-hosted load balancer in front of the API servers. In dual - // stack clusters this list contains two IPs otherwise only one. - // - // +kubebuilder:validation:Format=ip - // +kubebuilder:validation:MaxItems=2 - APIServerInternalIPs []string `json:"apiServerInternalIPs"` - - // ingressIP is an external IP which routes to the default ingress controller. - // The IP is a suitable target of a wildcard DNS record used to resolve default route host names. - // - // Deprecated: Use IngressIPs instead. - IngressIP string `json:"ingressIP,omitempty"` - - // ingressIPs are the external IPs which route to the default ingress - // controller. The IPs are suitable targets of a wildcard DNS record used to - // resolve default route host names. In dual stack clusters this list - // contains two IPs otherwise only one. - // - // +kubebuilder:validation:Format=ip - // +kubebuilder:validation:MaxItems=2 - IngressIPs []string `json:"ingressIPs"` - - // nodeDNSIP is the IP address for the internal DNS used by the - // nodes. Unlike the one managed by the DNS operator, `NodeDNSIP` - // provides name resolution for the nodes themselves. There is no DNS-as-a-service for - // BareMetal deployments. In order to minimize necessary changes to the - // datacenter DNS, a DNS service is hosted as a static pod to serve those hostnames - // to the nodes in the cluster. - NodeDNSIP string `json:"nodeDNSIP,omitempty"` - - // loadBalancer defines how the load balancer used by the cluster is configured. - // +default={"type": "OpenShiftManagedDefault"} - // +kubebuilder:default={"type": "OpenShiftManagedDefault"} - // +openshift:enable:FeatureSets=TechPreviewNoUpgrade - // +optional - LoadBalancer *BareMetalPlatformLoadBalancer `json:"loadBalancer,omitempty"` -} - -// OpenStackPlatformLoadBalancer defines the load balancer used by the cluster on OpenStack platform. -// +union -type OpenStackPlatformLoadBalancer struct { - // type defines the type of load balancer used by the cluster on OpenStack platform - // which can be a user-managed or openshift-managed load balancer - // that is to be used for the OpenShift API and Ingress endpoints. - // When set to OpenShiftManagedDefault the static pods in charge of API and Ingress traffic load-balancing - // defined in the machine config operator will be deployed. - // When set to UserManaged these static pods will not be deployed and it is expected that - // the load balancer is configured out of band by the deployer. - // When omitted, this means no opinion and the platform is left to choose a reasonable default. - // The default value is OpenShiftManagedDefault. - // +default="OpenShiftManagedDefault" - // +kubebuilder:default:="OpenShiftManagedDefault" - // +kubebuilder:validation:Enum:="OpenShiftManagedDefault";"UserManaged" - // +kubebuilder:validation:XValidation:rule="oldSelf == '' || self == oldSelf",message="type is immutable once set" - // +optional - // +unionDiscriminator - Type PlatformLoadBalancerType `json:"type,omitempty"` -} - -// OpenStackPlatformSpec holds the desired state of the OpenStack infrastructure provider. -// This only includes fields that can be modified in the cluster. -type OpenStackPlatformSpec struct{} - -// OpenStackPlatformStatus holds the current status of the OpenStack infrastructure provider. -type OpenStackPlatformStatus struct { - // apiServerInternalIP is an IP address to contact the Kubernetes API server that can be used - // by components inside the cluster, like kubelets using the infrastructure rather - // than Kubernetes networking. It is the IP that the Infrastructure.status.apiServerInternalURI - // points to. It is the IP for a self-hosted load balancer in front of the API servers. - // - // Deprecated: Use APIServerInternalIPs instead. - APIServerInternalIP string `json:"apiServerInternalIP,omitempty"` - - // apiServerInternalIPs are the IP addresses to contact the Kubernetes API - // server that can be used by components inside the cluster, like kubelets - // using the infrastructure rather than Kubernetes networking. These are the - // IPs for a self-hosted load balancer in front of the API servers. In dual - // stack clusters this list contains two IPs otherwise only one. - // - // +kubebuilder:validation:Format=ip - // +kubebuilder:validation:MaxItems=2 - APIServerInternalIPs []string `json:"apiServerInternalIPs"` - - // cloudName is the name of the desired OpenStack cloud in the - // client configuration file (`clouds.yaml`). - CloudName string `json:"cloudName,omitempty"` - - // ingressIP is an external IP which routes to the default ingress controller. - // The IP is a suitable target of a wildcard DNS record used to resolve default route host names. - // - // Deprecated: Use IngressIPs instead. - IngressIP string `json:"ingressIP,omitempty"` - - // ingressIPs are the external IPs which route to the default ingress - // controller. The IPs are suitable targets of a wildcard DNS record used to - // resolve default route host names. In dual stack clusters this list - // contains two IPs otherwise only one. - // - // +kubebuilder:validation:Format=ip - // +kubebuilder:validation:MaxItems=2 - IngressIPs []string `json:"ingressIPs"` - - // nodeDNSIP is the IP address for the internal DNS used by the - // nodes. Unlike the one managed by the DNS operator, `NodeDNSIP` - // provides name resolution for the nodes themselves. There is no DNS-as-a-service for - // OpenStack deployments. In order to minimize necessary changes to the - // datacenter DNS, a DNS service is hosted as a static pod to serve those hostnames - // to the nodes in the cluster. - NodeDNSIP string `json:"nodeDNSIP,omitempty"` - - // loadBalancer defines how the load balancer used by the cluster is configured. - // +default={"type": "OpenShiftManagedDefault"} - // +kubebuilder:default={"type": "OpenShiftManagedDefault"} - // +optional - LoadBalancer *OpenStackPlatformLoadBalancer `json:"loadBalancer,omitempty"` -} - -// OvirtPlatformLoadBalancer defines the load balancer used by the cluster on Ovirt platform. -// +union -type OvirtPlatformLoadBalancer struct { - // type defines the type of load balancer used by the cluster on Ovirt platform - // which can be a user-managed or openshift-managed load balancer - // that is to be used for the OpenShift API and Ingress endpoints. - // When set to OpenShiftManagedDefault the static pods in charge of API and Ingress traffic load-balancing - // defined in the machine config operator will be deployed. - // When set to UserManaged these static pods will not be deployed and it is expected that - // the load balancer is configured out of band by the deployer. - // When omitted, this means no opinion and the platform is left to choose a reasonable default. - // The default value is OpenShiftManagedDefault. - // +default="OpenShiftManagedDefault" - // +kubebuilder:default:="OpenShiftManagedDefault" - // +kubebuilder:validation:Enum:="OpenShiftManagedDefault";"UserManaged" - // +kubebuilder:validation:XValidation:rule="oldSelf == '' || self == oldSelf",message="type is immutable once set" - // +optional - // +unionDiscriminator - Type PlatformLoadBalancerType `json:"type,omitempty"` -} - -// OvirtPlatformSpec holds the desired state of the oVirt infrastructure provider. -// This only includes fields that can be modified in the cluster. -type OvirtPlatformSpec struct{} - -// OvirtPlatformStatus holds the current status of the oVirt infrastructure provider. -type OvirtPlatformStatus struct { - // apiServerInternalIP is an IP address to contact the Kubernetes API server that can be used - // by components inside the cluster, like kubelets using the infrastructure rather - // than Kubernetes networking. It is the IP that the Infrastructure.status.apiServerInternalURI - // points to. It is the IP for a self-hosted load balancer in front of the API servers. - // - // Deprecated: Use APIServerInternalIPs instead. - APIServerInternalIP string `json:"apiServerInternalIP,omitempty"` - - // apiServerInternalIPs are the IP addresses to contact the Kubernetes API - // server that can be used by components inside the cluster, like kubelets - // using the infrastructure rather than Kubernetes networking. These are the - // IPs for a self-hosted load balancer in front of the API servers. In dual - // stack clusters this list contains two IPs otherwise only one. - // - // +kubebuilder:validation:Format=ip - // +kubebuilder:validation:MaxItems=2 - APIServerInternalIPs []string `json:"apiServerInternalIPs"` - - // ingressIP is an external IP which routes to the default ingress controller. - // The IP is a suitable target of a wildcard DNS record used to resolve default route host names. - // - // Deprecated: Use IngressIPs instead. - IngressIP string `json:"ingressIP,omitempty"` - - // ingressIPs are the external IPs which route to the default ingress - // controller. The IPs are suitable targets of a wildcard DNS record used to - // resolve default route host names. In dual stack clusters this list - // contains two IPs otherwise only one. - // - // +kubebuilder:validation:Format=ip - // +kubebuilder:validation:MaxItems=2 - IngressIPs []string `json:"ingressIPs"` - - // deprecated: as of 4.6, this field is no longer set or honored. It will be removed in a future release. - NodeDNSIP string `json:"nodeDNSIP,omitempty"` - - // loadBalancer defines how the load balancer used by the cluster is configured. - // +default={"type": "OpenShiftManagedDefault"} - // +kubebuilder:default={"type": "OpenShiftManagedDefault"} - // +openshift:enable:FeatureSets=TechPreviewNoUpgrade - // +optional - LoadBalancer *OvirtPlatformLoadBalancer `json:"loadBalancer,omitempty"` -} - -// VSpherePlatformLoadBalancer defines the load balancer used by the cluster on VSphere platform. -// +union -type VSpherePlatformLoadBalancer struct { - // type defines the type of load balancer used by the cluster on VSphere platform - // which can be a user-managed or openshift-managed load balancer - // that is to be used for the OpenShift API and Ingress endpoints. - // When set to OpenShiftManagedDefault the static pods in charge of API and Ingress traffic load-balancing - // defined in the machine config operator will be deployed. - // When set to UserManaged these static pods will not be deployed and it is expected that - // the load balancer is configured out of band by the deployer. - // When omitted, this means no opinion and the platform is left to choose a reasonable default. - // The default value is OpenShiftManagedDefault. - // +default="OpenShiftManagedDefault" - // +kubebuilder:default:="OpenShiftManagedDefault" - // +kubebuilder:validation:Enum:="OpenShiftManagedDefault";"UserManaged" - // +kubebuilder:validation:XValidation:rule="oldSelf == '' || self == oldSelf",message="type is immutable once set" - // +optional - // +unionDiscriminator - Type PlatformLoadBalancerType `json:"type,omitempty"` -} - -// VSpherePlatformFailureDomainSpec holds the region and zone failure domain and -// the vCenter topology of that failure domain. -type VSpherePlatformFailureDomainSpec struct { - // name defines the arbitrary but unique name - // of a failure domain. - // +kubebuilder:validation:Required - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:MaxLength=256 - Name string `json:"name"` - - // region defines the name of a region tag that will - // be attached to a vCenter datacenter. The tag - // category in vCenter must be named openshift-region. - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:MaxLength=80 - // +kubebuilder:validation:Required - Region string `json:"region"` - - // zone defines the name of a zone tag that will - // be attached to a vCenter cluster. The tag - // category in vCenter must be named openshift-zone. - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:MaxLength=80 - // +kubebuilder:validation:Required - Zone string `json:"zone"` - - // server is the fully-qualified domain name or the IP address of the vCenter server. - // +kubebuilder:validation:Required - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:MaxLength=255 - // --- - // + Validation is applied via a patch, we validate the format as either ipv4, ipv6 or hostname - Server string `json:"server"` - - // Topology describes a given failure domain using vSphere constructs - // +kubebuilder:validation:Required - Topology VSpherePlatformTopology `json:"topology"` -} - -// VSpherePlatformTopology holds the required and optional vCenter objects - datacenter, -// computeCluster, networks, datastore and resourcePool - to provision virtual machines. -type VSpherePlatformTopology struct { - // datacenter is the name of vCenter datacenter in which virtual machines will be located. - // The maximum length of the datacenter name is 80 characters. - // +kubebuilder:validation:Required - // +kubebuilder:validation:MaxLength=80 - Datacenter string `json:"datacenter"` - - // computeCluster the absolute path of the vCenter cluster - // in which virtual machine will be located. - // The absolute path is of the form //host/. - // The maximum length of the path is 2048 characters. - // +kubebuilder:validation:Required - // +kubebuilder:validation:MaxLength=2048 - // +kubebuilder:validation:Pattern=`^/.*?/host/.*?` - ComputeCluster string `json:"computeCluster"` - - // networks is the list of port group network names within this failure domain. - // Currently, we only support a single interface per RHCOS virtual machine. - // The available networks (port groups) can be listed using - // `govc ls 'network/*'` - // The single interface should be the absolute path of the form - // //network/. - // +kubebuilder:validation:Required - // +kubebuilder:validation:MaxItems=1 - // +kubebuilder:validation:MinItems=1 - Networks []string `json:"networks"` - - // datastore is the absolute path of the datastore in which the - // virtual machine is located. - // The absolute path is of the form //datastore/ - // The maximum length of the path is 2048 characters. - // +kubebuilder:validation:Required - // +kubebuilder:validation:MaxLength=2048 - // +kubebuilder:validation:Pattern=`^/.*?/datastore/.*?` - Datastore string `json:"datastore"` - - // resourcePool is the absolute path of the resource pool where virtual machines will be - // created. The absolute path is of the form //host//Resources/. - // The maximum length of the path is 2048 characters. - // +kubebuilder:validation:MaxLength=2048 - // +kubebuilder:validation:Pattern=`^/.*?/host/.*?/Resources.*` - // +optional - ResourcePool string `json:"resourcePool,omitempty"` - - // folder is the absolute path of the folder where - // virtual machines are located. The absolute path - // is of the form //vm/. - // The maximum length of the path is 2048 characters. - // +kubebuilder:validation:MaxLength=2048 - // +kubebuilder:validation:Pattern=`^/.*?/vm/.*?` - // +optional - Folder string `json:"folder,omitempty"` -} - -// VSpherePlatformVCenterSpec stores the vCenter connection fields. -// This is used by the vSphere CCM. -type VSpherePlatformVCenterSpec struct { - - // server is the fully-qualified domain name or the IP address of the vCenter server. - // +kubebuilder:validation:Required - // +kubebuilder:validation:MaxLength=255 - // --- - // + Validation is applied via a patch, we validate the format as either ipv4, ipv6 or hostname - Server string `json:"server"` - - // port is the TCP port that will be used to communicate to - // the vCenter endpoint. - // When omitted, this means the user has no opinion and - // it is up to the platform to choose a sensible default, - // which is subject to change over time. - // +kubebuilder:validation:Minimum=1 - // +kubebuilder:validation:Maximum=32767 - // +optional - Port int32 `json:"port,omitempty"` - - // The vCenter Datacenters in which the RHCOS - // vm guests are located. This field will - // be used by the Cloud Controller Manager. - // Each datacenter listed here should be used within - // a topology. - // +kubebuilder:validation:Required - // +kubebuilder:validation:MinItems=1 - Datacenters []string `json:"datacenters"` -} - -// VSpherePlatformNodeNetworkingSpec holds the network CIDR(s) and port group name for -// including and excluding IP ranges in the cloud provider. -// This would be used for example when multiple network adapters are attached to -// a guest to help determine which IP address the cloud config manager should use -// for the external and internal node networking. -type VSpherePlatformNodeNetworkingSpec struct { - // networkSubnetCidr IP address on VirtualMachine's network interfaces included in the fields' CIDRs - // that will be used in respective status.addresses fields. - // --- - // + Validation is applied via a patch, we validate the format as cidr - // +optional - NetworkSubnetCIDR []string `json:"networkSubnetCidr,omitempty"` - - // network VirtualMachine's VM Network names that will be used to when searching - // for status.addresses fields. Note that if internal.networkSubnetCIDR and - // external.networkSubnetCIDR are not set, then the vNIC associated to this network must - // only have a single IP address assigned to it. - // The available networks (port groups) can be listed using - // `govc ls 'network/*'` - // +optional - Network string `json:"network,omitempty"` - - // excludeNetworkSubnetCidr IP addresses in subnet ranges will be excluded when selecting - // the IP address from the VirtualMachine's VM for use in the status.addresses fields. - // --- - // + Validation is applied via a patch, we validate the format as cidr - // +optional - ExcludeNetworkSubnetCIDR []string `json:"excludeNetworkSubnetCidr,omitempty"` -} - -// VSpherePlatformNodeNetworking holds the external and internal node networking spec. -type VSpherePlatformNodeNetworking struct { - // external represents the network configuration of the node that is externally routable. - // +optional - External VSpherePlatformNodeNetworkingSpec `json:"external"` - // internal represents the network configuration of the node that is routable only within the cluster. - // +optional - Internal VSpherePlatformNodeNetworkingSpec `json:"internal"` -} - -// VSpherePlatformSpec holds the desired state of the vSphere infrastructure provider. -// In the future the cloud provider operator, storage operator and machine operator will -// use these fields for configuration. -type VSpherePlatformSpec struct { - // vcenters holds the connection details for services to communicate with vCenter. - // Currently, only a single vCenter is supported. - // --- - // + If VCenters is not defined use the existing cloud-config configmap defined - // + in openshift-config. - // +kubebuilder:validation:MaxItems=1 - // +kubebuilder:validation:MinItems=0 - // +optional - VCenters []VSpherePlatformVCenterSpec `json:"vcenters,omitempty"` - - // failureDomains contains the definition of region, zone and the vCenter topology. - // If this is omitted failure domains (regions and zones) will not be used. - // +optional - FailureDomains []VSpherePlatformFailureDomainSpec `json:"failureDomains,omitempty"` - - // nodeNetworking contains the definition of internal and external network constraints for - // assigning the node's networking. - // If this field is omitted, networking defaults to the legacy - // address selection behavior which is to only support a single address and - // return the first one found. - // +optional - NodeNetworking VSpherePlatformNodeNetworking `json:"nodeNetworking,omitempty"` -} - -// VSpherePlatformStatus holds the current status of the vSphere infrastructure provider. -type VSpherePlatformStatus struct { - // apiServerInternalIP is an IP address to contact the Kubernetes API server that can be used - // by components inside the cluster, like kubelets using the infrastructure rather - // than Kubernetes networking. It is the IP that the Infrastructure.status.apiServerInternalURI - // points to. It is the IP for a self-hosted load balancer in front of the API servers. - // - // Deprecated: Use APIServerInternalIPs instead. - APIServerInternalIP string `json:"apiServerInternalIP,omitempty"` - - // apiServerInternalIPs are the IP addresses to contact the Kubernetes API - // server that can be used by components inside the cluster, like kubelets - // using the infrastructure rather than Kubernetes networking. These are the - // IPs for a self-hosted load balancer in front of the API servers. In dual - // stack clusters this list contains two IPs otherwise only one. - // - // +kubebuilder:validation:Format=ip - // +kubebuilder:validation:MaxItems=2 - APIServerInternalIPs []string `json:"apiServerInternalIPs"` - - // ingressIP is an external IP which routes to the default ingress controller. - // The IP is a suitable target of a wildcard DNS record used to resolve default route host names. - // - // Deprecated: Use IngressIPs instead. - IngressIP string `json:"ingressIP,omitempty"` - - // ingressIPs are the external IPs which route to the default ingress - // controller. The IPs are suitable targets of a wildcard DNS record used to - // resolve default route host names. In dual stack clusters this list - // contains two IPs otherwise only one. - // - // +kubebuilder:validation:Format=ip - // +kubebuilder:validation:MaxItems=2 - IngressIPs []string `json:"ingressIPs"` - - // nodeDNSIP is the IP address for the internal DNS used by the - // nodes. Unlike the one managed by the DNS operator, `NodeDNSIP` - // provides name resolution for the nodes themselves. There is no DNS-as-a-service for - // vSphere deployments. In order to minimize necessary changes to the - // datacenter DNS, a DNS service is hosted as a static pod to serve those hostnames - // to the nodes in the cluster. - NodeDNSIP string `json:"nodeDNSIP,omitempty"` - - // loadBalancer defines how the load balancer used by the cluster is configured. - // +default={"type": "OpenShiftManagedDefault"} - // +kubebuilder:default={"type": "OpenShiftManagedDefault"} - // +openshift:enable:FeatureSets=TechPreviewNoUpgrade - // +optional - LoadBalancer *VSpherePlatformLoadBalancer `json:"loadBalancer,omitempty"` -} - -// IBMCloudPlatformSpec holds the desired state of the IBMCloud infrastructure provider. -// This only includes fields that can be modified in the cluster. -type IBMCloudPlatformSpec struct{} - -// IBMCloudPlatformStatus holds the current status of the IBMCloud infrastructure provider. -type IBMCloudPlatformStatus struct { - // Location is where the cluster has been deployed - Location string `json:"location,omitempty"` - - // ResourceGroupName is the Resource Group for new IBMCloud resources created for the cluster. - ResourceGroupName string `json:"resourceGroupName,omitempty"` - - // ProviderType indicates the type of cluster that was created - ProviderType IBMCloudProviderType `json:"providerType,omitempty"` - - // CISInstanceCRN is the CRN of the Cloud Internet Services instance managing - // the DNS zone for the cluster's base domain - CISInstanceCRN string `json:"cisInstanceCRN,omitempty"` - - // DNSInstanceCRN is the CRN of the DNS Services instance managing the DNS zone - // for the cluster's base domain - DNSInstanceCRN string `json:"dnsInstanceCRN,omitempty"` -} - -// KubevirtPlatformSpec holds the desired state of the kubevirt infrastructure provider. -// This only includes fields that can be modified in the cluster. -type KubevirtPlatformSpec struct{} - -// KubevirtPlatformStatus holds the current status of the kubevirt infrastructure provider. -type KubevirtPlatformStatus struct { - // apiServerInternalIP is an IP address to contact the Kubernetes API server that can be used - // by components inside the cluster, like kubelets using the infrastructure rather - // than Kubernetes networking. It is the IP that the Infrastructure.status.apiServerInternalURI - // points to. It is the IP for a self-hosted load balancer in front of the API servers. - APIServerInternalIP string `json:"apiServerInternalIP,omitempty"` - - // ingressIP is an external IP which routes to the default ingress controller. - // The IP is a suitable target of a wildcard DNS record used to resolve default route host names. - IngressIP string `json:"ingressIP,omitempty"` -} - -// EquinixMetalPlatformSpec holds the desired state of the Equinix Metal infrastructure provider. -// This only includes fields that can be modified in the cluster. -type EquinixMetalPlatformSpec struct{} - -// EquinixMetalPlatformStatus holds the current status of the Equinix Metal infrastructure provider. -type EquinixMetalPlatformStatus struct { - // apiServerInternalIP is an IP address to contact the Kubernetes API server that can be used - // by components inside the cluster, like kubelets using the infrastructure rather - // than Kubernetes networking. It is the IP that the Infrastructure.status.apiServerInternalURI - // points to. It is the IP for a self-hosted load balancer in front of the API servers. - APIServerInternalIP string `json:"apiServerInternalIP,omitempty"` - - // ingressIP is an external IP which routes to the default ingress controller. - // The IP is a suitable target of a wildcard DNS record used to resolve default route host names. - IngressIP string `json:"ingressIP,omitempty"` -} - -// PowervsServiceEndpoint stores the configuration of a custom url to -// override existing defaults of PowerVS Services. -type PowerVSServiceEndpoint struct { - // name is the name of the Power VS service. - // Few of the services are - // IAM - https://cloud.ibm.com/apidocs/iam-identity-token-api - // ResourceController - https://cloud.ibm.com/apidocs/resource-controller/resource-controller - // Power Cloud - https://cloud.ibm.com/apidocs/power-cloud - // - // +kubebuilder:validation:Required - // +kubebuilder:validation:Pattern=`^[a-z0-9-]+$` - Name string `json:"name"` - - // url is fully qualified URI with scheme https, that overrides the default generated - // endpoint for a client. - // This must be provided and cannot be empty. - // - // +kubebuilder:validation:Required - // +kubebuilder:validation:Type=string - // +kubebuilder:validation:Format=uri - // +kubebuilder:validation:Pattern=`^https://` - URL string `json:"url"` -} - -// PowerVSPlatformSpec holds the desired state of the IBM Power Systems Virtual Servers infrastructure provider. -// This only includes fields that can be modified in the cluster. -type PowerVSPlatformSpec struct { - // serviceEndpoints is a list of custom endpoints which will override the default - // service endpoints of a Power VS service. - // +listType=map - // +listMapKey=name - // +optional - ServiceEndpoints []PowerVSServiceEndpoint `json:"serviceEndpoints,omitempty"` -} - -// PowerVSPlatformStatus holds the current status of the IBM Power Systems Virtual Servers infrastrucutre provider. -// +kubebuilder:validation:XValidation:rule="!has(oldSelf.resourceGroup) || has(self.resourceGroup)",message="cannot unset resourceGroup once set" -type PowerVSPlatformStatus struct { - // region holds the default Power VS region for new Power VS resources created by the cluster. - Region string `json:"region"` - - // zone holds the default zone for the new Power VS resources created by the cluster. - // Note: Currently only single-zone OCP clusters are supported - Zone string `json:"zone"` - - // resourceGroup is the resource group name for new IBMCloud resources created for a cluster. - // The resource group specified here will be used by cluster-image-registry-operator to set up a COS Instance in IBMCloud for the cluster registry. - // More about resource groups can be found here: https://cloud.ibm.com/docs/account?topic=account-rgs. - // When omitted, the image registry operator won't be able to configure storage, - // which results in the image registry cluster operator not being in an available state. - // - // +kubebuilder:validation:Pattern=^[a-zA-Z0-9-_ ]+$ - // +kubebuilder:validation:MaxLength=40 - // +kubebuilder:validation:XValidation:rule="oldSelf == '' || self == oldSelf",message="resourceGroup is immutable once set" - // +optional - ResourceGroup string `json:"resourceGroup"` - - // serviceEndpoints is a list of custom endpoints which will override the default - // service endpoints of a Power VS service. - // +optional - ServiceEndpoints []PowerVSServiceEndpoint `json:"serviceEndpoints,omitempty"` - - // CISInstanceCRN is the CRN of the Cloud Internet Services instance managing - // the DNS zone for the cluster's base domain - CISInstanceCRN string `json:"cisInstanceCRN,omitempty"` - - // DNSInstanceCRN is the CRN of the DNS Services instance managing the DNS zone - // for the cluster's base domain - DNSInstanceCRN string `json:"dnsInstanceCRN,omitempty"` -} - -// AlibabaCloudPlatformSpec holds the desired state of the Alibaba Cloud infrastructure provider. -// This only includes fields that can be modified in the cluster. -type AlibabaCloudPlatformSpec struct{} - -// AlibabaCloudPlatformStatus holds the current status of the Alibaba Cloud infrastructure provider. -type AlibabaCloudPlatformStatus struct { - // region specifies the region for Alibaba Cloud resources created for the cluster. - // +kubebuilder:validation:Required - // +kubebuilder:validation:Pattern=`^[0-9A-Za-z-]+$` - // +required - Region string `json:"region"` - // resourceGroupID is the ID of the resource group for the cluster. - // +kubebuilder:validation:Pattern=`^(rg-[0-9A-Za-z]+)?$` - // +optional - ResourceGroupID string `json:"resourceGroupID,omitempty"` - // resourceTags is a list of additional tags to apply to Alibaba Cloud resources created for the cluster. - // +kubebuilder:validation:MaxItems=20 - // +listType=map - // +listMapKey=key - // +optional - ResourceTags []AlibabaCloudResourceTag `json:"resourceTags,omitempty"` -} - -// AlibabaCloudResourceTag is the set of tags to add to apply to resources. -type AlibabaCloudResourceTag struct { - // key is the key of the tag. - // +kubebuilder:validation:Required - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:MaxLength=128 - // +required - Key string `json:"key"` - // value is the value of the tag. - // +kubebuilder:validation:Required - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:MaxLength=128 - // +required - Value string `json:"value"` -} - -// NutanixPlatformLoadBalancer defines the load balancer used by the cluster on Nutanix platform. -// +union -type NutanixPlatformLoadBalancer struct { - // type defines the type of load balancer used by the cluster on Nutanix platform - // which can be a user-managed or openshift-managed load balancer - // that is to be used for the OpenShift API and Ingress endpoints. - // When set to OpenShiftManagedDefault the static pods in charge of API and Ingress traffic load-balancing - // defined in the machine config operator will be deployed. - // When set to UserManaged these static pods will not be deployed and it is expected that - // the load balancer is configured out of band by the deployer. - // When omitted, this means no opinion and the platform is left to choose a reasonable default. - // The default value is OpenShiftManagedDefault. - // +default="OpenShiftManagedDefault" - // +kubebuilder:default:="OpenShiftManagedDefault" - // +kubebuilder:validation:Enum:="OpenShiftManagedDefault";"UserManaged" - // +kubebuilder:validation:XValidation:rule="oldSelf == '' || self == oldSelf",message="type is immutable once set" - // +optional - // +unionDiscriminator - Type PlatformLoadBalancerType `json:"type,omitempty"` -} - -// NutanixPlatformSpec holds the desired state of the Nutanix infrastructure provider. -// This only includes fields that can be modified in the cluster. -type NutanixPlatformSpec struct { - // prismCentral holds the endpoint address and port to access the Nutanix Prism Central. - // When a cluster-wide proxy is installed, by default, this endpoint will be accessed via the proxy. - // Should you wish for communication with this endpoint not to be proxied, please add the endpoint to the - // proxy spec.noProxy list. - // +kubebuilder:validation:Required - PrismCentral NutanixPrismEndpoint `json:"prismCentral"` - - // prismElements holds one or more endpoint address and port data to access the Nutanix - // Prism Elements (clusters) of the Nutanix Prism Central. Currently we only support one - // Prism Element (cluster) for an OpenShift cluster, where all the Nutanix resources (VMs, subnets, volumes, etc.) - // used in the OpenShift cluster are located. In the future, we may support Nutanix resources (VMs, etc.) - // spread over multiple Prism Elements (clusters) of the Prism Central. - // +kubebuilder:validation:Required - // +listType=map - // +listMapKey=name - PrismElements []NutanixPrismElementEndpoint `json:"prismElements"` -} - -// NutanixPrismEndpoint holds the endpoint address and port to access the Nutanix Prism Central or Element (cluster) -type NutanixPrismEndpoint struct { - // address is the endpoint address (DNS name or IP address) of the Nutanix Prism Central or Element (cluster) - // +kubebuilder:validation:Required - // +kubebuilder:validation:MaxLength=256 - Address string `json:"address"` - - // port is the port number to access the Nutanix Prism Central or Element (cluster) - // +kubebuilder:validation:Required - // +kubebuilder:validation:Minimum=1 - // +kubebuilder:validation:Maximum=65535 - Port int32 `json:"port"` -} - -// NutanixPrismElementEndpoint holds the name and endpoint data for a Prism Element (cluster) -type NutanixPrismElementEndpoint struct { - // name is the name of the Prism Element (cluster). This value will correspond with - // the cluster field configured on other resources (eg Machines, PVCs, etc). - // +kubebuilder:validation:Required - // +kubebuilder:validation:MaxLength=256 - Name string `json:"name"` - - // endpoint holds the endpoint address and port data of the Prism Element (cluster). - // When a cluster-wide proxy is installed, by default, this endpoint will be accessed via the proxy. - // Should you wish for communication with this endpoint not to be proxied, please add the endpoint to the - // proxy spec.noProxy list. - // +kubebuilder:validation:Required - Endpoint NutanixPrismEndpoint `json:"endpoint"` -} - -// NutanixPlatformStatus holds the current status of the Nutanix infrastructure provider. -type NutanixPlatformStatus struct { - // apiServerInternalIP is an IP address to contact the Kubernetes API server that can be used - // by components inside the cluster, like kubelets using the infrastructure rather - // than Kubernetes networking. It is the IP that the Infrastructure.status.apiServerInternalURI - // points to. It is the IP for a self-hosted load balancer in front of the API servers. - // - // Deprecated: Use APIServerInternalIPs instead. - APIServerInternalIP string `json:"apiServerInternalIP,omitempty"` - - // apiServerInternalIPs are the IP addresses to contact the Kubernetes API - // server that can be used by components inside the cluster, like kubelets - // using the infrastructure rather than Kubernetes networking. These are the - // IPs for a self-hosted load balancer in front of the API servers. In dual - // stack clusters this list contains two IPs otherwise only one. - // - // +kubebuilder:validation:Format=ip - // +kubebuilder:validation:MaxItems=2 - APIServerInternalIPs []string `json:"apiServerInternalIPs"` - - // ingressIP is an external IP which routes to the default ingress controller. - // The IP is a suitable target of a wildcard DNS record used to resolve default route host names. - // - // Deprecated: Use IngressIPs instead. - IngressIP string `json:"ingressIP,omitempty"` - - // ingressIPs are the external IPs which route to the default ingress - // controller. The IPs are suitable targets of a wildcard DNS record used to - // resolve default route host names. In dual stack clusters this list - // contains two IPs otherwise only one. - // - // +kubebuilder:validation:Format=ip - // +kubebuilder:validation:MaxItems=2 - IngressIPs []string `json:"ingressIPs"` - - // loadBalancer defines how the load balancer used by the cluster is configured. - // +default={"type": "OpenShiftManagedDefault"} - // +kubebuilder:default={"type": "OpenShiftManagedDefault"} - // +openshift:enable:FeatureSets=TechPreviewNoUpgrade - // +optional - LoadBalancer *NutanixPlatformLoadBalancer `json:"loadBalancer,omitempty"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// InfrastructureList is -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type InfrastructureList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata"` - - Items []Infrastructure `json:"items"` -} diff --git a/vendor/github.com/openshift/api/config/v1/types_ingress.go b/vendor/github.com/openshift/api/config/v1/types_ingress.go deleted file mode 100644 index e518f6765..000000000 --- a/vendor/github.com/openshift/api/config/v1/types_ingress.go +++ /dev/null @@ -1,334 +0,0 @@ -package v1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// +genclient -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// Ingress holds cluster-wide information about ingress, including the default ingress domain -// used for routes. The canonical name is `cluster`. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type Ingress struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata,omitempty"` - - // spec holds user settable values for configuration - // +kubebuilder:validation:Required - // +required - Spec IngressSpec `json:"spec"` - // status holds observed values from the cluster. They may not be overridden. - // +optional - Status IngressStatus `json:"status"` -} - -type IngressSpec struct { - // domain is used to generate a default host name for a route when the - // route's host name is empty. The generated host name will follow this - // pattern: "..". - // - // It is also used as the default wildcard domain suffix for ingress. The - // default ingresscontroller domain will follow this pattern: "*.". - // - // Once set, changing domain is not currently supported. - Domain string `json:"domain"` - - // appsDomain is an optional domain to use instead of the one specified - // in the domain field when a Route is created without specifying an explicit - // host. If appsDomain is nonempty, this value is used to generate default - // host values for Route. Unlike domain, appsDomain may be modified after - // installation. - // This assumes a new ingresscontroller has been setup with a wildcard - // certificate. - // +optional - AppsDomain string `json:"appsDomain,omitempty"` - - // componentRoutes is an optional list of routes that are managed by OpenShift components - // that a cluster-admin is able to configure the hostname and serving certificate for. - // The namespace and name of each route in this list should match an existing entry in the - // status.componentRoutes list. - // - // To determine the set of configurable Routes, look at namespace and name of entries in the - // .status.componentRoutes list, where participating operators write the status of - // configurable routes. - // +optional - // +listType=map - // +listMapKey=namespace - // +listMapKey=name - ComponentRoutes []ComponentRouteSpec `json:"componentRoutes,omitempty"` - - // requiredHSTSPolicies specifies HSTS policies that are required to be set on newly created or updated routes - // matching the domainPattern/s and namespaceSelector/s that are specified in the policy. - // Each requiredHSTSPolicy must have at least a domainPattern and a maxAge to validate a route HSTS Policy route - // annotation, and affect route admission. - // - // A candidate route is checked for HSTS Policies if it has the HSTS Policy route annotation: - // "haproxy.router.openshift.io/hsts_header" - // E.g. haproxy.router.openshift.io/hsts_header: max-age=31536000;preload;includeSubDomains - // - // - For each candidate route, if it matches a requiredHSTSPolicy domainPattern and optional namespaceSelector, - // then the maxAge, preloadPolicy, and includeSubdomainsPolicy must be valid to be admitted. Otherwise, the route - // is rejected. - // - The first match, by domainPattern and optional namespaceSelector, in the ordering of the RequiredHSTSPolicies - // determines the route's admission status. - // - If the candidate route doesn't match any requiredHSTSPolicy domainPattern and optional namespaceSelector, - // then it may use any HSTS Policy annotation. - // - // The HSTS policy configuration may be changed after routes have already been created. An update to a previously - // admitted route may then fail if the updated route does not conform to the updated HSTS policy configuration. - // However, changing the HSTS policy configuration will not cause a route that is already admitted to stop working. - // - // Note that if there are no RequiredHSTSPolicies, any HSTS Policy annotation on the route is valid. - // +optional - RequiredHSTSPolicies []RequiredHSTSPolicy `json:"requiredHSTSPolicies,omitempty"` - - // loadBalancer contains the load balancer details in general which are not only specific to the underlying infrastructure - // provider of the current cluster and are required for Ingress Controller to work on OpenShift. - // +optional - LoadBalancer LoadBalancer `json:"loadBalancer,omitempty"` -} - -// IngressPlatformSpec holds the desired state of Ingress specific to the underlying infrastructure provider -// of the current cluster. Since these are used at spec-level for the underlying cluster, it -// is supposed that only one of the spec structs is set. -// +union -type IngressPlatformSpec struct { - // type is the underlying infrastructure provider for the cluster. - // Allowed values are "AWS", "Azure", "BareMetal", "GCP", "Libvirt", - // "OpenStack", "VSphere", "oVirt", "KubeVirt", "EquinixMetal", "PowerVS", - // "AlibabaCloud", "Nutanix" and "None". Individual components may not support all platforms, - // and must handle unrecognized platforms as None if they do not support that platform. - // - // +unionDiscriminator - Type PlatformType `json:"type"` - - // aws contains settings specific to the Amazon Web Services infrastructure provider. - // +optional - AWS *AWSIngressSpec `json:"aws,omitempty"` -} - -type LoadBalancer struct { - // platform holds configuration specific to the underlying - // infrastructure provider for the ingress load balancers. - // When omitted, this means the user has no opinion and the platform is left - // to choose reasonable defaults. These defaults are subject to change over time. - // +optional - Platform IngressPlatformSpec `json:"platform,omitempty"` -} - -// AWSIngressSpec holds the desired state of the Ingress for Amazon Web Services infrastructure provider. -// This only includes fields that can be modified in the cluster. -// +union -type AWSIngressSpec struct { - // type allows user to set a load balancer type. - // When this field is set the default ingresscontroller will get created using the specified LBType. - // If this field is not set then the default ingress controller of LBType Classic will be created. - // Valid values are: - // - // * "Classic": A Classic Load Balancer that makes routing decisions at either - // the transport layer (TCP/SSL) or the application layer (HTTP/HTTPS). See - // the following for additional details: - // - // https://docs.aws.amazon.com/AmazonECS/latest/developerguide/load-balancer-types.html#clb - // - // * "NLB": A Network Load Balancer that makes routing decisions at the - // transport layer (TCP/SSL). See the following for additional details: - // - // https://docs.aws.amazon.com/AmazonECS/latest/developerguide/load-balancer-types.html#nlb - // +unionDiscriminator - // +kubebuilder:validation:Enum:=NLB;Classic - // +kubebuilder:validation:Required - Type AWSLBType `json:"type,omitempty"` -} - -type AWSLBType string - -const ( - // NLB is the Network Load Balancer Type of AWS. Using NLB one can set NLB load balancer type for the default ingress controller. - NLB AWSLBType = "NLB" - - // Classic is the Classic Load Balancer Type of AWS. Using CLassic one can set Classic load balancer type for the default ingress controller. - Classic AWSLBType = "Classic" -) - -// ConsumingUser is an alias for string which we add validation to. Currently only service accounts are supported. -// +kubebuilder:validation:Pattern="^system:serviceaccount:[a-z0-9]([-a-z0-9]*[a-z0-9])?:[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$" -// +kubebuilder:validation:MinLength=1 -// +kubebuilder:validation:MaxLength=512 -type ConsumingUser string - -// Hostname is an alias for hostname string validation. -// -// The left operand of the | is the original kubebuilder hostname validation format, which is incorrect because it -// allows upper case letters, disallows hyphen or number in the TLD, and allows labels to start/end in non-alphanumeric -// characters. See https://bugzilla.redhat.com/show_bug.cgi?id=2039256. -// ^([a-zA-Z0-9\p{S}\p{L}]((-?[a-zA-Z0-9\p{S}\p{L}]{0,62})?)|([a-zA-Z0-9\p{S}\p{L}](([a-zA-Z0-9-\p{S}\p{L}]{0,61}[a-zA-Z0-9\p{S}\p{L}])?)(\.)){1,}([a-zA-Z\p{L}]){2,63})$ -// -// The right operand of the | is a new pattern that mimics the current API route admission validation on hostname, -// except that it allows hostnames longer than the maximum length: -// ^(([a-z0-9][-a-z0-9]{0,61}[a-z0-9]|[a-z0-9]{1,63})[\.]){0,}([a-z0-9][-a-z0-9]{0,61}[a-z0-9]|[a-z0-9]{1,63})$ -// -// Both operand patterns are made available so that modifications on ingress spec can still happen after an invalid hostname -// was saved via validation by the incorrect left operand of the | operator. -// -// +kubebuilder:validation:Pattern=`^([a-zA-Z0-9\p{S}\p{L}]((-?[a-zA-Z0-9\p{S}\p{L}]{0,62})?)|([a-zA-Z0-9\p{S}\p{L}](([a-zA-Z0-9-\p{S}\p{L}]{0,61}[a-zA-Z0-9\p{S}\p{L}])?)(\.)){1,}([a-zA-Z\p{L}]){2,63})$|^(([a-z0-9][-a-z0-9]{0,61}[a-z0-9]|[a-z0-9]{1,63})[\.]){0,}([a-z0-9][-a-z0-9]{0,61}[a-z0-9]|[a-z0-9]{1,63})$` -type Hostname string - -type IngressStatus struct { - // componentRoutes is where participating operators place the current route status for routes whose - // hostnames and serving certificates can be customized by the cluster-admin. - // +optional - // +listType=map - // +listMapKey=namespace - // +listMapKey=name - ComponentRoutes []ComponentRouteStatus `json:"componentRoutes,omitempty"` - - // defaultPlacement is set at installation time to control which - // nodes will host the ingress router pods by default. The options are - // control-plane nodes or worker nodes. - // - // This field works by dictating how the Cluster Ingress Operator will - // consider unset replicas and nodePlacement fields in IngressController - // resources when creating the corresponding Deployments. - // - // See the documentation for the IngressController replicas and nodePlacement - // fields for more information. - // - // When omitted, the default value is Workers - // - // +kubebuilder:validation:Enum:="ControlPlane";"Workers";"" - // +optional - DefaultPlacement DefaultPlacement `json:"defaultPlacement"` -} - -// ComponentRouteSpec allows for configuration of a route's hostname and serving certificate. -type ComponentRouteSpec struct { - // namespace is the namespace of the route to customize. - // - // The namespace and name of this componentRoute must match a corresponding - // entry in the list of status.componentRoutes if the route is to be customized. - // +kubebuilder:validation:Pattern=^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:MaxLength=63 - // +kubebuilder:validation:Required - // +required - Namespace string `json:"namespace"` - - // name is the logical name of the route to customize. - // - // The namespace and name of this componentRoute must match a corresponding - // entry in the list of status.componentRoutes if the route is to be customized. - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:MaxLength=256 - // +kubebuilder:validation:Required - // +required - Name string `json:"name"` - - // hostname is the hostname that should be used by the route. - // +kubebuilder:validation:Required - // +required - Hostname Hostname `json:"hostname"` - - // servingCertKeyPairSecret is a reference to a secret of type `kubernetes.io/tls` in the openshift-config namespace. - // The serving cert/key pair must match and will be used by the operator to fulfill the intent of serving with this name. - // If the custom hostname uses the default routing suffix of the cluster, - // the Secret specification for a serving certificate will not be needed. - // +optional - ServingCertKeyPairSecret SecretNameReference `json:"servingCertKeyPairSecret"` -} - -// ComponentRouteStatus contains information allowing configuration of a route's hostname and serving certificate. -type ComponentRouteStatus struct { - // namespace is the namespace of the route to customize. It must be a real namespace. Using an actual namespace - // ensures that no two components will conflict and the same component can be installed multiple times. - // - // The namespace and name of this componentRoute must match a corresponding - // entry in the list of spec.componentRoutes if the route is to be customized. - // +kubebuilder:validation:Pattern=^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:MaxLength=63 - // +kubebuilder:validation:Required - // +required - Namespace string `json:"namespace"` - - // name is the logical name of the route to customize. It does not have to be the actual name of a route resource - // but it cannot be renamed. - // - // The namespace and name of this componentRoute must match a corresponding - // entry in the list of spec.componentRoutes if the route is to be customized. - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:MaxLength=256 - // +kubebuilder:validation:Required - // +required - Name string `json:"name"` - - // defaultHostname is the hostname of this route prior to customization. - // +kubebuilder:validation:Required - // +required - DefaultHostname Hostname `json:"defaultHostname"` - - // consumingUsers is a slice of ServiceAccounts that need to have read permission on the servingCertKeyPairSecret secret. - // +kubebuilder:validation:MaxItems=5 - // +optional - ConsumingUsers []ConsumingUser `json:"consumingUsers,omitempty"` - - // currentHostnames is the list of current names used by the route. Typically, this list should consist of a single - // hostname, but if multiple hostnames are supported by the route the operator may write multiple entries to this list. - // +kubebuilder:validation:MinItems=1 - // +optional - CurrentHostnames []Hostname `json:"currentHostnames,omitempty"` - - // conditions are used to communicate the state of the componentRoutes entry. - // - // Supported conditions include Available, Degraded and Progressing. - // - // If available is true, the content served by the route can be accessed by users. This includes cases - // where a default may continue to serve content while the customized route specified by the cluster-admin - // is being configured. - // - // If Degraded is true, that means something has gone wrong trying to handle the componentRoutes entry. - // The currentHostnames field may or may not be in effect. - // - // If Progressing is true, that means the component is taking some action related to the componentRoutes entry. - // +optional - // +listType=map - // +listMapKey=type - Conditions []metav1.Condition `json:"conditions,omitempty"` - - // relatedObjects is a list of resources which are useful when debugging or inspecting how spec.componentRoutes is applied. - // +kubebuilder:validation:MinItems=1 - // +kubebuilder:validation:Required - // +required - RelatedObjects []ObjectReference `json:"relatedObjects"` -} - -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +openshift:compatibility-gen:level=1 -type IngressList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata"` - - Items []Ingress `json:"items"` -} - -// DefaultPlacement defines the default placement of ingress router pods. -type DefaultPlacement string - -const ( - // "Workers" is for having router pods placed on worker nodes by default. - DefaultPlacementWorkers DefaultPlacement = "Workers" - - // "ControlPlane" is for having router pods placed on control-plane nodes by default. - DefaultPlacementControlPlane DefaultPlacement = "ControlPlane" -) diff --git a/vendor/github.com/openshift/api/config/v1/types_network.go b/vendor/github.com/openshift/api/config/v1/types_network.go deleted file mode 100644 index c79bc8cf0..000000000 --- a/vendor/github.com/openshift/api/config/v1/types_network.go +++ /dev/null @@ -1,183 +0,0 @@ -package v1 - -import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - -// +genclient -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// Network holds cluster-wide information about Network. The canonical name is `cluster`. It is used to configure the desired network configuration, such as: IP address pools for services/pod IPs, network plugin, etc. -// Please view network.spec for an explanation on what applies when configuring this resource. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type Network struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata,omitempty"` - - // spec holds user settable values for configuration. - // As a general rule, this SHOULD NOT be read directly. Instead, you should - // consume the NetworkStatus, as it indicates the currently deployed configuration. - // Currently, most spec fields are immutable after installation. Please view the individual ones for further details on each. - // +kubebuilder:validation:Required - // +required - Spec NetworkSpec `json:"spec"` - // status holds observed values from the cluster. They may not be overridden. - // +optional - Status NetworkStatus `json:"status"` -} - -// NetworkSpec is the desired network configuration. -// As a general rule, this SHOULD NOT be read directly. Instead, you should -// consume the NetworkStatus, as it indicates the currently deployed configuration. -// Currently, most spec fields are immutable after installation. Please view the individual ones for further details on each. -type NetworkSpec struct { - // IP address pool to use for pod IPs. - // This field is immutable after installation. - ClusterNetwork []ClusterNetworkEntry `json:"clusterNetwork"` - - // IP address pool for services. - // Currently, we only support a single entry here. - // This field is immutable after installation. - ServiceNetwork []string `json:"serviceNetwork"` - - // NetworkType is the plugin that is to be deployed (e.g. OpenShiftSDN). - // This should match a value that the cluster-network-operator understands, - // or else no networking will be installed. - // Currently supported values are: - // - OpenShiftSDN - // This field is immutable after installation. - NetworkType string `json:"networkType"` - - // externalIP defines configuration for controllers that - // affect Service.ExternalIP. If nil, then ExternalIP is - // not allowed to be set. - // +optional - ExternalIP *ExternalIPConfig `json:"externalIP,omitempty"` - - // The port range allowed for Services of type NodePort. - // If not specified, the default of 30000-32767 will be used. - // Such Services without a NodePort specified will have one - // automatically allocated from this range. - // This parameter can be updated after the cluster is - // installed. - // +kubebuilder:validation:Pattern=`^([0-9]{1,4}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])-([0-9]{1,4}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])$` - ServiceNodePortRange string `json:"serviceNodePortRange,omitempty"` -} - -// NetworkStatus is the current network configuration. -type NetworkStatus struct { - // IP address pool to use for pod IPs. - ClusterNetwork []ClusterNetworkEntry `json:"clusterNetwork,omitempty"` - - // IP address pool for services. - // Currently, we only support a single entry here. - ServiceNetwork []string `json:"serviceNetwork,omitempty"` - - // NetworkType is the plugin that is deployed (e.g. OpenShiftSDN). - NetworkType string `json:"networkType,omitempty"` - - // ClusterNetworkMTU is the MTU for inter-pod networking. - ClusterNetworkMTU int `json:"clusterNetworkMTU,omitempty"` - - // Migration contains the cluster network migration configuration. - Migration *NetworkMigration `json:"migration,omitempty"` -} - -// ClusterNetworkEntry is a contiguous block of IP addresses from which pod IPs -// are allocated. -type ClusterNetworkEntry struct { - // The complete block for pod IPs. - CIDR string `json:"cidr"` - - // The size (prefix) of block to allocate to each node. If this - // field is not used by the plugin, it can be left unset. - // +kubebuilder:validation:Minimum=0 - // +optional - HostPrefix uint32 `json:"hostPrefix,omitempty"` -} - -// ExternalIPConfig specifies some IP blocks relevant for the ExternalIP field -// of a Service resource. -type ExternalIPConfig struct { - // policy is a set of restrictions applied to the ExternalIP field. - // If nil or empty, then ExternalIP is not allowed to be set. - // +optional - Policy *ExternalIPPolicy `json:"policy,omitempty"` - - // autoAssignCIDRs is a list of CIDRs from which to automatically assign - // Service.ExternalIP. These are assigned when the service is of type - // LoadBalancer. In general, this is only useful for bare-metal clusters. - // In Openshift 3.x, this was misleadingly called "IngressIPs". - // Automatically assigned External IPs are not affected by any - // ExternalIPPolicy rules. - // Currently, only one entry may be provided. - // +optional - AutoAssignCIDRs []string `json:"autoAssignCIDRs,omitempty"` -} - -// ExternalIPPolicy configures exactly which IPs are allowed for the ExternalIP -// field in a Service. If the zero struct is supplied, then none are permitted. -// The policy controller always allows automatically assigned external IPs. -type ExternalIPPolicy struct { - // allowedCIDRs is the list of allowed CIDRs. - AllowedCIDRs []string `json:"allowedCIDRs,omitempty"` - - // rejectedCIDRs is the list of disallowed CIDRs. These take precedence - // over allowedCIDRs. - // +optional - RejectedCIDRs []string `json:"rejectedCIDRs,omitempty"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type NetworkList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata"` - - Items []Network `json:"items"` -} - -// NetworkMigration represents the cluster network configuration. -type NetworkMigration struct { - // NetworkType is the target plugin that is to be deployed. - // Currently supported values are: OpenShiftSDN, OVNKubernetes - // +kubebuilder:validation:Enum={"OpenShiftSDN","OVNKubernetes"} - // +optional - NetworkType string `json:"networkType,omitempty"` - - // MTU contains the MTU migration configuration. - // +optional - MTU *MTUMigration `json:"mtu,omitempty"` -} - -// MTUMigration contains infomation about MTU migration. -type MTUMigration struct { - // Network contains MTU migration configuration for the default network. - // +optional - Network *MTUMigrationValues `json:"network,omitempty"` - - // Machine contains MTU migration configuration for the machine's uplink. - // +optional - Machine *MTUMigrationValues `json:"machine,omitempty"` -} - -// MTUMigrationValues contains the values for a MTU migration. -type MTUMigrationValues struct { - // To is the MTU to migrate to. - // +kubebuilder:validation:Minimum=0 - To *uint32 `json:"to"` - - // From is the MTU to migrate from. - // +kubebuilder:validation:Minimum=0 - // +optional - From *uint32 `json:"from,omitempty"` -} diff --git a/vendor/github.com/openshift/api/config/v1/types_node.go b/vendor/github.com/openshift/api/config/v1/types_node.go deleted file mode 100644 index 233c89d9c..000000000 --- a/vendor/github.com/openshift/api/config/v1/types_node.go +++ /dev/null @@ -1,114 +0,0 @@ -package v1 - -import ( - "time" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// +genclient -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// Node holds cluster-wide information about node specific features. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -// +kubebuilder:resource:path=nodes,scope=Cluster -// +kubebuilder:subresource:status -type Node struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata,omitempty"` - - // spec holds user settable values for configuration - // +kubebuilder:validation:Required - // +required - Spec NodeSpec `json:"spec"` - - // status holds observed values. - // +optional - Status NodeStatus `json:"status"` -} - -type NodeSpec struct { - // CgroupMode determines the cgroups version on the node - // +optional - CgroupMode CgroupMode `json:"cgroupMode,omitempty"` - - // WorkerLatencyProfile determins the how fast the kubelet is updating - // the status and corresponding reaction of the cluster - // +optional - WorkerLatencyProfile WorkerLatencyProfileType `json:"workerLatencyProfile,omitempty"` -} - -type NodeStatus struct{} - -// +kubebuilder:validation:Enum=v1;v2;"" -type CgroupMode string - -const ( - CgroupModeEmpty CgroupMode = "" // Empty string indicates to honor user set value on the system that should not be overridden by OpenShift - CgroupModeV1 CgroupMode = "v1" - CgroupModeV2 CgroupMode = "v2" - CgroupModeDefault CgroupMode = CgroupModeV1 -) - -// +kubebuilder:validation:Enum=Default;MediumUpdateAverageReaction;LowUpdateSlowReaction -type WorkerLatencyProfileType string - -const ( - // Medium Kubelet Update Frequency (heart-beat) and Average Reaction Time to unresponsive Node - MediumUpdateAverageReaction WorkerLatencyProfileType = "MediumUpdateAverageReaction" - - // Low Kubelet Update Frequency (heart-beat) and Slow Reaction Time to unresponsive Node - LowUpdateSlowReaction WorkerLatencyProfileType = "LowUpdateSlowReaction" - - // Default values of relavent Kubelet, Kube Controller Manager and Kube API Server - DefaultUpdateDefaultReaction WorkerLatencyProfileType = "Default" -) - -const ( - // DefaultNodeStatusUpdateFrequency refers to the "--node-status-update-frequency" of the kubelet in case of DefaultUpdateDefaultReaction WorkerLatencyProfile type - DefaultNodeStatusUpdateFrequency = 10 * time.Second - // DefaultNodeMonitorGracePeriod refers to the "--node-monitor-grace-period" of the Kube Controller Manager in case of DefaultUpdateDefaultReaction WorkerLatencyProfile type - DefaultNodeMonitorGracePeriod = 40 * time.Second - // DefaultNotReadyTolerationSeconds refers to the "--default-not-ready-toleration-seconds" of the Kube API Server in case of DefaultUpdateDefaultReaction WorkerLatencyProfile type - DefaultNotReadyTolerationSeconds = 300 - // DefaultUnreachableTolerationSeconds refers to the "--default-unreachable-toleration-seconds" of the Kube API Server in case of DefaultUpdateDefaultReaction WorkerLatencyProfile type - DefaultUnreachableTolerationSeconds = 300 - - // MediumNodeStatusUpdateFrequency refers to the "--node-status-update-frequency" of the kubelet in case of MediumUpdateAverageReaction WorkerLatencyProfile type - MediumNodeStatusUpdateFrequency = 20 * time.Second - // MediumNodeMonitorGracePeriod refers to the "--node-monitor-grace-period" of the Kube Controller Manager in case of MediumUpdateAverageReaction WorkerLatencyProfile type - MediumNodeMonitorGracePeriod = 2 * time.Minute - // MediumNotReadyTolerationSeconds refers to the "--default-not-ready-toleration-seconds" of the Kube API Server in case of MediumUpdateAverageReaction WorkerLatencyProfile type - MediumNotReadyTolerationSeconds = 60 - // MediumUnreachableTolerationSeconds refers to the "--default-unreachable-toleration-seconds" of the Kube API Server in case of MediumUpdateAverageReaction WorkerLatencyProfile type - MediumUnreachableTolerationSeconds = 60 - - // LowNodeStatusUpdateFrequency refers to the "--node-status-update-frequency" of the kubelet in case of LowUpdateSlowReaction WorkerLatencyProfile type - LowNodeStatusUpdateFrequency = 1 * time.Minute - // LowNodeMonitorGracePeriod refers to the "--node-monitor-grace-period" of the Kube Controller Manager in case of LowUpdateSlowReaction WorkerLatencyProfile type - LowNodeMonitorGracePeriod = 5 * time.Minute - // LowNotReadyTolerationSeconds refers to the "--default-not-ready-toleration-seconds" of the Kube API Server in case of LowUpdateSlowReaction WorkerLatencyProfile type - LowNotReadyTolerationSeconds = 60 - // LowUnreachableTolerationSeconds refers to the "--default-unreachable-toleration-seconds" of the Kube API Server in case of LowUpdateSlowReaction WorkerLatencyProfile type - LowUnreachableTolerationSeconds = 60 -) - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type NodeList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata"` - - Items []Node `json:"items"` -} diff --git a/vendor/github.com/openshift/api/config/v1/types_oauth.go b/vendor/github.com/openshift/api/config/v1/types_oauth.go deleted file mode 100644 index 451a5ec38..000000000 --- a/vendor/github.com/openshift/api/config/v1/types_oauth.go +++ /dev/null @@ -1,592 +0,0 @@ -package v1 - -import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - -// OAuth Server and Identity Provider Config - -// +genclient -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// OAuth holds cluster-wide information about OAuth. The canonical name is `cluster`. -// It is used to configure the integrated OAuth server. -// This configuration is only honored when the top level Authentication config has type set to IntegratedOAuth. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type OAuth struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata"` - // spec holds user settable values for configuration - // +kubebuilder:validation:Required - // +required - Spec OAuthSpec `json:"spec"` - // status holds observed values from the cluster. They may not be overridden. - // +optional - Status OAuthStatus `json:"status"` -} - -// OAuthSpec contains desired cluster auth configuration -type OAuthSpec struct { - // identityProviders is an ordered list of ways for a user to identify themselves. - // When this list is empty, no identities are provisioned for users. - // +optional - // +listType=atomic - IdentityProviders []IdentityProvider `json:"identityProviders,omitempty"` - - // tokenConfig contains options for authorization and access tokens - TokenConfig TokenConfig `json:"tokenConfig"` - - // templates allow you to customize pages like the login page. - // +optional - Templates OAuthTemplates `json:"templates"` -} - -// OAuthStatus shows current known state of OAuth server in the cluster -type OAuthStatus struct { - // TODO Fill in with status of identityProviders and templates (and maybe tokenConfig) -} - -// TokenConfig holds the necessary configuration options for authorization and access tokens -type TokenConfig struct { - // accessTokenMaxAgeSeconds defines the maximum age of access tokens - AccessTokenMaxAgeSeconds int32 `json:"accessTokenMaxAgeSeconds,omitempty"` - - // accessTokenInactivityTimeoutSeconds - DEPRECATED: setting this field has no effect. - // +optional - AccessTokenInactivityTimeoutSeconds int32 `json:"accessTokenInactivityTimeoutSeconds,omitempty"` - - // accessTokenInactivityTimeout defines the token inactivity timeout - // for tokens granted by any client. - // The value represents the maximum amount of time that can occur between - // consecutive uses of the token. Tokens become invalid if they are not - // used within this temporal window. The user will need to acquire a new - // token to regain access once a token times out. Takes valid time - // duration string such as "5m", "1.5h" or "2h45m". The minimum allowed - // value for duration is 300s (5 minutes). If the timeout is configured - // per client, then that value takes precedence. If the timeout value is - // not specified and the client does not override the value, then tokens - // are valid until their lifetime. - // - // WARNING: existing tokens' timeout will not be affected (lowered) by changing this value - // +optional - AccessTokenInactivityTimeout *metav1.Duration `json:"accessTokenInactivityTimeout,omitempty"` -} - -const ( - // LoginTemplateKey is the key of the login template in a secret - LoginTemplateKey = "login.html" - - // ProviderSelectionTemplateKey is the key for the provider selection template in a secret - ProviderSelectionTemplateKey = "providers.html" - - // ErrorsTemplateKey is the key for the errors template in a secret - ErrorsTemplateKey = "errors.html" - - // BindPasswordKey is the key for the LDAP bind password in a secret - BindPasswordKey = "bindPassword" - - // ClientSecretKey is the key for the oauth client secret data in a secret - ClientSecretKey = "clientSecret" - - // HTPasswdDataKey is the key for the htpasswd file data in a secret - HTPasswdDataKey = "htpasswd" -) - -// OAuthTemplates allow for customization of pages like the login page -type OAuthTemplates struct { - // login is the name of a secret that specifies a go template to use to render the login page. - // The key "login.html" is used to locate the template data. - // If specified and the secret or expected key is not found, the default login page is used. - // If the specified template is not valid, the default login page is used. - // If unspecified, the default login page is used. - // The namespace for this secret is openshift-config. - // +optional - Login SecretNameReference `json:"login"` - - // providerSelection is the name of a secret that specifies a go template to use to render - // the provider selection page. - // The key "providers.html" is used to locate the template data. - // If specified and the secret or expected key is not found, the default provider selection page is used. - // If the specified template is not valid, the default provider selection page is used. - // If unspecified, the default provider selection page is used. - // The namespace for this secret is openshift-config. - // +optional - ProviderSelection SecretNameReference `json:"providerSelection"` - - // error is the name of a secret that specifies a go template to use to render error pages - // during the authentication or grant flow. - // The key "errors.html" is used to locate the template data. - // If specified and the secret or expected key is not found, the default error page is used. - // If the specified template is not valid, the default error page is used. - // If unspecified, the default error page is used. - // The namespace for this secret is openshift-config. - // +optional - Error SecretNameReference `json:"error"` -} - -// IdentityProvider provides identities for users authenticating using credentials -type IdentityProvider struct { - // name is used to qualify the identities returned by this provider. - // - It MUST be unique and not shared by any other identity provider used - // - It MUST be a valid path segment: name cannot equal "." or ".." or contain "/" or "%" or ":" - // Ref: https://godoc.org/github.com/openshift/origin/pkg/user/apis/user/validation#ValidateIdentityProviderName - Name string `json:"name"` - - // mappingMethod determines how identities from this provider are mapped to users - // Defaults to "claim" - // +optional - MappingMethod MappingMethodType `json:"mappingMethod,omitempty"` - - IdentityProviderConfig `json:",inline"` -} - -// MappingMethodType specifies how new identities should be mapped to users when they log in -type MappingMethodType string - -const ( - // MappingMethodClaim provisions a user with the identity’s preferred user name. Fails if a user - // with that user name is already mapped to another identity. - // Default. - MappingMethodClaim MappingMethodType = "claim" - - // MappingMethodLookup looks up existing users already mapped to an identity but does not - // automatically provision users or identities. Requires identities and users be set up - // manually or using an external process. - MappingMethodLookup MappingMethodType = "lookup" - - // MappingMethodAdd provisions a user with the identity’s preferred user name. If a user with - // that user name already exists, the identity is mapped to the existing user, adding to any - // existing identity mappings for the user. - MappingMethodAdd MappingMethodType = "add" -) - -type IdentityProviderType string - -const ( - // IdentityProviderTypeBasicAuth provides identities for users authenticating with HTTP Basic Auth - IdentityProviderTypeBasicAuth IdentityProviderType = "BasicAuth" - - // IdentityProviderTypeGitHub provides identities for users authenticating using GitHub credentials - IdentityProviderTypeGitHub IdentityProviderType = "GitHub" - - // IdentityProviderTypeGitLab provides identities for users authenticating using GitLab credentials - IdentityProviderTypeGitLab IdentityProviderType = "GitLab" - - // IdentityProviderTypeGoogle provides identities for users authenticating using Google credentials - IdentityProviderTypeGoogle IdentityProviderType = "Google" - - // IdentityProviderTypeHTPasswd provides identities from an HTPasswd file - IdentityProviderTypeHTPasswd IdentityProviderType = "HTPasswd" - - // IdentityProviderTypeKeystone provides identitities for users authenticating using keystone password credentials - IdentityProviderTypeKeystone IdentityProviderType = "Keystone" - - // IdentityProviderTypeLDAP provides identities for users authenticating using LDAP credentials - IdentityProviderTypeLDAP IdentityProviderType = "LDAP" - - // IdentityProviderTypeOpenID provides identities for users authenticating using OpenID credentials - IdentityProviderTypeOpenID IdentityProviderType = "OpenID" - - // IdentityProviderTypeRequestHeader provides identities for users authenticating using request header credentials - IdentityProviderTypeRequestHeader IdentityProviderType = "RequestHeader" -) - -// IdentityProviderConfig contains configuration for using a specific identity provider -type IdentityProviderConfig struct { - // type identifies the identity provider type for this entry. - Type IdentityProviderType `json:"type"` - - // Provider-specific configuration - // The json tag MUST match the `Type` specified above, case-insensitively - // e.g. For `Type: "LDAP"`, the `ldap` configuration should be provided - - // basicAuth contains configuration options for the BasicAuth IdP - // +optional - BasicAuth *BasicAuthIdentityProvider `json:"basicAuth,omitempty"` - - // github enables user authentication using GitHub credentials - // +optional - GitHub *GitHubIdentityProvider `json:"github,omitempty"` - - // gitlab enables user authentication using GitLab credentials - // +optional - GitLab *GitLabIdentityProvider `json:"gitlab,omitempty"` - - // google enables user authentication using Google credentials - // +optional - Google *GoogleIdentityProvider `json:"google,omitempty"` - - // htpasswd enables user authentication using an HTPasswd file to validate credentials - // +optional - HTPasswd *HTPasswdIdentityProvider `json:"htpasswd,omitempty"` - - // keystone enables user authentication using keystone password credentials - // +optional - Keystone *KeystoneIdentityProvider `json:"keystone,omitempty"` - - // ldap enables user authentication using LDAP credentials - // +optional - LDAP *LDAPIdentityProvider `json:"ldap,omitempty"` - - // openID enables user authentication using OpenID credentials - // +optional - OpenID *OpenIDIdentityProvider `json:"openID,omitempty"` - - // requestHeader enables user authentication using request header credentials - // +optional - RequestHeader *RequestHeaderIdentityProvider `json:"requestHeader,omitempty"` -} - -// BasicAuthPasswordIdentityProvider provides identities for users authenticating using HTTP basic auth credentials -type BasicAuthIdentityProvider struct { - // OAuthRemoteConnectionInfo contains information about how to connect to the external basic auth server - OAuthRemoteConnectionInfo `json:",inline"` -} - -// OAuthRemoteConnectionInfo holds information necessary for establishing a remote connection -type OAuthRemoteConnectionInfo struct { - // url is the remote URL to connect to - URL string `json:"url"` - - // ca is an optional reference to a config map by name containing the PEM-encoded CA bundle. - // It is used as a trust anchor to validate the TLS certificate presented by the remote server. - // The key "ca.crt" is used to locate the data. - // If specified and the config map or expected key is not found, the identity provider is not honored. - // If the specified ca data is not valid, the identity provider is not honored. - // If empty, the default system roots are used. - // The namespace for this config map is openshift-config. - // +optional - CA ConfigMapNameReference `json:"ca"` - - // tlsClientCert is an optional reference to a secret by name that contains the - // PEM-encoded TLS client certificate to present when connecting to the server. - // The key "tls.crt" is used to locate the data. - // If specified and the secret or expected key is not found, the identity provider is not honored. - // If the specified certificate data is not valid, the identity provider is not honored. - // The namespace for this secret is openshift-config. - // +optional - TLSClientCert SecretNameReference `json:"tlsClientCert"` - - // tlsClientKey is an optional reference to a secret by name that contains the - // PEM-encoded TLS private key for the client certificate referenced in tlsClientCert. - // The key "tls.key" is used to locate the data. - // If specified and the secret or expected key is not found, the identity provider is not honored. - // If the specified certificate data is not valid, the identity provider is not honored. - // The namespace for this secret is openshift-config. - // +optional - TLSClientKey SecretNameReference `json:"tlsClientKey"` -} - -// HTPasswdPasswordIdentityProvider provides identities for users authenticating using htpasswd credentials -type HTPasswdIdentityProvider struct { - // fileData is a required reference to a secret by name containing the data to use as the htpasswd file. - // The key "htpasswd" is used to locate the data. - // If the secret or expected key is not found, the identity provider is not honored. - // If the specified htpasswd data is not valid, the identity provider is not honored. - // The namespace for this secret is openshift-config. - FileData SecretNameReference `json:"fileData"` -} - -// LDAPPasswordIdentityProvider provides identities for users authenticating using LDAP credentials -type LDAPIdentityProvider struct { - // url is an RFC 2255 URL which specifies the LDAP search parameters to use. - // The syntax of the URL is: - // ldap://host:port/basedn?attribute?scope?filter - URL string `json:"url"` - - // bindDN is an optional DN to bind with during the search phase. - // +optional - BindDN string `json:"bindDN"` - - // bindPassword is an optional reference to a secret by name - // containing a password to bind with during the search phase. - // The key "bindPassword" is used to locate the data. - // If specified and the secret or expected key is not found, the identity provider is not honored. - // The namespace for this secret is openshift-config. - // +optional - BindPassword SecretNameReference `json:"bindPassword"` - - // insecure, if true, indicates the connection should not use TLS - // WARNING: Should not be set to `true` with the URL scheme "ldaps://" as "ldaps://" URLs always - // attempt to connect using TLS, even when `insecure` is set to `true` - // When `true`, "ldap://" URLS connect insecurely. When `false`, "ldap://" URLs are upgraded to - // a TLS connection using StartTLS as specified in https://tools.ietf.org/html/rfc2830. - Insecure bool `json:"insecure"` - - // ca is an optional reference to a config map by name containing the PEM-encoded CA bundle. - // It is used as a trust anchor to validate the TLS certificate presented by the remote server. - // The key "ca.crt" is used to locate the data. - // If specified and the config map or expected key is not found, the identity provider is not honored. - // If the specified ca data is not valid, the identity provider is not honored. - // If empty, the default system roots are used. - // The namespace for this config map is openshift-config. - // +optional - CA ConfigMapNameReference `json:"ca"` - - // attributes maps LDAP attributes to identities - Attributes LDAPAttributeMapping `json:"attributes"` -} - -// LDAPAttributeMapping maps LDAP attributes to OpenShift identity fields -type LDAPAttributeMapping struct { - // id is the list of attributes whose values should be used as the user ID. Required. - // First non-empty attribute is used. At least one attribute is required. If none of the listed - // attribute have a value, authentication fails. - // LDAP standard identity attribute is "dn" - ID []string `json:"id"` - - // preferredUsername is the list of attributes whose values should be used as the preferred username. - // LDAP standard login attribute is "uid" - // +optional - PreferredUsername []string `json:"preferredUsername,omitempty"` - - // name is the list of attributes whose values should be used as the display name. Optional. - // If unspecified, no display name is set for the identity - // LDAP standard display name attribute is "cn" - // +optional - Name []string `json:"name,omitempty"` - - // email is the list of attributes whose values should be used as the email address. Optional. - // If unspecified, no email is set for the identity - // +optional - Email []string `json:"email,omitempty"` -} - -// KeystonePasswordIdentityProvider provides identities for users authenticating using keystone password credentials -type KeystoneIdentityProvider struct { - // OAuthRemoteConnectionInfo contains information about how to connect to the keystone server - OAuthRemoteConnectionInfo `json:",inline"` - - // domainName is required for keystone v3 - DomainName string `json:"domainName"` - - // TODO if we ever add support for 3.11 to 4.0 upgrades, add this configuration - // useUsernameIdentity indicates that users should be authenticated by username, not keystone ID - // DEPRECATED - only use this option for legacy systems to ensure backwards compatibility - // +optional - // UseUsernameIdentity bool `json:"useUsernameIdentity"` -} - -// RequestHeaderIdentityProvider provides identities for users authenticating using request header credentials -type RequestHeaderIdentityProvider struct { - // loginURL is a URL to redirect unauthenticated /authorize requests to - // Unauthenticated requests from OAuth clients which expect interactive logins will be redirected here - // ${url} is replaced with the current URL, escaped to be safe in a query parameter - // https://www.example.com/sso-login?then=${url} - // ${query} is replaced with the current query string - // https://www.example.com/auth-proxy/oauth/authorize?${query} - // Required when login is set to true. - LoginURL string `json:"loginURL"` - - // challengeURL is a URL to redirect unauthenticated /authorize requests to - // Unauthenticated requests from OAuth clients which expect WWW-Authenticate challenges will be - // redirected here. - // ${url} is replaced with the current URL, escaped to be safe in a query parameter - // https://www.example.com/sso-login?then=${url} - // ${query} is replaced with the current query string - // https://www.example.com/auth-proxy/oauth/authorize?${query} - // Required when challenge is set to true. - ChallengeURL string `json:"challengeURL"` - - // ca is a required reference to a config map by name containing the PEM-encoded CA bundle. - // It is used as a trust anchor to validate the TLS certificate presented by the remote server. - // Specifically, it allows verification of incoming requests to prevent header spoofing. - // The key "ca.crt" is used to locate the data. - // If the config map or expected key is not found, the identity provider is not honored. - // If the specified ca data is not valid, the identity provider is not honored. - // The namespace for this config map is openshift-config. - ClientCA ConfigMapNameReference `json:"ca"` - - // clientCommonNames is an optional list of common names to require a match from. If empty, any - // client certificate validated against the clientCA bundle is considered authoritative. - // +optional - ClientCommonNames []string `json:"clientCommonNames,omitempty"` - - // headers is the set of headers to check for identity information - Headers []string `json:"headers"` - - // preferredUsernameHeaders is the set of headers to check for the preferred username - PreferredUsernameHeaders []string `json:"preferredUsernameHeaders"` - - // nameHeaders is the set of headers to check for the display name - NameHeaders []string `json:"nameHeaders"` - - // emailHeaders is the set of headers to check for the email address - EmailHeaders []string `json:"emailHeaders"` -} - -// GitHubIdentityProvider provides identities for users authenticating using GitHub credentials -type GitHubIdentityProvider struct { - // clientID is the oauth client ID - ClientID string `json:"clientID"` - - // clientSecret is a required reference to the secret by name containing the oauth client secret. - // The key "clientSecret" is used to locate the data. - // If the secret or expected key is not found, the identity provider is not honored. - // The namespace for this secret is openshift-config. - ClientSecret SecretNameReference `json:"clientSecret"` - - // organizations optionally restricts which organizations are allowed to log in - // +optional - Organizations []string `json:"organizations,omitempty"` - - // teams optionally restricts which teams are allowed to log in. Format is /. - // +optional - Teams []string `json:"teams,omitempty"` - - // hostname is the optional domain (e.g. "mycompany.com") for use with a hosted instance of - // GitHub Enterprise. - // It must match the GitHub Enterprise settings value configured at /setup/settings#hostname. - // +optional - Hostname string `json:"hostname"` - - // ca is an optional reference to a config map by name containing the PEM-encoded CA bundle. - // It is used as a trust anchor to validate the TLS certificate presented by the remote server. - // The key "ca.crt" is used to locate the data. - // If specified and the config map or expected key is not found, the identity provider is not honored. - // If the specified ca data is not valid, the identity provider is not honored. - // If empty, the default system roots are used. - // This can only be configured when hostname is set to a non-empty value. - // The namespace for this config map is openshift-config. - // +optional - CA ConfigMapNameReference `json:"ca"` -} - -// GitLabIdentityProvider provides identities for users authenticating using GitLab credentials -type GitLabIdentityProvider struct { - // clientID is the oauth client ID - ClientID string `json:"clientID"` - - // clientSecret is a required reference to the secret by name containing the oauth client secret. - // The key "clientSecret" is used to locate the data. - // If the secret or expected key is not found, the identity provider is not honored. - // The namespace for this secret is openshift-config. - ClientSecret SecretNameReference `json:"clientSecret"` - - // url is the oauth server base URL - URL string `json:"url"` - - // ca is an optional reference to a config map by name containing the PEM-encoded CA bundle. - // It is used as a trust anchor to validate the TLS certificate presented by the remote server. - // The key "ca.crt" is used to locate the data. - // If specified and the config map or expected key is not found, the identity provider is not honored. - // If the specified ca data is not valid, the identity provider is not honored. - // If empty, the default system roots are used. - // The namespace for this config map is openshift-config. - // +optional - CA ConfigMapNameReference `json:"ca"` -} - -// GoogleIdentityProvider provides identities for users authenticating using Google credentials -type GoogleIdentityProvider struct { - // clientID is the oauth client ID - ClientID string `json:"clientID"` - - // clientSecret is a required reference to the secret by name containing the oauth client secret. - // The key "clientSecret" is used to locate the data. - // If the secret or expected key is not found, the identity provider is not honored. - // The namespace for this secret is openshift-config. - ClientSecret SecretNameReference `json:"clientSecret"` - - // hostedDomain is the optional Google App domain (e.g. "mycompany.com") to restrict logins to - // +optional - HostedDomain string `json:"hostedDomain"` -} - -// OpenIDIdentityProvider provides identities for users authenticating using OpenID credentials -type OpenIDIdentityProvider struct { - // clientID is the oauth client ID - ClientID string `json:"clientID"` - - // clientSecret is a required reference to the secret by name containing the oauth client secret. - // The key "clientSecret" is used to locate the data. - // If the secret or expected key is not found, the identity provider is not honored. - // The namespace for this secret is openshift-config. - ClientSecret SecretNameReference `json:"clientSecret"` - - // ca is an optional reference to a config map by name containing the PEM-encoded CA bundle. - // It is used as a trust anchor to validate the TLS certificate presented by the remote server. - // The key "ca.crt" is used to locate the data. - // If specified and the config map or expected key is not found, the identity provider is not honored. - // If the specified ca data is not valid, the identity provider is not honored. - // If empty, the default system roots are used. - // The namespace for this config map is openshift-config. - // +optional - CA ConfigMapNameReference `json:"ca"` - - // extraScopes are any scopes to request in addition to the standard "openid" scope. - // +optional - ExtraScopes []string `json:"extraScopes,omitempty"` - - // extraAuthorizeParameters are any custom parameters to add to the authorize request. - // +optional - ExtraAuthorizeParameters map[string]string `json:"extraAuthorizeParameters,omitempty"` - - // issuer is the URL that the OpenID Provider asserts as its Issuer Identifier. - // It must use the https scheme with no query or fragment component. - Issuer string `json:"issuer"` - - // claims mappings - Claims OpenIDClaims `json:"claims"` -} - -// UserIDClaim is the claim used to provide a stable identifier for OIDC identities. -// Per http://openid.net/specs/openid-connect-core-1_0.html#ClaimStability -// -// "The sub (subject) and iss (issuer) Claims, used together, are the only Claims that an RP can -// rely upon as a stable identifier for the End-User, since the sub Claim MUST be locally unique -// and never reassigned within the Issuer for a particular End-User, as described in Section 2. -// Therefore, the only guaranteed unique identifier for a given End-User is the combination of the -// iss Claim and the sub Claim." -const UserIDClaim = "sub" - -// OpenIDClaim represents a claim retrieved from an OpenID provider's tokens or userInfo -// responses -// +kubebuilder:validation:MinLength=1 -type OpenIDClaim string - -// OpenIDClaims contains a list of OpenID claims to use when authenticating with an OpenID identity provider -type OpenIDClaims struct { - // preferredUsername is the list of claims whose values should be used as the preferred username. - // If unspecified, the preferred username is determined from the value of the sub claim - // +listType=atomic - // +optional - PreferredUsername []string `json:"preferredUsername,omitempty"` - - // name is the list of claims whose values should be used as the display name. Optional. - // If unspecified, no display name is set for the identity - // +listType=atomic - // +optional - Name []string `json:"name,omitempty"` - - // email is the list of claims whose values should be used as the email address. Optional. - // If unspecified, no email is set for the identity - // +listType=atomic - // +optional - Email []string `json:"email,omitempty"` - - // groups is the list of claims value of which should be used to synchronize groups - // from the OIDC provider to OpenShift for the user. - // If multiple claims are specified, the first one with a non-empty value is used. - // +listType=atomic - // +optional - Groups []OpenIDClaim `json:"groups,omitempty"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type OAuthList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata"` - - Items []OAuth `json:"items"` -} diff --git a/vendor/github.com/openshift/api/config/v1/types_operatorhub.go b/vendor/github.com/openshift/api/config/v1/types_operatorhub.go deleted file mode 100644 index ba2c96343..000000000 --- a/vendor/github.com/openshift/api/config/v1/types_operatorhub.go +++ /dev/null @@ -1,91 +0,0 @@ -package v1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// OperatorHubSpec defines the desired state of OperatorHub -type OperatorHubSpec struct { - // disableAllDefaultSources allows you to disable all the default hub - // sources. If this is true, a specific entry in sources can be used to - // enable a default source. If this is false, a specific entry in - // sources can be used to disable or enable a default source. - // +optional - DisableAllDefaultSources bool `json:"disableAllDefaultSources,omitempty"` - // sources is the list of default hub sources and their configuration. - // If the list is empty, it implies that the default hub sources are - // enabled on the cluster unless disableAllDefaultSources is true. - // If disableAllDefaultSources is true and sources is not empty, - // the configuration present in sources will take precedence. The list of - // default hub sources and their current state will always be reflected in - // the status block. - // +optional - Sources []HubSource `json:"sources,omitempty"` -} - -// OperatorHubStatus defines the observed state of OperatorHub. The current -// state of the default hub sources will always be reflected here. -type OperatorHubStatus struct { - // sources encapsulates the result of applying the configuration for each - // hub source - Sources []HubSourceStatus `json:"sources,omitempty"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// OperatorHub is the Schema for the operatorhubs API. It can be used to change -// the state of the default hub sources for OperatorHub on the cluster from -// enabled to disabled and vice versa. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +kubebuilder:subresource:status -// +genclient -// +genclient:nonNamespaced -// +openshift:compatibility-gen:level=1 -type OperatorHub struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata"` - - Spec OperatorHubSpec `json:"spec"` - Status OperatorHubStatus `json:"status"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// OperatorHubList contains a list of OperatorHub -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type OperatorHubList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata"` - Items []OperatorHub `json:"items"` -} - -// HubSource is used to specify the hub source and its configuration -type HubSource struct { - // name is the name of one of the default hub sources - // +kubebuilder:validation:MaxLength=253 - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:Required - Name string `json:"name"` - // disabled is used to disable a default hub source on cluster - // +kubebuilder:Required - Disabled bool `json:"disabled"` -} - -// HubSourceStatus is used to reflect the current state of applying the -// configuration to a default source -type HubSourceStatus struct { - HubSource `json:",omitempty"` - // status indicates success or failure in applying the configuration - Status string `json:"status,omitempty"` - // message provides more information regarding failures - Message string `json:"message,omitempty"` -} diff --git a/vendor/github.com/openshift/api/config/v1/types_project.go b/vendor/github.com/openshift/api/config/v1/types_project.go deleted file mode 100644 index 85afb90c2..000000000 --- a/vendor/github.com/openshift/api/config/v1/types_project.go +++ /dev/null @@ -1,65 +0,0 @@ -package v1 - -import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - -// +genclient -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// Project holds cluster-wide information about Project. The canonical name is `cluster` -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type Project struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata,omitempty"` - - // spec holds user settable values for configuration - // +kubebuilder:validation:Required - // +required - Spec ProjectSpec `json:"spec"` - // status holds observed values from the cluster. They may not be overridden. - // +optional - Status ProjectStatus `json:"status"` -} - -// TemplateReference references a template in a specific namespace. -// The namespace must be specified at the point of use. -type TemplateReference struct { - // name is the metadata.name of the referenced project request template - Name string `json:"name"` -} - -// ProjectSpec holds the project creation configuration. -type ProjectSpec struct { - // projectRequestMessage is the string presented to a user if they are unable to request a project via the projectrequest api endpoint - // +optional - ProjectRequestMessage string `json:"projectRequestMessage"` - - // projectRequestTemplate is the template to use for creating projects in response to projectrequest. - // This must point to a template in 'openshift-config' namespace. It is optional. - // If it is not specified, a default template is used. - // - // +optional - ProjectRequestTemplate TemplateReference `json:"projectRequestTemplate"` -} - -type ProjectStatus struct { -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type ProjectList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata"` - - Items []Project `json:"items"` -} diff --git a/vendor/github.com/openshift/api/config/v1/types_proxy.go b/vendor/github.com/openshift/api/config/v1/types_proxy.go deleted file mode 100644 index 40ed296d6..000000000 --- a/vendor/github.com/openshift/api/config/v1/types_proxy.go +++ /dev/null @@ -1,105 +0,0 @@ -package v1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// +genclient -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// Proxy holds cluster-wide information on how to configure default proxies for the cluster. The canonical name is `cluster` -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type Proxy struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata,omitempty"` - - // Spec holds user-settable values for the proxy configuration - // +kubebuilder:validation:Required - // +required - Spec ProxySpec `json:"spec"` - // status holds observed values from the cluster. They may not be overridden. - // +optional - Status ProxyStatus `json:"status"` -} - -// ProxySpec contains cluster proxy creation configuration. -type ProxySpec struct { - // httpProxy is the URL of the proxy for HTTP requests. Empty means unset and will not result in an env var. - // +optional - HTTPProxy string `json:"httpProxy,omitempty"` - - // httpsProxy is the URL of the proxy for HTTPS requests. Empty means unset and will not result in an env var. - // +optional - HTTPSProxy string `json:"httpsProxy,omitempty"` - - // noProxy is a comma-separated list of hostnames and/or CIDRs and/or IPs for which the proxy should not be used. - // Empty means unset and will not result in an env var. - // +optional - NoProxy string `json:"noProxy,omitempty"` - - // readinessEndpoints is a list of endpoints used to verify readiness of the proxy. - // +optional - ReadinessEndpoints []string `json:"readinessEndpoints,omitempty"` - - // trustedCA is a reference to a ConfigMap containing a CA certificate bundle. - // The trustedCA field should only be consumed by a proxy validator. The - // validator is responsible for reading the certificate bundle from the required - // key "ca-bundle.crt", merging it with the system default trust bundle, - // and writing the merged trust bundle to a ConfigMap named "trusted-ca-bundle" - // in the "openshift-config-managed" namespace. Clients that expect to make - // proxy connections must use the trusted-ca-bundle for all HTTPS requests to - // the proxy, and may use the trusted-ca-bundle for non-proxy HTTPS requests as - // well. - // - // The namespace for the ConfigMap referenced by trustedCA is - // "openshift-config". Here is an example ConfigMap (in yaml): - // - // apiVersion: v1 - // kind: ConfigMap - // metadata: - // name: user-ca-bundle - // namespace: openshift-config - // data: - // ca-bundle.crt: | - // -----BEGIN CERTIFICATE----- - // Custom CA certificate bundle. - // -----END CERTIFICATE----- - // - // +optional - TrustedCA ConfigMapNameReference `json:"trustedCA,omitempty"` -} - -// ProxyStatus shows current known state of the cluster proxy. -type ProxyStatus struct { - // httpProxy is the URL of the proxy for HTTP requests. - // +optional - HTTPProxy string `json:"httpProxy,omitempty"` - - // httpsProxy is the URL of the proxy for HTTPS requests. - // +optional - HTTPSProxy string `json:"httpsProxy,omitempty"` - - // noProxy is a comma-separated list of hostnames and/or CIDRs for which the proxy should not be used. - // +optional - NoProxy string `json:"noProxy,omitempty"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type ProxyList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata"` - - Items []Proxy `json:"items"` -} diff --git a/vendor/github.com/openshift/api/config/v1/types_scheduling.go b/vendor/github.com/openshift/api/config/v1/types_scheduling.go deleted file mode 100644 index 7367f414f..000000000 --- a/vendor/github.com/openshift/api/config/v1/types_scheduling.go +++ /dev/null @@ -1,111 +0,0 @@ -package v1 - -import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - -// +genclient -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// Scheduler holds cluster-wide config information to run the Kubernetes Scheduler -// and influence its placement decisions. The canonical name for this config is `cluster`. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type Scheduler struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata,omitempty"` - - // spec holds user settable values for configuration - // +kubebuilder:validation:Required - // +required - Spec SchedulerSpec `json:"spec"` - // status holds observed values from the cluster. They may not be overridden. - // +optional - Status SchedulerStatus `json:"status"` -} - -type SchedulerSpec struct { - // DEPRECATED: the scheduler Policy API has been deprecated and will be removed in a future release. - // policy is a reference to a ConfigMap containing scheduler policy which has - // user specified predicates and priorities. If this ConfigMap is not available - // scheduler will default to use DefaultAlgorithmProvider. - // The namespace for this configmap is openshift-config. - // +optional - Policy ConfigMapNameReference `json:"policy,omitempty"` - // profile sets which scheduling profile should be set in order to configure scheduling - // decisions for new pods. - // - // Valid values are "LowNodeUtilization", "HighNodeUtilization", "NoScoring" - // Defaults to "LowNodeUtilization" - // +optional - Profile SchedulerProfile `json:"profile,omitempty"` - // defaultNodeSelector helps set the cluster-wide default node selector to - // restrict pod placement to specific nodes. This is applied to the pods - // created in all namespaces and creates an intersection with any existing - // nodeSelectors already set on a pod, additionally constraining that pod's selector. - // For example, - // defaultNodeSelector: "type=user-node,region=east" would set nodeSelector - // field in pod spec to "type=user-node,region=east" to all pods created - // in all namespaces. Namespaces having project-wide node selectors won't be - // impacted even if this field is set. This adds an annotation section to - // the namespace. - // For example, if a new namespace is created with - // node-selector='type=user-node,region=east', - // the annotation openshift.io/node-selector: type=user-node,region=east - // gets added to the project. When the openshift.io/node-selector annotation - // is set on the project the value is used in preference to the value we are setting - // for defaultNodeSelector field. - // For instance, - // openshift.io/node-selector: "type=user-node,region=west" means - // that the default of "type=user-node,region=east" set in defaultNodeSelector - // would not be applied. - // +optional - DefaultNodeSelector string `json:"defaultNodeSelector,omitempty"` - // MastersSchedulable allows masters nodes to be schedulable. When this flag is - // turned on, all the master nodes in the cluster will be made schedulable, - // so that workload pods can run on them. The default value for this field is false, - // meaning none of the master nodes are schedulable. - // Important Note: Once the workload pods start running on the master nodes, - // extreme care must be taken to ensure that cluster-critical control plane components - // are not impacted. - // Please turn on this field after doing due diligence. - // +optional - MastersSchedulable bool `json:"mastersSchedulable"` -} - -// +kubebuilder:validation:Enum="";LowNodeUtilization;HighNodeUtilization;NoScoring -type SchedulerProfile string - -var ( - // LowNodeUtililization is the default, and defines a scheduling profile which prefers to - // spread pods evenly among nodes targeting low resource consumption on each node. - LowNodeUtilization SchedulerProfile = "LowNodeUtilization" - - // HighNodeUtilization defines a scheduling profile which packs as many pods as possible onto - // as few nodes as possible targeting a small node count but high resource usage on each node. - HighNodeUtilization SchedulerProfile = "HighNodeUtilization" - - // NoScoring defines a scheduling profile which tries to provide lower-latency scheduling - // at the expense of potentially less optimal pod placement decisions. - NoScoring SchedulerProfile = "NoScoring" -) - -type SchedulerStatus struct { -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type SchedulerList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata"` - - Items []Scheduler `json:"items"` -} diff --git a/vendor/github.com/openshift/api/config/v1/zz_generated.deepcopy.go b/vendor/github.com/openshift/api/config/v1/zz_generated.deepcopy.go deleted file mode 100644 index 4db1b9ad4..000000000 --- a/vendor/github.com/openshift/api/config/v1/zz_generated.deepcopy.go +++ /dev/null @@ -1,5299 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// Code generated by deepcopy-gen. DO NOT EDIT. - -package v1 - -import ( - corev1 "k8s.io/api/core/v1" - metav1 "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 *APIServer) DeepCopyInto(out *APIServer) { - *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 APIServer. -func (in *APIServer) DeepCopy() *APIServer { - if in == nil { - return nil - } - out := new(APIServer) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *APIServer) 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 *APIServerEncryption) DeepCopyInto(out *APIServerEncryption) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIServerEncryption. -func (in *APIServerEncryption) DeepCopy() *APIServerEncryption { - if in == nil { - return nil - } - out := new(APIServerEncryption) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *APIServerList) DeepCopyInto(out *APIServerList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]APIServer, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIServerList. -func (in *APIServerList) DeepCopy() *APIServerList { - if in == nil { - return nil - } - out := new(APIServerList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *APIServerList) 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 *APIServerNamedServingCert) DeepCopyInto(out *APIServerNamedServingCert) { - *out = *in - if in.Names != nil { - in, out := &in.Names, &out.Names - *out = make([]string, len(*in)) - copy(*out, *in) - } - out.ServingCertificate = in.ServingCertificate - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIServerNamedServingCert. -func (in *APIServerNamedServingCert) DeepCopy() *APIServerNamedServingCert { - if in == nil { - return nil - } - out := new(APIServerNamedServingCert) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *APIServerServingCerts) DeepCopyInto(out *APIServerServingCerts) { - *out = *in - if in.NamedCertificates != nil { - in, out := &in.NamedCertificates, &out.NamedCertificates - *out = make([]APIServerNamedServingCert, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIServerServingCerts. -func (in *APIServerServingCerts) DeepCopy() *APIServerServingCerts { - if in == nil { - return nil - } - out := new(APIServerServingCerts) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *APIServerSpec) DeepCopyInto(out *APIServerSpec) { - *out = *in - in.ServingCerts.DeepCopyInto(&out.ServingCerts) - out.ClientCA = in.ClientCA - if in.AdditionalCORSAllowedOrigins != nil { - in, out := &in.AdditionalCORSAllowedOrigins, &out.AdditionalCORSAllowedOrigins - *out = make([]string, len(*in)) - copy(*out, *in) - } - out.Encryption = in.Encryption - if in.TLSSecurityProfile != nil { - in, out := &in.TLSSecurityProfile, &out.TLSSecurityProfile - *out = new(TLSSecurityProfile) - (*in).DeepCopyInto(*out) - } - in.Audit.DeepCopyInto(&out.Audit) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIServerSpec. -func (in *APIServerSpec) DeepCopy() *APIServerSpec { - if in == nil { - return nil - } - out := new(APIServerSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *APIServerStatus) DeepCopyInto(out *APIServerStatus) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIServerStatus. -func (in *APIServerStatus) DeepCopy() *APIServerStatus { - if in == nil { - return nil - } - out := new(APIServerStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AWSIngressSpec) DeepCopyInto(out *AWSIngressSpec) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AWSIngressSpec. -func (in *AWSIngressSpec) DeepCopy() *AWSIngressSpec { - if in == nil { - return nil - } - out := new(AWSIngressSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AWSPlatformSpec) DeepCopyInto(out *AWSPlatformSpec) { - *out = *in - if in.ServiceEndpoints != nil { - in, out := &in.ServiceEndpoints, &out.ServiceEndpoints - *out = make([]AWSServiceEndpoint, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AWSPlatformSpec. -func (in *AWSPlatformSpec) DeepCopy() *AWSPlatformSpec { - if in == nil { - return nil - } - out := new(AWSPlatformSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AWSPlatformStatus) DeepCopyInto(out *AWSPlatformStatus) { - *out = *in - if in.ServiceEndpoints != nil { - in, out := &in.ServiceEndpoints, &out.ServiceEndpoints - *out = make([]AWSServiceEndpoint, len(*in)) - copy(*out, *in) - } - if in.ResourceTags != nil { - in, out := &in.ResourceTags, &out.ResourceTags - *out = make([]AWSResourceTag, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AWSPlatformStatus. -func (in *AWSPlatformStatus) DeepCopy() *AWSPlatformStatus { - if in == nil { - return nil - } - out := new(AWSPlatformStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AWSResourceTag) DeepCopyInto(out *AWSResourceTag) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AWSResourceTag. -func (in *AWSResourceTag) DeepCopy() *AWSResourceTag { - if in == nil { - return nil - } - out := new(AWSResourceTag) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AWSServiceEndpoint) DeepCopyInto(out *AWSServiceEndpoint) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AWSServiceEndpoint. -func (in *AWSServiceEndpoint) DeepCopy() *AWSServiceEndpoint { - if in == nil { - return nil - } - out := new(AWSServiceEndpoint) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AdmissionConfig) DeepCopyInto(out *AdmissionConfig) { - *out = *in - if in.PluginConfig != nil { - in, out := &in.PluginConfig, &out.PluginConfig - *out = make(map[string]AdmissionPluginConfig, len(*in)) - for key, val := range *in { - (*out)[key] = *val.DeepCopy() - } - } - if in.EnabledAdmissionPlugins != nil { - in, out := &in.EnabledAdmissionPlugins, &out.EnabledAdmissionPlugins - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.DisabledAdmissionPlugins != nil { - in, out := &in.DisabledAdmissionPlugins, &out.DisabledAdmissionPlugins - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AdmissionConfig. -func (in *AdmissionConfig) DeepCopy() *AdmissionConfig { - if in == nil { - return nil - } - out := new(AdmissionConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AdmissionPluginConfig) DeepCopyInto(out *AdmissionPluginConfig) { - *out = *in - in.Configuration.DeepCopyInto(&out.Configuration) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AdmissionPluginConfig. -func (in *AdmissionPluginConfig) DeepCopy() *AdmissionPluginConfig { - if in == nil { - return nil - } - out := new(AdmissionPluginConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AlibabaCloudPlatformSpec) DeepCopyInto(out *AlibabaCloudPlatformSpec) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AlibabaCloudPlatformSpec. -func (in *AlibabaCloudPlatformSpec) DeepCopy() *AlibabaCloudPlatformSpec { - if in == nil { - return nil - } - out := new(AlibabaCloudPlatformSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AlibabaCloudPlatformStatus) DeepCopyInto(out *AlibabaCloudPlatformStatus) { - *out = *in - if in.ResourceTags != nil { - in, out := &in.ResourceTags, &out.ResourceTags - *out = make([]AlibabaCloudResourceTag, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AlibabaCloudPlatformStatus. -func (in *AlibabaCloudPlatformStatus) DeepCopy() *AlibabaCloudPlatformStatus { - if in == nil { - return nil - } - out := new(AlibabaCloudPlatformStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AlibabaCloudResourceTag) DeepCopyInto(out *AlibabaCloudResourceTag) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AlibabaCloudResourceTag. -func (in *AlibabaCloudResourceTag) DeepCopy() *AlibabaCloudResourceTag { - if in == nil { - return nil - } - out := new(AlibabaCloudResourceTag) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Audit) DeepCopyInto(out *Audit) { - *out = *in - if in.CustomRules != nil { - in, out := &in.CustomRules, &out.CustomRules - *out = make([]AuditCustomRule, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Audit. -func (in *Audit) DeepCopy() *Audit { - if in == nil { - return nil - } - out := new(Audit) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AuditConfig) DeepCopyInto(out *AuditConfig) { - *out = *in - in.PolicyConfiguration.DeepCopyInto(&out.PolicyConfiguration) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AuditConfig. -func (in *AuditConfig) DeepCopy() *AuditConfig { - if in == nil { - return nil - } - out := new(AuditConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AuditCustomRule) DeepCopyInto(out *AuditCustomRule) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AuditCustomRule. -func (in *AuditCustomRule) DeepCopy() *AuditCustomRule { - if in == nil { - return nil - } - out := new(AuditCustomRule) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Authentication) DeepCopyInto(out *Authentication) { - *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 Authentication. -func (in *Authentication) DeepCopy() *Authentication { - if in == nil { - return nil - } - out := new(Authentication) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *Authentication) 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 *AuthenticationList) DeepCopyInto(out *AuthenticationList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]Authentication, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AuthenticationList. -func (in *AuthenticationList) DeepCopy() *AuthenticationList { - if in == nil { - return nil - } - out := new(AuthenticationList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *AuthenticationList) 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 *AuthenticationSpec) DeepCopyInto(out *AuthenticationSpec) { - *out = *in - out.OAuthMetadata = in.OAuthMetadata - if in.WebhookTokenAuthenticators != nil { - in, out := &in.WebhookTokenAuthenticators, &out.WebhookTokenAuthenticators - *out = make([]DeprecatedWebhookTokenAuthenticator, len(*in)) - copy(*out, *in) - } - if in.WebhookTokenAuthenticator != nil { - in, out := &in.WebhookTokenAuthenticator, &out.WebhookTokenAuthenticator - *out = new(WebhookTokenAuthenticator) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AuthenticationSpec. -func (in *AuthenticationSpec) DeepCopy() *AuthenticationSpec { - if in == nil { - return nil - } - out := new(AuthenticationSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AuthenticationStatus) DeepCopyInto(out *AuthenticationStatus) { - *out = *in - out.IntegratedOAuthMetadata = in.IntegratedOAuthMetadata - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AuthenticationStatus. -func (in *AuthenticationStatus) DeepCopy() *AuthenticationStatus { - if in == nil { - return nil - } - out := new(AuthenticationStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AzurePlatformSpec) DeepCopyInto(out *AzurePlatformSpec) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzurePlatformSpec. -func (in *AzurePlatformSpec) DeepCopy() *AzurePlatformSpec { - if in == nil { - return nil - } - out := new(AzurePlatformSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AzurePlatformStatus) DeepCopyInto(out *AzurePlatformStatus) { - *out = *in - if in.ResourceTags != nil { - in, out := &in.ResourceTags, &out.ResourceTags - *out = make([]AzureResourceTag, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzurePlatformStatus. -func (in *AzurePlatformStatus) DeepCopy() *AzurePlatformStatus { - if in == nil { - return nil - } - out := new(AzurePlatformStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AzureResourceTag) DeepCopyInto(out *AzureResourceTag) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureResourceTag. -func (in *AzureResourceTag) DeepCopy() *AzureResourceTag { - if in == nil { - return nil - } - out := new(AzureResourceTag) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *BareMetalPlatformLoadBalancer) DeepCopyInto(out *BareMetalPlatformLoadBalancer) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BareMetalPlatformLoadBalancer. -func (in *BareMetalPlatformLoadBalancer) DeepCopy() *BareMetalPlatformLoadBalancer { - if in == nil { - return nil - } - out := new(BareMetalPlatformLoadBalancer) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *BareMetalPlatformSpec) DeepCopyInto(out *BareMetalPlatformSpec) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BareMetalPlatformSpec. -func (in *BareMetalPlatformSpec) DeepCopy() *BareMetalPlatformSpec { - if in == nil { - return nil - } - out := new(BareMetalPlatformSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *BareMetalPlatformStatus) DeepCopyInto(out *BareMetalPlatformStatus) { - *out = *in - if in.APIServerInternalIPs != nil { - in, out := &in.APIServerInternalIPs, &out.APIServerInternalIPs - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.IngressIPs != nil { - in, out := &in.IngressIPs, &out.IngressIPs - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.LoadBalancer != nil { - in, out := &in.LoadBalancer, &out.LoadBalancer - *out = new(BareMetalPlatformLoadBalancer) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BareMetalPlatformStatus. -func (in *BareMetalPlatformStatus) DeepCopy() *BareMetalPlatformStatus { - if in == nil { - return nil - } - out := new(BareMetalPlatformStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *BasicAuthIdentityProvider) DeepCopyInto(out *BasicAuthIdentityProvider) { - *out = *in - out.OAuthRemoteConnectionInfo = in.OAuthRemoteConnectionInfo - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BasicAuthIdentityProvider. -func (in *BasicAuthIdentityProvider) DeepCopy() *BasicAuthIdentityProvider { - if in == nil { - return nil - } - out := new(BasicAuthIdentityProvider) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Build) DeepCopyInto(out *Build) { - *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 Build. -func (in *Build) DeepCopy() *Build { - if in == nil { - return nil - } - out := new(Build) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *Build) 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 *BuildDefaults) DeepCopyInto(out *BuildDefaults) { - *out = *in - if in.DefaultProxy != nil { - in, out := &in.DefaultProxy, &out.DefaultProxy - *out = new(ProxySpec) - (*in).DeepCopyInto(*out) - } - if in.GitProxy != nil { - in, out := &in.GitProxy, &out.GitProxy - *out = new(ProxySpec) - (*in).DeepCopyInto(*out) - } - if in.Env != nil { - in, out := &in.Env, &out.Env - *out = make([]corev1.EnvVar, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.ImageLabels != nil { - in, out := &in.ImageLabels, &out.ImageLabels - *out = make([]ImageLabel, len(*in)) - copy(*out, *in) - } - in.Resources.DeepCopyInto(&out.Resources) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BuildDefaults. -func (in *BuildDefaults) DeepCopy() *BuildDefaults { - if in == nil { - return nil - } - out := new(BuildDefaults) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *BuildList) DeepCopyInto(out *BuildList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]Build, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BuildList. -func (in *BuildList) DeepCopy() *BuildList { - if in == nil { - return nil - } - out := new(BuildList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *BuildList) 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 *BuildOverrides) DeepCopyInto(out *BuildOverrides) { - *out = *in - if in.ImageLabels != nil { - in, out := &in.ImageLabels, &out.ImageLabels - *out = make([]ImageLabel, len(*in)) - copy(*out, *in) - } - if in.NodeSelector != nil { - in, out := &in.NodeSelector, &out.NodeSelector - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.Tolerations != nil { - in, out := &in.Tolerations, &out.Tolerations - *out = make([]corev1.Toleration, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.ForcePull != nil { - in, out := &in.ForcePull, &out.ForcePull - *out = new(bool) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BuildOverrides. -func (in *BuildOverrides) DeepCopy() *BuildOverrides { - if in == nil { - return nil - } - out := new(BuildOverrides) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *BuildSpec) DeepCopyInto(out *BuildSpec) { - *out = *in - out.AdditionalTrustedCA = in.AdditionalTrustedCA - in.BuildDefaults.DeepCopyInto(&out.BuildDefaults) - in.BuildOverrides.DeepCopyInto(&out.BuildOverrides) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BuildSpec. -func (in *BuildSpec) DeepCopy() *BuildSpec { - if in == nil { - return nil - } - out := new(BuildSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CertInfo) DeepCopyInto(out *CertInfo) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CertInfo. -func (in *CertInfo) DeepCopy() *CertInfo { - if in == nil { - return nil - } - out := new(CertInfo) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClientConnectionOverrides) DeepCopyInto(out *ClientConnectionOverrides) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClientConnectionOverrides. -func (in *ClientConnectionOverrides) DeepCopy() *ClientConnectionOverrides { - if in == nil { - return nil - } - out := new(ClientConnectionOverrides) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClusterCondition) DeepCopyInto(out *ClusterCondition) { - *out = *in - if in.PromQL != nil { - in, out := &in.PromQL, &out.PromQL - *out = new(PromQLClusterCondition) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterCondition. -func (in *ClusterCondition) DeepCopy() *ClusterCondition { - if in == nil { - return nil - } - out := new(ClusterCondition) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClusterNetworkEntry) DeepCopyInto(out *ClusterNetworkEntry) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterNetworkEntry. -func (in *ClusterNetworkEntry) DeepCopy() *ClusterNetworkEntry { - if in == nil { - return nil - } - out := new(ClusterNetworkEntry) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClusterOperator) DeepCopyInto(out *ClusterOperator) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - out.Spec = in.Spec - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterOperator. -func (in *ClusterOperator) DeepCopy() *ClusterOperator { - if in == nil { - return nil - } - out := new(ClusterOperator) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ClusterOperator) 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 *ClusterOperatorList) DeepCopyInto(out *ClusterOperatorList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]ClusterOperator, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterOperatorList. -func (in *ClusterOperatorList) DeepCopy() *ClusterOperatorList { - if in == nil { - return nil - } - out := new(ClusterOperatorList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ClusterOperatorList) 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 *ClusterOperatorSpec) DeepCopyInto(out *ClusterOperatorSpec) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterOperatorSpec. -func (in *ClusterOperatorSpec) DeepCopy() *ClusterOperatorSpec { - if in == nil { - return nil - } - out := new(ClusterOperatorSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClusterOperatorStatus) DeepCopyInto(out *ClusterOperatorStatus) { - *out = *in - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]ClusterOperatorStatusCondition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Versions != nil { - in, out := &in.Versions, &out.Versions - *out = make([]OperandVersion, len(*in)) - copy(*out, *in) - } - if in.RelatedObjects != nil { - in, out := &in.RelatedObjects, &out.RelatedObjects - *out = make([]ObjectReference, len(*in)) - copy(*out, *in) - } - in.Extension.DeepCopyInto(&out.Extension) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterOperatorStatus. -func (in *ClusterOperatorStatus) DeepCopy() *ClusterOperatorStatus { - if in == nil { - return nil - } - out := new(ClusterOperatorStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClusterOperatorStatusCondition) DeepCopyInto(out *ClusterOperatorStatusCondition) { - *out = *in - in.LastTransitionTime.DeepCopyInto(&out.LastTransitionTime) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterOperatorStatusCondition. -func (in *ClusterOperatorStatusCondition) DeepCopy() *ClusterOperatorStatusCondition { - if in == nil { - return nil - } - out := new(ClusterOperatorStatusCondition) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClusterVersion) DeepCopyInto(out *ClusterVersion) { - *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 ClusterVersion. -func (in *ClusterVersion) DeepCopy() *ClusterVersion { - if in == nil { - return nil - } - out := new(ClusterVersion) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ClusterVersion) 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 *ClusterVersionCapabilitiesSpec) DeepCopyInto(out *ClusterVersionCapabilitiesSpec) { - *out = *in - if in.AdditionalEnabledCapabilities != nil { - in, out := &in.AdditionalEnabledCapabilities, &out.AdditionalEnabledCapabilities - *out = make([]ClusterVersionCapability, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterVersionCapabilitiesSpec. -func (in *ClusterVersionCapabilitiesSpec) DeepCopy() *ClusterVersionCapabilitiesSpec { - if in == nil { - return nil - } - out := new(ClusterVersionCapabilitiesSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClusterVersionCapabilitiesStatus) DeepCopyInto(out *ClusterVersionCapabilitiesStatus) { - *out = *in - if in.EnabledCapabilities != nil { - in, out := &in.EnabledCapabilities, &out.EnabledCapabilities - *out = make([]ClusterVersionCapability, len(*in)) - copy(*out, *in) - } - if in.KnownCapabilities != nil { - in, out := &in.KnownCapabilities, &out.KnownCapabilities - *out = make([]ClusterVersionCapability, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterVersionCapabilitiesStatus. -func (in *ClusterVersionCapabilitiesStatus) DeepCopy() *ClusterVersionCapabilitiesStatus { - if in == nil { - return nil - } - out := new(ClusterVersionCapabilitiesStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClusterVersionList) DeepCopyInto(out *ClusterVersionList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]ClusterVersion, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterVersionList. -func (in *ClusterVersionList) DeepCopy() *ClusterVersionList { - if in == nil { - return nil - } - out := new(ClusterVersionList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ClusterVersionList) 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 *ClusterVersionSpec) DeepCopyInto(out *ClusterVersionSpec) { - *out = *in - if in.DesiredUpdate != nil { - in, out := &in.DesiredUpdate, &out.DesiredUpdate - *out = new(Update) - **out = **in - } - if in.Capabilities != nil { - in, out := &in.Capabilities, &out.Capabilities - *out = new(ClusterVersionCapabilitiesSpec) - (*in).DeepCopyInto(*out) - } - if in.Overrides != nil { - in, out := &in.Overrides, &out.Overrides - *out = make([]ComponentOverride, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterVersionSpec. -func (in *ClusterVersionSpec) DeepCopy() *ClusterVersionSpec { - if in == nil { - return nil - } - out := new(ClusterVersionSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClusterVersionStatus) DeepCopyInto(out *ClusterVersionStatus) { - *out = *in - in.Desired.DeepCopyInto(&out.Desired) - if in.History != nil { - in, out := &in.History, &out.History - *out = make([]UpdateHistory, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - in.Capabilities.DeepCopyInto(&out.Capabilities) - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]ClusterOperatorStatusCondition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.AvailableUpdates != nil { - in, out := &in.AvailableUpdates, &out.AvailableUpdates - *out = make([]Release, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.ConditionalUpdates != nil { - in, out := &in.ConditionalUpdates, &out.ConditionalUpdates - *out = make([]ConditionalUpdate, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterVersionStatus. -func (in *ClusterVersionStatus) DeepCopy() *ClusterVersionStatus { - if in == nil { - return nil - } - out := new(ClusterVersionStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ComponentOverride) DeepCopyInto(out *ComponentOverride) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentOverride. -func (in *ComponentOverride) DeepCopy() *ComponentOverride { - if in == nil { - return nil - } - out := new(ComponentOverride) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ComponentRouteSpec) DeepCopyInto(out *ComponentRouteSpec) { - *out = *in - out.ServingCertKeyPairSecret = in.ServingCertKeyPairSecret - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentRouteSpec. -func (in *ComponentRouteSpec) DeepCopy() *ComponentRouteSpec { - if in == nil { - return nil - } - out := new(ComponentRouteSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ComponentRouteStatus) DeepCopyInto(out *ComponentRouteStatus) { - *out = *in - if in.ConsumingUsers != nil { - in, out := &in.ConsumingUsers, &out.ConsumingUsers - *out = make([]ConsumingUser, len(*in)) - copy(*out, *in) - } - if in.CurrentHostnames != nil { - in, out := &in.CurrentHostnames, &out.CurrentHostnames - *out = make([]Hostname, len(*in)) - copy(*out, *in) - } - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]metav1.Condition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.RelatedObjects != nil { - in, out := &in.RelatedObjects, &out.RelatedObjects - *out = make([]ObjectReference, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentRouteStatus. -func (in *ComponentRouteStatus) DeepCopy() *ComponentRouteStatus { - if in == nil { - return nil - } - out := new(ComponentRouteStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ConditionalUpdate) DeepCopyInto(out *ConditionalUpdate) { - *out = *in - in.Release.DeepCopyInto(&out.Release) - if in.Risks != nil { - in, out := &in.Risks, &out.Risks - *out = make([]ConditionalUpdateRisk, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]metav1.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 ConditionalUpdate. -func (in *ConditionalUpdate) DeepCopy() *ConditionalUpdate { - if in == nil { - return nil - } - out := new(ConditionalUpdate) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ConditionalUpdateRisk) DeepCopyInto(out *ConditionalUpdateRisk) { - *out = *in - if in.MatchingRules != nil { - in, out := &in.MatchingRules, &out.MatchingRules - *out = make([]ClusterCondition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConditionalUpdateRisk. -func (in *ConditionalUpdateRisk) DeepCopy() *ConditionalUpdateRisk { - if in == nil { - return nil - } - out := new(ConditionalUpdateRisk) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ConfigMapFileReference) DeepCopyInto(out *ConfigMapFileReference) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigMapFileReference. -func (in *ConfigMapFileReference) DeepCopy() *ConfigMapFileReference { - if in == nil { - return nil - } - out := new(ConfigMapFileReference) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ConfigMapNameReference) DeepCopyInto(out *ConfigMapNameReference) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigMapNameReference. -func (in *ConfigMapNameReference) DeepCopy() *ConfigMapNameReference { - if in == nil { - return nil - } - out := new(ConfigMapNameReference) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Console) DeepCopyInto(out *Console) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - out.Spec = in.Spec - out.Status = in.Status - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Console. -func (in *Console) DeepCopy() *Console { - if in == nil { - return nil - } - out := new(Console) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *Console) 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 *ConsoleAuthentication) DeepCopyInto(out *ConsoleAuthentication) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConsoleAuthentication. -func (in *ConsoleAuthentication) DeepCopy() *ConsoleAuthentication { - if in == nil { - return nil - } - out := new(ConsoleAuthentication) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ConsoleList) DeepCopyInto(out *ConsoleList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]Console, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConsoleList. -func (in *ConsoleList) DeepCopy() *ConsoleList { - if in == nil { - return nil - } - out := new(ConsoleList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ConsoleList) 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 *ConsoleSpec) DeepCopyInto(out *ConsoleSpec) { - *out = *in - out.Authentication = in.Authentication - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConsoleSpec. -func (in *ConsoleSpec) DeepCopy() *ConsoleSpec { - if in == nil { - return nil - } - out := new(ConsoleSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ConsoleStatus) DeepCopyInto(out *ConsoleStatus) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConsoleStatus. -func (in *ConsoleStatus) DeepCopy() *ConsoleStatus { - if in == nil { - return nil - } - out := new(ConsoleStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CustomFeatureGates) DeepCopyInto(out *CustomFeatureGates) { - *out = *in - if in.Enabled != nil { - in, out := &in.Enabled, &out.Enabled - *out = make([]FeatureGateName, len(*in)) - copy(*out, *in) - } - if in.Disabled != nil { - in, out := &in.Disabled, &out.Disabled - *out = make([]FeatureGateName, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomFeatureGates. -func (in *CustomFeatureGates) DeepCopy() *CustomFeatureGates { - if in == nil { - return nil - } - out := new(CustomFeatureGates) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CustomTLSProfile) DeepCopyInto(out *CustomTLSProfile) { - *out = *in - in.TLSProfileSpec.DeepCopyInto(&out.TLSProfileSpec) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomTLSProfile. -func (in *CustomTLSProfile) DeepCopy() *CustomTLSProfile { - if in == nil { - return nil - } - out := new(CustomTLSProfile) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DNS) DeepCopyInto(out *DNS) { - *out = *in - 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 DNS. -func (in *DNS) DeepCopy() *DNS { - if in == nil { - return nil - } - out := new(DNS) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *DNS) 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 *DNSList) DeepCopyInto(out *DNSList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]DNS, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DNSList. -func (in *DNSList) DeepCopy() *DNSList { - if in == nil { - return nil - } - out := new(DNSList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *DNSList) 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 *DNSSpec) DeepCopyInto(out *DNSSpec) { - *out = *in - if in.PublicZone != nil { - in, out := &in.PublicZone, &out.PublicZone - *out = new(DNSZone) - (*in).DeepCopyInto(*out) - } - if in.PrivateZone != nil { - in, out := &in.PrivateZone, &out.PrivateZone - *out = new(DNSZone) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DNSSpec. -func (in *DNSSpec) DeepCopy() *DNSSpec { - if in == nil { - return nil - } - out := new(DNSSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DNSStatus) DeepCopyInto(out *DNSStatus) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DNSStatus. -func (in *DNSStatus) DeepCopy() *DNSStatus { - if in == nil { - return nil - } - out := new(DNSStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DNSZone) DeepCopyInto(out *DNSZone) { - *out = *in - if in.Tags != nil { - in, out := &in.Tags, &out.Tags - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DNSZone. -func (in *DNSZone) DeepCopy() *DNSZone { - if in == nil { - return nil - } - out := new(DNSZone) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DelegatedAuthentication) DeepCopyInto(out *DelegatedAuthentication) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DelegatedAuthentication. -func (in *DelegatedAuthentication) DeepCopy() *DelegatedAuthentication { - if in == nil { - return nil - } - out := new(DelegatedAuthentication) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DelegatedAuthorization) DeepCopyInto(out *DelegatedAuthorization) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DelegatedAuthorization. -func (in *DelegatedAuthorization) DeepCopy() *DelegatedAuthorization { - if in == nil { - return nil - } - out := new(DelegatedAuthorization) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DeprecatedWebhookTokenAuthenticator) DeepCopyInto(out *DeprecatedWebhookTokenAuthenticator) { - *out = *in - out.KubeConfig = in.KubeConfig - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeprecatedWebhookTokenAuthenticator. -func (in *DeprecatedWebhookTokenAuthenticator) DeepCopy() *DeprecatedWebhookTokenAuthenticator { - if in == nil { - return nil - } - out := new(DeprecatedWebhookTokenAuthenticator) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EquinixMetalPlatformSpec) DeepCopyInto(out *EquinixMetalPlatformSpec) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EquinixMetalPlatformSpec. -func (in *EquinixMetalPlatformSpec) DeepCopy() *EquinixMetalPlatformSpec { - if in == nil { - return nil - } - out := new(EquinixMetalPlatformSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EquinixMetalPlatformStatus) DeepCopyInto(out *EquinixMetalPlatformStatus) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EquinixMetalPlatformStatus. -func (in *EquinixMetalPlatformStatus) DeepCopy() *EquinixMetalPlatformStatus { - if in == nil { - return nil - } - out := new(EquinixMetalPlatformStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EtcdConnectionInfo) DeepCopyInto(out *EtcdConnectionInfo) { - *out = *in - if in.URLs != nil { - in, out := &in.URLs, &out.URLs - *out = make([]string, len(*in)) - copy(*out, *in) - } - out.CertInfo = in.CertInfo - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EtcdConnectionInfo. -func (in *EtcdConnectionInfo) DeepCopy() *EtcdConnectionInfo { - if in == nil { - return nil - } - out := new(EtcdConnectionInfo) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EtcdStorageConfig) DeepCopyInto(out *EtcdStorageConfig) { - *out = *in - in.EtcdConnectionInfo.DeepCopyInto(&out.EtcdConnectionInfo) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EtcdStorageConfig. -func (in *EtcdStorageConfig) DeepCopy() *EtcdStorageConfig { - if in == nil { - return nil - } - out := new(EtcdStorageConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ExternalIPConfig) DeepCopyInto(out *ExternalIPConfig) { - *out = *in - if in.Policy != nil { - in, out := &in.Policy, &out.Policy - *out = new(ExternalIPPolicy) - (*in).DeepCopyInto(*out) - } - if in.AutoAssignCIDRs != nil { - in, out := &in.AutoAssignCIDRs, &out.AutoAssignCIDRs - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExternalIPConfig. -func (in *ExternalIPConfig) DeepCopy() *ExternalIPConfig { - if in == nil { - return nil - } - out := new(ExternalIPConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ExternalIPPolicy) DeepCopyInto(out *ExternalIPPolicy) { - *out = *in - if in.AllowedCIDRs != nil { - in, out := &in.AllowedCIDRs, &out.AllowedCIDRs - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.RejectedCIDRs != nil { - in, out := &in.RejectedCIDRs, &out.RejectedCIDRs - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExternalIPPolicy. -func (in *ExternalIPPolicy) DeepCopy() *ExternalIPPolicy { - if in == nil { - return nil - } - out := new(ExternalIPPolicy) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ExternalPlatformSpec) DeepCopyInto(out *ExternalPlatformSpec) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExternalPlatformSpec. -func (in *ExternalPlatformSpec) DeepCopy() *ExternalPlatformSpec { - if in == nil { - return nil - } - out := new(ExternalPlatformSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ExternalPlatformStatus) DeepCopyInto(out *ExternalPlatformStatus) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExternalPlatformStatus. -func (in *ExternalPlatformStatus) DeepCopy() *ExternalPlatformStatus { - if in == nil { - return nil - } - out := new(ExternalPlatformStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *FeatureGate) DeepCopyInto(out *FeatureGate) { - *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 FeatureGate. -func (in *FeatureGate) DeepCopy() *FeatureGate { - if in == nil { - return nil - } - out := new(FeatureGate) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *FeatureGate) 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 *FeatureGateAttributes) DeepCopyInto(out *FeatureGateAttributes) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FeatureGateAttributes. -func (in *FeatureGateAttributes) DeepCopy() *FeatureGateAttributes { - if in == nil { - return nil - } - out := new(FeatureGateAttributes) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *FeatureGateDescription) DeepCopyInto(out *FeatureGateDescription) { - *out = *in - out.FeatureGateAttributes = in.FeatureGateAttributes - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FeatureGateDescription. -func (in *FeatureGateDescription) DeepCopy() *FeatureGateDescription { - if in == nil { - return nil - } - out := new(FeatureGateDescription) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *FeatureGateDetails) DeepCopyInto(out *FeatureGateDetails) { - *out = *in - if in.Enabled != nil { - in, out := &in.Enabled, &out.Enabled - *out = make([]FeatureGateAttributes, len(*in)) - copy(*out, *in) - } - if in.Disabled != nil { - in, out := &in.Disabled, &out.Disabled - *out = make([]FeatureGateAttributes, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FeatureGateDetails. -func (in *FeatureGateDetails) DeepCopy() *FeatureGateDetails { - if in == nil { - return nil - } - out := new(FeatureGateDetails) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *FeatureGateEnabledDisabled) DeepCopyInto(out *FeatureGateEnabledDisabled) { - *out = *in - if in.Enabled != nil { - in, out := &in.Enabled, &out.Enabled - *out = make([]FeatureGateDescription, len(*in)) - copy(*out, *in) - } - if in.Disabled != nil { - in, out := &in.Disabled, &out.Disabled - *out = make([]FeatureGateDescription, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FeatureGateEnabledDisabled. -func (in *FeatureGateEnabledDisabled) DeepCopy() *FeatureGateEnabledDisabled { - if in == nil { - return nil - } - out := new(FeatureGateEnabledDisabled) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *FeatureGateList) DeepCopyInto(out *FeatureGateList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]FeatureGate, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FeatureGateList. -func (in *FeatureGateList) DeepCopy() *FeatureGateList { - if in == nil { - return nil - } - out := new(FeatureGateList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *FeatureGateList) 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 *FeatureGateSelection) DeepCopyInto(out *FeatureGateSelection) { - *out = *in - if in.CustomNoUpgrade != nil { - in, out := &in.CustomNoUpgrade, &out.CustomNoUpgrade - *out = new(CustomFeatureGates) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FeatureGateSelection. -func (in *FeatureGateSelection) DeepCopy() *FeatureGateSelection { - if in == nil { - return nil - } - out := new(FeatureGateSelection) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *FeatureGateSpec) DeepCopyInto(out *FeatureGateSpec) { - *out = *in - in.FeatureGateSelection.DeepCopyInto(&out.FeatureGateSelection) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FeatureGateSpec. -func (in *FeatureGateSpec) DeepCopy() *FeatureGateSpec { - if in == nil { - return nil - } - out := new(FeatureGateSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *FeatureGateStatus) DeepCopyInto(out *FeatureGateStatus) { - *out = *in - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]metav1.Condition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.FeatureGates != nil { - in, out := &in.FeatureGates, &out.FeatureGates - *out = make([]FeatureGateDetails, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FeatureGateStatus. -func (in *FeatureGateStatus) DeepCopy() *FeatureGateStatus { - if in == nil { - return nil - } - out := new(FeatureGateStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GCPPlatformSpec) DeepCopyInto(out *GCPPlatformSpec) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GCPPlatformSpec. -func (in *GCPPlatformSpec) DeepCopy() *GCPPlatformSpec { - if in == nil { - return nil - } - out := new(GCPPlatformSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GCPPlatformStatus) DeepCopyInto(out *GCPPlatformStatus) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GCPPlatformStatus. -func (in *GCPPlatformStatus) DeepCopy() *GCPPlatformStatus { - if in == nil { - return nil - } - out := new(GCPPlatformStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GenericAPIServerConfig) DeepCopyInto(out *GenericAPIServerConfig) { - *out = *in - in.ServingInfo.DeepCopyInto(&out.ServingInfo) - if in.CORSAllowedOrigins != nil { - in, out := &in.CORSAllowedOrigins, &out.CORSAllowedOrigins - *out = make([]string, len(*in)) - copy(*out, *in) - } - in.AuditConfig.DeepCopyInto(&out.AuditConfig) - in.StorageConfig.DeepCopyInto(&out.StorageConfig) - in.AdmissionConfig.DeepCopyInto(&out.AdmissionConfig) - out.KubeClientConfig = in.KubeClientConfig - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GenericAPIServerConfig. -func (in *GenericAPIServerConfig) DeepCopy() *GenericAPIServerConfig { - if in == nil { - return nil - } - out := new(GenericAPIServerConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GenericControllerConfig) DeepCopyInto(out *GenericControllerConfig) { - *out = *in - in.ServingInfo.DeepCopyInto(&out.ServingInfo) - out.LeaderElection = in.LeaderElection - out.Authentication = in.Authentication - out.Authorization = in.Authorization - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GenericControllerConfig. -func (in *GenericControllerConfig) DeepCopy() *GenericControllerConfig { - if in == nil { - return nil - } - out := new(GenericControllerConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GitHubIdentityProvider) DeepCopyInto(out *GitHubIdentityProvider) { - *out = *in - out.ClientSecret = in.ClientSecret - if in.Organizations != nil { - in, out := &in.Organizations, &out.Organizations - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Teams != nil { - in, out := &in.Teams, &out.Teams - *out = make([]string, len(*in)) - copy(*out, *in) - } - out.CA = in.CA - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GitHubIdentityProvider. -func (in *GitHubIdentityProvider) DeepCopy() *GitHubIdentityProvider { - if in == nil { - return nil - } - out := new(GitHubIdentityProvider) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GitLabIdentityProvider) DeepCopyInto(out *GitLabIdentityProvider) { - *out = *in - out.ClientSecret = in.ClientSecret - out.CA = in.CA - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GitLabIdentityProvider. -func (in *GitLabIdentityProvider) DeepCopy() *GitLabIdentityProvider { - if in == nil { - return nil - } - out := new(GitLabIdentityProvider) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GoogleIdentityProvider) DeepCopyInto(out *GoogleIdentityProvider) { - *out = *in - out.ClientSecret = in.ClientSecret - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GoogleIdentityProvider. -func (in *GoogleIdentityProvider) DeepCopy() *GoogleIdentityProvider { - if in == nil { - return nil - } - out := new(GoogleIdentityProvider) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *HTPasswdIdentityProvider) DeepCopyInto(out *HTPasswdIdentityProvider) { - *out = *in - out.FileData = in.FileData - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTPasswdIdentityProvider. -func (in *HTPasswdIdentityProvider) DeepCopy() *HTPasswdIdentityProvider { - if in == nil { - return nil - } - out := new(HTPasswdIdentityProvider) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *HTTPServingInfo) DeepCopyInto(out *HTTPServingInfo) { - *out = *in - in.ServingInfo.DeepCopyInto(&out.ServingInfo) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPServingInfo. -func (in *HTTPServingInfo) DeepCopy() *HTTPServingInfo { - if in == nil { - return nil - } - out := new(HTTPServingInfo) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *HubSource) DeepCopyInto(out *HubSource) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HubSource. -func (in *HubSource) DeepCopy() *HubSource { - if in == nil { - return nil - } - out := new(HubSource) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *HubSourceStatus) DeepCopyInto(out *HubSourceStatus) { - *out = *in - out.HubSource = in.HubSource - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HubSourceStatus. -func (in *HubSourceStatus) DeepCopy() *HubSourceStatus { - if in == nil { - return nil - } - out := new(HubSourceStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *IBMCloudPlatformSpec) DeepCopyInto(out *IBMCloudPlatformSpec) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IBMCloudPlatformSpec. -func (in *IBMCloudPlatformSpec) DeepCopy() *IBMCloudPlatformSpec { - if in == nil { - return nil - } - out := new(IBMCloudPlatformSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *IBMCloudPlatformStatus) DeepCopyInto(out *IBMCloudPlatformStatus) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IBMCloudPlatformStatus. -func (in *IBMCloudPlatformStatus) DeepCopy() *IBMCloudPlatformStatus { - if in == nil { - return nil - } - out := new(IBMCloudPlatformStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *IdentityProvider) DeepCopyInto(out *IdentityProvider) { - *out = *in - in.IdentityProviderConfig.DeepCopyInto(&out.IdentityProviderConfig) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IdentityProvider. -func (in *IdentityProvider) DeepCopy() *IdentityProvider { - if in == nil { - return nil - } - out := new(IdentityProvider) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *IdentityProviderConfig) DeepCopyInto(out *IdentityProviderConfig) { - *out = *in - if in.BasicAuth != nil { - in, out := &in.BasicAuth, &out.BasicAuth - *out = new(BasicAuthIdentityProvider) - **out = **in - } - if in.GitHub != nil { - in, out := &in.GitHub, &out.GitHub - *out = new(GitHubIdentityProvider) - (*in).DeepCopyInto(*out) - } - if in.GitLab != nil { - in, out := &in.GitLab, &out.GitLab - *out = new(GitLabIdentityProvider) - **out = **in - } - if in.Google != nil { - in, out := &in.Google, &out.Google - *out = new(GoogleIdentityProvider) - **out = **in - } - if in.HTPasswd != nil { - in, out := &in.HTPasswd, &out.HTPasswd - *out = new(HTPasswdIdentityProvider) - **out = **in - } - if in.Keystone != nil { - in, out := &in.Keystone, &out.Keystone - *out = new(KeystoneIdentityProvider) - **out = **in - } - if in.LDAP != nil { - in, out := &in.LDAP, &out.LDAP - *out = new(LDAPIdentityProvider) - (*in).DeepCopyInto(*out) - } - if in.OpenID != nil { - in, out := &in.OpenID, &out.OpenID - *out = new(OpenIDIdentityProvider) - (*in).DeepCopyInto(*out) - } - if in.RequestHeader != nil { - in, out := &in.RequestHeader, &out.RequestHeader - *out = new(RequestHeaderIdentityProvider) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IdentityProviderConfig. -func (in *IdentityProviderConfig) DeepCopy() *IdentityProviderConfig { - if in == nil { - return nil - } - out := new(IdentityProviderConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Image) DeepCopyInto(out *Image) { - *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 Image. -func (in *Image) DeepCopy() *Image { - if in == nil { - return nil - } - out := new(Image) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *Image) 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 *ImageContentPolicy) DeepCopyInto(out *ImageContentPolicy) { - *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 ImageContentPolicy. -func (in *ImageContentPolicy) DeepCopy() *ImageContentPolicy { - if in == nil { - return nil - } - out := new(ImageContentPolicy) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ImageContentPolicy) 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 *ImageContentPolicyList) DeepCopyInto(out *ImageContentPolicyList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]ImageContentPolicy, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageContentPolicyList. -func (in *ImageContentPolicyList) DeepCopy() *ImageContentPolicyList { - if in == nil { - return nil - } - out := new(ImageContentPolicyList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ImageContentPolicyList) 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 *ImageContentPolicySpec) DeepCopyInto(out *ImageContentPolicySpec) { - *out = *in - if in.RepositoryDigestMirrors != nil { - in, out := &in.RepositoryDigestMirrors, &out.RepositoryDigestMirrors - *out = make([]RepositoryDigestMirrors, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageContentPolicySpec. -func (in *ImageContentPolicySpec) DeepCopy() *ImageContentPolicySpec { - if in == nil { - return nil - } - out := new(ImageContentPolicySpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ImageDigestMirrorSet) DeepCopyInto(out *ImageDigestMirrorSet) { - *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 ImageDigestMirrorSet. -func (in *ImageDigestMirrorSet) DeepCopy() *ImageDigestMirrorSet { - if in == nil { - return nil - } - out := new(ImageDigestMirrorSet) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ImageDigestMirrorSet) 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 *ImageDigestMirrorSetList) DeepCopyInto(out *ImageDigestMirrorSetList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]ImageDigestMirrorSet, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageDigestMirrorSetList. -func (in *ImageDigestMirrorSetList) DeepCopy() *ImageDigestMirrorSetList { - if in == nil { - return nil - } - out := new(ImageDigestMirrorSetList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ImageDigestMirrorSetList) 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 *ImageDigestMirrorSetSpec) DeepCopyInto(out *ImageDigestMirrorSetSpec) { - *out = *in - if in.ImageDigestMirrors != nil { - in, out := &in.ImageDigestMirrors, &out.ImageDigestMirrors - *out = make([]ImageDigestMirrors, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageDigestMirrorSetSpec. -func (in *ImageDigestMirrorSetSpec) DeepCopy() *ImageDigestMirrorSetSpec { - if in == nil { - return nil - } - out := new(ImageDigestMirrorSetSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ImageDigestMirrorSetStatus) DeepCopyInto(out *ImageDigestMirrorSetStatus) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageDigestMirrorSetStatus. -func (in *ImageDigestMirrorSetStatus) DeepCopy() *ImageDigestMirrorSetStatus { - if in == nil { - return nil - } - out := new(ImageDigestMirrorSetStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ImageDigestMirrors) DeepCopyInto(out *ImageDigestMirrors) { - *out = *in - if in.Mirrors != nil { - in, out := &in.Mirrors, &out.Mirrors - *out = make([]ImageMirror, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageDigestMirrors. -func (in *ImageDigestMirrors) DeepCopy() *ImageDigestMirrors { - if in == nil { - return nil - } - out := new(ImageDigestMirrors) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ImageLabel) DeepCopyInto(out *ImageLabel) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageLabel. -func (in *ImageLabel) DeepCopy() *ImageLabel { - if in == nil { - return nil - } - out := new(ImageLabel) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ImageList) DeepCopyInto(out *ImageList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]Image, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageList. -func (in *ImageList) DeepCopy() *ImageList { - if in == nil { - return nil - } - out := new(ImageList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ImageList) 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 *ImageSpec) DeepCopyInto(out *ImageSpec) { - *out = *in - if in.AllowedRegistriesForImport != nil { - in, out := &in.AllowedRegistriesForImport, &out.AllowedRegistriesForImport - *out = make([]RegistryLocation, len(*in)) - copy(*out, *in) - } - if in.ExternalRegistryHostnames != nil { - in, out := &in.ExternalRegistryHostnames, &out.ExternalRegistryHostnames - *out = make([]string, len(*in)) - copy(*out, *in) - } - out.AdditionalTrustedCA = in.AdditionalTrustedCA - in.RegistrySources.DeepCopyInto(&out.RegistrySources) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageSpec. -func (in *ImageSpec) DeepCopy() *ImageSpec { - if in == nil { - return nil - } - out := new(ImageSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ImageStatus) DeepCopyInto(out *ImageStatus) { - *out = *in - if in.ExternalRegistryHostnames != nil { - in, out := &in.ExternalRegistryHostnames, &out.ExternalRegistryHostnames - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageStatus. -func (in *ImageStatus) DeepCopy() *ImageStatus { - if in == nil { - return nil - } - out := new(ImageStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ImageTagMirrorSet) DeepCopyInto(out *ImageTagMirrorSet) { - *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 ImageTagMirrorSet. -func (in *ImageTagMirrorSet) DeepCopy() *ImageTagMirrorSet { - if in == nil { - return nil - } - out := new(ImageTagMirrorSet) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ImageTagMirrorSet) 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 *ImageTagMirrorSetList) DeepCopyInto(out *ImageTagMirrorSetList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]ImageTagMirrorSet, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageTagMirrorSetList. -func (in *ImageTagMirrorSetList) DeepCopy() *ImageTagMirrorSetList { - if in == nil { - return nil - } - out := new(ImageTagMirrorSetList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ImageTagMirrorSetList) 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 *ImageTagMirrorSetSpec) DeepCopyInto(out *ImageTagMirrorSetSpec) { - *out = *in - if in.ImageTagMirrors != nil { - in, out := &in.ImageTagMirrors, &out.ImageTagMirrors - *out = make([]ImageTagMirrors, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageTagMirrorSetSpec. -func (in *ImageTagMirrorSetSpec) DeepCopy() *ImageTagMirrorSetSpec { - if in == nil { - return nil - } - out := new(ImageTagMirrorSetSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ImageTagMirrorSetStatus) DeepCopyInto(out *ImageTagMirrorSetStatus) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageTagMirrorSetStatus. -func (in *ImageTagMirrorSetStatus) DeepCopy() *ImageTagMirrorSetStatus { - if in == nil { - return nil - } - out := new(ImageTagMirrorSetStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ImageTagMirrors) DeepCopyInto(out *ImageTagMirrors) { - *out = *in - if in.Mirrors != nil { - in, out := &in.Mirrors, &out.Mirrors - *out = make([]ImageMirror, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageTagMirrors. -func (in *ImageTagMirrors) DeepCopy() *ImageTagMirrors { - if in == nil { - return nil - } - out := new(ImageTagMirrors) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Infrastructure) DeepCopyInto(out *Infrastructure) { - *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 Infrastructure. -func (in *Infrastructure) DeepCopy() *Infrastructure { - if in == nil { - return nil - } - out := new(Infrastructure) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *Infrastructure) 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 *InfrastructureList) DeepCopyInto(out *InfrastructureList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]Infrastructure, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InfrastructureList. -func (in *InfrastructureList) DeepCopy() *InfrastructureList { - if in == nil { - return nil - } - out := new(InfrastructureList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *InfrastructureList) 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 *InfrastructureSpec) DeepCopyInto(out *InfrastructureSpec) { - *out = *in - out.CloudConfig = in.CloudConfig - in.PlatformSpec.DeepCopyInto(&out.PlatformSpec) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InfrastructureSpec. -func (in *InfrastructureSpec) DeepCopy() *InfrastructureSpec { - if in == nil { - return nil - } - out := new(InfrastructureSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *InfrastructureStatus) DeepCopyInto(out *InfrastructureStatus) { - *out = *in - if in.PlatformStatus != nil { - in, out := &in.PlatformStatus, &out.PlatformStatus - *out = new(PlatformStatus) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InfrastructureStatus. -func (in *InfrastructureStatus) DeepCopy() *InfrastructureStatus { - if in == nil { - return nil - } - out := new(InfrastructureStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Ingress) DeepCopyInto(out *Ingress) { - *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 Ingress. -func (in *Ingress) DeepCopy() *Ingress { - if in == nil { - return nil - } - out := new(Ingress) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *Ingress) 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 *IngressList) DeepCopyInto(out *IngressList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]Ingress, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IngressList. -func (in *IngressList) DeepCopy() *IngressList { - if in == nil { - return nil - } - out := new(IngressList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *IngressList) 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 *IngressPlatformSpec) DeepCopyInto(out *IngressPlatformSpec) { - *out = *in - if in.AWS != nil { - in, out := &in.AWS, &out.AWS - *out = new(AWSIngressSpec) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IngressPlatformSpec. -func (in *IngressPlatformSpec) DeepCopy() *IngressPlatformSpec { - if in == nil { - return nil - } - out := new(IngressPlatformSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *IngressSpec) DeepCopyInto(out *IngressSpec) { - *out = *in - if in.ComponentRoutes != nil { - in, out := &in.ComponentRoutes, &out.ComponentRoutes - *out = make([]ComponentRouteSpec, len(*in)) - copy(*out, *in) - } - if in.RequiredHSTSPolicies != nil { - in, out := &in.RequiredHSTSPolicies, &out.RequiredHSTSPolicies - *out = make([]RequiredHSTSPolicy, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - in.LoadBalancer.DeepCopyInto(&out.LoadBalancer) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IngressSpec. -func (in *IngressSpec) DeepCopy() *IngressSpec { - if in == nil { - return nil - } - out := new(IngressSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *IngressStatus) DeepCopyInto(out *IngressStatus) { - *out = *in - if in.ComponentRoutes != nil { - in, out := &in.ComponentRoutes, &out.ComponentRoutes - *out = make([]ComponentRouteStatus, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IngressStatus. -func (in *IngressStatus) DeepCopy() *IngressStatus { - if in == nil { - return nil - } - out := new(IngressStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *IntermediateTLSProfile) DeepCopyInto(out *IntermediateTLSProfile) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IntermediateTLSProfile. -func (in *IntermediateTLSProfile) DeepCopy() *IntermediateTLSProfile { - if in == nil { - return nil - } - out := new(IntermediateTLSProfile) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *KeystoneIdentityProvider) DeepCopyInto(out *KeystoneIdentityProvider) { - *out = *in - out.OAuthRemoteConnectionInfo = in.OAuthRemoteConnectionInfo - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KeystoneIdentityProvider. -func (in *KeystoneIdentityProvider) DeepCopy() *KeystoneIdentityProvider { - if in == nil { - return nil - } - out := new(KeystoneIdentityProvider) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *KubeClientConfig) DeepCopyInto(out *KubeClientConfig) { - *out = *in - out.ConnectionOverrides = in.ConnectionOverrides - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubeClientConfig. -func (in *KubeClientConfig) DeepCopy() *KubeClientConfig { - if in == nil { - return nil - } - out := new(KubeClientConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *KubevirtPlatformSpec) DeepCopyInto(out *KubevirtPlatformSpec) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubevirtPlatformSpec. -func (in *KubevirtPlatformSpec) DeepCopy() *KubevirtPlatformSpec { - if in == nil { - return nil - } - out := new(KubevirtPlatformSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *KubevirtPlatformStatus) DeepCopyInto(out *KubevirtPlatformStatus) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubevirtPlatformStatus. -func (in *KubevirtPlatformStatus) DeepCopy() *KubevirtPlatformStatus { - if in == nil { - return nil - } - out := new(KubevirtPlatformStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *LDAPAttributeMapping) DeepCopyInto(out *LDAPAttributeMapping) { - *out = *in - if in.ID != nil { - in, out := &in.ID, &out.ID - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.PreferredUsername != nil { - in, out := &in.PreferredUsername, &out.PreferredUsername - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Name != nil { - in, out := &in.Name, &out.Name - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Email != nil { - in, out := &in.Email, &out.Email - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LDAPAttributeMapping. -func (in *LDAPAttributeMapping) DeepCopy() *LDAPAttributeMapping { - if in == nil { - return nil - } - out := new(LDAPAttributeMapping) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *LDAPIdentityProvider) DeepCopyInto(out *LDAPIdentityProvider) { - *out = *in - out.BindPassword = in.BindPassword - out.CA = in.CA - in.Attributes.DeepCopyInto(&out.Attributes) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LDAPIdentityProvider. -func (in *LDAPIdentityProvider) DeepCopy() *LDAPIdentityProvider { - if in == nil { - return nil - } - out := new(LDAPIdentityProvider) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *LeaderElection) DeepCopyInto(out *LeaderElection) { - *out = *in - out.LeaseDuration = in.LeaseDuration - out.RenewDeadline = in.RenewDeadline - out.RetryPeriod = in.RetryPeriod - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LeaderElection. -func (in *LeaderElection) DeepCopy() *LeaderElection { - if in == nil { - return nil - } - out := new(LeaderElection) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *LoadBalancer) DeepCopyInto(out *LoadBalancer) { - *out = *in - in.Platform.DeepCopyInto(&out.Platform) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LoadBalancer. -func (in *LoadBalancer) DeepCopy() *LoadBalancer { - if in == nil { - return nil - } - out := new(LoadBalancer) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *MTUMigration) DeepCopyInto(out *MTUMigration) { - *out = *in - if in.Network != nil { - in, out := &in.Network, &out.Network - *out = new(MTUMigrationValues) - (*in).DeepCopyInto(*out) - } - if in.Machine != nil { - in, out := &in.Machine, &out.Machine - *out = new(MTUMigrationValues) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MTUMigration. -func (in *MTUMigration) DeepCopy() *MTUMigration { - if in == nil { - return nil - } - out := new(MTUMigration) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *MTUMigrationValues) DeepCopyInto(out *MTUMigrationValues) { - *out = *in - if in.To != nil { - in, out := &in.To, &out.To - *out = new(uint32) - **out = **in - } - if in.From != nil { - in, out := &in.From, &out.From - *out = new(uint32) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MTUMigrationValues. -func (in *MTUMigrationValues) DeepCopy() *MTUMigrationValues { - if in == nil { - return nil - } - out := new(MTUMigrationValues) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *MaxAgePolicy) DeepCopyInto(out *MaxAgePolicy) { - *out = *in - if in.LargestMaxAge != nil { - in, out := &in.LargestMaxAge, &out.LargestMaxAge - *out = new(int32) - **out = **in - } - if in.SmallestMaxAge != nil { - in, out := &in.SmallestMaxAge, &out.SmallestMaxAge - *out = new(int32) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MaxAgePolicy. -func (in *MaxAgePolicy) DeepCopy() *MaxAgePolicy { - if in == nil { - return nil - } - out := new(MaxAgePolicy) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ModernTLSProfile) DeepCopyInto(out *ModernTLSProfile) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ModernTLSProfile. -func (in *ModernTLSProfile) DeepCopy() *ModernTLSProfile { - if in == nil { - return nil - } - out := new(ModernTLSProfile) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NamedCertificate) DeepCopyInto(out *NamedCertificate) { - *out = *in - if in.Names != nil { - in, out := &in.Names, &out.Names - *out = make([]string, len(*in)) - copy(*out, *in) - } - out.CertInfo = in.CertInfo - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamedCertificate. -func (in *NamedCertificate) DeepCopy() *NamedCertificate { - if in == nil { - return nil - } - out := new(NamedCertificate) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Network) DeepCopyInto(out *Network) { - *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 Network. -func (in *Network) DeepCopy() *Network { - if in == nil { - return nil - } - out := new(Network) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *Network) 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 *NetworkList) DeepCopyInto(out *NetworkList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]Network, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkList. -func (in *NetworkList) DeepCopy() *NetworkList { - if in == nil { - return nil - } - out := new(NetworkList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *NetworkList) 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 *NetworkMigration) DeepCopyInto(out *NetworkMigration) { - *out = *in - if in.MTU != nil { - in, out := &in.MTU, &out.MTU - *out = new(MTUMigration) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkMigration. -func (in *NetworkMigration) DeepCopy() *NetworkMigration { - if in == nil { - return nil - } - out := new(NetworkMigration) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NetworkSpec) DeepCopyInto(out *NetworkSpec) { - *out = *in - if in.ClusterNetwork != nil { - in, out := &in.ClusterNetwork, &out.ClusterNetwork - *out = make([]ClusterNetworkEntry, len(*in)) - copy(*out, *in) - } - if in.ServiceNetwork != nil { - in, out := &in.ServiceNetwork, &out.ServiceNetwork - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.ExternalIP != nil { - in, out := &in.ExternalIP, &out.ExternalIP - *out = new(ExternalIPConfig) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkSpec. -func (in *NetworkSpec) DeepCopy() *NetworkSpec { - if in == nil { - return nil - } - out := new(NetworkSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NetworkStatus) DeepCopyInto(out *NetworkStatus) { - *out = *in - if in.ClusterNetwork != nil { - in, out := &in.ClusterNetwork, &out.ClusterNetwork - *out = make([]ClusterNetworkEntry, len(*in)) - copy(*out, *in) - } - if in.ServiceNetwork != nil { - in, out := &in.ServiceNetwork, &out.ServiceNetwork - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Migration != nil { - in, out := &in.Migration, &out.Migration - *out = new(NetworkMigration) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkStatus. -func (in *NetworkStatus) DeepCopy() *NetworkStatus { - if in == nil { - return nil - } - out := new(NetworkStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Node) DeepCopyInto(out *Node) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - out.Spec = in.Spec - out.Status = in.Status - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Node. -func (in *Node) DeepCopy() *Node { - if in == nil { - return nil - } - out := new(Node) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *Node) 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 *NodeList) DeepCopyInto(out *NodeList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]Node, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeList. -func (in *NodeList) DeepCopy() *NodeList { - if in == nil { - return nil - } - out := new(NodeList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *NodeList) 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 *NodeSpec) DeepCopyInto(out *NodeSpec) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeSpec. -func (in *NodeSpec) DeepCopy() *NodeSpec { - if in == nil { - return nil - } - out := new(NodeSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NodeStatus) DeepCopyInto(out *NodeStatus) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeStatus. -func (in *NodeStatus) DeepCopy() *NodeStatus { - if in == nil { - return nil - } - out := new(NodeStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NutanixPlatformLoadBalancer) DeepCopyInto(out *NutanixPlatformLoadBalancer) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NutanixPlatformLoadBalancer. -func (in *NutanixPlatformLoadBalancer) DeepCopy() *NutanixPlatformLoadBalancer { - if in == nil { - return nil - } - out := new(NutanixPlatformLoadBalancer) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NutanixPlatformSpec) DeepCopyInto(out *NutanixPlatformSpec) { - *out = *in - out.PrismCentral = in.PrismCentral - if in.PrismElements != nil { - in, out := &in.PrismElements, &out.PrismElements - *out = make([]NutanixPrismElementEndpoint, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NutanixPlatformSpec. -func (in *NutanixPlatformSpec) DeepCopy() *NutanixPlatformSpec { - if in == nil { - return nil - } - out := new(NutanixPlatformSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NutanixPlatformStatus) DeepCopyInto(out *NutanixPlatformStatus) { - *out = *in - if in.APIServerInternalIPs != nil { - in, out := &in.APIServerInternalIPs, &out.APIServerInternalIPs - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.IngressIPs != nil { - in, out := &in.IngressIPs, &out.IngressIPs - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.LoadBalancer != nil { - in, out := &in.LoadBalancer, &out.LoadBalancer - *out = new(NutanixPlatformLoadBalancer) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NutanixPlatformStatus. -func (in *NutanixPlatformStatus) DeepCopy() *NutanixPlatformStatus { - if in == nil { - return nil - } - out := new(NutanixPlatformStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NutanixPrismElementEndpoint) DeepCopyInto(out *NutanixPrismElementEndpoint) { - *out = *in - out.Endpoint = in.Endpoint - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NutanixPrismElementEndpoint. -func (in *NutanixPrismElementEndpoint) DeepCopy() *NutanixPrismElementEndpoint { - if in == nil { - return nil - } - out := new(NutanixPrismElementEndpoint) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NutanixPrismEndpoint) DeepCopyInto(out *NutanixPrismEndpoint) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NutanixPrismEndpoint. -func (in *NutanixPrismEndpoint) DeepCopy() *NutanixPrismEndpoint { - if in == nil { - return nil - } - out := new(NutanixPrismEndpoint) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OAuth) DeepCopyInto(out *OAuth) { - *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 OAuth. -func (in *OAuth) DeepCopy() *OAuth { - if in == nil { - return nil - } - out := new(OAuth) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *OAuth) 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 *OAuthList) DeepCopyInto(out *OAuthList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]OAuth, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OAuthList. -func (in *OAuthList) DeepCopy() *OAuthList { - if in == nil { - return nil - } - out := new(OAuthList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *OAuthList) 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 *OAuthRemoteConnectionInfo) DeepCopyInto(out *OAuthRemoteConnectionInfo) { - *out = *in - out.CA = in.CA - out.TLSClientCert = in.TLSClientCert - out.TLSClientKey = in.TLSClientKey - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OAuthRemoteConnectionInfo. -func (in *OAuthRemoteConnectionInfo) DeepCopy() *OAuthRemoteConnectionInfo { - if in == nil { - return nil - } - out := new(OAuthRemoteConnectionInfo) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OAuthSpec) DeepCopyInto(out *OAuthSpec) { - *out = *in - if in.IdentityProviders != nil { - in, out := &in.IdentityProviders, &out.IdentityProviders - *out = make([]IdentityProvider, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - in.TokenConfig.DeepCopyInto(&out.TokenConfig) - out.Templates = in.Templates - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OAuthSpec. -func (in *OAuthSpec) DeepCopy() *OAuthSpec { - if in == nil { - return nil - } - out := new(OAuthSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OAuthStatus) DeepCopyInto(out *OAuthStatus) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OAuthStatus. -func (in *OAuthStatus) DeepCopy() *OAuthStatus { - if in == nil { - return nil - } - out := new(OAuthStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OAuthTemplates) DeepCopyInto(out *OAuthTemplates) { - *out = *in - out.Login = in.Login - out.ProviderSelection = in.ProviderSelection - out.Error = in.Error - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OAuthTemplates. -func (in *OAuthTemplates) DeepCopy() *OAuthTemplates { - if in == nil { - return nil - } - out := new(OAuthTemplates) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ObjectReference) DeepCopyInto(out *ObjectReference) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ObjectReference. -func (in *ObjectReference) DeepCopy() *ObjectReference { - if in == nil { - return nil - } - out := new(ObjectReference) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OldTLSProfile) DeepCopyInto(out *OldTLSProfile) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OldTLSProfile. -func (in *OldTLSProfile) DeepCopy() *OldTLSProfile { - if in == nil { - return nil - } - out := new(OldTLSProfile) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OpenIDClaims) DeepCopyInto(out *OpenIDClaims) { - *out = *in - if in.PreferredUsername != nil { - in, out := &in.PreferredUsername, &out.PreferredUsername - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Name != nil { - in, out := &in.Name, &out.Name - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Email != nil { - in, out := &in.Email, &out.Email - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Groups != nil { - in, out := &in.Groups, &out.Groups - *out = make([]OpenIDClaim, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenIDClaims. -func (in *OpenIDClaims) DeepCopy() *OpenIDClaims { - if in == nil { - return nil - } - out := new(OpenIDClaims) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OpenIDIdentityProvider) DeepCopyInto(out *OpenIDIdentityProvider) { - *out = *in - out.ClientSecret = in.ClientSecret - out.CA = in.CA - if in.ExtraScopes != nil { - in, out := &in.ExtraScopes, &out.ExtraScopes - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.ExtraAuthorizeParameters != nil { - in, out := &in.ExtraAuthorizeParameters, &out.ExtraAuthorizeParameters - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - in.Claims.DeepCopyInto(&out.Claims) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenIDIdentityProvider. -func (in *OpenIDIdentityProvider) DeepCopy() *OpenIDIdentityProvider { - if in == nil { - return nil - } - out := new(OpenIDIdentityProvider) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OpenStackPlatformLoadBalancer) DeepCopyInto(out *OpenStackPlatformLoadBalancer) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenStackPlatformLoadBalancer. -func (in *OpenStackPlatformLoadBalancer) DeepCopy() *OpenStackPlatformLoadBalancer { - if in == nil { - return nil - } - out := new(OpenStackPlatformLoadBalancer) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OpenStackPlatformSpec) DeepCopyInto(out *OpenStackPlatformSpec) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenStackPlatformSpec. -func (in *OpenStackPlatformSpec) DeepCopy() *OpenStackPlatformSpec { - if in == nil { - return nil - } - out := new(OpenStackPlatformSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OpenStackPlatformStatus) DeepCopyInto(out *OpenStackPlatformStatus) { - *out = *in - if in.APIServerInternalIPs != nil { - in, out := &in.APIServerInternalIPs, &out.APIServerInternalIPs - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.IngressIPs != nil { - in, out := &in.IngressIPs, &out.IngressIPs - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.LoadBalancer != nil { - in, out := &in.LoadBalancer, &out.LoadBalancer - *out = new(OpenStackPlatformLoadBalancer) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenStackPlatformStatus. -func (in *OpenStackPlatformStatus) DeepCopy() *OpenStackPlatformStatus { - if in == nil { - return nil - } - out := new(OpenStackPlatformStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OperandVersion) DeepCopyInto(out *OperandVersion) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OperandVersion. -func (in *OperandVersion) DeepCopy() *OperandVersion { - if in == nil { - return nil - } - out := new(OperandVersion) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OperatorHub) DeepCopyInto(out *OperatorHub) { - *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 OperatorHub. -func (in *OperatorHub) DeepCopy() *OperatorHub { - if in == nil { - return nil - } - out := new(OperatorHub) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *OperatorHub) 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 *OperatorHubList) DeepCopyInto(out *OperatorHubList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]OperatorHub, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OperatorHubList. -func (in *OperatorHubList) DeepCopy() *OperatorHubList { - if in == nil { - return nil - } - out := new(OperatorHubList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *OperatorHubList) 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 *OperatorHubSpec) DeepCopyInto(out *OperatorHubSpec) { - *out = *in - if in.Sources != nil { - in, out := &in.Sources, &out.Sources - *out = make([]HubSource, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OperatorHubSpec. -func (in *OperatorHubSpec) DeepCopy() *OperatorHubSpec { - if in == nil { - return nil - } - out := new(OperatorHubSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OperatorHubStatus) DeepCopyInto(out *OperatorHubStatus) { - *out = *in - if in.Sources != nil { - in, out := &in.Sources, &out.Sources - *out = make([]HubSourceStatus, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OperatorHubStatus. -func (in *OperatorHubStatus) DeepCopy() *OperatorHubStatus { - if in == nil { - return nil - } - out := new(OperatorHubStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OvirtPlatformLoadBalancer) DeepCopyInto(out *OvirtPlatformLoadBalancer) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OvirtPlatformLoadBalancer. -func (in *OvirtPlatformLoadBalancer) DeepCopy() *OvirtPlatformLoadBalancer { - if in == nil { - return nil - } - out := new(OvirtPlatformLoadBalancer) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OvirtPlatformSpec) DeepCopyInto(out *OvirtPlatformSpec) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OvirtPlatformSpec. -func (in *OvirtPlatformSpec) DeepCopy() *OvirtPlatformSpec { - if in == nil { - return nil - } - out := new(OvirtPlatformSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OvirtPlatformStatus) DeepCopyInto(out *OvirtPlatformStatus) { - *out = *in - if in.APIServerInternalIPs != nil { - in, out := &in.APIServerInternalIPs, &out.APIServerInternalIPs - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.IngressIPs != nil { - in, out := &in.IngressIPs, &out.IngressIPs - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.LoadBalancer != nil { - in, out := &in.LoadBalancer, &out.LoadBalancer - *out = new(OvirtPlatformLoadBalancer) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OvirtPlatformStatus. -func (in *OvirtPlatformStatus) DeepCopy() *OvirtPlatformStatus { - if in == nil { - return nil - } - out := new(OvirtPlatformStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PlatformSpec) DeepCopyInto(out *PlatformSpec) { - *out = *in - if in.AWS != nil { - in, out := &in.AWS, &out.AWS - *out = new(AWSPlatformSpec) - (*in).DeepCopyInto(*out) - } - if in.Azure != nil { - in, out := &in.Azure, &out.Azure - *out = new(AzurePlatformSpec) - **out = **in - } - if in.GCP != nil { - in, out := &in.GCP, &out.GCP - *out = new(GCPPlatformSpec) - **out = **in - } - if in.BareMetal != nil { - in, out := &in.BareMetal, &out.BareMetal - *out = new(BareMetalPlatformSpec) - **out = **in - } - if in.OpenStack != nil { - in, out := &in.OpenStack, &out.OpenStack - *out = new(OpenStackPlatformSpec) - **out = **in - } - if in.Ovirt != nil { - in, out := &in.Ovirt, &out.Ovirt - *out = new(OvirtPlatformSpec) - **out = **in - } - if in.VSphere != nil { - in, out := &in.VSphere, &out.VSphere - *out = new(VSpherePlatformSpec) - (*in).DeepCopyInto(*out) - } - if in.IBMCloud != nil { - in, out := &in.IBMCloud, &out.IBMCloud - *out = new(IBMCloudPlatformSpec) - **out = **in - } - if in.Kubevirt != nil { - in, out := &in.Kubevirt, &out.Kubevirt - *out = new(KubevirtPlatformSpec) - **out = **in - } - if in.EquinixMetal != nil { - in, out := &in.EquinixMetal, &out.EquinixMetal - *out = new(EquinixMetalPlatformSpec) - **out = **in - } - if in.PowerVS != nil { - in, out := &in.PowerVS, &out.PowerVS - *out = new(PowerVSPlatformSpec) - (*in).DeepCopyInto(*out) - } - if in.AlibabaCloud != nil { - in, out := &in.AlibabaCloud, &out.AlibabaCloud - *out = new(AlibabaCloudPlatformSpec) - **out = **in - } - if in.Nutanix != nil { - in, out := &in.Nutanix, &out.Nutanix - *out = new(NutanixPlatformSpec) - (*in).DeepCopyInto(*out) - } - if in.External != nil { - in, out := &in.External, &out.External - *out = new(ExternalPlatformSpec) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PlatformSpec. -func (in *PlatformSpec) DeepCopy() *PlatformSpec { - if in == nil { - return nil - } - out := new(PlatformSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PlatformStatus) DeepCopyInto(out *PlatformStatus) { - *out = *in - if in.AWS != nil { - in, out := &in.AWS, &out.AWS - *out = new(AWSPlatformStatus) - (*in).DeepCopyInto(*out) - } - if in.Azure != nil { - in, out := &in.Azure, &out.Azure - *out = new(AzurePlatformStatus) - (*in).DeepCopyInto(*out) - } - if in.GCP != nil { - in, out := &in.GCP, &out.GCP - *out = new(GCPPlatformStatus) - **out = **in - } - if in.BareMetal != nil { - in, out := &in.BareMetal, &out.BareMetal - *out = new(BareMetalPlatformStatus) - (*in).DeepCopyInto(*out) - } - if in.OpenStack != nil { - in, out := &in.OpenStack, &out.OpenStack - *out = new(OpenStackPlatformStatus) - (*in).DeepCopyInto(*out) - } - if in.Ovirt != nil { - in, out := &in.Ovirt, &out.Ovirt - *out = new(OvirtPlatformStatus) - (*in).DeepCopyInto(*out) - } - if in.VSphere != nil { - in, out := &in.VSphere, &out.VSphere - *out = new(VSpherePlatformStatus) - (*in).DeepCopyInto(*out) - } - if in.IBMCloud != nil { - in, out := &in.IBMCloud, &out.IBMCloud - *out = new(IBMCloudPlatformStatus) - **out = **in - } - if in.Kubevirt != nil { - in, out := &in.Kubevirt, &out.Kubevirt - *out = new(KubevirtPlatformStatus) - **out = **in - } - if in.EquinixMetal != nil { - in, out := &in.EquinixMetal, &out.EquinixMetal - *out = new(EquinixMetalPlatformStatus) - **out = **in - } - if in.PowerVS != nil { - in, out := &in.PowerVS, &out.PowerVS - *out = new(PowerVSPlatformStatus) - (*in).DeepCopyInto(*out) - } - if in.AlibabaCloud != nil { - in, out := &in.AlibabaCloud, &out.AlibabaCloud - *out = new(AlibabaCloudPlatformStatus) - (*in).DeepCopyInto(*out) - } - if in.Nutanix != nil { - in, out := &in.Nutanix, &out.Nutanix - *out = new(NutanixPlatformStatus) - (*in).DeepCopyInto(*out) - } - if in.External != nil { - in, out := &in.External, &out.External - *out = new(ExternalPlatformStatus) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PlatformStatus. -func (in *PlatformStatus) DeepCopy() *PlatformStatus { - if in == nil { - return nil - } - out := new(PlatformStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PowerVSPlatformSpec) DeepCopyInto(out *PowerVSPlatformSpec) { - *out = *in - if in.ServiceEndpoints != nil { - in, out := &in.ServiceEndpoints, &out.ServiceEndpoints - *out = make([]PowerVSServiceEndpoint, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PowerVSPlatformSpec. -func (in *PowerVSPlatformSpec) DeepCopy() *PowerVSPlatformSpec { - if in == nil { - return nil - } - out := new(PowerVSPlatformSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PowerVSPlatformStatus) DeepCopyInto(out *PowerVSPlatformStatus) { - *out = *in - if in.ServiceEndpoints != nil { - in, out := &in.ServiceEndpoints, &out.ServiceEndpoints - *out = make([]PowerVSServiceEndpoint, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PowerVSPlatformStatus. -func (in *PowerVSPlatformStatus) DeepCopy() *PowerVSPlatformStatus { - if in == nil { - return nil - } - out := new(PowerVSPlatformStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PowerVSServiceEndpoint) DeepCopyInto(out *PowerVSServiceEndpoint) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PowerVSServiceEndpoint. -func (in *PowerVSServiceEndpoint) DeepCopy() *PowerVSServiceEndpoint { - if in == nil { - return nil - } - out := new(PowerVSServiceEndpoint) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Project) DeepCopyInto(out *Project) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - out.Spec = in.Spec - out.Status = in.Status - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Project. -func (in *Project) DeepCopy() *Project { - if in == nil { - return nil - } - out := new(Project) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *Project) 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 *ProjectList) DeepCopyInto(out *ProjectList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]Project, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectList. -func (in *ProjectList) DeepCopy() *ProjectList { - if in == nil { - return nil - } - out := new(ProjectList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ProjectList) 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 *ProjectSpec) DeepCopyInto(out *ProjectSpec) { - *out = *in - out.ProjectRequestTemplate = in.ProjectRequestTemplate - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectSpec. -func (in *ProjectSpec) DeepCopy() *ProjectSpec { - if in == nil { - return nil - } - out := new(ProjectSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ProjectStatus) DeepCopyInto(out *ProjectStatus) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectStatus. -func (in *ProjectStatus) DeepCopy() *ProjectStatus { - if in == nil { - return nil - } - out := new(ProjectStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PromQLClusterCondition) DeepCopyInto(out *PromQLClusterCondition) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PromQLClusterCondition. -func (in *PromQLClusterCondition) DeepCopy() *PromQLClusterCondition { - if in == nil { - return nil - } - out := new(PromQLClusterCondition) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Proxy) DeepCopyInto(out *Proxy) { - *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 Proxy. -func (in *Proxy) DeepCopy() *Proxy { - if in == nil { - return nil - } - out := new(Proxy) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *Proxy) 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 *ProxyList) DeepCopyInto(out *ProxyList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]Proxy, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProxyList. -func (in *ProxyList) DeepCopy() *ProxyList { - if in == nil { - return nil - } - out := new(ProxyList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ProxyList) 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 *ProxySpec) DeepCopyInto(out *ProxySpec) { - *out = *in - if in.ReadinessEndpoints != nil { - in, out := &in.ReadinessEndpoints, &out.ReadinessEndpoints - *out = make([]string, len(*in)) - copy(*out, *in) - } - out.TrustedCA = in.TrustedCA - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProxySpec. -func (in *ProxySpec) DeepCopy() *ProxySpec { - if in == nil { - return nil - } - out := new(ProxySpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ProxyStatus) DeepCopyInto(out *ProxyStatus) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProxyStatus. -func (in *ProxyStatus) DeepCopy() *ProxyStatus { - if in == nil { - return nil - } - out := new(ProxyStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RegistryLocation) DeepCopyInto(out *RegistryLocation) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RegistryLocation. -func (in *RegistryLocation) DeepCopy() *RegistryLocation { - if in == nil { - return nil - } - out := new(RegistryLocation) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RegistrySources) DeepCopyInto(out *RegistrySources) { - *out = *in - if in.InsecureRegistries != nil { - in, out := &in.InsecureRegistries, &out.InsecureRegistries - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.BlockedRegistries != nil { - in, out := &in.BlockedRegistries, &out.BlockedRegistries - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.AllowedRegistries != nil { - in, out := &in.AllowedRegistries, &out.AllowedRegistries - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.ContainerRuntimeSearchRegistries != nil { - in, out := &in.ContainerRuntimeSearchRegistries, &out.ContainerRuntimeSearchRegistries - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RegistrySources. -func (in *RegistrySources) DeepCopy() *RegistrySources { - if in == nil { - return nil - } - out := new(RegistrySources) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Release) DeepCopyInto(out *Release) { - *out = *in - if in.Channels != nil { - in, out := &in.Channels, &out.Channels - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Release. -func (in *Release) DeepCopy() *Release { - if in == nil { - return nil - } - out := new(Release) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RemoteConnectionInfo) DeepCopyInto(out *RemoteConnectionInfo) { - *out = *in - out.CertInfo = in.CertInfo - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RemoteConnectionInfo. -func (in *RemoteConnectionInfo) DeepCopy() *RemoteConnectionInfo { - if in == nil { - return nil - } - out := new(RemoteConnectionInfo) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RepositoryDigestMirrors) DeepCopyInto(out *RepositoryDigestMirrors) { - *out = *in - if in.Mirrors != nil { - in, out := &in.Mirrors, &out.Mirrors - *out = make([]Mirror, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RepositoryDigestMirrors. -func (in *RepositoryDigestMirrors) DeepCopy() *RepositoryDigestMirrors { - if in == nil { - return nil - } - out := new(RepositoryDigestMirrors) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RequestHeaderIdentityProvider) DeepCopyInto(out *RequestHeaderIdentityProvider) { - *out = *in - out.ClientCA = in.ClientCA - if in.ClientCommonNames != nil { - in, out := &in.ClientCommonNames, &out.ClientCommonNames - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Headers != nil { - in, out := &in.Headers, &out.Headers - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.PreferredUsernameHeaders != nil { - in, out := &in.PreferredUsernameHeaders, &out.PreferredUsernameHeaders - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.NameHeaders != nil { - in, out := &in.NameHeaders, &out.NameHeaders - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.EmailHeaders != nil { - in, out := &in.EmailHeaders, &out.EmailHeaders - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RequestHeaderIdentityProvider. -func (in *RequestHeaderIdentityProvider) DeepCopy() *RequestHeaderIdentityProvider { - if in == nil { - return nil - } - out := new(RequestHeaderIdentityProvider) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RequiredHSTSPolicy) DeepCopyInto(out *RequiredHSTSPolicy) { - *out = *in - if in.NamespaceSelector != nil { - in, out := &in.NamespaceSelector, &out.NamespaceSelector - *out = new(metav1.LabelSelector) - (*in).DeepCopyInto(*out) - } - if in.DomainPatterns != nil { - in, out := &in.DomainPatterns, &out.DomainPatterns - *out = make([]string, len(*in)) - copy(*out, *in) - } - in.MaxAge.DeepCopyInto(&out.MaxAge) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RequiredHSTSPolicy. -func (in *RequiredHSTSPolicy) DeepCopy() *RequiredHSTSPolicy { - if in == nil { - return nil - } - out := new(RequiredHSTSPolicy) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Scheduler) DeepCopyInto(out *Scheduler) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - out.Spec = in.Spec - out.Status = in.Status - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Scheduler. -func (in *Scheduler) DeepCopy() *Scheduler { - if in == nil { - return nil - } - out := new(Scheduler) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *Scheduler) 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 *SchedulerList) DeepCopyInto(out *SchedulerList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]Scheduler, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SchedulerList. -func (in *SchedulerList) DeepCopy() *SchedulerList { - if in == nil { - return nil - } - out := new(SchedulerList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *SchedulerList) 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 *SchedulerSpec) DeepCopyInto(out *SchedulerSpec) { - *out = *in - out.Policy = in.Policy - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SchedulerSpec. -func (in *SchedulerSpec) DeepCopy() *SchedulerSpec { - if in == nil { - return nil - } - out := new(SchedulerSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SchedulerStatus) DeepCopyInto(out *SchedulerStatus) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SchedulerStatus. -func (in *SchedulerStatus) DeepCopy() *SchedulerStatus { - if in == nil { - return nil - } - out := new(SchedulerStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SecretNameReference) DeepCopyInto(out *SecretNameReference) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecretNameReference. -func (in *SecretNameReference) DeepCopy() *SecretNameReference { - if in == nil { - return nil - } - out := new(SecretNameReference) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ServingInfo) DeepCopyInto(out *ServingInfo) { - *out = *in - out.CertInfo = in.CertInfo - if in.NamedCertificates != nil { - in, out := &in.NamedCertificates, &out.NamedCertificates - *out = make([]NamedCertificate, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.CipherSuites != nil { - in, out := &in.CipherSuites, &out.CipherSuites - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServingInfo. -func (in *ServingInfo) DeepCopy() *ServingInfo { - if in == nil { - return nil - } - out := new(ServingInfo) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *StringSource) DeepCopyInto(out *StringSource) { - *out = *in - out.StringSourceSpec = in.StringSourceSpec - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StringSource. -func (in *StringSource) DeepCopy() *StringSource { - if in == nil { - return nil - } - out := new(StringSource) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *StringSourceSpec) DeepCopyInto(out *StringSourceSpec) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StringSourceSpec. -func (in *StringSourceSpec) DeepCopy() *StringSourceSpec { - if in == nil { - return nil - } - out := new(StringSourceSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *TLSProfileSpec) DeepCopyInto(out *TLSProfileSpec) { - *out = *in - if in.Ciphers != nil { - in, out := &in.Ciphers, &out.Ciphers - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TLSProfileSpec. -func (in *TLSProfileSpec) DeepCopy() *TLSProfileSpec { - if in == nil { - return nil - } - out := new(TLSProfileSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *TLSSecurityProfile) DeepCopyInto(out *TLSSecurityProfile) { - *out = *in - if in.Old != nil { - in, out := &in.Old, &out.Old - *out = new(OldTLSProfile) - **out = **in - } - if in.Intermediate != nil { - in, out := &in.Intermediate, &out.Intermediate - *out = new(IntermediateTLSProfile) - **out = **in - } - if in.Modern != nil { - in, out := &in.Modern, &out.Modern - *out = new(ModernTLSProfile) - **out = **in - } - if in.Custom != nil { - in, out := &in.Custom, &out.Custom - *out = new(CustomTLSProfile) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TLSSecurityProfile. -func (in *TLSSecurityProfile) DeepCopy() *TLSSecurityProfile { - if in == nil { - return nil - } - out := new(TLSSecurityProfile) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *TemplateReference) DeepCopyInto(out *TemplateReference) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TemplateReference. -func (in *TemplateReference) DeepCopy() *TemplateReference { - if in == nil { - return nil - } - out := new(TemplateReference) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *TokenConfig) DeepCopyInto(out *TokenConfig) { - *out = *in - if in.AccessTokenInactivityTimeout != nil { - in, out := &in.AccessTokenInactivityTimeout, &out.AccessTokenInactivityTimeout - *out = new(metav1.Duration) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TokenConfig. -func (in *TokenConfig) DeepCopy() *TokenConfig { - if in == nil { - return nil - } - out := new(TokenConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Update) DeepCopyInto(out *Update) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Update. -func (in *Update) DeepCopy() *Update { - if in == nil { - return nil - } - out := new(Update) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *UpdateHistory) DeepCopyInto(out *UpdateHistory) { - *out = *in - in.StartedTime.DeepCopyInto(&out.StartedTime) - if in.CompletionTime != nil { - in, out := &in.CompletionTime, &out.CompletionTime - *out = (*in).DeepCopy() - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UpdateHistory. -func (in *UpdateHistory) DeepCopy() *UpdateHistory { - if in == nil { - return nil - } - out := new(UpdateHistory) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VSpherePlatformFailureDomainSpec) DeepCopyInto(out *VSpherePlatformFailureDomainSpec) { - *out = *in - in.Topology.DeepCopyInto(&out.Topology) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VSpherePlatformFailureDomainSpec. -func (in *VSpherePlatformFailureDomainSpec) DeepCopy() *VSpherePlatformFailureDomainSpec { - if in == nil { - return nil - } - out := new(VSpherePlatformFailureDomainSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VSpherePlatformLoadBalancer) DeepCopyInto(out *VSpherePlatformLoadBalancer) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VSpherePlatformLoadBalancer. -func (in *VSpherePlatformLoadBalancer) DeepCopy() *VSpherePlatformLoadBalancer { - if in == nil { - return nil - } - out := new(VSpherePlatformLoadBalancer) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VSpherePlatformNodeNetworking) DeepCopyInto(out *VSpherePlatformNodeNetworking) { - *out = *in - in.External.DeepCopyInto(&out.External) - in.Internal.DeepCopyInto(&out.Internal) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VSpherePlatformNodeNetworking. -func (in *VSpherePlatformNodeNetworking) DeepCopy() *VSpherePlatformNodeNetworking { - if in == nil { - return nil - } - out := new(VSpherePlatformNodeNetworking) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VSpherePlatformNodeNetworkingSpec) DeepCopyInto(out *VSpherePlatformNodeNetworkingSpec) { - *out = *in - if in.NetworkSubnetCIDR != nil { - in, out := &in.NetworkSubnetCIDR, &out.NetworkSubnetCIDR - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.ExcludeNetworkSubnetCIDR != nil { - in, out := &in.ExcludeNetworkSubnetCIDR, &out.ExcludeNetworkSubnetCIDR - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VSpherePlatformNodeNetworkingSpec. -func (in *VSpherePlatformNodeNetworkingSpec) DeepCopy() *VSpherePlatformNodeNetworkingSpec { - if in == nil { - return nil - } - out := new(VSpherePlatformNodeNetworkingSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VSpherePlatformSpec) DeepCopyInto(out *VSpherePlatformSpec) { - *out = *in - if in.VCenters != nil { - in, out := &in.VCenters, &out.VCenters - *out = make([]VSpherePlatformVCenterSpec, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.FailureDomains != nil { - in, out := &in.FailureDomains, &out.FailureDomains - *out = make([]VSpherePlatformFailureDomainSpec, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - in.NodeNetworking.DeepCopyInto(&out.NodeNetworking) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VSpherePlatformSpec. -func (in *VSpherePlatformSpec) DeepCopy() *VSpherePlatformSpec { - if in == nil { - return nil - } - out := new(VSpherePlatformSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VSpherePlatformStatus) DeepCopyInto(out *VSpherePlatformStatus) { - *out = *in - if in.APIServerInternalIPs != nil { - in, out := &in.APIServerInternalIPs, &out.APIServerInternalIPs - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.IngressIPs != nil { - in, out := &in.IngressIPs, &out.IngressIPs - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.LoadBalancer != nil { - in, out := &in.LoadBalancer, &out.LoadBalancer - *out = new(VSpherePlatformLoadBalancer) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VSpherePlatformStatus. -func (in *VSpherePlatformStatus) DeepCopy() *VSpherePlatformStatus { - if in == nil { - return nil - } - out := new(VSpherePlatformStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VSpherePlatformTopology) DeepCopyInto(out *VSpherePlatformTopology) { - *out = *in - if in.Networks != nil { - in, out := &in.Networks, &out.Networks - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VSpherePlatformTopology. -func (in *VSpherePlatformTopology) DeepCopy() *VSpherePlatformTopology { - if in == nil { - return nil - } - out := new(VSpherePlatformTopology) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VSpherePlatformVCenterSpec) DeepCopyInto(out *VSpherePlatformVCenterSpec) { - *out = *in - if in.Datacenters != nil { - in, out := &in.Datacenters, &out.Datacenters - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VSpherePlatformVCenterSpec. -func (in *VSpherePlatformVCenterSpec) DeepCopy() *VSpherePlatformVCenterSpec { - if in == nil { - return nil - } - out := new(VSpherePlatformVCenterSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *WebhookTokenAuthenticator) DeepCopyInto(out *WebhookTokenAuthenticator) { - *out = *in - out.KubeConfig = in.KubeConfig - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WebhookTokenAuthenticator. -func (in *WebhookTokenAuthenticator) DeepCopy() *WebhookTokenAuthenticator { - if in == nil { - return nil - } - out := new(WebhookTokenAuthenticator) - in.DeepCopyInto(out) - return out -} diff --git a/vendor/github.com/openshift/api/config/v1/zz_generated.swagger_doc_generated.go b/vendor/github.com/openshift/api/config/v1/zz_generated.swagger_doc_generated.go deleted file mode 100644 index 179d921e1..000000000 --- a/vendor/github.com/openshift/api/config/v1/zz_generated.swagger_doc_generated.go +++ /dev/null @@ -1,2281 +0,0 @@ -package v1 - -// This file contains a collection of methods that can be used from go-restful to -// generate Swagger API documentation for its models. Please read this PR for more -// information on the implementation: https://github.com/emicklei/go-restful/pull/215 -// -// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if -// they are on one line! For multiple line or blocks that you want to ignore use ---. -// Any context after a --- is ignored. -// -// Those methods can be generated by using hack/update-swagger-docs.sh - -// AUTO-GENERATED FUNCTIONS START HERE -var map_AdmissionConfig = map[string]string{ - "enabledPlugins": "enabledPlugins is a list of admission plugins that must be on in addition to the default list. Some admission plugins are disabled by default, but certain configurations require them. This is fairly uncommon and can result in performance penalties and unexpected behavior.", - "disabledPlugins": "disabledPlugins is a list of admission plugins that must be off. Putting something in this list is almost always a mistake and likely to result in cluster instability.", -} - -func (AdmissionConfig) SwaggerDoc() map[string]string { - return map_AdmissionConfig -} - -var map_AdmissionPluginConfig = map[string]string{ - "": "AdmissionPluginConfig holds the necessary configuration options for admission plugins", - "location": "Location is the path to a configuration file that contains the plugin's configuration", - "configuration": "Configuration is an embedded configuration object to be used as the plugin's configuration. If present, it will be used instead of the path to the configuration file.", -} - -func (AdmissionPluginConfig) SwaggerDoc() map[string]string { - return map_AdmissionPluginConfig -} - -var map_AuditConfig = map[string]string{ - "": "AuditConfig holds configuration for the audit capabilities", - "enabled": "If this flag is set, audit log will be printed in the logs. The logs contains, method, user and a requested URL.", - "auditFilePath": "All requests coming to the apiserver will be logged to this file.", - "maximumFileRetentionDays": "Maximum number of days to retain old log files based on the timestamp encoded in their filename.", - "maximumRetainedFiles": "Maximum number of old log files to retain.", - "maximumFileSizeMegabytes": "Maximum size in megabytes of the log file before it gets rotated. Defaults to 100MB.", - "policyFile": "PolicyFile is a path to the file that defines the audit policy configuration.", - "policyConfiguration": "PolicyConfiguration is an embedded policy configuration object to be used as the audit policy configuration. If present, it will be used instead of the path to the policy file.", - "logFormat": "Format of saved audits (legacy or json).", - "webHookKubeConfig": "Path to a .kubeconfig formatted file that defines the audit webhook configuration.", - "webHookMode": "Strategy for sending audit events (block or batch).", -} - -func (AuditConfig) SwaggerDoc() map[string]string { - return map_AuditConfig -} - -var map_CertInfo = map[string]string{ - "": "CertInfo relates a certificate with a private key", - "certFile": "CertFile is a file containing a PEM-encoded certificate", - "keyFile": "KeyFile is a file containing a PEM-encoded private key for the certificate specified by CertFile", -} - -func (CertInfo) SwaggerDoc() map[string]string { - return map_CertInfo -} - -var map_ClientConnectionOverrides = map[string]string{ - "acceptContentTypes": "acceptContentTypes defines the Accept header sent by clients when connecting to a server, overriding the default value of 'application/json'. This field will control all connections to the server used by a particular client.", - "contentType": "contentType is the content type used when sending data to the server from this client.", - "qps": "qps controls the number of queries per second allowed for this connection.", - "burst": "burst allows extra queries to accumulate when a client is exceeding its rate.", -} - -func (ClientConnectionOverrides) SwaggerDoc() map[string]string { - return map_ClientConnectionOverrides -} - -var map_ConfigMapFileReference = map[string]string{ - "": "ConfigMapFileReference references a config map in a specific namespace. The namespace must be specified at the point of use.", - "key": "Key allows pointing to a specific key/value inside of the configmap. This is useful for logical file references.", -} - -func (ConfigMapFileReference) SwaggerDoc() map[string]string { - return map_ConfigMapFileReference -} - -var map_ConfigMapNameReference = map[string]string{ - "": "ConfigMapNameReference references a config map in a specific namespace. The namespace must be specified at the point of use.", - "name": "name is the metadata.name of the referenced config map", -} - -func (ConfigMapNameReference) SwaggerDoc() map[string]string { - return map_ConfigMapNameReference -} - -var map_DelegatedAuthentication = map[string]string{ - "": "DelegatedAuthentication allows authentication to be disabled.", - "disabled": "disabled indicates that authentication should be disabled. By default it will use delegated authentication.", -} - -func (DelegatedAuthentication) SwaggerDoc() map[string]string { - return map_DelegatedAuthentication -} - -var map_DelegatedAuthorization = map[string]string{ - "": "DelegatedAuthorization allows authorization to be disabled.", - "disabled": "disabled indicates that authorization should be disabled. By default it will use delegated authorization.", -} - -func (DelegatedAuthorization) SwaggerDoc() map[string]string { - return map_DelegatedAuthorization -} - -var map_EtcdConnectionInfo = map[string]string{ - "": "EtcdConnectionInfo holds information necessary for connecting to an etcd server", - "urls": "URLs are the URLs for etcd", - "ca": "CA is a file containing trusted roots for the etcd server certificates", -} - -func (EtcdConnectionInfo) SwaggerDoc() map[string]string { - return map_EtcdConnectionInfo -} - -var map_EtcdStorageConfig = map[string]string{ - "storagePrefix": "StoragePrefix is the path within etcd that the OpenShift resources will be rooted under. This value, if changed, will mean existing objects in etcd will no longer be located.", -} - -func (EtcdStorageConfig) SwaggerDoc() map[string]string { - return map_EtcdStorageConfig -} - -var map_GenericAPIServerConfig = map[string]string{ - "": "GenericAPIServerConfig is an inline-able struct for aggregated apiservers that need to store data in etcd", - "servingInfo": "servingInfo describes how to start serving", - "corsAllowedOrigins": "corsAllowedOrigins", - "auditConfig": "auditConfig describes how to configure audit information", - "storageConfig": "storageConfig contains information about how to use", - "admission": "admissionConfig holds information about how to configure admission.", -} - -func (GenericAPIServerConfig) SwaggerDoc() map[string]string { - return map_GenericAPIServerConfig -} - -var map_GenericControllerConfig = map[string]string{ - "": "GenericControllerConfig provides information to configure a controller", - "servingInfo": "ServingInfo is the HTTP serving information for the controller's endpoints", - "leaderElection": "leaderElection provides information to elect a leader. Only override this if you have a specific need", - "authentication": "authentication allows configuration of authentication for the endpoints", - "authorization": "authorization allows configuration of authentication for the endpoints", -} - -func (GenericControllerConfig) SwaggerDoc() map[string]string { - return map_GenericControllerConfig -} - -var map_HTTPServingInfo = map[string]string{ - "": "HTTPServingInfo holds configuration for serving HTTP", - "maxRequestsInFlight": "MaxRequestsInFlight is the number of concurrent requests allowed to the server. If zero, no limit.", - "requestTimeoutSeconds": "RequestTimeoutSeconds is the number of seconds before requests are timed out. The default is 60 minutes, if -1 there is no limit on requests.", -} - -func (HTTPServingInfo) SwaggerDoc() map[string]string { - return map_HTTPServingInfo -} - -var map_KubeClientConfig = map[string]string{ - "kubeConfig": "kubeConfig is a .kubeconfig filename for going to the owning kube-apiserver. Empty uses an in-cluster-config", - "connectionOverrides": "connectionOverrides specifies client overrides for system components to loop back to this master.", -} - -func (KubeClientConfig) SwaggerDoc() map[string]string { - return map_KubeClientConfig -} - -var map_LeaderElection = map[string]string{ - "": "LeaderElection provides information to elect a leader", - "disable": "disable allows leader election to be suspended while allowing a fully defaulted \"normal\" startup case.", - "namespace": "namespace indicates which namespace the resource is in", - "name": "name indicates what name to use for the resource", - "leaseDuration": "leaseDuration is the duration that non-leader candidates will wait after observing a leadership renewal until attempting to acquire leadership of a led but unrenewed leader slot. This is effectively the maximum duration that a leader can be stopped before it is replaced by another candidate. This is only applicable if leader election is enabled.", - "renewDeadline": "renewDeadline is the interval between attempts by the acting master to renew a leadership slot before it stops leading. This must be less than or equal to the lease duration. This is only applicable if leader election is enabled.", - "retryPeriod": "retryPeriod is the duration the clients should wait between attempting acquisition and renewal of a leadership. This is only applicable if leader election is enabled.", -} - -func (LeaderElection) SwaggerDoc() map[string]string { - return map_LeaderElection -} - -var map_MaxAgePolicy = map[string]string{ - "": "MaxAgePolicy contains a numeric range for specifying a compliant HSTS max-age for the enclosing RequiredHSTSPolicy", - "largestMaxAge": "The largest allowed value (in seconds) of the RequiredHSTSPolicy max-age This value can be left unspecified, in which case no upper limit is enforced.", - "smallestMaxAge": "The smallest allowed value (in seconds) of the RequiredHSTSPolicy max-age Setting max-age=0 allows the deletion of an existing HSTS header from a host. This is a necessary tool for administrators to quickly correct mistakes. This value can be left unspecified, in which case no lower limit is enforced.", -} - -func (MaxAgePolicy) SwaggerDoc() map[string]string { - return map_MaxAgePolicy -} - -var map_NamedCertificate = map[string]string{ - "": "NamedCertificate specifies a certificate/key, and the names it should be served for", - "names": "Names is a list of DNS names this certificate should be used to secure A name can be a normal DNS name, or can contain leading wildcard segments.", -} - -func (NamedCertificate) SwaggerDoc() map[string]string { - return map_NamedCertificate -} - -var map_RemoteConnectionInfo = map[string]string{ - "": "RemoteConnectionInfo holds information necessary for establishing a remote connection", - "url": "URL is the remote URL to connect to", - "ca": "CA is the CA for verifying TLS connections", -} - -func (RemoteConnectionInfo) SwaggerDoc() map[string]string { - return map_RemoteConnectionInfo -} - -var map_RequiredHSTSPolicy = map[string]string{ - "namespaceSelector": "namespaceSelector specifies a label selector such that the policy applies only to those routes that are in namespaces with labels that match the selector, and are in one of the DomainPatterns. Defaults to the empty LabelSelector, which matches everything.", - "domainPatterns": "domainPatterns is a list of domains for which the desired HSTS annotations are required. If domainPatterns is specified and a route is created with a spec.host matching one of the domains, the route must specify the HSTS Policy components described in the matching RequiredHSTSPolicy.\n\nThe use of wildcards is allowed like this: *.foo.com matches everything under foo.com. foo.com only matches foo.com, so to cover foo.com and everything under it, you must specify *both*.", - "maxAge": "maxAge is the delta time range in seconds during which hosts are regarded as HSTS hosts. If set to 0, it negates the effect, and hosts are removed as HSTS hosts. If set to 0 and includeSubdomains is specified, all subdomains of the host are also removed as HSTS hosts. maxAge is a time-to-live value, and if this policy is not refreshed on a client, the HSTS policy will eventually expire on that client.", - "preloadPolicy": "preloadPolicy directs the client to include hosts in its host preload list so that it never needs to do an initial load to get the HSTS header (note that this is not defined in RFC 6797 and is therefore client implementation-dependent).", - "includeSubDomainsPolicy": "includeSubDomainsPolicy means the HSTS Policy should apply to any subdomains of the host's domain name. Thus, for the host bar.foo.com, if includeSubDomainsPolicy was set to RequireIncludeSubDomains: - the host app.bar.foo.com would inherit the HSTS Policy of bar.foo.com - the host bar.foo.com would inherit the HSTS Policy of bar.foo.com - the host foo.com would NOT inherit the HSTS Policy of bar.foo.com - the host def.foo.com would NOT inherit the HSTS Policy of bar.foo.com", -} - -func (RequiredHSTSPolicy) SwaggerDoc() map[string]string { - return map_RequiredHSTSPolicy -} - -var map_SecretNameReference = map[string]string{ - "": "SecretNameReference references a secret in a specific namespace. The namespace must be specified at the point of use.", - "name": "name is the metadata.name of the referenced secret", -} - -func (SecretNameReference) SwaggerDoc() map[string]string { - return map_SecretNameReference -} - -var map_ServingInfo = map[string]string{ - "": "ServingInfo holds information about serving web pages", - "bindAddress": "BindAddress is the ip:port to serve on", - "bindNetwork": "BindNetwork is the type of network to bind to - defaults to \"tcp4\", accepts \"tcp\", \"tcp4\", and \"tcp6\"", - "clientCA": "ClientCA is the certificate bundle for all the signers that you'll recognize for incoming client certificates", - "namedCertificates": "NamedCertificates is a list of certificates to use to secure requests to specific hostnames", - "minTLSVersion": "MinTLSVersion is the minimum TLS version supported. Values must match version names from https://golang.org/pkg/crypto/tls/#pkg-constants", - "cipherSuites": "CipherSuites contains an overridden list of ciphers for the server to support. Values must match cipher suite IDs from https://golang.org/pkg/crypto/tls/#pkg-constants", -} - -func (ServingInfo) SwaggerDoc() map[string]string { - return map_ServingInfo -} - -var map_StringSource = map[string]string{ - "": "StringSource allows specifying a string inline, or externally via env var or file. When it contains only a string value, it marshals to a simple JSON string.", -} - -func (StringSource) SwaggerDoc() map[string]string { - return map_StringSource -} - -var map_StringSourceSpec = map[string]string{ - "": "StringSourceSpec specifies a string value, or external location", - "value": "Value specifies the cleartext value, or an encrypted value if keyFile is specified.", - "env": "Env specifies an envvar containing the cleartext value, or an encrypted value if the keyFile is specified.", - "file": "File references a file containing the cleartext value, or an encrypted value if a keyFile is specified.", - "keyFile": "KeyFile references a file containing the key to use to decrypt the value.", -} - -func (StringSourceSpec) SwaggerDoc() map[string]string { - return map_StringSourceSpec -} - -var map_APIServer = map[string]string{ - "": "APIServer holds configuration (like serving certificates, client CA and CORS domains) shared by all API servers in the system, among them especially kube-apiserver and openshift-apiserver. The canonical name of an instance is 'cluster'.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "spec": "spec holds user settable values for configuration", - "status": "status holds observed values from the cluster. They may not be overridden.", -} - -func (APIServer) SwaggerDoc() map[string]string { - return map_APIServer -} - -var map_APIServerEncryption = map[string]string{ - "type": "type defines what encryption type should be used to encrypt resources at the datastore layer. When this field is unset (i.e. when it is set to the empty string), identity is implied. The behavior of unset can and will change over time. Even if encryption is enabled by default, the meaning of unset may change to a different encryption type based on changes in best practices.\n\nWhen encryption is enabled, all sensitive resources shipped with the platform are encrypted. This list of sensitive resources can and will change over time. The current authoritative list is:\n\n 1. secrets\n 2. configmaps\n 3. routes.route.openshift.io\n 4. oauthaccesstokens.oauth.openshift.io\n 5. oauthauthorizetokens.oauth.openshift.io", -} - -func (APIServerEncryption) SwaggerDoc() map[string]string { - return map_APIServerEncryption -} - -var map_APIServerList = map[string]string{ - "": "Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", -} - -func (APIServerList) SwaggerDoc() map[string]string { - return map_APIServerList -} - -var map_APIServerNamedServingCert = map[string]string{ - "": "APIServerNamedServingCert maps a server DNS name, as understood by a client, to a certificate.", - "names": "names is a optional list of explicit DNS names (leading wildcards allowed) that should use this certificate to serve secure traffic. If no names are provided, the implicit names will be extracted from the certificates. Exact names trump over wildcard names. Explicit names defined here trump over extracted implicit names.", - "servingCertificate": "servingCertificate references a kubernetes.io/tls type secret containing the TLS cert info for serving secure traffic. The secret must exist in the openshift-config namespace and contain the following required fields: - Secret.Data[\"tls.key\"] - TLS private key. - Secret.Data[\"tls.crt\"] - TLS certificate.", -} - -func (APIServerNamedServingCert) SwaggerDoc() map[string]string { - return map_APIServerNamedServingCert -} - -var map_APIServerServingCerts = map[string]string{ - "namedCertificates": "namedCertificates references secrets containing the TLS cert info for serving secure traffic to specific hostnames. If no named certificates are provided, or no named certificates match the server name as understood by a client, the defaultServingCertificate will be used.", -} - -func (APIServerServingCerts) SwaggerDoc() map[string]string { - return map_APIServerServingCerts -} - -var map_APIServerSpec = map[string]string{ - "servingCerts": "servingCert is the TLS cert info for serving secure traffic. If not specified, operator managed certificates will be used for serving secure traffic.", - "clientCA": "clientCA references a ConfigMap containing a certificate bundle for the signers that will be recognized for incoming client certificates in addition to the operator managed signers. If this is empty, then only operator managed signers are valid. You usually only have to set this if you have your own PKI you wish to honor client certificates from. The ConfigMap must exist in the openshift-config namespace and contain the following required fields: - ConfigMap.Data[\"ca-bundle.crt\"] - CA bundle.", - "additionalCORSAllowedOrigins": "additionalCORSAllowedOrigins lists additional, user-defined regular expressions describing hosts for which the API server allows access using the CORS headers. This may be needed to access the API and the integrated OAuth server from JavaScript applications. The values are regular expressions that correspond to the Golang regular expression language.", - "encryption": "encryption allows the configuration of encryption of resources at the datastore layer.", - "tlsSecurityProfile": "tlsSecurityProfile specifies settings for TLS connections for externally exposed servers.\n\nIf unset, a default (which may change between releases) is chosen. Note that only Old, Intermediate and Custom profiles are currently supported, and the maximum available MinTLSVersions is VersionTLS12.", - "audit": "audit specifies the settings for audit configuration to be applied to all OpenShift-provided API servers in the cluster.", -} - -func (APIServerSpec) SwaggerDoc() map[string]string { - return map_APIServerSpec -} - -var map_Audit = map[string]string{ - "profile": "profile specifies the name of the desired top-level audit profile to be applied to all requests sent to any of the OpenShift-provided API servers in the cluster (kube-apiserver, openshift-apiserver and oauth-apiserver), with the exception of those requests that match one or more of the customRules.\n\nThe following profiles are provided: - Default: default policy which means MetaData level logging with the exception of events\n (not logged at all), oauthaccesstokens and oauthauthorizetokens (both logged at RequestBody\n level).\n- WriteRequestBodies: like 'Default', but logs request and response HTTP payloads for write requests (create, update, patch). - AllRequestBodies: like 'WriteRequestBodies', but also logs request and response HTTP payloads for read requests (get, list). - None: no requests are logged at all, not even oauthaccesstokens and oauthauthorizetokens.\n\nWarning: It is not recommended to disable audit logging by using the `None` profile unless you are fully aware of the risks of not logging data that can be beneficial when troubleshooting issues. If you disable audit logging and a support situation arises, you might need to enable audit logging and reproduce the issue in order to troubleshoot properly.\n\nIf unset, the 'Default' profile is used as the default.", - "customRules": "customRules specify profiles per group. These profile take precedence over the top-level profile field if they apply. They are evaluation from top to bottom and the first one that matches, applies.", -} - -func (Audit) SwaggerDoc() map[string]string { - return map_Audit -} - -var map_AuditCustomRule = map[string]string{ - "": "AuditCustomRule describes a custom rule for an audit profile that takes precedence over the top-level profile.", - "group": "group is a name of group a request user must be member of in order to this profile to apply.", - "profile": "profile specifies the name of the desired audit policy configuration to be deployed to all OpenShift-provided API servers in the cluster.\n\nThe following profiles are provided: - Default: the existing default policy. - WriteRequestBodies: like 'Default', but logs request and response HTTP payloads for write requests (create, update, patch). - AllRequestBodies: like 'WriteRequestBodies', but also logs request and response HTTP payloads for read requests (get, list). - None: no requests are logged at all, not even oauthaccesstokens and oauthauthorizetokens.\n\nIf unset, the 'Default' profile is used as the default.", -} - -func (AuditCustomRule) SwaggerDoc() map[string]string { - return map_AuditCustomRule -} - -var map_Authentication = map[string]string{ - "": "Authentication specifies cluster-wide settings for authentication (like OAuth and webhook token authenticators). The canonical name of an instance is `cluster`.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "spec": "spec holds user settable values for configuration", - "status": "status holds observed values from the cluster. They may not be overridden.", -} - -func (Authentication) SwaggerDoc() map[string]string { - return map_Authentication -} - -var map_AuthenticationList = map[string]string{ - "": "Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", -} - -func (AuthenticationList) SwaggerDoc() map[string]string { - return map_AuthenticationList -} - -var map_AuthenticationSpec = map[string]string{ - "type": "type identifies the cluster managed, user facing authentication mode in use. Specifically, it manages the component that responds to login attempts. The default is IntegratedOAuth.", - "oauthMetadata": "oauthMetadata contains the discovery endpoint data for OAuth 2.0 Authorization Server Metadata for an external OAuth server. This discovery document can be viewed from its served location: oc get --raw '/.well-known/oauth-authorization-server' For further details, see the IETF Draft: https://tools.ietf.org/html/draft-ietf-oauth-discovery-04#section-2 If oauthMetadata.name is non-empty, this value has precedence over any metadata reference stored in status. The key \"oauthMetadata\" is used to locate the data. If specified and the config map or expected key is not found, no metadata is served. If the specified metadata is not valid, no metadata is served. The namespace for this config map is openshift-config.", - "webhookTokenAuthenticators": "webhookTokenAuthenticators is DEPRECATED, setting it has no effect.", - "webhookTokenAuthenticator": "webhookTokenAuthenticator configures a remote token reviewer. These remote authentication webhooks can be used to verify bearer tokens via the tokenreviews.authentication.k8s.io REST API. This is required to honor bearer tokens that are provisioned by an external authentication service.", - "serviceAccountIssuer": "serviceAccountIssuer is the identifier of the bound service account token issuer. The default is https://kubernetes.default.svc WARNING: Updating this field will not result in immediate invalidation of all bound tokens with the previous issuer value. Instead, the tokens issued by previous service account issuer will continue to be trusted for a time period chosen by the platform (currently set to 24h). This time period is subject to change over time. This allows internal components to transition to use new service account issuer without service distruption.", -} - -func (AuthenticationSpec) SwaggerDoc() map[string]string { - return map_AuthenticationSpec -} - -var map_AuthenticationStatus = map[string]string{ - "integratedOAuthMetadata": "integratedOAuthMetadata contains the discovery endpoint data for OAuth 2.0 Authorization Server Metadata for the in-cluster integrated OAuth server. This discovery document can be viewed from its served location: oc get --raw '/.well-known/oauth-authorization-server' For further details, see the IETF Draft: https://tools.ietf.org/html/draft-ietf-oauth-discovery-04#section-2 This contains the observed value based on cluster state. An explicitly set value in spec.oauthMetadata has precedence over this field. This field has no meaning if authentication spec.type is not set to IntegratedOAuth. The key \"oauthMetadata\" is used to locate the data. If the config map or expected key is not found, no metadata is served. If the specified metadata is not valid, no metadata is served. The namespace for this config map is openshift-config-managed.", -} - -func (AuthenticationStatus) SwaggerDoc() map[string]string { - return map_AuthenticationStatus -} - -var map_DeprecatedWebhookTokenAuthenticator = map[string]string{ - "": "deprecatedWebhookTokenAuthenticator holds the necessary configuration options for a remote token authenticator. It's the same as WebhookTokenAuthenticator but it's missing the 'required' validation on KubeConfig field.", - "kubeConfig": "kubeConfig contains kube config file data which describes how to access the remote webhook service. For further details, see: https://kubernetes.io/docs/reference/access-authn-authz/authentication/#webhook-token-authentication The key \"kubeConfig\" is used to locate the data. If the secret or expected key is not found, the webhook is not honored. If the specified kube config data is not valid, the webhook is not honored. The namespace for this secret is determined by the point of use.", -} - -func (DeprecatedWebhookTokenAuthenticator) SwaggerDoc() map[string]string { - return map_DeprecatedWebhookTokenAuthenticator -} - -var map_WebhookTokenAuthenticator = map[string]string{ - "": "webhookTokenAuthenticator holds the necessary configuration options for a remote token authenticator", - "kubeConfig": "kubeConfig references a secret that contains kube config file data which describes how to access the remote webhook service. The namespace for the referenced secret is openshift-config.\n\nFor further details, see:\n\nhttps://kubernetes.io/docs/reference/access-authn-authz/authentication/#webhook-token-authentication\n\nThe key \"kubeConfig\" is used to locate the data. If the secret or expected key is not found, the webhook is not honored. If the specified kube config data is not valid, the webhook is not honored.", -} - -func (WebhookTokenAuthenticator) SwaggerDoc() map[string]string { - return map_WebhookTokenAuthenticator -} - -var map_Build = map[string]string{ - "": "Build configures the behavior of OpenShift builds for the entire cluster. This includes default settings that can be overridden in BuildConfig objects, and overrides which are applied to all builds.\n\nThe canonical name is \"cluster\"\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "spec": "Spec holds user-settable values for the build controller configuration", -} - -func (Build) SwaggerDoc() map[string]string { - return map_Build -} - -var map_BuildDefaults = map[string]string{ - "defaultProxy": "DefaultProxy contains the default proxy settings for all build operations, including image pull/push and source download.\n\nValues can be overrode by setting the `HTTP_PROXY`, `HTTPS_PROXY`, and `NO_PROXY` environment variables in the build config's strategy.", - "gitProxy": "GitProxy contains the proxy settings for git operations only. If set, this will override any Proxy settings for all git commands, such as git clone.\n\nValues that are not set here will be inherited from DefaultProxy.", - "env": "Env is a set of default environment variables that will be applied to the build if the specified variables do not exist on the build", - "imageLabels": "ImageLabels is a list of docker labels that are applied to the resulting image. User can override a default label by providing a label with the same name in their Build/BuildConfig.", - "resources": "Resources defines resource requirements to execute the build.", -} - -func (BuildDefaults) SwaggerDoc() map[string]string { - return map_BuildDefaults -} - -var map_BuildList = map[string]string{ - "": "Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", -} - -func (BuildList) SwaggerDoc() map[string]string { - return map_BuildList -} - -var map_BuildOverrides = map[string]string{ - "imageLabels": "ImageLabels is a list of docker labels that are applied to the resulting image. If user provided a label in their Build/BuildConfig with the same name as one in this list, the user's label will be overwritten.", - "nodeSelector": "NodeSelector is a selector which must be true for the build pod to fit on a node", - "tolerations": "Tolerations is a list of Tolerations that will override any existing tolerations set on a build pod.", - "forcePull": "ForcePull overrides, if set, the equivalent value in the builds, i.e. false disables force pull for all builds, true enables force pull for all builds, independently of what each build specifies itself", -} - -func (BuildOverrides) SwaggerDoc() map[string]string { - return map_BuildOverrides -} - -var map_BuildSpec = map[string]string{ - "additionalTrustedCA": "AdditionalTrustedCA is a reference to a ConfigMap containing additional CAs that should be trusted for image pushes and pulls during builds. The namespace for this config map is openshift-config.\n\nDEPRECATED: Additional CAs for image pull and push should be set on image.config.openshift.io/cluster instead.", - "buildDefaults": "BuildDefaults controls the default information for Builds", - "buildOverrides": "BuildOverrides controls override settings for builds", -} - -func (BuildSpec) SwaggerDoc() map[string]string { - return map_BuildSpec -} - -var map_ImageLabel = map[string]string{ - "name": "Name defines the name of the label. It must have non-zero length.", - "value": "Value defines the literal value of the label.", -} - -func (ImageLabel) SwaggerDoc() map[string]string { - return map_ImageLabel -} - -var map_ClusterOperator = map[string]string{ - "": "ClusterOperator is the Custom Resource object which holds the current state of an operator. This object is used by operators to convey their state to the rest of the cluster.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "spec": "spec holds configuration that could apply to any operator.", - "status": "status holds the information about the state of an operator. It is consistent with status information across the Kubernetes ecosystem.", -} - -func (ClusterOperator) SwaggerDoc() map[string]string { - return map_ClusterOperator -} - -var map_ClusterOperatorList = map[string]string{ - "": "ClusterOperatorList is a list of OperatorStatus resources.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", -} - -func (ClusterOperatorList) SwaggerDoc() map[string]string { - return map_ClusterOperatorList -} - -var map_ClusterOperatorSpec = map[string]string{ - "": "ClusterOperatorSpec is empty for now, but you could imagine holding information like \"pause\".", -} - -func (ClusterOperatorSpec) SwaggerDoc() map[string]string { - return map_ClusterOperatorSpec -} - -var map_ClusterOperatorStatus = map[string]string{ - "": "ClusterOperatorStatus provides information about the status of the operator.", - "conditions": "conditions describes the state of the operator's managed and monitored components.", - "versions": "versions is a slice of operator and operand version tuples. Operators which manage multiple operands will have multiple operand entries in the array. Available operators must report the version of the operator itself with the name \"operator\". An operator reports a new \"operator\" version when it has rolled out the new version to all of its operands.", - "relatedObjects": "relatedObjects is a list of objects that are \"interesting\" or related to this operator. Common uses are: 1. the detailed resource driving the operator 2. operator namespaces 3. operand namespaces", - "extension": "extension contains any additional status information specific to the operator which owns this status object.", -} - -func (ClusterOperatorStatus) SwaggerDoc() map[string]string { - return map_ClusterOperatorStatus -} - -var map_ClusterOperatorStatusCondition = map[string]string{ - "": "ClusterOperatorStatusCondition represents the state of the operator's managed and monitored components.", - "type": "type specifies the aspect reported by this condition.", - "status": "status of the condition, one of True, False, Unknown.", - "lastTransitionTime": "lastTransitionTime is the time of the last update to the current status property.", - "reason": "reason is the CamelCase reason for the condition's current status.", - "message": "message provides additional information about the current condition. This is only to be consumed by humans. It may contain Line Feed characters (U+000A), which should be rendered as new lines.", -} - -func (ClusterOperatorStatusCondition) SwaggerDoc() map[string]string { - return map_ClusterOperatorStatusCondition -} - -var map_ObjectReference = map[string]string{ - "": "ObjectReference contains enough information to let you inspect or modify the referred object.", - "group": "group of the referent.", - "resource": "resource of the referent.", - "namespace": "namespace of the referent.", - "name": "name of the referent.", -} - -func (ObjectReference) SwaggerDoc() map[string]string { - return map_ObjectReference -} - -var map_OperandVersion = map[string]string{ - "name": "name is the name of the particular operand this version is for. It usually matches container images, not operators.", - "version": "version indicates which version of a particular operand is currently being managed. It must always match the Available operand. If 1.0.0 is Available, then this must indicate 1.0.0 even if the operator is trying to rollout 1.1.0", -} - -func (OperandVersion) SwaggerDoc() map[string]string { - return map_OperandVersion -} - -var map_ClusterCondition = map[string]string{ - "": "ClusterCondition is a union of typed cluster conditions. The 'type' property determines which of the type-specific properties are relevant. When evaluated on a cluster, the condition may match, not match, or fail to evaluate.", - "type": "type represents the cluster-condition type. This defines the members and semantics of any additional properties.", - "promql": "promQL represents a cluster condition based on PromQL.", -} - -func (ClusterCondition) SwaggerDoc() map[string]string { - return map_ClusterCondition -} - -var map_ClusterVersion = map[string]string{ - "": "ClusterVersion is the configuration for the ClusterVersionOperator. This is where parameters related to automatic updates can be set.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "spec": "spec is the desired state of the cluster version - the operator will work to ensure that the desired version is applied to the cluster.", - "status": "status contains information about the available updates and any in-progress updates.", -} - -func (ClusterVersion) SwaggerDoc() map[string]string { - return map_ClusterVersion -} - -var map_ClusterVersionCapabilitiesSpec = map[string]string{ - "": "ClusterVersionCapabilitiesSpec selects the managed set of optional, core cluster components.", - "baselineCapabilitySet": "baselineCapabilitySet selects an initial set of optional capabilities to enable, which can be extended via additionalEnabledCapabilities. If unset, the cluster will choose a default, and the default may change over time. The current default is vCurrent.", - "additionalEnabledCapabilities": "additionalEnabledCapabilities extends the set of managed capabilities beyond the baseline defined in baselineCapabilitySet. The default is an empty set.", -} - -func (ClusterVersionCapabilitiesSpec) SwaggerDoc() map[string]string { - return map_ClusterVersionCapabilitiesSpec -} - -var map_ClusterVersionCapabilitiesStatus = map[string]string{ - "": "ClusterVersionCapabilitiesStatus describes the state of optional, core cluster components.", - "enabledCapabilities": "enabledCapabilities lists all the capabilities that are currently managed.", - "knownCapabilities": "knownCapabilities lists all the capabilities known to the current cluster.", -} - -func (ClusterVersionCapabilitiesStatus) SwaggerDoc() map[string]string { - return map_ClusterVersionCapabilitiesStatus -} - -var map_ClusterVersionList = map[string]string{ - "": "ClusterVersionList is a list of ClusterVersion resources.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", -} - -func (ClusterVersionList) SwaggerDoc() map[string]string { - return map_ClusterVersionList -} - -var map_ClusterVersionSpec = map[string]string{ - "": "ClusterVersionSpec is the desired version state of the cluster. It includes the version the cluster should be at, how the cluster is identified, and where the cluster should look for version updates.", - "clusterID": "clusterID uniquely identifies this cluster. This is expected to be an RFC4122 UUID value (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx in hexadecimal values). This is a required field.", - "desiredUpdate": "desiredUpdate is an optional field that indicates the desired value of the cluster version. Setting this value will trigger an upgrade (if the current version does not match the desired version). The set of recommended update values is listed as part of available updates in status, and setting values outside that range may cause the upgrade to fail.\n\nSome of the fields are inter-related with restrictions and meanings described here. 1. image is specified, version is specified, architecture is specified. API validation error. 2. image is specified, version is specified, architecture is not specified. You should not do this. version is silently ignored and image is used. 3. image is specified, version is not specified, architecture is specified. API validation error. 4. image is specified, version is not specified, architecture is not specified. image is used. 5. image is not specified, version is specified, architecture is specified. version and desired architecture are used to select an image. 6. image is not specified, version is specified, architecture is not specified. version and current architecture are used to select an image. 7. image is not specified, version is not specified, architecture is specified. API validation error. 8. image is not specified, version is not specified, architecture is not specified. API validation error.\n\nIf an upgrade fails the operator will halt and report status about the failing component. Setting the desired update value back to the previous version will cause a rollback to be attempted. Not all rollbacks will succeed.", - "upstream": "upstream may be used to specify the preferred update server. By default it will use the appropriate update server for the cluster and region.", - "channel": "channel is an identifier for explicitly requesting that a non-default set of updates be applied to this cluster. The default channel will be contain stable updates that are appropriate for production clusters.", - "capabilities": "capabilities configures the installation of optional, core cluster components. A null value here is identical to an empty object; see the child properties for default semantics.", - "overrides": "overrides is list of overides for components that are managed by cluster version operator. Marking a component unmanaged will prevent the operator from creating or updating the object.", -} - -func (ClusterVersionSpec) SwaggerDoc() map[string]string { - return map_ClusterVersionSpec -} - -var map_ClusterVersionStatus = map[string]string{ - "": "ClusterVersionStatus reports the status of the cluster versioning, including any upgrades that are in progress. The current field will be set to whichever version the cluster is reconciling to, and the conditions array will report whether the update succeeded, is in progress, or is failing.", - "desired": "desired is the version that the cluster is reconciling towards. If the cluster is not yet fully initialized desired will be set with the information available, which may be an image or a tag.", - "history": "history contains a list of the most recent versions applied to the cluster. This value may be empty during cluster startup, and then will be updated when a new update is being applied. The newest update is first in the list and it is ordered by recency. Updates in the history have state Completed if the rollout completed - if an update was failing or halfway applied the state will be Partial. Only a limited amount of update history is preserved.", - "observedGeneration": "observedGeneration reports which version of the spec is being synced. If this value is not equal to metadata.generation, then the desired and conditions fields may represent a previous version.", - "versionHash": "versionHash is a fingerprint of the content that the cluster will be updated with. It is used by the operator to avoid unnecessary work and is for internal use only.", - "capabilities": "capabilities describes the state of optional, core cluster components.", - "conditions": "conditions provides information about the cluster version. The condition \"Available\" is set to true if the desiredUpdate has been reached. The condition \"Progressing\" is set to true if an update is being applied. The condition \"Degraded\" is set to true if an update is currently blocked by a temporary or permanent error. Conditions are only valid for the current desiredUpdate when metadata.generation is equal to status.generation.", - "availableUpdates": "availableUpdates contains updates recommended for this cluster. Updates which appear in conditionalUpdates but not in availableUpdates may expose this cluster to known issues. This list may be empty if no updates are recommended, if the update service is unavailable, or if an invalid channel has been specified.", - "conditionalUpdates": "conditionalUpdates contains the list of updates that may be recommended for this cluster if it meets specific required conditions. Consumers interested in the set of updates that are actually recommended for this cluster should use availableUpdates. This list may be empty if no updates are recommended, if the update service is unavailable, or if an empty or invalid channel has been specified.", -} - -func (ClusterVersionStatus) SwaggerDoc() map[string]string { - return map_ClusterVersionStatus -} - -var map_ComponentOverride = map[string]string{ - "": "ComponentOverride allows overriding cluster version operator's behavior for a component.", - "kind": "kind indentifies which object to override.", - "group": "group identifies the API group that the kind is in.", - "namespace": "namespace is the component's namespace. If the resource is cluster scoped, the namespace should be empty.", - "name": "name is the component's name.", - "unmanaged": "unmanaged controls if cluster version operator should stop managing the resources in this cluster. Default: false", -} - -func (ComponentOverride) SwaggerDoc() map[string]string { - return map_ComponentOverride -} - -var map_ConditionalUpdate = map[string]string{ - "": "ConditionalUpdate represents an update which is recommended to some clusters on the version the current cluster is reconciling, but which may not be recommended for the current cluster.", - "release": "release is the target of the update.", - "risks": "risks represents the range of issues associated with updating to the target release. The cluster-version operator will evaluate all entries, and only recommend the update if there is at least one entry and all entries recommend the update.", - "conditions": "conditions represents the observations of the conditional update's current status. Known types are: * Evaluating, for whether the cluster-version operator will attempt to evaluate any risks[].matchingRules. * Recommended, for whether the update is recommended for the current cluster.", -} - -func (ConditionalUpdate) SwaggerDoc() map[string]string { - return map_ConditionalUpdate -} - -var map_ConditionalUpdateRisk = map[string]string{ - "": "ConditionalUpdateRisk represents a reason and cluster-state for not recommending a conditional update.", - "url": "url contains information about this risk.", - "name": "name is the CamelCase reason for not recommending a conditional update, in the event that matchingRules match the cluster state.", - "message": "message provides additional information about the risk of updating, in the event that matchingRules match the cluster state. This is only to be consumed by humans. It may contain Line Feed characters (U+000A), which should be rendered as new lines.", - "matchingRules": "matchingRules is a slice of conditions for deciding which clusters match the risk and which do not. The slice is ordered by decreasing precedence. The cluster-version operator will walk the slice in order, and stop after the first it can successfully evaluate. If no condition can be successfully evaluated, the update will not be recommended.", -} - -func (ConditionalUpdateRisk) SwaggerDoc() map[string]string { - return map_ConditionalUpdateRisk -} - -var map_PromQLClusterCondition = map[string]string{ - "": "PromQLClusterCondition represents a cluster condition based on PromQL.", - "promql": "PromQL is a PromQL query classifying clusters. This query query should return a 1 in the match case and a 0 in the does-not-match case. Queries which return no time series, or which return values besides 0 or 1, are evaluation failures.", -} - -func (PromQLClusterCondition) SwaggerDoc() map[string]string { - return map_PromQLClusterCondition -} - -var map_Release = map[string]string{ - "": "Release represents an OpenShift release image and associated metadata.", - "version": "version is a semantic version identifying the update version. When this field is part of spec, version is optional if image is specified.", - "image": "image is a container image location that contains the update. When this field is part of spec, image is optional if version is specified and the availableUpdates field contains a matching version.", - "url": "url contains information about this release. This URL is set by the 'url' metadata property on a release or the metadata returned by the update API and should be displayed as a link in user interfaces. The URL field may not be set for test or nightly releases.", - "channels": "channels is the set of Cincinnati channels to which the release currently belongs.", -} - -func (Release) SwaggerDoc() map[string]string { - return map_Release -} - -var map_Update = map[string]string{ - "": "Update represents an administrator update request.", - "architecture": "architecture is an optional field that indicates the desired value of the cluster architecture. In this context cluster architecture means either a single architecture or a multi architecture. architecture can only be set to Multi thereby only allowing updates from single to multi architecture. If architecture is set, image cannot be set and version must be set. Valid values are 'Multi' and empty.", - "version": "version is a semantic version identifying the update version. version is ignored if image is specified and required if architecture is specified.", - "image": "image is a container image location that contains the update. image should be used when the desired version does not exist in availableUpdates or history. When image is set, version is ignored. When image is set, version should be empty. When image is set, architecture cannot be specified.", - "force": "force allows an administrator to update to an image that has failed verification or upgradeable checks. This option should only be used when the authenticity of the provided image has been verified out of band because the provided image will run with full administrative access to the cluster. Do not use this flag with images that comes from unknown or potentially malicious sources.", -} - -func (Update) SwaggerDoc() map[string]string { - return map_Update -} - -var map_UpdateHistory = map[string]string{ - "": "UpdateHistory is a single attempted update to the cluster.", - "state": "state reflects whether the update was fully applied. The Partial state indicates the update is not fully applied, while the Completed state indicates the update was successfully rolled out at least once (all parts of the update successfully applied).", - "startedTime": "startedTime is the time at which the update was started.", - "completionTime": "completionTime, if set, is when the update was fully applied. The update that is currently being applied will have a null completion time. Completion time will always be set for entries that are not the current update (usually to the started time of the next update).", - "version": "version is a semantic version identifying the update version. If the requested image does not define a version, or if a failure occurs retrieving the image, this value may be empty.", - "image": "image is a container image location that contains the update. This value is always populated.", - "verified": "verified indicates whether the provided update was properly verified before it was installed. If this is false the cluster may not be trusted. Verified does not cover upgradeable checks that depend on the cluster state at the time when the update target was accepted.", - "acceptedRisks": "acceptedRisks records risks which were accepted to initiate the update. For example, it may menition an Upgradeable=False or missing signature that was overriden via desiredUpdate.force, or an update that was initiated despite not being in the availableUpdates set of recommended update targets.", -} - -func (UpdateHistory) SwaggerDoc() map[string]string { - return map_UpdateHistory -} - -var map_Console = map[string]string{ - "": "Console holds cluster-wide configuration for the web console, including the logout URL, and reports the public URL of the console. The canonical name is `cluster`.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "spec": "spec holds user settable values for configuration", - "status": "status holds observed values from the cluster. They may not be overridden.", -} - -func (Console) SwaggerDoc() map[string]string { - return map_Console -} - -var map_ConsoleAuthentication = map[string]string{ - "": "ConsoleAuthentication defines a list of optional configuration for console authentication.", - "logoutRedirect": "An optional, absolute URL to redirect web browsers to after logging out of the console. If not specified, it will redirect to the default login page. This is required when using an identity provider that supports single sign-on (SSO) such as: - OpenID (Keycloak, Azure) - RequestHeader (GSSAPI, SSPI, SAML) - OAuth (GitHub, GitLab, Google) Logging out of the console will destroy the user's token. The logoutRedirect provides the user the option to perform single logout (SLO) through the identity provider to destroy their single sign-on session.", -} - -func (ConsoleAuthentication) SwaggerDoc() map[string]string { - return map_ConsoleAuthentication -} - -var map_ConsoleList = map[string]string{ - "": "Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", -} - -func (ConsoleList) SwaggerDoc() map[string]string { - return map_ConsoleList -} - -var map_ConsoleSpec = map[string]string{ - "": "ConsoleSpec is the specification of the desired behavior of the Console.", -} - -func (ConsoleSpec) SwaggerDoc() map[string]string { - return map_ConsoleSpec -} - -var map_ConsoleStatus = map[string]string{ - "": "ConsoleStatus defines the observed status of the Console.", - "consoleURL": "The URL for the console. This will be derived from the host for the route that is created for the console.", -} - -func (ConsoleStatus) SwaggerDoc() map[string]string { - return map_ConsoleStatus -} - -var map_DNS = map[string]string{ - "": "DNS holds cluster-wide information about DNS. The canonical name is `cluster`\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "spec": "spec holds user settable values for configuration", - "status": "status holds observed values from the cluster. They may not be overridden.", -} - -func (DNS) SwaggerDoc() map[string]string { - return map_DNS -} - -var map_DNSList = map[string]string{ - "": "Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", -} - -func (DNSList) SwaggerDoc() map[string]string { - return map_DNSList -} - -var map_DNSSpec = map[string]string{ - "baseDomain": "baseDomain is the base domain of the cluster. All managed DNS records will be sub-domains of this base.\n\nFor example, given the base domain `openshift.example.com`, an API server DNS record may be created for `cluster-api.openshift.example.com`.\n\nOnce set, this field cannot be changed.", - "publicZone": "publicZone is the location where all the DNS records that are publicly accessible to the internet exist.\n\nIf this field is nil, no public records should be created.\n\nOnce set, this field cannot be changed.", - "privateZone": "privateZone is the location where all the DNS records that are only available internally to the cluster exist.\n\nIf this field is nil, no private records should be created.\n\nOnce set, this field cannot be changed.", -} - -func (DNSSpec) SwaggerDoc() map[string]string { - return map_DNSSpec -} - -var map_DNSZone = map[string]string{ - "": "DNSZone is used to define a DNS hosted zone. A zone can be identified by an ID or tags.", - "id": "id is the identifier that can be used to find the DNS hosted zone.\n\non AWS zone can be fetched using `ID` as id in [1] on Azure zone can be fetched using `ID` as a pre-determined name in [2], on GCP zone can be fetched using `ID` as a pre-determined name in [3].\n\n[1]: https://docs.aws.amazon.com/cli/latest/reference/route53/get-hosted-zone.html#options [2]: https://docs.microsoft.com/en-us/cli/azure/network/dns/zone?view=azure-cli-latest#az-network-dns-zone-show [3]: https://cloud.google.com/dns/docs/reference/v1/managedZones/get", - "tags": "tags can be used to query the DNS hosted zone.\n\non AWS, resourcegroupstaggingapi [1] can be used to fetch a zone using `Tags` as tag-filters,\n\n[1]: https://docs.aws.amazon.com/cli/latest/reference/resourcegroupstaggingapi/get-resources.html#options", -} - -func (DNSZone) SwaggerDoc() map[string]string { - return map_DNSZone -} - -var map_CustomFeatureGates = map[string]string{ - "enabled": "enabled is a list of all feature gates that you want to force on", - "disabled": "disabled is a list of all feature gates that you want to force off", -} - -func (CustomFeatureGates) SwaggerDoc() map[string]string { - return map_CustomFeatureGates -} - -var map_FeatureGate = map[string]string{ - "": "Feature holds cluster-wide information about feature gates. The canonical name is `cluster`\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "spec": "spec holds user settable values for configuration", - "status": "status holds observed values from the cluster. They may not be overridden.", -} - -func (FeatureGate) SwaggerDoc() map[string]string { - return map_FeatureGate -} - -var map_FeatureGateAttributes = map[string]string{ - "name": "name is the name of the FeatureGate.", -} - -func (FeatureGateAttributes) SwaggerDoc() map[string]string { - return map_FeatureGateAttributes -} - -var map_FeatureGateDetails = map[string]string{ - "version": "version matches the version provided by the ClusterVersion and in the ClusterOperator.Status.Versions field.", - "enabled": "enabled is a list of all feature gates that are enabled in the cluster for the named version.", - "disabled": "disabled is a list of all feature gates that are disabled in the cluster for the named version.", -} - -func (FeatureGateDetails) SwaggerDoc() map[string]string { - return map_FeatureGateDetails -} - -var map_FeatureGateList = map[string]string{ - "": "Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", -} - -func (FeatureGateList) SwaggerDoc() map[string]string { - return map_FeatureGateList -} - -var map_FeatureGateSelection = map[string]string{ - "featureSet": "featureSet changes the list of features in the cluster. The default is empty. Be very careful adjusting this setting. Turning on or off features may cause irreversible changes in your cluster which cannot be undone.", - "customNoUpgrade": "customNoUpgrade allows the enabling or disabling of any feature. Turning this feature set on IS NOT SUPPORTED, CANNOT BE UNDONE, and PREVENTS UPGRADES. Because of its nature, this setting cannot be validated. If you have any typos or accidentally apply invalid combinations your cluster may fail in an unrecoverable way. featureSet must equal \"CustomNoUpgrade\" must be set to use this field.", -} - -func (FeatureGateSelection) SwaggerDoc() map[string]string { - return map_FeatureGateSelection -} - -var map_FeatureGateStatus = map[string]string{ - "conditions": "conditions represent the observations of the current state. Known .status.conditions.type are: \"DeterminationDegraded\"", - "featureGates": "featureGates contains a list of enabled and disabled featureGates that are keyed by payloadVersion. Operators other than the CVO and cluster-config-operator, must read the .status.featureGates, locate the version they are managing, find the enabled/disabled featuregates and make the operand and operator match. The enabled/disabled values for a particular version may change during the life of the cluster as various .spec.featureSet values are selected. Operators may choose to restart their processes to pick up these changes, but remembering past enable/disable lists is beyond the scope of this API and is the responsibility of individual operators. Only featureGates with .version in the ClusterVersion.status will be present in this list.", -} - -func (FeatureGateStatus) SwaggerDoc() map[string]string { - return map_FeatureGateStatus -} - -var map_Image = map[string]string{ - "": "Image governs policies related to imagestream imports and runtime configuration for external registries. It allows cluster admins to configure which registries OpenShift is allowed to import images from, extra CA trust bundles for external registries, and policies to block or allow registry hostnames. When exposing OpenShift's image registry to the public, this also lets cluster admins specify the external hostname.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "spec": "spec holds user settable values for configuration", - "status": "status holds observed values from the cluster. They may not be overridden.", -} - -func (Image) SwaggerDoc() map[string]string { - return map_Image -} - -var map_ImageList = map[string]string{ - "": "Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", -} - -func (ImageList) SwaggerDoc() map[string]string { - return map_ImageList -} - -var map_ImageSpec = map[string]string{ - "allowedRegistriesForImport": "allowedRegistriesForImport limits the container image registries that normal users may import images from. Set this list to the registries that you trust to contain valid Docker images and that you want applications to be able to import from. Users with permission to create Images or ImageStreamMappings via the API are not affected by this policy - typically only administrators or system integrations will have those permissions.", - "externalRegistryHostnames": "externalRegistryHostnames provides the hostnames for the default external image registry. The external hostname should be set only when the image registry is exposed externally. The first value is used in 'publicDockerImageRepository' field in ImageStreams. The value must be in \"hostname[:port]\" format.", - "additionalTrustedCA": "additionalTrustedCA is a reference to a ConfigMap containing additional CAs that should be trusted during imagestream import, pod image pull, build image pull, and imageregistry pullthrough. The namespace for this config map is openshift-config.", - "registrySources": "registrySources contains configuration that determines how the container runtime should treat individual registries when accessing images for builds+pods. (e.g. whether or not to allow insecure access). It does not contain configuration for the internal cluster registry.", -} - -func (ImageSpec) SwaggerDoc() map[string]string { - return map_ImageSpec -} - -var map_ImageStatus = map[string]string{ - "internalRegistryHostname": "internalRegistryHostname sets the hostname for the default internal image registry. The value must be in \"hostname[:port]\" format. This value is set by the image registry operator which controls the internal registry hostname. For backward compatibility, users can still use OPENSHIFT_DEFAULT_REGISTRY environment variable but this setting overrides the environment variable.", - "externalRegistryHostnames": "externalRegistryHostnames provides the hostnames for the default external image registry. The external hostname should be set only when the image registry is exposed externally. The first value is used in 'publicDockerImageRepository' field in ImageStreams. The value must be in \"hostname[:port]\" format.", -} - -func (ImageStatus) SwaggerDoc() map[string]string { - return map_ImageStatus -} - -var map_RegistryLocation = map[string]string{ - "": "RegistryLocation contains a location of the registry specified by the registry domain name. The domain name might include wildcards, like '*' or '??'.", - "domainName": "domainName specifies a domain name for the registry In case the registry use non-standard (80 or 443) port, the port should be included in the domain name as well.", - "insecure": "insecure indicates whether the registry is secure (https) or insecure (http) By default (if not specified) the registry is assumed as secure.", -} - -func (RegistryLocation) SwaggerDoc() map[string]string { - return map_RegistryLocation -} - -var map_RegistrySources = map[string]string{ - "": "RegistrySources holds cluster-wide information about how to handle the registries config.", - "insecureRegistries": "insecureRegistries are registries which do not have a valid TLS certificates or only support HTTP connections.", - "blockedRegistries": "blockedRegistries cannot be used for image pull and push actions. All other registries are permitted.\n\nOnly one of BlockedRegistries or AllowedRegistries may be set.", - "allowedRegistries": "allowedRegistries are the only registries permitted for image pull and push actions. All other registries are denied.\n\nOnly one of BlockedRegistries or AllowedRegistries may be set.", - "containerRuntimeSearchRegistries": "containerRuntimeSearchRegistries are registries that will be searched when pulling images that do not have fully qualified domains in their pull specs. Registries will be searched in the order provided in the list. Note: this search list only works with the container runtime, i.e CRI-O. Will NOT work with builds or imagestream imports.", -} - -func (RegistrySources) SwaggerDoc() map[string]string { - return map_RegistrySources -} - -var map_ImageContentPolicy = map[string]string{ - "": "ImageContentPolicy holds cluster-wide information about how to handle registry mirror rules. When multiple policies are defined, the outcome of the behavior is defined on each field.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "spec": "spec holds user settable values for configuration", -} - -func (ImageContentPolicy) SwaggerDoc() map[string]string { - return map_ImageContentPolicy -} - -var map_ImageContentPolicyList = map[string]string{ - "": "ImageContentPolicyList lists the items in the ImageContentPolicy CRD.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", -} - -func (ImageContentPolicyList) SwaggerDoc() map[string]string { - return map_ImageContentPolicyList -} - -var map_ImageContentPolicySpec = map[string]string{ - "": "ImageContentPolicySpec is the specification of the ImageContentPolicy CRD.", - "repositoryDigestMirrors": "repositoryDigestMirrors allows images referenced by image digests in pods to be pulled from alternative mirrored repository locations. The image pull specification provided to the pod will be compared to the source locations described in RepositoryDigestMirrors and the image may be pulled down from any of the mirrors in the list instead of the specified repository allowing administrators to choose a potentially faster mirror. To pull image from mirrors by tags, should set the \"allowMirrorByTags\".\n\nEach “source” repository is treated independently; configurations for different “source” repositories don’t interact.\n\nIf the \"mirrors\" is not specified, the image will continue to be pulled from the specified repository in the pull spec.\n\nWhen multiple policies are defined for the same “source” repository, the sets of defined mirrors will be merged together, preserving the relative order of the mirrors, if possible. For example, if policy A has mirrors `a, b, c` and policy B has mirrors `c, d, e`, the mirrors will be used in the order `a, b, c, d, e`. If the orders of mirror entries conflict (e.g. `a, b` vs. `b, a`) the configuration is not rejected but the resulting order is unspecified.", -} - -func (ImageContentPolicySpec) SwaggerDoc() map[string]string { - return map_ImageContentPolicySpec -} - -var map_RepositoryDigestMirrors = map[string]string{ - "": "RepositoryDigestMirrors holds cluster-wide information about how to handle mirrors in the registries config.", - "source": "source is the repository that users refer to, e.g. in image pull specifications.", - "allowMirrorByTags": "allowMirrorByTags if true, the mirrors can be used to pull the images that are referenced by their tags. Default is false, the mirrors only work when pulling the images that are referenced by their digests. Pulling images by tag can potentially yield different images, depending on which endpoint we pull from. Forcing digest-pulls for mirrors avoids that issue.", - "mirrors": "mirrors is zero or more repositories that may also contain the same images. If the \"mirrors\" is not specified, the image will continue to be pulled from the specified repository in the pull spec. No mirror will be configured. The order of mirrors in this list is treated as the user's desired priority, while source is by default considered lower priority than all mirrors. Other cluster configuration, including (but not limited to) other repositoryDigestMirrors objects, may impact the exact order mirrors are contacted in, or some mirrors may be contacted in parallel, so this should be considered a preference rather than a guarantee of ordering.", -} - -func (RepositoryDigestMirrors) SwaggerDoc() map[string]string { - return map_RepositoryDigestMirrors -} - -var map_ImageDigestMirrorSet = map[string]string{ - "": "ImageDigestMirrorSet holds cluster-wide information about how to handle registry mirror rules on using digest pull specification. When multiple policies are defined, the outcome of the behavior is defined on each field.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "spec": "spec holds user settable values for configuration", - "status": "status contains the observed state of the resource.", -} - -func (ImageDigestMirrorSet) SwaggerDoc() map[string]string { - return map_ImageDigestMirrorSet -} - -var map_ImageDigestMirrorSetList = map[string]string{ - "": "ImageDigestMirrorSetList lists the items in the ImageDigestMirrorSet CRD.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", -} - -func (ImageDigestMirrorSetList) SwaggerDoc() map[string]string { - return map_ImageDigestMirrorSetList -} - -var map_ImageDigestMirrorSetSpec = map[string]string{ - "": "ImageDigestMirrorSetSpec is the specification of the ImageDigestMirrorSet CRD.", - "imageDigestMirrors": "imageDigestMirrors allows images referenced by image digests in pods to be pulled from alternative mirrored repository locations. The image pull specification provided to the pod will be compared to the source locations described in imageDigestMirrors and the image may be pulled down from any of the mirrors in the list instead of the specified repository allowing administrators to choose a potentially faster mirror. To use mirrors to pull images using tag specification, users should configure a list of mirrors using \"ImageTagMirrorSet\" CRD.\n\nIf the image pull specification matches the repository of \"source\" in multiple imagedigestmirrorset objects, only the objects which define the most specific namespace match will be used. For example, if there are objects using quay.io/libpod and quay.io/libpod/busybox as the \"source\", only the objects using quay.io/libpod/busybox are going to apply for pull specification quay.io/libpod/busybox. Each “source” repository is treated independently; configurations for different “source” repositories don’t interact.\n\nIf the \"mirrors\" is not specified, the image will continue to be pulled from the specified repository in the pull spec.\n\nWhen multiple policies are defined for the same “source” repository, the sets of defined mirrors will be merged together, preserving the relative order of the mirrors, if possible. For example, if policy A has mirrors `a, b, c` and policy B has mirrors `c, d, e`, the mirrors will be used in the order `a, b, c, d, e`. If the orders of mirror entries conflict (e.g. `a, b` vs. `b, a`) the configuration is not rejected but the resulting order is unspecified. Users who want to use a specific order of mirrors, should configure them into one list of mirrors using the expected order.", -} - -func (ImageDigestMirrorSetSpec) SwaggerDoc() map[string]string { - return map_ImageDigestMirrorSetSpec -} - -var map_ImageDigestMirrors = map[string]string{ - "": "ImageDigestMirrors holds cluster-wide information about how to handle mirrors in the registries config.", - "source": "source matches the repository that users refer to, e.g. in image pull specifications. Setting source to a registry hostname e.g. docker.io. quay.io, or registry.redhat.io, will match the image pull specification of corressponding registry. \"source\" uses one of the following formats: host[:port] host[:port]/namespace[/namespace…] host[:port]/namespace[/namespace…]/repo [*.]host for more information about the format, see the document about the location field: https://github.com/containers/image/blob/main/docs/containers-registries.conf.5.md#choosing-a-registry-toml-table", - "mirrors": "mirrors is zero or more locations that may also contain the same images. No mirror will be configured if not specified. Images can be pulled from these mirrors only if they are referenced by their digests. The mirrored location is obtained by replacing the part of the input reference that matches source by the mirrors entry, e.g. for registry.redhat.io/product/repo reference, a (source, mirror) pair *.redhat.io, mirror.local/redhat causes a mirror.local/redhat/product/repo repository to be used. The order of mirrors in this list is treated as the user's desired priority, while source is by default considered lower priority than all mirrors. If no mirror is specified or all image pulls from the mirror list fail, the image will continue to be pulled from the repository in the pull spec unless explicitly prohibited by \"mirrorSourcePolicy\" Other cluster configuration, including (but not limited to) other imageDigestMirrors objects, may impact the exact order mirrors are contacted in, or some mirrors may be contacted in parallel, so this should be considered a preference rather than a guarantee of ordering. \"mirrors\" uses one of the following formats: host[:port] host[:port]/namespace[/namespace…] host[:port]/namespace[/namespace…]/repo for more information about the format, see the document about the location field: https://github.com/containers/image/blob/main/docs/containers-registries.conf.5.md#choosing-a-registry-toml-table", - "mirrorSourcePolicy": "mirrorSourcePolicy defines the fallback policy if fails to pull image from the mirrors. If unset, the image will continue to be pulled from the the repository in the pull spec. sourcePolicy is valid configuration only when one or more mirrors are in the mirror list.", -} - -func (ImageDigestMirrors) SwaggerDoc() map[string]string { - return map_ImageDigestMirrors -} - -var map_ImageTagMirrorSet = map[string]string{ - "": "ImageTagMirrorSet holds cluster-wide information about how to handle registry mirror rules on using tag pull specification. When multiple policies are defined, the outcome of the behavior is defined on each field.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "spec": "spec holds user settable values for configuration", - "status": "status contains the observed state of the resource.", -} - -func (ImageTagMirrorSet) SwaggerDoc() map[string]string { - return map_ImageTagMirrorSet -} - -var map_ImageTagMirrorSetList = map[string]string{ - "": "ImageTagMirrorSetList lists the items in the ImageTagMirrorSet CRD.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", -} - -func (ImageTagMirrorSetList) SwaggerDoc() map[string]string { - return map_ImageTagMirrorSetList -} - -var map_ImageTagMirrorSetSpec = map[string]string{ - "": "ImageTagMirrorSetSpec is the specification of the ImageTagMirrorSet CRD.", - "imageTagMirrors": "imageTagMirrors allows images referenced by image tags in pods to be pulled from alternative mirrored repository locations. The image pull specification provided to the pod will be compared to the source locations described in imageTagMirrors and the image may be pulled down from any of the mirrors in the list instead of the specified repository allowing administrators to choose a potentially faster mirror. To use mirrors to pull images using digest specification only, users should configure a list of mirrors using \"ImageDigestMirrorSet\" CRD.\n\nIf the image pull specification matches the repository of \"source\" in multiple imagetagmirrorset objects, only the objects which define the most specific namespace match will be used. For example, if there are objects using quay.io/libpod and quay.io/libpod/busybox as the \"source\", only the objects using quay.io/libpod/busybox are going to apply for pull specification quay.io/libpod/busybox. Each “source” repository is treated independently; configurations for different “source” repositories don’t interact.\n\nIf the \"mirrors\" is not specified, the image will continue to be pulled from the specified repository in the pull spec.\n\nWhen multiple policies are defined for the same “source” repository, the sets of defined mirrors will be merged together, preserving the relative order of the mirrors, if possible. For example, if policy A has mirrors `a, b, c` and policy B has mirrors `c, d, e`, the mirrors will be used in the order `a, b, c, d, e`. If the orders of mirror entries conflict (e.g. `a, b` vs. `b, a`) the configuration is not rejected but the resulting order is unspecified. Users who want to use a deterministic order of mirrors, should configure them into one list of mirrors using the expected order.", -} - -func (ImageTagMirrorSetSpec) SwaggerDoc() map[string]string { - return map_ImageTagMirrorSetSpec -} - -var map_ImageTagMirrors = map[string]string{ - "": "ImageTagMirrors holds cluster-wide information about how to handle mirrors in the registries config.", - "source": "source matches the repository that users refer to, e.g. in image pull specifications. Setting source to a registry hostname e.g. docker.io. quay.io, or registry.redhat.io, will match the image pull specification of corressponding registry. \"source\" uses one of the following formats: host[:port] host[:port]/namespace[/namespace…] host[:port]/namespace[/namespace…]/repo [*.]host for more information about the format, see the document about the location field: https://github.com/containers/image/blob/main/docs/containers-registries.conf.5.md#choosing-a-registry-toml-table", - "mirrors": "mirrors is zero or more locations that may also contain the same images. No mirror will be configured if not specified. Images can be pulled from these mirrors only if they are referenced by their tags. The mirrored location is obtained by replacing the part of the input reference that matches source by the mirrors entry, e.g. for registry.redhat.io/product/repo reference, a (source, mirror) pair *.redhat.io, mirror.local/redhat causes a mirror.local/redhat/product/repo repository to be used. Pulling images by tag can potentially yield different images, depending on which endpoint we pull from. Configuring a list of mirrors using \"ImageDigestMirrorSet\" CRD and forcing digest-pulls for mirrors avoids that issue. The order of mirrors in this list is treated as the user's desired priority, while source is by default considered lower priority than all mirrors. If no mirror is specified or all image pulls from the mirror list fail, the image will continue to be pulled from the repository in the pull spec unless explicitly prohibited by \"mirrorSourcePolicy\". Other cluster configuration, including (but not limited to) other imageTagMirrors objects, may impact the exact order mirrors are contacted in, or some mirrors may be contacted in parallel, so this should be considered a preference rather than a guarantee of ordering. \"mirrors\" uses one of the following formats: host[:port] host[:port]/namespace[/namespace…] host[:port]/namespace[/namespace…]/repo for more information about the format, see the document about the location field: https://github.com/containers/image/blob/main/docs/containers-registries.conf.5.md#choosing-a-registry-toml-table", - "mirrorSourcePolicy": "mirrorSourcePolicy defines the fallback policy if fails to pull image from the mirrors. If unset, the image will continue to be pulled from the repository in the pull spec. sourcePolicy is valid configuration only when one or more mirrors are in the mirror list.", -} - -func (ImageTagMirrors) SwaggerDoc() map[string]string { - return map_ImageTagMirrors -} - -var map_AWSPlatformSpec = map[string]string{ - "": "AWSPlatformSpec holds the desired state of the Amazon Web Services infrastructure provider. This only includes fields that can be modified in the cluster.", - "serviceEndpoints": "serviceEndpoints list contains custom endpoints which will override default service endpoint of AWS Services. There must be only one ServiceEndpoint for a service.", -} - -func (AWSPlatformSpec) SwaggerDoc() map[string]string { - return map_AWSPlatformSpec -} - -var map_AWSPlatformStatus = map[string]string{ - "": "AWSPlatformStatus holds the current status of the Amazon Web Services infrastructure provider.", - "region": "region holds the default AWS region for new AWS resources created by the cluster.", - "serviceEndpoints": "ServiceEndpoints list contains custom endpoints which will override default service endpoint of AWS Services. There must be only one ServiceEndpoint for a service.", - "resourceTags": "resourceTags is a list of additional tags to apply to AWS resources created for the cluster. See https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html for information on tagging AWS resources. AWS supports a maximum of 50 tags per resource. OpenShift reserves 25 tags for its use, leaving 25 tags available for the user.", -} - -func (AWSPlatformStatus) SwaggerDoc() map[string]string { - return map_AWSPlatformStatus -} - -var map_AWSResourceTag = map[string]string{ - "": "AWSResourceTag is a tag to apply to AWS resources created for the cluster.", - "key": "key is the key of the tag", - "value": "value is the value of the tag. Some AWS service do not support empty values. Since tags are added to resources in many services, the length of the tag value must meet the requirements of all services.", -} - -func (AWSResourceTag) SwaggerDoc() map[string]string { - return map_AWSResourceTag -} - -var map_AWSServiceEndpoint = map[string]string{ - "": "AWSServiceEndpoint store the configuration of a custom url to override existing defaults of AWS Services.", - "name": "name is the name of the AWS service. The list of all the service names can be found at https://docs.aws.amazon.com/general/latest/gr/aws-service-information.html This must be provided and cannot be empty.", - "url": "url is fully qualified URI with scheme https, that overrides the default generated endpoint for a client. This must be provided and cannot be empty.", -} - -func (AWSServiceEndpoint) SwaggerDoc() map[string]string { - return map_AWSServiceEndpoint -} - -var map_AlibabaCloudPlatformSpec = map[string]string{ - "": "AlibabaCloudPlatformSpec holds the desired state of the Alibaba Cloud infrastructure provider. This only includes fields that can be modified in the cluster.", -} - -func (AlibabaCloudPlatformSpec) SwaggerDoc() map[string]string { - return map_AlibabaCloudPlatformSpec -} - -var map_AlibabaCloudPlatformStatus = map[string]string{ - "": "AlibabaCloudPlatformStatus holds the current status of the Alibaba Cloud infrastructure provider.", - "region": "region specifies the region for Alibaba Cloud resources created for the cluster.", - "resourceGroupID": "resourceGroupID is the ID of the resource group for the cluster.", - "resourceTags": "resourceTags is a list of additional tags to apply to Alibaba Cloud resources created for the cluster.", -} - -func (AlibabaCloudPlatformStatus) SwaggerDoc() map[string]string { - return map_AlibabaCloudPlatformStatus -} - -var map_AlibabaCloudResourceTag = map[string]string{ - "": "AlibabaCloudResourceTag is the set of tags to add to apply to resources.", - "key": "key is the key of the tag.", - "value": "value is the value of the tag.", -} - -func (AlibabaCloudResourceTag) SwaggerDoc() map[string]string { - return map_AlibabaCloudResourceTag -} - -var map_AzurePlatformSpec = map[string]string{ - "": "AzurePlatformSpec holds the desired state of the Azure infrastructure provider. This only includes fields that can be modified in the cluster.", -} - -func (AzurePlatformSpec) SwaggerDoc() map[string]string { - return map_AzurePlatformSpec -} - -var map_AzurePlatformStatus = map[string]string{ - "": "AzurePlatformStatus holds the current status of the Azure infrastructure provider.", - "resourceGroupName": "resourceGroupName is the Resource Group for new Azure resources created for the cluster.", - "networkResourceGroupName": "networkResourceGroupName is the Resource Group for network resources like the Virtual Network and Subnets used by the cluster. If empty, the value is same as ResourceGroupName.", - "cloudName": "cloudName is the name of the Azure cloud environment which can be used to configure the Azure SDK with the appropriate Azure API endpoints. If empty, the value is equal to `AzurePublicCloud`.", - "armEndpoint": "armEndpoint specifies a URL to use for resource management in non-soverign clouds such as Azure Stack.", - "resourceTags": "resourceTags is a list of additional tags to apply to Azure resources created for the cluster. See https://docs.microsoft.com/en-us/rest/api/resources/tags for information on tagging Azure resources. Due to limitations on Automation, Content Delivery Network, DNS Azure resources, a maximum of 15 tags may be applied. OpenShift reserves 5 tags for internal use, allowing 10 tags for user configuration.", -} - -func (AzurePlatformStatus) SwaggerDoc() map[string]string { - return map_AzurePlatformStatus -} - -var map_AzureResourceTag = map[string]string{ - "": "AzureResourceTag is a tag to apply to Azure resources created for the cluster.", - "key": "key is the key part of the tag. A tag key can have a maximum of 128 characters and cannot be empty. Key must begin with a letter, end with a letter, number or underscore, and must contain only alphanumeric characters and the following special characters `_ . -`.", - "value": "value is the value part of the tag. A tag value can have a maximum of 256 characters and cannot be empty. Value must contain only alphanumeric characters and the following special characters `_ + , - . / : ; < = > ? @`.", -} - -func (AzureResourceTag) SwaggerDoc() map[string]string { - return map_AzureResourceTag -} - -var map_BareMetalPlatformLoadBalancer = map[string]string{ - "": "BareMetalPlatformLoadBalancer defines the load balancer used by the cluster on BareMetal platform.", - "type": "type defines the type of load balancer used by the cluster on BareMetal platform which can be a user-managed or openshift-managed load balancer that is to be used for the OpenShift API and Ingress endpoints. When set to OpenShiftManagedDefault the static pods in charge of API and Ingress traffic load-balancing defined in the machine config operator will be deployed. When set to UserManaged these static pods will not be deployed and it is expected that the load balancer is configured out of band by the deployer. When omitted, this means no opinion and the platform is left to choose a reasonable default. The default value is OpenShiftManagedDefault.", -} - -func (BareMetalPlatformLoadBalancer) SwaggerDoc() map[string]string { - return map_BareMetalPlatformLoadBalancer -} - -var map_BareMetalPlatformSpec = map[string]string{ - "": "BareMetalPlatformSpec holds the desired state of the BareMetal infrastructure provider. This only includes fields that can be modified in the cluster.", -} - -func (BareMetalPlatformSpec) SwaggerDoc() map[string]string { - return map_BareMetalPlatformSpec -} - -var map_BareMetalPlatformStatus = map[string]string{ - "": "BareMetalPlatformStatus holds the current status of the BareMetal infrastructure provider. For more information about the network architecture used with the BareMetal platform type, see: https://github.com/openshift/installer/blob/master/docs/design/baremetal/networking-infrastructure.md", - "apiServerInternalIP": "apiServerInternalIP is an IP address to contact the Kubernetes API server that can be used by components inside the cluster, like kubelets using the infrastructure rather than Kubernetes networking. It is the IP that the Infrastructure.status.apiServerInternalURI points to. It is the IP for a self-hosted load balancer in front of the API servers.\n\nDeprecated: Use APIServerInternalIPs instead.", - "apiServerInternalIPs": "apiServerInternalIPs are the IP addresses to contact the Kubernetes API server that can be used by components inside the cluster, like kubelets using the infrastructure rather than Kubernetes networking. These are the IPs for a self-hosted load balancer in front of the API servers. In dual stack clusters this list contains two IPs otherwise only one.", - "ingressIP": "ingressIP is an external IP which routes to the default ingress controller. The IP is a suitable target of a wildcard DNS record used to resolve default route host names.\n\nDeprecated: Use IngressIPs instead.", - "ingressIPs": "ingressIPs are the external IPs which route to the default ingress controller. The IPs are suitable targets of a wildcard DNS record used to resolve default route host names. In dual stack clusters this list contains two IPs otherwise only one.", - "nodeDNSIP": "nodeDNSIP is the IP address for the internal DNS used by the nodes. Unlike the one managed by the DNS operator, `NodeDNSIP` provides name resolution for the nodes themselves. There is no DNS-as-a-service for BareMetal deployments. In order to minimize necessary changes to the datacenter DNS, a DNS service is hosted as a static pod to serve those hostnames to the nodes in the cluster.", - "loadBalancer": "loadBalancer defines how the load balancer used by the cluster is configured.", -} - -func (BareMetalPlatformStatus) SwaggerDoc() map[string]string { - return map_BareMetalPlatformStatus -} - -var map_EquinixMetalPlatformSpec = map[string]string{ - "": "EquinixMetalPlatformSpec holds the desired state of the Equinix Metal infrastructure provider. This only includes fields that can be modified in the cluster.", -} - -func (EquinixMetalPlatformSpec) SwaggerDoc() map[string]string { - return map_EquinixMetalPlatformSpec -} - -var map_EquinixMetalPlatformStatus = map[string]string{ - "": "EquinixMetalPlatformStatus holds the current status of the Equinix Metal infrastructure provider.", - "apiServerInternalIP": "apiServerInternalIP is an IP address to contact the Kubernetes API server that can be used by components inside the cluster, like kubelets using the infrastructure rather than Kubernetes networking. It is the IP that the Infrastructure.status.apiServerInternalURI points to. It is the IP for a self-hosted load balancer in front of the API servers.", - "ingressIP": "ingressIP is an external IP which routes to the default ingress controller. The IP is a suitable target of a wildcard DNS record used to resolve default route host names.", -} - -func (EquinixMetalPlatformStatus) SwaggerDoc() map[string]string { - return map_EquinixMetalPlatformStatus -} - -var map_ExternalPlatformSpec = map[string]string{ - "": "ExternalPlatformSpec holds the desired state for the generic External infrastructure provider.", - "platformName": "PlatformName holds the arbitrary string representing the infrastructure provider name, expected to be set at the installation time. This field is solely for informational and reporting purposes and is not expected to be used for decision-making.", -} - -func (ExternalPlatformSpec) SwaggerDoc() map[string]string { - return map_ExternalPlatformSpec -} - -var map_ExternalPlatformStatus = map[string]string{ - "": "ExternalPlatformStatus holds the current status of the generic External infrastructure provider.", -} - -func (ExternalPlatformStatus) SwaggerDoc() map[string]string { - return map_ExternalPlatformStatus -} - -var map_GCPPlatformSpec = map[string]string{ - "": "GCPPlatformSpec holds the desired state of the Google Cloud Platform infrastructure provider. This only includes fields that can be modified in the cluster.", -} - -func (GCPPlatformSpec) SwaggerDoc() map[string]string { - return map_GCPPlatformSpec -} - -var map_GCPPlatformStatus = map[string]string{ - "": "GCPPlatformStatus holds the current status of the Google Cloud Platform infrastructure provider.", - "projectID": "resourceGroupName is the Project ID for new GCP resources created for the cluster.", - "region": "region holds the region for new GCP resources created for the cluster.", -} - -func (GCPPlatformStatus) SwaggerDoc() map[string]string { - return map_GCPPlatformStatus -} - -var map_IBMCloudPlatformSpec = map[string]string{ - "": "IBMCloudPlatformSpec holds the desired state of the IBMCloud infrastructure provider. This only includes fields that can be modified in the cluster.", -} - -func (IBMCloudPlatformSpec) SwaggerDoc() map[string]string { - return map_IBMCloudPlatformSpec -} - -var map_IBMCloudPlatformStatus = map[string]string{ - "": "IBMCloudPlatformStatus holds the current status of the IBMCloud infrastructure provider.", - "location": "Location is where the cluster has been deployed", - "resourceGroupName": "ResourceGroupName is the Resource Group for new IBMCloud resources created for the cluster.", - "providerType": "ProviderType indicates the type of cluster that was created", - "cisInstanceCRN": "CISInstanceCRN is the CRN of the Cloud Internet Services instance managing the DNS zone for the cluster's base domain", - "dnsInstanceCRN": "DNSInstanceCRN is the CRN of the DNS Services instance managing the DNS zone for the cluster's base domain", -} - -func (IBMCloudPlatformStatus) SwaggerDoc() map[string]string { - return map_IBMCloudPlatformStatus -} - -var map_Infrastructure = map[string]string{ - "": "Infrastructure holds cluster-wide information about Infrastructure. The canonical name is `cluster`\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "spec": "spec holds user settable values for configuration", - "status": "status holds observed values from the cluster. They may not be overridden.", -} - -func (Infrastructure) SwaggerDoc() map[string]string { - return map_Infrastructure -} - -var map_InfrastructureList = map[string]string{ - "": "InfrastructureList is\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", -} - -func (InfrastructureList) SwaggerDoc() map[string]string { - return map_InfrastructureList -} - -var map_InfrastructureSpec = map[string]string{ - "": "InfrastructureSpec contains settings that apply to the cluster infrastructure.", - "cloudConfig": "cloudConfig is a reference to a ConfigMap containing the cloud provider configuration file. This configuration file is used to configure the Kubernetes cloud provider integration when using the built-in cloud provider integration or the external cloud controller manager. The namespace for this config map is openshift-config.\n\ncloudConfig should only be consumed by the kube_cloud_config controller. The controller is responsible for using the user configuration in the spec for various platforms and combining that with the user provided ConfigMap in this field to create a stitched kube cloud config. The controller generates a ConfigMap `kube-cloud-config` in `openshift-config-managed` namespace with the kube cloud config is stored in `cloud.conf` key. All the clients are expected to use the generated ConfigMap only.", - "platformSpec": "platformSpec holds desired information specific to the underlying infrastructure provider.", -} - -func (InfrastructureSpec) SwaggerDoc() map[string]string { - return map_InfrastructureSpec -} - -var map_InfrastructureStatus = map[string]string{ - "": "InfrastructureStatus describes the infrastructure the cluster is leveraging.", - "infrastructureName": "infrastructureName uniquely identifies a cluster with a human friendly name. Once set it should not be changed. Must be of max length 27 and must have only alphanumeric or hyphen characters.", - "platform": "platform is the underlying infrastructure provider for the cluster.\n\nDeprecated: Use platformStatus.type instead.", - "platformStatus": "platformStatus holds status information specific to the underlying infrastructure provider.", - "etcdDiscoveryDomain": "etcdDiscoveryDomain is the domain used to fetch the SRV records for discovering etcd servers and clients. For more info: https://github.com/etcd-io/etcd/blob/329be66e8b3f9e2e6af83c123ff89297e49ebd15/Documentation/op-guide/clustering.md#dns-discovery deprecated: as of 4.7, this field is no longer set or honored. It will be removed in a future release.", - "apiServerURL": "apiServerURL is a valid URI with scheme 'https', address and optionally a port (defaulting to 443). apiServerURL can be used by components like the web console to tell users where to find the Kubernetes API.", - "apiServerInternalURI": "apiServerInternalURL is a valid URI with scheme 'https', address and optionally a port (defaulting to 443). apiServerInternalURL can be used by components like kubelets, to contact the Kubernetes API server using the infrastructure provider rather than Kubernetes networking.", - "controlPlaneTopology": "controlPlaneTopology expresses the expectations for operands that normally run on control nodes. The default is 'HighlyAvailable', which represents the behavior operators have in a \"normal\" cluster. The 'SingleReplica' mode will be used in single-node deployments and the operators should not configure the operand for highly-available operation The 'External' mode indicates that the control plane is hosted externally to the cluster and that its components are not visible within the cluster.", - "infrastructureTopology": "infrastructureTopology expresses the expectations for infrastructure services that do not run on control plane nodes, usually indicated by a node selector for a `role` value other than `master`. The default is 'HighlyAvailable', which represents the behavior operators have in a \"normal\" cluster. The 'SingleReplica' mode will be used in single-node deployments and the operators should not configure the operand for highly-available operation NOTE: External topology mode is not applicable for this field.", - "cpuPartitioning": "cpuPartitioning expresses if CPU partitioning is a currently enabled feature in the cluster. CPU Partitioning means that this cluster can support partitioning workloads to specific CPU Sets. Valid values are \"None\" and \"AllNodes\". When omitted, the default value is \"None\". The default value of \"None\" indicates that no nodes will be setup with CPU partitioning. The \"AllNodes\" value indicates that all nodes have been setup with CPU partitioning, and can then be further configured via the PerformanceProfile API.", -} - -func (InfrastructureStatus) SwaggerDoc() map[string]string { - return map_InfrastructureStatus -} - -var map_KubevirtPlatformSpec = map[string]string{ - "": "KubevirtPlatformSpec holds the desired state of the kubevirt infrastructure provider. This only includes fields that can be modified in the cluster.", -} - -func (KubevirtPlatformSpec) SwaggerDoc() map[string]string { - return map_KubevirtPlatformSpec -} - -var map_KubevirtPlatformStatus = map[string]string{ - "": "KubevirtPlatformStatus holds the current status of the kubevirt infrastructure provider.", - "apiServerInternalIP": "apiServerInternalIP is an IP address to contact the Kubernetes API server that can be used by components inside the cluster, like kubelets using the infrastructure rather than Kubernetes networking. It is the IP that the Infrastructure.status.apiServerInternalURI points to. It is the IP for a self-hosted load balancer in front of the API servers.", - "ingressIP": "ingressIP is an external IP which routes to the default ingress controller. The IP is a suitable target of a wildcard DNS record used to resolve default route host names.", -} - -func (KubevirtPlatformStatus) SwaggerDoc() map[string]string { - return map_KubevirtPlatformStatus -} - -var map_NutanixPlatformLoadBalancer = map[string]string{ - "": "NutanixPlatformLoadBalancer defines the load balancer used by the cluster on Nutanix platform.", - "type": "type defines the type of load balancer used by the cluster on Nutanix platform which can be a user-managed or openshift-managed load balancer that is to be used for the OpenShift API and Ingress endpoints. When set to OpenShiftManagedDefault the static pods in charge of API and Ingress traffic load-balancing defined in the machine config operator will be deployed. When set to UserManaged these static pods will not be deployed and it is expected that the load balancer is configured out of band by the deployer. When omitted, this means no opinion and the platform is left to choose a reasonable default. The default value is OpenShiftManagedDefault.", -} - -func (NutanixPlatformLoadBalancer) SwaggerDoc() map[string]string { - return map_NutanixPlatformLoadBalancer -} - -var map_NutanixPlatformSpec = map[string]string{ - "": "NutanixPlatformSpec holds the desired state of the Nutanix infrastructure provider. This only includes fields that can be modified in the cluster.", - "prismCentral": "prismCentral holds the endpoint address and port to access the Nutanix Prism Central. When a cluster-wide proxy is installed, by default, this endpoint will be accessed via the proxy. Should you wish for communication with this endpoint not to be proxied, please add the endpoint to the proxy spec.noProxy list.", - "prismElements": "prismElements holds one or more endpoint address and port data to access the Nutanix Prism Elements (clusters) of the Nutanix Prism Central. Currently we only support one Prism Element (cluster) for an OpenShift cluster, where all the Nutanix resources (VMs, subnets, volumes, etc.) used in the OpenShift cluster are located. In the future, we may support Nutanix resources (VMs, etc.) spread over multiple Prism Elements (clusters) of the Prism Central.", -} - -func (NutanixPlatformSpec) SwaggerDoc() map[string]string { - return map_NutanixPlatformSpec -} - -var map_NutanixPlatformStatus = map[string]string{ - "": "NutanixPlatformStatus holds the current status of the Nutanix infrastructure provider.", - "apiServerInternalIP": "apiServerInternalIP is an IP address to contact the Kubernetes API server that can be used by components inside the cluster, like kubelets using the infrastructure rather than Kubernetes networking. It is the IP that the Infrastructure.status.apiServerInternalURI points to. It is the IP for a self-hosted load balancer in front of the API servers.\n\nDeprecated: Use APIServerInternalIPs instead.", - "apiServerInternalIPs": "apiServerInternalIPs are the IP addresses to contact the Kubernetes API server that can be used by components inside the cluster, like kubelets using the infrastructure rather than Kubernetes networking. These are the IPs for a self-hosted load balancer in front of the API servers. In dual stack clusters this list contains two IPs otherwise only one.", - "ingressIP": "ingressIP is an external IP which routes to the default ingress controller. The IP is a suitable target of a wildcard DNS record used to resolve default route host names.\n\nDeprecated: Use IngressIPs instead.", - "ingressIPs": "ingressIPs are the external IPs which route to the default ingress controller. The IPs are suitable targets of a wildcard DNS record used to resolve default route host names. In dual stack clusters this list contains two IPs otherwise only one.", - "loadBalancer": "loadBalancer defines how the load balancer used by the cluster is configured.", -} - -func (NutanixPlatformStatus) SwaggerDoc() map[string]string { - return map_NutanixPlatformStatus -} - -var map_NutanixPrismElementEndpoint = map[string]string{ - "": "NutanixPrismElementEndpoint holds the name and endpoint data for a Prism Element (cluster)", - "name": "name is the name of the Prism Element (cluster). This value will correspond with the cluster field configured on other resources (eg Machines, PVCs, etc).", - "endpoint": "endpoint holds the endpoint address and port data of the Prism Element (cluster). When a cluster-wide proxy is installed, by default, this endpoint will be accessed via the proxy. Should you wish for communication with this endpoint not to be proxied, please add the endpoint to the proxy spec.noProxy list.", -} - -func (NutanixPrismElementEndpoint) SwaggerDoc() map[string]string { - return map_NutanixPrismElementEndpoint -} - -var map_NutanixPrismEndpoint = map[string]string{ - "": "NutanixPrismEndpoint holds the endpoint address and port to access the Nutanix Prism Central or Element (cluster)", - "address": "address is the endpoint address (DNS name or IP address) of the Nutanix Prism Central or Element (cluster)", - "port": "port is the port number to access the Nutanix Prism Central or Element (cluster)", -} - -func (NutanixPrismEndpoint) SwaggerDoc() map[string]string { - return map_NutanixPrismEndpoint -} - -var map_OpenStackPlatformLoadBalancer = map[string]string{ - "": "OpenStackPlatformLoadBalancer defines the load balancer used by the cluster on OpenStack platform.", - "type": "type defines the type of load balancer used by the cluster on OpenStack platform which can be a user-managed or openshift-managed load balancer that is to be used for the OpenShift API and Ingress endpoints. When set to OpenShiftManagedDefault the static pods in charge of API and Ingress traffic load-balancing defined in the machine config operator will be deployed. When set to UserManaged these static pods will not be deployed and it is expected that the load balancer is configured out of band by the deployer. When omitted, this means no opinion and the platform is left to choose a reasonable default. The default value is OpenShiftManagedDefault.", -} - -func (OpenStackPlatformLoadBalancer) SwaggerDoc() map[string]string { - return map_OpenStackPlatformLoadBalancer -} - -var map_OpenStackPlatformSpec = map[string]string{ - "": "OpenStackPlatformSpec holds the desired state of the OpenStack infrastructure provider. This only includes fields that can be modified in the cluster.", -} - -func (OpenStackPlatformSpec) SwaggerDoc() map[string]string { - return map_OpenStackPlatformSpec -} - -var map_OpenStackPlatformStatus = map[string]string{ - "": "OpenStackPlatformStatus holds the current status of the OpenStack infrastructure provider.", - "apiServerInternalIP": "apiServerInternalIP is an IP address to contact the Kubernetes API server that can be used by components inside the cluster, like kubelets using the infrastructure rather than Kubernetes networking. It is the IP that the Infrastructure.status.apiServerInternalURI points to. It is the IP for a self-hosted load balancer in front of the API servers.\n\nDeprecated: Use APIServerInternalIPs instead.", - "apiServerInternalIPs": "apiServerInternalIPs are the IP addresses to contact the Kubernetes API server that can be used by components inside the cluster, like kubelets using the infrastructure rather than Kubernetes networking. These are the IPs for a self-hosted load balancer in front of the API servers. In dual stack clusters this list contains two IPs otherwise only one.", - "cloudName": "cloudName is the name of the desired OpenStack cloud in the client configuration file (`clouds.yaml`).", - "ingressIP": "ingressIP is an external IP which routes to the default ingress controller. The IP is a suitable target of a wildcard DNS record used to resolve default route host names.\n\nDeprecated: Use IngressIPs instead.", - "ingressIPs": "ingressIPs are the external IPs which route to the default ingress controller. The IPs are suitable targets of a wildcard DNS record used to resolve default route host names. In dual stack clusters this list contains two IPs otherwise only one.", - "nodeDNSIP": "nodeDNSIP is the IP address for the internal DNS used by the nodes. Unlike the one managed by the DNS operator, `NodeDNSIP` provides name resolution for the nodes themselves. There is no DNS-as-a-service for OpenStack deployments. In order to minimize necessary changes to the datacenter DNS, a DNS service is hosted as a static pod to serve those hostnames to the nodes in the cluster.", - "loadBalancer": "loadBalancer defines how the load balancer used by the cluster is configured.", -} - -func (OpenStackPlatformStatus) SwaggerDoc() map[string]string { - return map_OpenStackPlatformStatus -} - -var map_OvirtPlatformLoadBalancer = map[string]string{ - "": "OvirtPlatformLoadBalancer defines the load balancer used by the cluster on Ovirt platform.", - "type": "type defines the type of load balancer used by the cluster on Ovirt platform which can be a user-managed or openshift-managed load balancer that is to be used for the OpenShift API and Ingress endpoints. When set to OpenShiftManagedDefault the static pods in charge of API and Ingress traffic load-balancing defined in the machine config operator will be deployed. When set to UserManaged these static pods will not be deployed and it is expected that the load balancer is configured out of band by the deployer. When omitted, this means no opinion and the platform is left to choose a reasonable default. The default value is OpenShiftManagedDefault.", -} - -func (OvirtPlatformLoadBalancer) SwaggerDoc() map[string]string { - return map_OvirtPlatformLoadBalancer -} - -var map_OvirtPlatformSpec = map[string]string{ - "": "OvirtPlatformSpec holds the desired state of the oVirt infrastructure provider. This only includes fields that can be modified in the cluster.", -} - -func (OvirtPlatformSpec) SwaggerDoc() map[string]string { - return map_OvirtPlatformSpec -} - -var map_OvirtPlatformStatus = map[string]string{ - "": "OvirtPlatformStatus holds the current status of the oVirt infrastructure provider.", - "apiServerInternalIP": "apiServerInternalIP is an IP address to contact the Kubernetes API server that can be used by components inside the cluster, like kubelets using the infrastructure rather than Kubernetes networking. It is the IP that the Infrastructure.status.apiServerInternalURI points to. It is the IP for a self-hosted load balancer in front of the API servers.\n\nDeprecated: Use APIServerInternalIPs instead.", - "apiServerInternalIPs": "apiServerInternalIPs are the IP addresses to contact the Kubernetes API server that can be used by components inside the cluster, like kubelets using the infrastructure rather than Kubernetes networking. These are the IPs for a self-hosted load balancer in front of the API servers. In dual stack clusters this list contains two IPs otherwise only one.", - "ingressIP": "ingressIP is an external IP which routes to the default ingress controller. The IP is a suitable target of a wildcard DNS record used to resolve default route host names.\n\nDeprecated: Use IngressIPs instead.", - "ingressIPs": "ingressIPs are the external IPs which route to the default ingress controller. The IPs are suitable targets of a wildcard DNS record used to resolve default route host names. In dual stack clusters this list contains two IPs otherwise only one.", - "nodeDNSIP": "deprecated: as of 4.6, this field is no longer set or honored. It will be removed in a future release.", - "loadBalancer": "loadBalancer defines how the load balancer used by the cluster is configured.", -} - -func (OvirtPlatformStatus) SwaggerDoc() map[string]string { - return map_OvirtPlatformStatus -} - -var map_PlatformSpec = map[string]string{ - "": "PlatformSpec holds the desired state specific to the underlying infrastructure provider of the current cluster. Since these are used at spec-level for the underlying cluster, it is supposed that only one of the spec structs is set.", - "type": "type is the underlying infrastructure provider for the cluster. This value controls whether infrastructure automation such as service load balancers, dynamic volume provisioning, machine creation and deletion, and other integrations are enabled. If None, no infrastructure automation is enabled. Allowed values are \"AWS\", \"Azure\", \"BareMetal\", \"GCP\", \"Libvirt\", \"OpenStack\", \"VSphere\", \"oVirt\", \"KubeVirt\", \"EquinixMetal\", \"PowerVS\", \"AlibabaCloud\", \"Nutanix\" and \"None\". Individual components may not support all platforms, and must handle unrecognized platforms as None if they do not support that platform.", - "aws": "AWS contains settings specific to the Amazon Web Services infrastructure provider.", - "azure": "Azure contains settings specific to the Azure infrastructure provider.", - "gcp": "GCP contains settings specific to the Google Cloud Platform infrastructure provider.", - "baremetal": "BareMetal contains settings specific to the BareMetal platform.", - "openstack": "OpenStack contains settings specific to the OpenStack infrastructure provider.", - "ovirt": "Ovirt contains settings specific to the oVirt infrastructure provider.", - "vsphere": "VSphere contains settings specific to the VSphere infrastructure provider.", - "ibmcloud": "IBMCloud contains settings specific to the IBMCloud infrastructure provider.", - "kubevirt": "Kubevirt contains settings specific to the kubevirt infrastructure provider.", - "equinixMetal": "EquinixMetal contains settings specific to the Equinix Metal infrastructure provider.", - "powervs": "PowerVS contains settings specific to the IBM Power Systems Virtual Servers infrastructure provider.", - "alibabaCloud": "AlibabaCloud contains settings specific to the Alibaba Cloud infrastructure provider.", - "nutanix": "Nutanix contains settings specific to the Nutanix infrastructure provider.", - "external": "ExternalPlatformType represents generic infrastructure provider. Platform-specific components should be supplemented separately.", -} - -func (PlatformSpec) SwaggerDoc() map[string]string { - return map_PlatformSpec -} - -var map_PlatformStatus = map[string]string{ - "": "PlatformStatus holds the current status specific to the underlying infrastructure provider of the current cluster. Since these are used at status-level for the underlying cluster, it is supposed that only one of the status structs is set.", - "type": "type is the underlying infrastructure provider for the cluster. This value controls whether infrastructure automation such as service load balancers, dynamic volume provisioning, machine creation and deletion, and other integrations are enabled. If None, no infrastructure automation is enabled. Allowed values are \"AWS\", \"Azure\", \"BareMetal\", \"GCP\", \"Libvirt\", \"OpenStack\", \"VSphere\", \"oVirt\", \"EquinixMetal\", \"PowerVS\", \"AlibabaCloud\", \"Nutanix\" and \"None\". Individual components may not support all platforms, and must handle unrecognized platforms as None if they do not support that platform.\n\nThis value will be synced with to the `status.platform` and `status.platformStatus.type`. Currently this value cannot be changed once set.", - "aws": "AWS contains settings specific to the Amazon Web Services infrastructure provider.", - "azure": "Azure contains settings specific to the Azure infrastructure provider.", - "gcp": "GCP contains settings specific to the Google Cloud Platform infrastructure provider.", - "baremetal": "BareMetal contains settings specific to the BareMetal platform.", - "openstack": "OpenStack contains settings specific to the OpenStack infrastructure provider.", - "ovirt": "Ovirt contains settings specific to the oVirt infrastructure provider.", - "vsphere": "VSphere contains settings specific to the VSphere infrastructure provider.", - "ibmcloud": "IBMCloud contains settings specific to the IBMCloud infrastructure provider.", - "kubevirt": "Kubevirt contains settings specific to the kubevirt infrastructure provider.", - "equinixMetal": "EquinixMetal contains settings specific to the Equinix Metal infrastructure provider.", - "powervs": "PowerVS contains settings specific to the Power Systems Virtual Servers infrastructure provider.", - "alibabaCloud": "AlibabaCloud contains settings specific to the Alibaba Cloud infrastructure provider.", - "nutanix": "Nutanix contains settings specific to the Nutanix infrastructure provider.", - "external": "External contains settings specific to the generic External infrastructure provider.", -} - -func (PlatformStatus) SwaggerDoc() map[string]string { - return map_PlatformStatus -} - -var map_PowerVSPlatformSpec = map[string]string{ - "": "PowerVSPlatformSpec holds the desired state of the IBM Power Systems Virtual Servers infrastructure provider. This only includes fields that can be modified in the cluster.", - "serviceEndpoints": "serviceEndpoints is a list of custom endpoints which will override the default service endpoints of a Power VS service.", -} - -func (PowerVSPlatformSpec) SwaggerDoc() map[string]string { - return map_PowerVSPlatformSpec -} - -var map_PowerVSPlatformStatus = map[string]string{ - "": "PowerVSPlatformStatus holds the current status of the IBM Power Systems Virtual Servers infrastrucutre provider.", - "region": "region holds the default Power VS region for new Power VS resources created by the cluster.", - "zone": "zone holds the default zone for the new Power VS resources created by the cluster. Note: Currently only single-zone OCP clusters are supported", - "resourceGroup": "resourceGroup is the resource group name for new IBMCloud resources created for a cluster. The resource group specified here will be used by cluster-image-registry-operator to set up a COS Instance in IBMCloud for the cluster registry. More about resource groups can be found here: https://cloud.ibm.com/docs/account?topic=account-rgs. When omitted, the image registry operator won't be able to configure storage, which results in the image registry cluster operator not being in an available state.", - "serviceEndpoints": "serviceEndpoints is a list of custom endpoints which will override the default service endpoints of a Power VS service.", - "cisInstanceCRN": "CISInstanceCRN is the CRN of the Cloud Internet Services instance managing the DNS zone for the cluster's base domain", - "dnsInstanceCRN": "DNSInstanceCRN is the CRN of the DNS Services instance managing the DNS zone for the cluster's base domain", -} - -func (PowerVSPlatformStatus) SwaggerDoc() map[string]string { - return map_PowerVSPlatformStatus -} - -var map_PowerVSServiceEndpoint = map[string]string{ - "": "PowervsServiceEndpoint stores the configuration of a custom url to override existing defaults of PowerVS Services.", - "name": "name is the name of the Power VS service. Few of the services are IAM - https://cloud.ibm.com/apidocs/iam-identity-token-api ResourceController - https://cloud.ibm.com/apidocs/resource-controller/resource-controller Power Cloud - https://cloud.ibm.com/apidocs/power-cloud", - "url": "url is fully qualified URI with scheme https, that overrides the default generated endpoint for a client. This must be provided and cannot be empty.", -} - -func (PowerVSServiceEndpoint) SwaggerDoc() map[string]string { - return map_PowerVSServiceEndpoint -} - -var map_VSpherePlatformFailureDomainSpec = map[string]string{ - "": "VSpherePlatformFailureDomainSpec holds the region and zone failure domain and the vCenter topology of that failure domain.", - "name": "name defines the arbitrary but unique name of a failure domain.", - "region": "region defines the name of a region tag that will be attached to a vCenter datacenter. The tag category in vCenter must be named openshift-region.", - "zone": "zone defines the name of a zone tag that will be attached to a vCenter cluster. The tag category in vCenter must be named openshift-zone.", - "server": "server is the fully-qualified domain name or the IP address of the vCenter server.", - "topology": "Topology describes a given failure domain using vSphere constructs", -} - -func (VSpherePlatformFailureDomainSpec) SwaggerDoc() map[string]string { - return map_VSpherePlatformFailureDomainSpec -} - -var map_VSpherePlatformLoadBalancer = map[string]string{ - "": "VSpherePlatformLoadBalancer defines the load balancer used by the cluster on VSphere platform.", - "type": "type defines the type of load balancer used by the cluster on VSphere platform which can be a user-managed or openshift-managed load balancer that is to be used for the OpenShift API and Ingress endpoints. When set to OpenShiftManagedDefault the static pods in charge of API and Ingress traffic load-balancing defined in the machine config operator will be deployed. When set to UserManaged these static pods will not be deployed and it is expected that the load balancer is configured out of band by the deployer. When omitted, this means no opinion and the platform is left to choose a reasonable default. The default value is OpenShiftManagedDefault.", -} - -func (VSpherePlatformLoadBalancer) SwaggerDoc() map[string]string { - return map_VSpherePlatformLoadBalancer -} - -var map_VSpherePlatformNodeNetworking = map[string]string{ - "": "VSpherePlatformNodeNetworking holds the external and internal node networking spec.", - "external": "external represents the network configuration of the node that is externally routable.", - "internal": "internal represents the network configuration of the node that is routable only within the cluster.", -} - -func (VSpherePlatformNodeNetworking) SwaggerDoc() map[string]string { - return map_VSpherePlatformNodeNetworking -} - -var map_VSpherePlatformNodeNetworkingSpec = map[string]string{ - "": "VSpherePlatformNodeNetworkingSpec holds the network CIDR(s) and port group name for including and excluding IP ranges in the cloud provider. This would be used for example when multiple network adapters are attached to a guest to help determine which IP address the cloud config manager should use for the external and internal node networking.", - "networkSubnetCidr": "networkSubnetCidr IP address on VirtualMachine's network interfaces included in the fields' CIDRs that will be used in respective status.addresses fields.", - "network": "network VirtualMachine's VM Network names that will be used to when searching for status.addresses fields. Note that if internal.networkSubnetCIDR and external.networkSubnetCIDR are not set, then the vNIC associated to this network must only have a single IP address assigned to it. The available networks (port groups) can be listed using `govc ls 'network/*'`", - "excludeNetworkSubnetCidr": "excludeNetworkSubnetCidr IP addresses in subnet ranges will be excluded when selecting the IP address from the VirtualMachine's VM for use in the status.addresses fields.", -} - -func (VSpherePlatformNodeNetworkingSpec) SwaggerDoc() map[string]string { - return map_VSpherePlatformNodeNetworkingSpec -} - -var map_VSpherePlatformSpec = map[string]string{ - "": "VSpherePlatformSpec holds the desired state of the vSphere infrastructure provider. In the future the cloud provider operator, storage operator and machine operator will use these fields for configuration.", - "vcenters": "vcenters holds the connection details for services to communicate with vCenter. Currently, only a single vCenter is supported.", - "failureDomains": "failureDomains contains the definition of region, zone and the vCenter topology. If this is omitted failure domains (regions and zones) will not be used.", - "nodeNetworking": "nodeNetworking contains the definition of internal and external network constraints for assigning the node's networking. If this field is omitted, networking defaults to the legacy address selection behavior which is to only support a single address and return the first one found.", -} - -func (VSpherePlatformSpec) SwaggerDoc() map[string]string { - return map_VSpherePlatformSpec -} - -var map_VSpherePlatformStatus = map[string]string{ - "": "VSpherePlatformStatus holds the current status of the vSphere infrastructure provider.", - "apiServerInternalIP": "apiServerInternalIP is an IP address to contact the Kubernetes API server that can be used by components inside the cluster, like kubelets using the infrastructure rather than Kubernetes networking. It is the IP that the Infrastructure.status.apiServerInternalURI points to. It is the IP for a self-hosted load balancer in front of the API servers.\n\nDeprecated: Use APIServerInternalIPs instead.", - "apiServerInternalIPs": "apiServerInternalIPs are the IP addresses to contact the Kubernetes API server that can be used by components inside the cluster, like kubelets using the infrastructure rather than Kubernetes networking. These are the IPs for a self-hosted load balancer in front of the API servers. In dual stack clusters this list contains two IPs otherwise only one.", - "ingressIP": "ingressIP is an external IP which routes to the default ingress controller. The IP is a suitable target of a wildcard DNS record used to resolve default route host names.\n\nDeprecated: Use IngressIPs instead.", - "ingressIPs": "ingressIPs are the external IPs which route to the default ingress controller. The IPs are suitable targets of a wildcard DNS record used to resolve default route host names. In dual stack clusters this list contains two IPs otherwise only one.", - "nodeDNSIP": "nodeDNSIP is the IP address for the internal DNS used by the nodes. Unlike the one managed by the DNS operator, `NodeDNSIP` provides name resolution for the nodes themselves. There is no DNS-as-a-service for vSphere deployments. In order to minimize necessary changes to the datacenter DNS, a DNS service is hosted as a static pod to serve those hostnames to the nodes in the cluster.", - "loadBalancer": "loadBalancer defines how the load balancer used by the cluster is configured.", -} - -func (VSpherePlatformStatus) SwaggerDoc() map[string]string { - return map_VSpherePlatformStatus -} - -var map_VSpherePlatformTopology = map[string]string{ - "": "VSpherePlatformTopology holds the required and optional vCenter objects - datacenter, computeCluster, networks, datastore and resourcePool - to provision virtual machines.", - "datacenter": "datacenter is the name of vCenter datacenter in which virtual machines will be located. The maximum length of the datacenter name is 80 characters.", - "computeCluster": "computeCluster the absolute path of the vCenter cluster in which virtual machine will be located. The absolute path is of the form //host/. The maximum length of the path is 2048 characters.", - "networks": "networks is the list of port group network names within this failure domain. Currently, we only support a single interface per RHCOS virtual machine. The available networks (port groups) can be listed using `govc ls 'network/*'` The single interface should be the absolute path of the form //network/.", - "datastore": "datastore is the absolute path of the datastore in which the virtual machine is located. The absolute path is of the form //datastore/ The maximum length of the path is 2048 characters.", - "resourcePool": "resourcePool is the absolute path of the resource pool where virtual machines will be created. The absolute path is of the form //host//Resources/. The maximum length of the path is 2048 characters.", - "folder": "folder is the absolute path of the folder where virtual machines are located. The absolute path is of the form //vm/. The maximum length of the path is 2048 characters.", -} - -func (VSpherePlatformTopology) SwaggerDoc() map[string]string { - return map_VSpherePlatformTopology -} - -var map_VSpherePlatformVCenterSpec = map[string]string{ - "": "VSpherePlatformVCenterSpec stores the vCenter connection fields. This is used by the vSphere CCM.", - "server": "server is the fully-qualified domain name or the IP address of the vCenter server.", - "port": "port is the TCP port that will be used to communicate to the vCenter endpoint. When omitted, this means the user has no opinion and it is up to the platform to choose a sensible default, which is subject to change over time.", - "datacenters": "The vCenter Datacenters in which the RHCOS vm guests are located. This field will be used by the Cloud Controller Manager. Each datacenter listed here should be used within a topology.", -} - -func (VSpherePlatformVCenterSpec) SwaggerDoc() map[string]string { - return map_VSpherePlatformVCenterSpec -} - -var map_AWSIngressSpec = map[string]string{ - "": "AWSIngressSpec holds the desired state of the Ingress for Amazon Web Services infrastructure provider. This only includes fields that can be modified in the cluster.", - "type": "type allows user to set a load balancer type. When this field is set the default ingresscontroller will get created using the specified LBType. If this field is not set then the default ingress controller of LBType Classic will be created. Valid values are:\n\n* \"Classic\": A Classic Load Balancer that makes routing decisions at either\n the transport layer (TCP/SSL) or the application layer (HTTP/HTTPS). See\n the following for additional details:\n\n https://docs.aws.amazon.com/AmazonECS/latest/developerguide/load-balancer-types.html#clb\n\n* \"NLB\": A Network Load Balancer that makes routing decisions at the\n transport layer (TCP/SSL). See the following for additional details:\n\n https://docs.aws.amazon.com/AmazonECS/latest/developerguide/load-balancer-types.html#nlb", -} - -func (AWSIngressSpec) SwaggerDoc() map[string]string { - return map_AWSIngressSpec -} - -var map_ComponentRouteSpec = map[string]string{ - "": "ComponentRouteSpec allows for configuration of a route's hostname and serving certificate.", - "namespace": "namespace is the namespace of the route to customize.\n\nThe namespace and name of this componentRoute must match a corresponding entry in the list of status.componentRoutes if the route is to be customized.", - "name": "name is the logical name of the route to customize.\n\nThe namespace and name of this componentRoute must match a corresponding entry in the list of status.componentRoutes if the route is to be customized.", - "hostname": "hostname is the hostname that should be used by the route.", - "servingCertKeyPairSecret": "servingCertKeyPairSecret is a reference to a secret of type `kubernetes.io/tls` in the openshift-config namespace. The serving cert/key pair must match and will be used by the operator to fulfill the intent of serving with this name. If the custom hostname uses the default routing suffix of the cluster, the Secret specification for a serving certificate will not be needed.", -} - -func (ComponentRouteSpec) SwaggerDoc() map[string]string { - return map_ComponentRouteSpec -} - -var map_ComponentRouteStatus = map[string]string{ - "": "ComponentRouteStatus contains information allowing configuration of a route's hostname and serving certificate.", - "namespace": "namespace is the namespace of the route to customize. It must be a real namespace. Using an actual namespace ensures that no two components will conflict and the same component can be installed multiple times.\n\nThe namespace and name of this componentRoute must match a corresponding entry in the list of spec.componentRoutes if the route is to be customized.", - "name": "name is the logical name of the route to customize. It does not have to be the actual name of a route resource but it cannot be renamed.\n\nThe namespace and name of this componentRoute must match a corresponding entry in the list of spec.componentRoutes if the route is to be customized.", - "defaultHostname": "defaultHostname is the hostname of this route prior to customization.", - "consumingUsers": "consumingUsers is a slice of ServiceAccounts that need to have read permission on the servingCertKeyPairSecret secret.", - "currentHostnames": "currentHostnames is the list of current names used by the route. Typically, this list should consist of a single hostname, but if multiple hostnames are supported by the route the operator may write multiple entries to this list.", - "conditions": "conditions are used to communicate the state of the componentRoutes entry.\n\nSupported conditions include Available, Degraded and Progressing.\n\nIf available is true, the content served by the route can be accessed by users. This includes cases where a default may continue to serve content while the customized route specified by the cluster-admin is being configured.\n\nIf Degraded is true, that means something has gone wrong trying to handle the componentRoutes entry. The currentHostnames field may or may not be in effect.\n\nIf Progressing is true, that means the component is taking some action related to the componentRoutes entry.", - "relatedObjects": "relatedObjects is a list of resources which are useful when debugging or inspecting how spec.componentRoutes is applied.", -} - -func (ComponentRouteStatus) SwaggerDoc() map[string]string { - return map_ComponentRouteStatus -} - -var map_Ingress = map[string]string{ - "": "Ingress holds cluster-wide information about ingress, including the default ingress domain used for routes. The canonical name is `cluster`.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "spec": "spec holds user settable values for configuration", - "status": "status holds observed values from the cluster. They may not be overridden.", -} - -func (Ingress) SwaggerDoc() map[string]string { - return map_Ingress -} - -var map_IngressList = map[string]string{ - "": "Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", -} - -func (IngressList) SwaggerDoc() map[string]string { - return map_IngressList -} - -var map_IngressPlatformSpec = map[string]string{ - "": "IngressPlatformSpec holds the desired state of Ingress specific to the underlying infrastructure provider of the current cluster. Since these are used at spec-level for the underlying cluster, it is supposed that only one of the spec structs is set.", - "type": "type is the underlying infrastructure provider for the cluster. Allowed values are \"AWS\", \"Azure\", \"BareMetal\", \"GCP\", \"Libvirt\", \"OpenStack\", \"VSphere\", \"oVirt\", \"KubeVirt\", \"EquinixMetal\", \"PowerVS\", \"AlibabaCloud\", \"Nutanix\" and \"None\". Individual components may not support all platforms, and must handle unrecognized platforms as None if they do not support that platform.", - "aws": "aws contains settings specific to the Amazon Web Services infrastructure provider.", -} - -func (IngressPlatformSpec) SwaggerDoc() map[string]string { - return map_IngressPlatformSpec -} - -var map_IngressSpec = map[string]string{ - "domain": "domain is used to generate a default host name for a route when the route's host name is empty. The generated host name will follow this pattern: \"..\".\n\nIt is also used as the default wildcard domain suffix for ingress. The default ingresscontroller domain will follow this pattern: \"*.\".\n\nOnce set, changing domain is not currently supported.", - "appsDomain": "appsDomain is an optional domain to use instead of the one specified in the domain field when a Route is created without specifying an explicit host. If appsDomain is nonempty, this value is used to generate default host values for Route. Unlike domain, appsDomain may be modified after installation. This assumes a new ingresscontroller has been setup with a wildcard certificate.", - "componentRoutes": "componentRoutes is an optional list of routes that are managed by OpenShift components that a cluster-admin is able to configure the hostname and serving certificate for. The namespace and name of each route in this list should match an existing entry in the status.componentRoutes list.\n\nTo determine the set of configurable Routes, look at namespace and name of entries in the .status.componentRoutes list, where participating operators write the status of configurable routes.", - "requiredHSTSPolicies": "requiredHSTSPolicies specifies HSTS policies that are required to be set on newly created or updated routes matching the domainPattern/s and namespaceSelector/s that are specified in the policy. Each requiredHSTSPolicy must have at least a domainPattern and a maxAge to validate a route HSTS Policy route annotation, and affect route admission.\n\nA candidate route is checked for HSTS Policies if it has the HSTS Policy route annotation: \"haproxy.router.openshift.io/hsts_header\" E.g. haproxy.router.openshift.io/hsts_header: max-age=31536000;preload;includeSubDomains\n\n- For each candidate route, if it matches a requiredHSTSPolicy domainPattern and optional namespaceSelector, then the maxAge, preloadPolicy, and includeSubdomainsPolicy must be valid to be admitted. Otherwise, the route is rejected. - The first match, by domainPattern and optional namespaceSelector, in the ordering of the RequiredHSTSPolicies determines the route's admission status. - If the candidate route doesn't match any requiredHSTSPolicy domainPattern and optional namespaceSelector, then it may use any HSTS Policy annotation.\n\nThe HSTS policy configuration may be changed after routes have already been created. An update to a previously admitted route may then fail if the updated route does not conform to the updated HSTS policy configuration. However, changing the HSTS policy configuration will not cause a route that is already admitted to stop working.\n\nNote that if there are no RequiredHSTSPolicies, any HSTS Policy annotation on the route is valid.", - "loadBalancer": "loadBalancer contains the load balancer details in general which are not only specific to the underlying infrastructure provider of the current cluster and are required for Ingress Controller to work on OpenShift.", -} - -func (IngressSpec) SwaggerDoc() map[string]string { - return map_IngressSpec -} - -var map_IngressStatus = map[string]string{ - "componentRoutes": "componentRoutes is where participating operators place the current route status for routes whose hostnames and serving certificates can be customized by the cluster-admin.", - "defaultPlacement": "defaultPlacement is set at installation time to control which nodes will host the ingress router pods by default. The options are control-plane nodes or worker nodes.\n\nThis field works by dictating how the Cluster Ingress Operator will consider unset replicas and nodePlacement fields in IngressController resources when creating the corresponding Deployments.\n\nSee the documentation for the IngressController replicas and nodePlacement fields for more information.\n\nWhen omitted, the default value is Workers", -} - -func (IngressStatus) SwaggerDoc() map[string]string { - return map_IngressStatus -} - -var map_LoadBalancer = map[string]string{ - "platform": "platform holds configuration specific to the underlying infrastructure provider for the ingress load balancers. When omitted, this means the user has no opinion and the platform is left to choose reasonable defaults. These defaults are subject to change over time.", -} - -func (LoadBalancer) SwaggerDoc() map[string]string { - return map_LoadBalancer -} - -var map_ClusterNetworkEntry = map[string]string{ - "": "ClusterNetworkEntry is a contiguous block of IP addresses from which pod IPs are allocated.", - "cidr": "The complete block for pod IPs.", - "hostPrefix": "The size (prefix) of block to allocate to each node. If this field is not used by the plugin, it can be left unset.", -} - -func (ClusterNetworkEntry) SwaggerDoc() map[string]string { - return map_ClusterNetworkEntry -} - -var map_ExternalIPConfig = map[string]string{ - "": "ExternalIPConfig specifies some IP blocks relevant for the ExternalIP field of a Service resource.", - "policy": "policy is a set of restrictions applied to the ExternalIP field. If nil or empty, then ExternalIP is not allowed to be set.", - "autoAssignCIDRs": "autoAssignCIDRs is a list of CIDRs from which to automatically assign Service.ExternalIP. These are assigned when the service is of type LoadBalancer. In general, this is only useful for bare-metal clusters. In Openshift 3.x, this was misleadingly called \"IngressIPs\". Automatically assigned External IPs are not affected by any ExternalIPPolicy rules. Currently, only one entry may be provided.", -} - -func (ExternalIPConfig) SwaggerDoc() map[string]string { - return map_ExternalIPConfig -} - -var map_ExternalIPPolicy = map[string]string{ - "": "ExternalIPPolicy configures exactly which IPs are allowed for the ExternalIP field in a Service. If the zero struct is supplied, then none are permitted. The policy controller always allows automatically assigned external IPs.", - "allowedCIDRs": "allowedCIDRs is the list of allowed CIDRs.", - "rejectedCIDRs": "rejectedCIDRs is the list of disallowed CIDRs. These take precedence over allowedCIDRs.", -} - -func (ExternalIPPolicy) SwaggerDoc() map[string]string { - return map_ExternalIPPolicy -} - -var map_MTUMigration = map[string]string{ - "": "MTUMigration contains infomation about MTU migration.", - "network": "Network contains MTU migration configuration for the default network.", - "machine": "Machine contains MTU migration configuration for the machine's uplink.", -} - -func (MTUMigration) SwaggerDoc() map[string]string { - return map_MTUMigration -} - -var map_MTUMigrationValues = map[string]string{ - "": "MTUMigrationValues contains the values for a MTU migration.", - "to": "To is the MTU to migrate to.", - "from": "From is the MTU to migrate from.", -} - -func (MTUMigrationValues) SwaggerDoc() map[string]string { - return map_MTUMigrationValues -} - -var map_Network = map[string]string{ - "": "Network holds cluster-wide information about Network. The canonical name is `cluster`. It is used to configure the desired network configuration, such as: IP address pools for services/pod IPs, network plugin, etc. Please view network.spec for an explanation on what applies when configuring this resource.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "spec": "spec holds user settable values for configuration. As a general rule, this SHOULD NOT be read directly. Instead, you should consume the NetworkStatus, as it indicates the currently deployed configuration. Currently, most spec fields are immutable after installation. Please view the individual ones for further details on each.", - "status": "status holds observed values from the cluster. They may not be overridden.", -} - -func (Network) SwaggerDoc() map[string]string { - return map_Network -} - -var map_NetworkList = map[string]string{ - "": "Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", -} - -func (NetworkList) SwaggerDoc() map[string]string { - return map_NetworkList -} - -var map_NetworkMigration = map[string]string{ - "": "NetworkMigration represents the cluster network configuration.", - "networkType": "NetworkType is the target plugin that is to be deployed. Currently supported values are: OpenShiftSDN, OVNKubernetes", - "mtu": "MTU contains the MTU migration configuration.", -} - -func (NetworkMigration) SwaggerDoc() map[string]string { - return map_NetworkMigration -} - -var map_NetworkSpec = map[string]string{ - "": "NetworkSpec is the desired network configuration. As a general rule, this SHOULD NOT be read directly. Instead, you should consume the NetworkStatus, as it indicates the currently deployed configuration. Currently, most spec fields are immutable after installation. Please view the individual ones for further details on each.", - "clusterNetwork": "IP address pool to use for pod IPs. This field is immutable after installation.", - "serviceNetwork": "IP address pool for services. Currently, we only support a single entry here. This field is immutable after installation.", - "networkType": "NetworkType is the plugin that is to be deployed (e.g. OpenShiftSDN). This should match a value that the cluster-network-operator understands, or else no networking will be installed. Currently supported values are: - OpenShiftSDN This field is immutable after installation.", - "externalIP": "externalIP defines configuration for controllers that affect Service.ExternalIP. If nil, then ExternalIP is not allowed to be set.", - "serviceNodePortRange": "The port range allowed for Services of type NodePort. If not specified, the default of 30000-32767 will be used. Such Services without a NodePort specified will have one automatically allocated from this range. This parameter can be updated after the cluster is installed.", -} - -func (NetworkSpec) SwaggerDoc() map[string]string { - return map_NetworkSpec -} - -var map_NetworkStatus = map[string]string{ - "": "NetworkStatus is the current network configuration.", - "clusterNetwork": "IP address pool to use for pod IPs.", - "serviceNetwork": "IP address pool for services. Currently, we only support a single entry here.", - "networkType": "NetworkType is the plugin that is deployed (e.g. OpenShiftSDN).", - "clusterNetworkMTU": "ClusterNetworkMTU is the MTU for inter-pod networking.", - "migration": "Migration contains the cluster network migration configuration.", -} - -func (NetworkStatus) SwaggerDoc() map[string]string { - return map_NetworkStatus -} - -var map_Node = map[string]string{ - "": "Node holds cluster-wide information about node specific features.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "spec": "spec holds user settable values for configuration", - "status": "status holds observed values.", -} - -func (Node) SwaggerDoc() map[string]string { - return map_Node -} - -var map_NodeList = map[string]string{ - "": "Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", -} - -func (NodeList) SwaggerDoc() map[string]string { - return map_NodeList -} - -var map_NodeSpec = map[string]string{ - "cgroupMode": "CgroupMode determines the cgroups version on the node", - "workerLatencyProfile": "WorkerLatencyProfile determins the how fast the kubelet is updating the status and corresponding reaction of the cluster", -} - -func (NodeSpec) SwaggerDoc() map[string]string { - return map_NodeSpec -} - -var map_BasicAuthIdentityProvider = map[string]string{ - "": "BasicAuthPasswordIdentityProvider provides identities for users authenticating using HTTP basic auth credentials", -} - -func (BasicAuthIdentityProvider) SwaggerDoc() map[string]string { - return map_BasicAuthIdentityProvider -} - -var map_GitHubIdentityProvider = map[string]string{ - "": "GitHubIdentityProvider provides identities for users authenticating using GitHub credentials", - "clientID": "clientID is the oauth client ID", - "clientSecret": "clientSecret is a required reference to the secret by name containing the oauth client secret. The key \"clientSecret\" is used to locate the data. If the secret or expected key is not found, the identity provider is not honored. The namespace for this secret is openshift-config.", - "organizations": "organizations optionally restricts which organizations are allowed to log in", - "teams": "teams optionally restricts which teams are allowed to log in. Format is /.", - "hostname": "hostname is the optional domain (e.g. \"mycompany.com\") for use with a hosted instance of GitHub Enterprise. It must match the GitHub Enterprise settings value configured at /setup/settings#hostname.", - "ca": "ca is an optional reference to a config map by name containing the PEM-encoded CA bundle. It is used as a trust anchor to validate the TLS certificate presented by the remote server. The key \"ca.crt\" is used to locate the data. If specified and the config map or expected key is not found, the identity provider is not honored. If the specified ca data is not valid, the identity provider is not honored. If empty, the default system roots are used. This can only be configured when hostname is set to a non-empty value. The namespace for this config map is openshift-config.", -} - -func (GitHubIdentityProvider) SwaggerDoc() map[string]string { - return map_GitHubIdentityProvider -} - -var map_GitLabIdentityProvider = map[string]string{ - "": "GitLabIdentityProvider provides identities for users authenticating using GitLab credentials", - "clientID": "clientID is the oauth client ID", - "clientSecret": "clientSecret is a required reference to the secret by name containing the oauth client secret. The key \"clientSecret\" is used to locate the data. If the secret or expected key is not found, the identity provider is not honored. The namespace for this secret is openshift-config.", - "url": "url is the oauth server base URL", - "ca": "ca is an optional reference to a config map by name containing the PEM-encoded CA bundle. It is used as a trust anchor to validate the TLS certificate presented by the remote server. The key \"ca.crt\" is used to locate the data. If specified and the config map or expected key is not found, the identity provider is not honored. If the specified ca data is not valid, the identity provider is not honored. If empty, the default system roots are used. The namespace for this config map is openshift-config.", -} - -func (GitLabIdentityProvider) SwaggerDoc() map[string]string { - return map_GitLabIdentityProvider -} - -var map_GoogleIdentityProvider = map[string]string{ - "": "GoogleIdentityProvider provides identities for users authenticating using Google credentials", - "clientID": "clientID is the oauth client ID", - "clientSecret": "clientSecret is a required reference to the secret by name containing the oauth client secret. The key \"clientSecret\" is used to locate the data. If the secret or expected key is not found, the identity provider is not honored. The namespace for this secret is openshift-config.", - "hostedDomain": "hostedDomain is the optional Google App domain (e.g. \"mycompany.com\") to restrict logins to", -} - -func (GoogleIdentityProvider) SwaggerDoc() map[string]string { - return map_GoogleIdentityProvider -} - -var map_HTPasswdIdentityProvider = map[string]string{ - "": "HTPasswdPasswordIdentityProvider provides identities for users authenticating using htpasswd credentials", - "fileData": "fileData is a required reference to a secret by name containing the data to use as the htpasswd file. The key \"htpasswd\" is used to locate the data. If the secret or expected key is not found, the identity provider is not honored. If the specified htpasswd data is not valid, the identity provider is not honored. The namespace for this secret is openshift-config.", -} - -func (HTPasswdIdentityProvider) SwaggerDoc() map[string]string { - return map_HTPasswdIdentityProvider -} - -var map_IdentityProvider = map[string]string{ - "": "IdentityProvider provides identities for users authenticating using credentials", - "name": "name is used to qualify the identities returned by this provider. - It MUST be unique and not shared by any other identity provider used - It MUST be a valid path segment: name cannot equal \".\" or \"..\" or contain \"/\" or \"%\" or \":\"\n Ref: https://godoc.org/github.com/openshift/origin/pkg/user/apis/user/validation#ValidateIdentityProviderName", - "mappingMethod": "mappingMethod determines how identities from this provider are mapped to users Defaults to \"claim\"", -} - -func (IdentityProvider) SwaggerDoc() map[string]string { - return map_IdentityProvider -} - -var map_IdentityProviderConfig = map[string]string{ - "": "IdentityProviderConfig contains configuration for using a specific identity provider", - "type": "type identifies the identity provider type for this entry.", - "basicAuth": "basicAuth contains configuration options for the BasicAuth IdP", - "github": "github enables user authentication using GitHub credentials", - "gitlab": "gitlab enables user authentication using GitLab credentials", - "google": "google enables user authentication using Google credentials", - "htpasswd": "htpasswd enables user authentication using an HTPasswd file to validate credentials", - "keystone": "keystone enables user authentication using keystone password credentials", - "ldap": "ldap enables user authentication using LDAP credentials", - "openID": "openID enables user authentication using OpenID credentials", - "requestHeader": "requestHeader enables user authentication using request header credentials", -} - -func (IdentityProviderConfig) SwaggerDoc() map[string]string { - return map_IdentityProviderConfig -} - -var map_KeystoneIdentityProvider = map[string]string{ - "": "KeystonePasswordIdentityProvider provides identities for users authenticating using keystone password credentials", - "domainName": "domainName is required for keystone v3", -} - -func (KeystoneIdentityProvider) SwaggerDoc() map[string]string { - return map_KeystoneIdentityProvider -} - -var map_LDAPAttributeMapping = map[string]string{ - "": "LDAPAttributeMapping maps LDAP attributes to OpenShift identity fields", - "id": "id is the list of attributes whose values should be used as the user ID. Required. First non-empty attribute is used. At least one attribute is required. If none of the listed attribute have a value, authentication fails. LDAP standard identity attribute is \"dn\"", - "preferredUsername": "preferredUsername is the list of attributes whose values should be used as the preferred username. LDAP standard login attribute is \"uid\"", - "name": "name is the list of attributes whose values should be used as the display name. Optional. If unspecified, no display name is set for the identity LDAP standard display name attribute is \"cn\"", - "email": "email is the list of attributes whose values should be used as the email address. Optional. If unspecified, no email is set for the identity", -} - -func (LDAPAttributeMapping) SwaggerDoc() map[string]string { - return map_LDAPAttributeMapping -} - -var map_LDAPIdentityProvider = map[string]string{ - "": "LDAPPasswordIdentityProvider provides identities for users authenticating using LDAP credentials", - "url": "url is an RFC 2255 URL which specifies the LDAP search parameters to use. The syntax of the URL is: ldap://host:port/basedn?attribute?scope?filter", - "bindDN": "bindDN is an optional DN to bind with during the search phase.", - "bindPassword": "bindPassword is an optional reference to a secret by name containing a password to bind with during the search phase. The key \"bindPassword\" is used to locate the data. If specified and the secret or expected key is not found, the identity provider is not honored. The namespace for this secret is openshift-config.", - "insecure": "insecure, if true, indicates the connection should not use TLS WARNING: Should not be set to `true` with the URL scheme \"ldaps://\" as \"ldaps://\" URLs always\n attempt to connect using TLS, even when `insecure` is set to `true`\nWhen `true`, \"ldap://\" URLS connect insecurely. When `false`, \"ldap://\" URLs are upgraded to a TLS connection using StartTLS as specified in https://tools.ietf.org/html/rfc2830.", - "ca": "ca is an optional reference to a config map by name containing the PEM-encoded CA bundle. It is used as a trust anchor to validate the TLS certificate presented by the remote server. The key \"ca.crt\" is used to locate the data. If specified and the config map or expected key is not found, the identity provider is not honored. If the specified ca data is not valid, the identity provider is not honored. If empty, the default system roots are used. The namespace for this config map is openshift-config.", - "attributes": "attributes maps LDAP attributes to identities", -} - -func (LDAPIdentityProvider) SwaggerDoc() map[string]string { - return map_LDAPIdentityProvider -} - -var map_OAuth = map[string]string{ - "": "OAuth holds cluster-wide information about OAuth. The canonical name is `cluster`. It is used to configure the integrated OAuth server. This configuration is only honored when the top level Authentication config has type set to IntegratedOAuth.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "spec": "spec holds user settable values for configuration", - "status": "status holds observed values from the cluster. They may not be overridden.", -} - -func (OAuth) SwaggerDoc() map[string]string { - return map_OAuth -} - -var map_OAuthList = map[string]string{ - "": "Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", -} - -func (OAuthList) SwaggerDoc() map[string]string { - return map_OAuthList -} - -var map_OAuthRemoteConnectionInfo = map[string]string{ - "": "OAuthRemoteConnectionInfo holds information necessary for establishing a remote connection", - "url": "url is the remote URL to connect to", - "ca": "ca is an optional reference to a config map by name containing the PEM-encoded CA bundle. It is used as a trust anchor to validate the TLS certificate presented by the remote server. The key \"ca.crt\" is used to locate the data. If specified and the config map or expected key is not found, the identity provider is not honored. If the specified ca data is not valid, the identity provider is not honored. If empty, the default system roots are used. The namespace for this config map is openshift-config.", - "tlsClientCert": "tlsClientCert is an optional reference to a secret by name that contains the PEM-encoded TLS client certificate to present when connecting to the server. The key \"tls.crt\" is used to locate the data. If specified and the secret or expected key is not found, the identity provider is not honored. If the specified certificate data is not valid, the identity provider is not honored. The namespace for this secret is openshift-config.", - "tlsClientKey": "tlsClientKey is an optional reference to a secret by name that contains the PEM-encoded TLS private key for the client certificate referenced in tlsClientCert. The key \"tls.key\" is used to locate the data. If specified and the secret or expected key is not found, the identity provider is not honored. If the specified certificate data is not valid, the identity provider is not honored. The namespace for this secret is openshift-config.", -} - -func (OAuthRemoteConnectionInfo) SwaggerDoc() map[string]string { - return map_OAuthRemoteConnectionInfo -} - -var map_OAuthSpec = map[string]string{ - "": "OAuthSpec contains desired cluster auth configuration", - "identityProviders": "identityProviders is an ordered list of ways for a user to identify themselves. When this list is empty, no identities are provisioned for users.", - "tokenConfig": "tokenConfig contains options for authorization and access tokens", - "templates": "templates allow you to customize pages like the login page.", -} - -func (OAuthSpec) SwaggerDoc() map[string]string { - return map_OAuthSpec -} - -var map_OAuthStatus = map[string]string{ - "": "OAuthStatus shows current known state of OAuth server in the cluster", -} - -func (OAuthStatus) SwaggerDoc() map[string]string { - return map_OAuthStatus -} - -var map_OAuthTemplates = map[string]string{ - "": "OAuthTemplates allow for customization of pages like the login page", - "login": "login is the name of a secret that specifies a go template to use to render the login page. The key \"login.html\" is used to locate the template data. If specified and the secret or expected key is not found, the default login page is used. If the specified template is not valid, the default login page is used. If unspecified, the default login page is used. The namespace for this secret is openshift-config.", - "providerSelection": "providerSelection is the name of a secret that specifies a go template to use to render the provider selection page. The key \"providers.html\" is used to locate the template data. If specified and the secret or expected key is not found, the default provider selection page is used. If the specified template is not valid, the default provider selection page is used. If unspecified, the default provider selection page is used. The namespace for this secret is openshift-config.", - "error": "error is the name of a secret that specifies a go template to use to render error pages during the authentication or grant flow. The key \"errors.html\" is used to locate the template data. If specified and the secret or expected key is not found, the default error page is used. If the specified template is not valid, the default error page is used. If unspecified, the default error page is used. The namespace for this secret is openshift-config.", -} - -func (OAuthTemplates) SwaggerDoc() map[string]string { - return map_OAuthTemplates -} - -var map_OpenIDClaims = map[string]string{ - "": "OpenIDClaims contains a list of OpenID claims to use when authenticating with an OpenID identity provider", - "preferredUsername": "preferredUsername is the list of claims whose values should be used as the preferred username. If unspecified, the preferred username is determined from the value of the sub claim", - "name": "name is the list of claims whose values should be used as the display name. Optional. If unspecified, no display name is set for the identity", - "email": "email is the list of claims whose values should be used as the email address. Optional. If unspecified, no email is set for the identity", - "groups": "groups is the list of claims value of which should be used to synchronize groups from the OIDC provider to OpenShift for the user. If multiple claims are specified, the first one with a non-empty value is used.", -} - -func (OpenIDClaims) SwaggerDoc() map[string]string { - return map_OpenIDClaims -} - -var map_OpenIDIdentityProvider = map[string]string{ - "": "OpenIDIdentityProvider provides identities for users authenticating using OpenID credentials", - "clientID": "clientID is the oauth client ID", - "clientSecret": "clientSecret is a required reference to the secret by name containing the oauth client secret. The key \"clientSecret\" is used to locate the data. If the secret or expected key is not found, the identity provider is not honored. The namespace for this secret is openshift-config.", - "ca": "ca is an optional reference to a config map by name containing the PEM-encoded CA bundle. It is used as a trust anchor to validate the TLS certificate presented by the remote server. The key \"ca.crt\" is used to locate the data. If specified and the config map or expected key is not found, the identity provider is not honored. If the specified ca data is not valid, the identity provider is not honored. If empty, the default system roots are used. The namespace for this config map is openshift-config.", - "extraScopes": "extraScopes are any scopes to request in addition to the standard \"openid\" scope.", - "extraAuthorizeParameters": "extraAuthorizeParameters are any custom parameters to add to the authorize request.", - "issuer": "issuer is the URL that the OpenID Provider asserts as its Issuer Identifier. It must use the https scheme with no query or fragment component.", - "claims": "claims mappings", -} - -func (OpenIDIdentityProvider) SwaggerDoc() map[string]string { - return map_OpenIDIdentityProvider -} - -var map_RequestHeaderIdentityProvider = map[string]string{ - "": "RequestHeaderIdentityProvider provides identities for users authenticating using request header credentials", - "loginURL": "loginURL is a URL to redirect unauthenticated /authorize requests to Unauthenticated requests from OAuth clients which expect interactive logins will be redirected here ${url} is replaced with the current URL, escaped to be safe in a query parameter\n https://www.example.com/sso-login?then=${url}\n${query} is replaced with the current query string\n https://www.example.com/auth-proxy/oauth/authorize?${query}\nRequired when login is set to true.", - "challengeURL": "challengeURL is a URL to redirect unauthenticated /authorize requests to Unauthenticated requests from OAuth clients which expect WWW-Authenticate challenges will be redirected here. ${url} is replaced with the current URL, escaped to be safe in a query parameter\n https://www.example.com/sso-login?then=${url}\n${query} is replaced with the current query string\n https://www.example.com/auth-proxy/oauth/authorize?${query}\nRequired when challenge is set to true.", - "ca": "ca is a required reference to a config map by name containing the PEM-encoded CA bundle. It is used as a trust anchor to validate the TLS certificate presented by the remote server. Specifically, it allows verification of incoming requests to prevent header spoofing. The key \"ca.crt\" is used to locate the data. If the config map or expected key is not found, the identity provider is not honored. If the specified ca data is not valid, the identity provider is not honored. The namespace for this config map is openshift-config.", - "clientCommonNames": "clientCommonNames is an optional list of common names to require a match from. If empty, any client certificate validated against the clientCA bundle is considered authoritative.", - "headers": "headers is the set of headers to check for identity information", - "preferredUsernameHeaders": "preferredUsernameHeaders is the set of headers to check for the preferred username", - "nameHeaders": "nameHeaders is the set of headers to check for the display name", - "emailHeaders": "emailHeaders is the set of headers to check for the email address", -} - -func (RequestHeaderIdentityProvider) SwaggerDoc() map[string]string { - return map_RequestHeaderIdentityProvider -} - -var map_TokenConfig = map[string]string{ - "": "TokenConfig holds the necessary configuration options for authorization and access tokens", - "accessTokenMaxAgeSeconds": "accessTokenMaxAgeSeconds defines the maximum age of access tokens", - "accessTokenInactivityTimeoutSeconds": "accessTokenInactivityTimeoutSeconds - DEPRECATED: setting this field has no effect.", - "accessTokenInactivityTimeout": "accessTokenInactivityTimeout defines the token inactivity timeout for tokens granted by any client. The value represents the maximum amount of time that can occur between consecutive uses of the token. Tokens become invalid if they are not used within this temporal window. The user will need to acquire a new token to regain access once a token times out. Takes valid time duration string such as \"5m\", \"1.5h\" or \"2h45m\". The minimum allowed value for duration is 300s (5 minutes). If the timeout is configured per client, then that value takes precedence. If the timeout value is not specified and the client does not override the value, then tokens are valid until their lifetime.\n\nWARNING: existing tokens' timeout will not be affected (lowered) by changing this value", -} - -func (TokenConfig) SwaggerDoc() map[string]string { - return map_TokenConfig -} - -var map_HubSource = map[string]string{ - "": "HubSource is used to specify the hub source and its configuration", - "name": "name is the name of one of the default hub sources", - "disabled": "disabled is used to disable a default hub source on cluster", -} - -func (HubSource) SwaggerDoc() map[string]string { - return map_HubSource -} - -var map_HubSourceStatus = map[string]string{ - "": "HubSourceStatus is used to reflect the current state of applying the configuration to a default source", - "status": "status indicates success or failure in applying the configuration", - "message": "message provides more information regarding failures", -} - -func (HubSourceStatus) SwaggerDoc() map[string]string { - return map_HubSourceStatus -} - -var map_OperatorHub = map[string]string{ - "": "OperatorHub is the Schema for the operatorhubs API. It can be used to change the state of the default hub sources for OperatorHub on the cluster from enabled to disabled and vice versa.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", -} - -func (OperatorHub) SwaggerDoc() map[string]string { - return map_OperatorHub -} - -var map_OperatorHubList = map[string]string{ - "": "OperatorHubList contains a list of OperatorHub\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", -} - -func (OperatorHubList) SwaggerDoc() map[string]string { - return map_OperatorHubList -} - -var map_OperatorHubSpec = map[string]string{ - "": "OperatorHubSpec defines the desired state of OperatorHub", - "disableAllDefaultSources": "disableAllDefaultSources allows you to disable all the default hub sources. If this is true, a specific entry in sources can be used to enable a default source. If this is false, a specific entry in sources can be used to disable or enable a default source.", - "sources": "sources is the list of default hub sources and their configuration. If the list is empty, it implies that the default hub sources are enabled on the cluster unless disableAllDefaultSources is true. If disableAllDefaultSources is true and sources is not empty, the configuration present in sources will take precedence. The list of default hub sources and their current state will always be reflected in the status block.", -} - -func (OperatorHubSpec) SwaggerDoc() map[string]string { - return map_OperatorHubSpec -} - -var map_OperatorHubStatus = map[string]string{ - "": "OperatorHubStatus defines the observed state of OperatorHub. The current state of the default hub sources will always be reflected here.", - "sources": "sources encapsulates the result of applying the configuration for each hub source", -} - -func (OperatorHubStatus) SwaggerDoc() map[string]string { - return map_OperatorHubStatus -} - -var map_Project = map[string]string{ - "": "Project holds cluster-wide information about Project. The canonical name is `cluster`\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "spec": "spec holds user settable values for configuration", - "status": "status holds observed values from the cluster. They may not be overridden.", -} - -func (Project) SwaggerDoc() map[string]string { - return map_Project -} - -var map_ProjectList = map[string]string{ - "": "Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", -} - -func (ProjectList) SwaggerDoc() map[string]string { - return map_ProjectList -} - -var map_ProjectSpec = map[string]string{ - "": "ProjectSpec holds the project creation configuration.", - "projectRequestMessage": "projectRequestMessage is the string presented to a user if they are unable to request a project via the projectrequest api endpoint", - "projectRequestTemplate": "projectRequestTemplate is the template to use for creating projects in response to projectrequest. This must point to a template in 'openshift-config' namespace. It is optional. If it is not specified, a default template is used.", -} - -func (ProjectSpec) SwaggerDoc() map[string]string { - return map_ProjectSpec -} - -var map_TemplateReference = map[string]string{ - "": "TemplateReference references a template in a specific namespace. The namespace must be specified at the point of use.", - "name": "name is the metadata.name of the referenced project request template", -} - -func (TemplateReference) SwaggerDoc() map[string]string { - return map_TemplateReference -} - -var map_Proxy = map[string]string{ - "": "Proxy holds cluster-wide information on how to configure default proxies for the cluster. The canonical name is `cluster`\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "spec": "Spec holds user-settable values for the proxy configuration", - "status": "status holds observed values from the cluster. They may not be overridden.", -} - -func (Proxy) SwaggerDoc() map[string]string { - return map_Proxy -} - -var map_ProxyList = map[string]string{ - "": "Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", -} - -func (ProxyList) SwaggerDoc() map[string]string { - return map_ProxyList -} - -var map_ProxySpec = map[string]string{ - "": "ProxySpec contains cluster proxy creation configuration.", - "httpProxy": "httpProxy is the URL of the proxy for HTTP requests. Empty means unset and will not result in an env var.", - "httpsProxy": "httpsProxy is the URL of the proxy for HTTPS requests. Empty means unset and will not result in an env var.", - "noProxy": "noProxy is a comma-separated list of hostnames and/or CIDRs and/or IPs for which the proxy should not be used. Empty means unset and will not result in an env var.", - "readinessEndpoints": "readinessEndpoints is a list of endpoints used to verify readiness of the proxy.", - "trustedCA": "trustedCA is a reference to a ConfigMap containing a CA certificate bundle. The trustedCA field should only be consumed by a proxy validator. The validator is responsible for reading the certificate bundle from the required key \"ca-bundle.crt\", merging it with the system default trust bundle, and writing the merged trust bundle to a ConfigMap named \"trusted-ca-bundle\" in the \"openshift-config-managed\" namespace. Clients that expect to make proxy connections must use the trusted-ca-bundle for all HTTPS requests to the proxy, and may use the trusted-ca-bundle for non-proxy HTTPS requests as well.\n\nThe namespace for the ConfigMap referenced by trustedCA is \"openshift-config\". Here is an example ConfigMap (in yaml):\n\napiVersion: v1 kind: ConfigMap metadata:\n name: user-ca-bundle\n namespace: openshift-config\n data:\n ca-bundle.crt: |", -} - -func (ProxySpec) SwaggerDoc() map[string]string { - return map_ProxySpec -} - -var map_ProxyStatus = map[string]string{ - "": "ProxyStatus shows current known state of the cluster proxy.", - "httpProxy": "httpProxy is the URL of the proxy for HTTP requests.", - "httpsProxy": "httpsProxy is the URL of the proxy for HTTPS requests.", - "noProxy": "noProxy is a comma-separated list of hostnames and/or CIDRs for which the proxy should not be used.", -} - -func (ProxyStatus) SwaggerDoc() map[string]string { - return map_ProxyStatus -} - -var map_Scheduler = map[string]string{ - "": "Scheduler holds cluster-wide config information to run the Kubernetes Scheduler and influence its placement decisions. The canonical name for this config is `cluster`.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "spec": "spec holds user settable values for configuration", - "status": "status holds observed values from the cluster. They may not be overridden.", -} - -func (Scheduler) SwaggerDoc() map[string]string { - return map_Scheduler -} - -var map_SchedulerList = map[string]string{ - "": "Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", -} - -func (SchedulerList) SwaggerDoc() map[string]string { - return map_SchedulerList -} - -var map_SchedulerSpec = map[string]string{ - "policy": "DEPRECATED: the scheduler Policy API has been deprecated and will be removed in a future release. policy is a reference to a ConfigMap containing scheduler policy which has user specified predicates and priorities. If this ConfigMap is not available scheduler will default to use DefaultAlgorithmProvider. The namespace for this configmap is openshift-config.", - "profile": "profile sets which scheduling profile should be set in order to configure scheduling decisions for new pods.\n\nValid values are \"LowNodeUtilization\", \"HighNodeUtilization\", \"NoScoring\" Defaults to \"LowNodeUtilization\"", - "defaultNodeSelector": "defaultNodeSelector helps set the cluster-wide default node selector to restrict pod placement to specific nodes. This is applied to the pods created in all namespaces and creates an intersection with any existing nodeSelectors already set on a pod, additionally constraining that pod's selector. For example, defaultNodeSelector: \"type=user-node,region=east\" would set nodeSelector field in pod spec to \"type=user-node,region=east\" to all pods created in all namespaces. Namespaces having project-wide node selectors won't be impacted even if this field is set. This adds an annotation section to the namespace. For example, if a new namespace is created with node-selector='type=user-node,region=east', the annotation openshift.io/node-selector: type=user-node,region=east gets added to the project. When the openshift.io/node-selector annotation is set on the project the value is used in preference to the value we are setting for defaultNodeSelector field. For instance, openshift.io/node-selector: \"type=user-node,region=west\" means that the default of \"type=user-node,region=east\" set in defaultNodeSelector would not be applied.", - "mastersSchedulable": "MastersSchedulable allows masters nodes to be schedulable. When this flag is turned on, all the master nodes in the cluster will be made schedulable, so that workload pods can run on them. The default value for this field is false, meaning none of the master nodes are schedulable. Important Note: Once the workload pods start running on the master nodes, extreme care must be taken to ensure that cluster-critical control plane components are not impacted. Please turn on this field after doing due diligence.", -} - -func (SchedulerSpec) SwaggerDoc() map[string]string { - return map_SchedulerSpec -} - -var map_CustomTLSProfile = map[string]string{ - "": "CustomTLSProfile is a user-defined TLS security profile. Be extremely careful using a custom TLS profile as invalid configurations can be catastrophic.", -} - -func (CustomTLSProfile) SwaggerDoc() map[string]string { - return map_CustomTLSProfile -} - -var map_IntermediateTLSProfile = map[string]string{ - "": "IntermediateTLSProfile is a TLS security profile based on: https://wiki.mozilla.org/Security/Server_Side_TLS#Intermediate_compatibility_.28default.29", -} - -func (IntermediateTLSProfile) SwaggerDoc() map[string]string { - return map_IntermediateTLSProfile -} - -var map_ModernTLSProfile = map[string]string{ - "": "ModernTLSProfile is a TLS security profile based on: https://wiki.mozilla.org/Security/Server_Side_TLS#Modern_compatibility", -} - -func (ModernTLSProfile) SwaggerDoc() map[string]string { - return map_ModernTLSProfile -} - -var map_OldTLSProfile = map[string]string{ - "": "OldTLSProfile is a TLS security profile based on: https://wiki.mozilla.org/Security/Server_Side_TLS#Old_backward_compatibility", -} - -func (OldTLSProfile) SwaggerDoc() map[string]string { - return map_OldTLSProfile -} - -var map_TLSProfileSpec = map[string]string{ - "": "TLSProfileSpec is the desired behavior of a TLSSecurityProfile.", - "ciphers": "ciphers is used to specify the cipher algorithms that are negotiated during the TLS handshake. Operators may remove entries their operands do not support. For example, to use DES-CBC3-SHA (yaml):\n\n ciphers:\n - DES-CBC3-SHA", - "minTLSVersion": "minTLSVersion is used to specify the minimal version of the TLS protocol that is negotiated during the TLS handshake. For example, to use TLS versions 1.1, 1.2 and 1.3 (yaml):\n\n minTLSVersion: TLSv1.1\n\nNOTE: currently the highest minTLSVersion allowed is VersionTLS12", -} - -func (TLSProfileSpec) SwaggerDoc() map[string]string { - return map_TLSProfileSpec -} - -var map_TLSSecurityProfile = map[string]string{ - "": "TLSSecurityProfile defines the schema for a TLS security profile. This object is used by operators to apply TLS security settings to operands.", - "type": "type is one of Old, Intermediate, Modern or Custom. Custom provides the ability to specify individual TLS security profile parameters. Old, Intermediate and Modern are TLS security profiles based on:\n\nhttps://wiki.mozilla.org/Security/Server_Side_TLS#Recommended_configurations\n\nThe profiles are intent based, so they may change over time as new ciphers are developed and existing ciphers are found to be insecure. Depending on precisely which ciphers are available to a process, the list may be reduced.\n\nNote that the Modern profile is currently not supported because it is not yet well adopted by common software libraries.", - "old": "old is a TLS security profile based on:\n\nhttps://wiki.mozilla.org/Security/Server_Side_TLS#Old_backward_compatibility\n\nand looks like this (yaml):\n\n ciphers:\n - TLS_AES_128_GCM_SHA256\n - TLS_AES_256_GCM_SHA384\n - TLS_CHACHA20_POLY1305_SHA256\n - ECDHE-ECDSA-AES128-GCM-SHA256\n - ECDHE-RSA-AES128-GCM-SHA256\n - ECDHE-ECDSA-AES256-GCM-SHA384\n - ECDHE-RSA-AES256-GCM-SHA384\n - ECDHE-ECDSA-CHACHA20-POLY1305\n - ECDHE-RSA-CHACHA20-POLY1305\n - DHE-RSA-AES128-GCM-SHA256\n - DHE-RSA-AES256-GCM-SHA384\n - DHE-RSA-CHACHA20-POLY1305\n - ECDHE-ECDSA-AES128-SHA256\n - ECDHE-RSA-AES128-SHA256\n - ECDHE-ECDSA-AES128-SHA\n - ECDHE-RSA-AES128-SHA\n - ECDHE-ECDSA-AES256-SHA384\n - ECDHE-RSA-AES256-SHA384\n - ECDHE-ECDSA-AES256-SHA\n - ECDHE-RSA-AES256-SHA\n - DHE-RSA-AES128-SHA256\n - DHE-RSA-AES256-SHA256\n - AES128-GCM-SHA256\n - AES256-GCM-SHA384\n - AES128-SHA256\n - AES256-SHA256\n - AES128-SHA\n - AES256-SHA\n - DES-CBC3-SHA\n minTLSVersion: TLSv1.0", - "intermediate": "intermediate is a TLS security profile based on:\n\nhttps://wiki.mozilla.org/Security/Server_Side_TLS#Intermediate_compatibility_.28recommended.29\n\nand looks like this (yaml):\n\n ciphers:\n - TLS_AES_128_GCM_SHA256\n - TLS_AES_256_GCM_SHA384\n - TLS_CHACHA20_POLY1305_SHA256\n - ECDHE-ECDSA-AES128-GCM-SHA256\n - ECDHE-RSA-AES128-GCM-SHA256\n - ECDHE-ECDSA-AES256-GCM-SHA384\n - ECDHE-RSA-AES256-GCM-SHA384\n - ECDHE-ECDSA-CHACHA20-POLY1305\n - ECDHE-RSA-CHACHA20-POLY1305\n - DHE-RSA-AES128-GCM-SHA256\n - DHE-RSA-AES256-GCM-SHA384\n minTLSVersion: TLSv1.2", - "modern": "modern is a TLS security profile based on:\n\nhttps://wiki.mozilla.org/Security/Server_Side_TLS#Modern_compatibility\n\nand looks like this (yaml):\n\n ciphers:\n - TLS_AES_128_GCM_SHA256\n - TLS_AES_256_GCM_SHA384\n - TLS_CHACHA20_POLY1305_SHA256\n minTLSVersion: TLSv1.3\n\nNOTE: Currently unsupported.", - "custom": "custom is a user-defined TLS security profile. Be extremely careful using a custom profile as invalid configurations can be catastrophic. An example custom profile looks like this:\n\n ciphers:\n - ECDHE-ECDSA-CHACHA20-POLY1305\n - ECDHE-RSA-CHACHA20-POLY1305\n - ECDHE-RSA-AES128-GCM-SHA256\n - ECDHE-ECDSA-AES128-GCM-SHA256\n minTLSVersion: TLSv1.1", -} - -func (TLSSecurityProfile) SwaggerDoc() map[string]string { - return map_TLSSecurityProfile -} - -// AUTO-GENERATED FUNCTIONS END HERE diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/doc.go b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/doc.go index 2a6b02dcc..3f017ff42 100644 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/doc.go +++ b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/doc.go @@ -18,4 +18,4 @@ limitations under the License. // +groupName=apiextensions.k8s.io // Package apiextensions is the internal version of the API. -package apiextensions // import "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions" +package apiextensions diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/types_jsonschema.go b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/types_jsonschema.go index 8c4e147f0..61efeae69 100644 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/types_jsonschema.go +++ b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/types_jsonschema.go @@ -144,7 +144,6 @@ type JSONSchemaProps struct { XMapType *string // x-kubernetes-validations -kubernetes-validations describes a list of validation rules written in the CEL expression language. - // This field is an alpha-level. Using this field requires the feature gate `CustomResourceValidationExpressions` to be enabled. // +patchMergeKey=rule // +patchStrategy=merge // +listType=map diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/conversion.go b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/conversion.go index 2ca72bb16..98ee94b19 100644 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/conversion.go +++ b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/conversion.go @@ -65,7 +65,7 @@ func Convert_v1_JSON_To_apiextensions_JSON(in *JSON, out *apiextensions.JSON, s } *out = i } else { - out = nil + *out = nil } return nil } diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/defaults.go b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/defaults.go index 5cebec927..629501470 100644 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/defaults.go +++ b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/defaults.go @@ -20,7 +20,7 @@ import ( "strings" "k8s.io/apimachinery/pkg/runtime" - utilpointer "k8s.io/utils/pointer" + "k8s.io/utils/ptr" ) func addDefaultingFuncs(scheme *runtime.Scheme) error { @@ -56,6 +56,6 @@ func SetDefaults_CustomResourceDefinitionSpec(obj *CustomResourceDefinitionSpec) // SetDefaults_ServiceReference sets defaults for Webhook's ServiceReference func SetDefaults_ServiceReference(obj *ServiceReference) { if obj.Port == nil { - obj.Port = utilpointer.Int32Ptr(443) + obj.Port = ptr.To[int32](443) } } diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/doc.go b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/doc.go index 09d4872f8..39e70bb03 100644 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/doc.go +++ b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/doc.go @@ -19,7 +19,8 @@ limitations under the License. // +k8s:conversion-gen=k8s.io/apiextensions-apiserver/pkg/apis/apiextensions // +k8s:defaulter-gen=TypeMeta // +k8s:openapi-gen=true +// +k8s:prerelease-lifecycle-gen=true // +groupName=apiextensions.k8s.io // Package v1 is the v1 version of the API. -package v1 // import "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" +package v1 diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/generated.proto b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/generated.proto index 2ad78822f..1bbd0ce13 100644 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/generated.proto +++ b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/generated.proto @@ -41,7 +41,7 @@ message ConversionRequest { // objects is the list of custom resource objects to be converted. // +listType=atomic - repeated k8s.io.apimachinery.pkg.runtime.RawExtension objects = 3; + repeated .k8s.io.apimachinery.pkg.runtime.RawExtension objects = 3; } // ConversionResponse describes a conversion response. @@ -55,14 +55,14 @@ message ConversionResponse { // must also have the same size as the input list with the same objects in the same order (equal kind, metadata.uid, metadata.name and metadata.namespace). // The webhook is allowed to mutate labels and annotations. Any other change to the metadata is silently ignored. // +listType=atomic - repeated k8s.io.apimachinery.pkg.runtime.RawExtension convertedObjects = 2; + repeated .k8s.io.apimachinery.pkg.runtime.RawExtension convertedObjects = 2; // result contains the result of conversion with extra details if the conversion failed. `result.status` determines if // the conversion failed or succeeded. The `result.status` field is required and represents the success or failure of the // conversion. A successful conversion must set `result.status` to `Success`. A failed conversion must set // `result.status` to `Failure` and provide more details in `result.message` and return http status 200. The `result.message` // will be used to construct an error message for the end user. - optional k8s.io.apimachinery.pkg.apis.meta.v1.Status result = 3; + optional .k8s.io.apimachinery.pkg.apis.meta.v1.Status result = 3; } // ConversionReview describes a conversion request/response. @@ -125,7 +125,7 @@ message CustomResourceDefinition { // Standard object's metadata // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; + optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // spec describes how the user wants the resources to appear optional CustomResourceDefinitionSpec spec = 2; @@ -146,7 +146,7 @@ message CustomResourceDefinitionCondition { // lastTransitionTime last time the condition transitioned from one status to another. // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 3; + optional .k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 3; // reason is a unique, one-word, CamelCase reason for the condition's last transition. // +optional @@ -162,7 +162,7 @@ message CustomResourceDefinitionList { // Standard object's metadata // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; + optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; // items list individual CustomResourceDefinition objects repeated CustomResourceDefinition items = 2; @@ -573,7 +573,6 @@ message JSONSchemaProps { optional string xKubernetesMapType = 43; // x-kubernetes-validations describes a list of validation rules written in the CEL expression language. - // This field is an alpha-level. Using this field requires the feature gate `CustomResourceValidationExpressions` to be enabled. // +patchMergeKey=rule // +patchStrategy=merge // +listType=map diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/marshal.go b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/marshal.go index 12cc2f6f2..6ade24a82 100644 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/marshal.go +++ b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/marshal.go @@ -20,12 +20,42 @@ import ( "bytes" "errors" + cbor "k8s.io/apimachinery/pkg/runtime/serializer/cbor/direct" "k8s.io/apimachinery/pkg/util/json" ) var jsTrue = []byte("true") var jsFalse = []byte("false") +// The CBOR parsing related constants and functions below are not exported so they can be +// easily removed at a future date when the CBOR library provides equivalent functionality. + +type cborMajorType int + +const ( + // https://www.rfc-editor.org/rfc/rfc8949.html#section-3.1 + cborUnsignedInteger cborMajorType = 0 + cborNegativeInteger cborMajorType = 1 + cborByteString cborMajorType = 2 + cborTextString cborMajorType = 3 + cborArray cborMajorType = 4 + cborMap cborMajorType = 5 + cborTag cborMajorType = 6 + cborOther cborMajorType = 7 +) + +const ( + // from https://www.rfc-editor.org/rfc/rfc8949.html#name-jump-table-for-initial-byte. + // additionally, see https://www.rfc-editor.org/rfc/rfc8949.html#section-3.3-5. + cborFalseValue = 0xf4 + cborTrueValue = 0xf5 + cborNullValue = 0xf6 +) + +func cborType(b byte) cborMajorType { + return cborMajorType(b >> 5) +} + func (s JSONSchemaPropsOrBool) MarshalJSON() ([]byte, error) { if s.Schema != nil { return json.Marshal(s.Schema) @@ -59,6 +89,39 @@ func (s *JSONSchemaPropsOrBool) UnmarshalJSON(data []byte) error { return nil } +func (s JSONSchemaPropsOrBool) MarshalCBOR() ([]byte, error) { + if s.Schema != nil { + return cbor.Marshal(s.Schema) + } + return cbor.Marshal(s.Allows) +} + +func (s *JSONSchemaPropsOrBool) UnmarshalCBOR(data []byte) error { + switch { + case len(data) == 0: + // ideally we would avoid modifying *s here, but we are matching the behavior of UnmarshalJSON + *s = JSONSchemaPropsOrBool{} + return nil + case cborType(data[0]) == cborMap: + var p JSONSchemaProps + if err := cbor.Unmarshal(data, &p); err != nil { + return err + } + *s = JSONSchemaPropsOrBool{Allows: true, Schema: &p} + return nil + case data[0] == cborTrueValue: + *s = JSONSchemaPropsOrBool{Allows: true} + return nil + case data[0] == cborFalseValue: + *s = JSONSchemaPropsOrBool{Allows: false} + return nil + default: + // ideally, this case would not also capture a null input value, + // but we are matching the behavior of the UnmarshalJSON + return errors.New("boolean or JSON schema expected") + } +} + func (s JSONSchemaPropsOrStringArray) MarshalJSON() ([]byte, error) { if len(s.Property) > 0 { return json.Marshal(s.Property) @@ -91,6 +154,40 @@ func (s *JSONSchemaPropsOrStringArray) UnmarshalJSON(data []byte) error { return nil } +func (s JSONSchemaPropsOrStringArray) MarshalCBOR() ([]byte, error) { + if len(s.Property) > 0 { + return cbor.Marshal(s.Property) + } + if s.Schema != nil { + return cbor.Marshal(s.Schema) + } + return cbor.Marshal(nil) +} + +func (s *JSONSchemaPropsOrStringArray) UnmarshalCBOR(data []byte) error { + if len(data) > 0 && cborType(data[0]) == cborArray { + var a []string + if err := cbor.Unmarshal(data, &a); err != nil { + return err + } + *s = JSONSchemaPropsOrStringArray{Property: a} + return nil + } + if len(data) > 0 && cborType(data[0]) == cborMap { + var p JSONSchemaProps + if err := cbor.Unmarshal(data, &p); err != nil { + return err + } + *s = JSONSchemaPropsOrStringArray{Schema: &p} + return nil + } + // At this point we either have: empty data, a null value, or an + // unexpected type. In order to match the behavior of the existing + // UnmarshalJSON, no error is returned and *s is overwritten here. + *s = JSONSchemaPropsOrStringArray{} + return nil +} + func (s JSONSchemaPropsOrArray) MarshalJSON() ([]byte, error) { if len(s.JSONSchemas) > 0 { return json.Marshal(s.JSONSchemas) @@ -120,6 +217,37 @@ func (s *JSONSchemaPropsOrArray) UnmarshalJSON(data []byte) error { return nil } +func (s JSONSchemaPropsOrArray) MarshalCBOR() ([]byte, error) { + if len(s.JSONSchemas) > 0 { + return cbor.Marshal(s.JSONSchemas) + } + return cbor.Marshal(s.Schema) +} + +func (s *JSONSchemaPropsOrArray) UnmarshalCBOR(data []byte) error { + if len(data) > 0 && cborType(data[0]) == cborMap { + var p JSONSchemaProps + if err := cbor.Unmarshal(data, &p); err != nil { + return err + } + *s = JSONSchemaPropsOrArray{Schema: &p} + return nil + } + if len(data) > 0 && cborType(data[0]) == cborArray { + var a []JSONSchemaProps + if err := cbor.Unmarshal(data, &a); err != nil { + return err + } + *s = JSONSchemaPropsOrArray{JSONSchemas: a} + return nil + } + // At this point we either have: empty data, a null value, or an + // unexpected type. In order to match the behavior of the existing + // UnmarshalJSON, no error is returned and *s is overwritten here. + *s = JSONSchemaPropsOrArray{} + return nil +} + func (s JSON) MarshalJSON() ([]byte, error) { if len(s.Raw) > 0 { return s.Raw, nil @@ -130,7 +258,38 @@ func (s JSON) MarshalJSON() ([]byte, error) { func (s *JSON) UnmarshalJSON(data []byte) error { if len(data) > 0 && !bytes.Equal(data, nullLiteral) { - s.Raw = data + s.Raw = append(s.Raw[0:0], data...) } return nil } + +func (s JSON) MarshalCBOR() ([]byte, error) { + // Note that non-semantic whitespace is lost during the transcoding performed here. + // We do not forsee this to be a problem given the current known uses of this type. + // Other limitations that arise when roundtripping JSON via dynamic clients also apply + // here, for example: insignificant whitespace handling, number handling, and map key ordering. + if len(s.Raw) == 0 { + return []byte{cborNullValue}, nil + } + var u any + if err := json.Unmarshal(s.Raw, &u); err != nil { + return nil, err + } + return cbor.Marshal(u) +} + +func (s *JSON) UnmarshalCBOR(data []byte) error { + if len(data) == 0 || data[0] == cborNullValue { + return nil + } + var u any + if err := cbor.Unmarshal(data, &u); err != nil { + return err + } + raw, err := json.Marshal(u) + if err != nil { + return err + } + s.Raw = raw + return nil +} diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/types.go b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/types.go index e1d1e0be3..212cea6f6 100644 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/types.go +++ b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/types.go @@ -383,6 +383,7 @@ const CustomResourceCleanupFinalizer = "customresourcecleanup.apiextensions.k8s. // +genclient // +genclient:nonNamespaced // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.16 // CustomResourceDefinition represents a resource that should be exposed on the API server. Its name MUST be in the format // <.spec.name>.<.spec.group>. @@ -401,6 +402,7 @@ type CustomResourceDefinition struct { } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.16 // CustomResourceDefinitionList is a list of CustomResourceDefinition objects. type CustomResourceDefinitionList struct { @@ -469,6 +471,7 @@ type CustomResourceSubresourceScale struct { } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.16 // ConversionReview describes a conversion request/response. type ConversionReview struct { diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/types_jsonschema.go b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/types_jsonschema.go index 5dbdf576b..197bd1b7a 100644 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/types_jsonschema.go +++ b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/types_jsonschema.go @@ -189,7 +189,6 @@ type JSONSchemaProps struct { XMapType *string `json:"x-kubernetes-map-type,omitempty" protobuf:"bytes,43,opt,name=xKubernetesMapType"` // x-kubernetes-validations describes a list of validation rules written in the CEL expression language. - // This field is an alpha-level. Using this field requires the feature gate `CustomResourceValidationExpressions` to be enabled. // +patchMergeKey=rule // +patchStrategy=merge // +listType=map diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/zz_generated.prerelease-lifecycle.go b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/zz_generated.prerelease-lifecycle.go new file mode 100644 index 000000000..e3acc247c --- /dev/null +++ b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/zz_generated.prerelease-lifecycle.go @@ -0,0 +1,40 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +/* +Copyright 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. +*/ + +// Code generated by prerelease-lifecycle-gen. DO NOT EDIT. + +package v1 + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *ConversionReview) APILifecycleIntroduced() (major, minor int) { + return 1, 16 +} + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *CustomResourceDefinition) APILifecycleIntroduced() (major, minor int) { + return 1, 16 +} + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *CustomResourceDefinitionList) APILifecycleIntroduced() (major, minor int) { + return 1, 16 +} diff --git a/vendor/kubevirt.io/api/backup/register.go b/vendor/kubevirt.io/api/backup/register.go new file mode 100644 index 000000000..236c7d7d4 --- /dev/null +++ b/vendor/kubevirt.io/api/backup/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 2025 Red Hat, Inc. + * + */ + +package backup + +// GroupName is the group name used in this package +const ( + GroupName = "backup.kubevirt.io" +) diff --git a/vendor/kubevirt.io/api/backup/v1alpha1/deepcopy_generated.go b/vendor/kubevirt.io/api/backup/v1alpha1/deepcopy_generated.go new file mode 100644 index 000000000..6f98c3bb7 --- /dev/null +++ b/vendor/kubevirt.io/api/backup/v1alpha1/deepcopy_generated.go @@ -0,0 +1,386 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +/* +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 The KubeVirt Authors. +*/ + +// 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 *BackupCheckpoint) DeepCopyInto(out *BackupCheckpoint) { + *out = *in + if in.CreationTime != nil { + in, out := &in.CreationTime, &out.CreationTime + *out = (*in).DeepCopy() + } + if in.Volumes != nil { + in, out := &in.Volumes, &out.Volumes + *out = make([]BackupVolumeInfo, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackupCheckpoint. +func (in *BackupCheckpoint) DeepCopy() *BackupCheckpoint { + if in == nil { + return nil + } + out := new(BackupCheckpoint) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *BackupOptions) DeepCopyInto(out *BackupOptions) { + *out = *in + if in.BackupStartTime != nil { + in, out := &in.BackupStartTime, &out.BackupStartTime + *out = (*in).DeepCopy() + } + if in.Incremental != nil { + in, out := &in.Incremental, &out.Incremental + *out = new(string) + **out = **in + } + if in.TargetPath != nil { + in, out := &in.TargetPath, &out.TargetPath + *out = new(string) + **out = **in + } + if in.ExportServerAddr != nil { + in, out := &in.ExportServerAddr, &out.ExportServerAddr + *out = new(string) + **out = **in + } + if in.ExportServerName != nil { + in, out := &in.ExportServerName, &out.ExportServerName + *out = new(string) + **out = **in + } + if in.BackupKey != nil { + in, out := &in.BackupKey, &out.BackupKey + *out = new(string) + **out = **in + } + if in.BackupCert != nil { + in, out := &in.BackupCert, &out.BackupCert + *out = new(string) + **out = **in + } + if in.CACert != nil { + in, out := &in.CACert, &out.CACert + *out = new(string) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackupOptions. +func (in *BackupOptions) DeepCopy() *BackupOptions { + if in == nil { + return nil + } + out := new(BackupOptions) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *BackupVolumeInfo) DeepCopyInto(out *BackupVolumeInfo) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackupVolumeInfo. +func (in *BackupVolumeInfo) DeepCopy() *BackupVolumeInfo { + if in == nil { + return nil + } + out := new(BackupVolumeInfo) + in.DeepCopyInto(out) + return out +} + +// 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 *VirtualMachineBackup) DeepCopyInto(out *VirtualMachineBackup) { + *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(VirtualMachineBackupStatus) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineBackup. +func (in *VirtualMachineBackup) DeepCopy() *VirtualMachineBackup { + if in == nil { + return nil + } + out := new(VirtualMachineBackup) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *VirtualMachineBackup) 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 *VirtualMachineBackupList) DeepCopyInto(out *VirtualMachineBackupList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]VirtualMachineBackup, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineBackupList. +func (in *VirtualMachineBackupList) DeepCopy() *VirtualMachineBackupList { + if in == nil { + return nil + } + out := new(VirtualMachineBackupList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *VirtualMachineBackupList) 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 *VirtualMachineBackupSpec) DeepCopyInto(out *VirtualMachineBackupSpec) { + *out = *in + in.Source.DeepCopyInto(&out.Source) + if in.Mode != nil { + in, out := &in.Mode, &out.Mode + *out = new(BackupMode) + **out = **in + } + if in.PvcName != nil { + in, out := &in.PvcName, &out.PvcName + *out = new(string) + **out = **in + } + if in.TTLDuration != nil { + in, out := &in.TTLDuration, &out.TTLDuration + *out = new(v1.Duration) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineBackupSpec. +func (in *VirtualMachineBackupSpec) DeepCopy() *VirtualMachineBackupSpec { + if in == nil { + return nil + } + out := new(VirtualMachineBackupSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualMachineBackupStatus) DeepCopyInto(out *VirtualMachineBackupStatus) { + *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]) + } + } + if in.CheckpointName != nil { + in, out := &in.CheckpointName, &out.CheckpointName + *out = new(string) + **out = **in + } + if in.EndpointCert != nil { + in, out := &in.EndpointCert, &out.EndpointCert + *out = new(string) + **out = **in + } + if in.IncludedVolumes != nil { + in, out := &in.IncludedVolumes, &out.IncludedVolumes + *out = make([]BackupVolumeInfo, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineBackupStatus. +func (in *VirtualMachineBackupStatus) DeepCopy() *VirtualMachineBackupStatus { + if in == nil { + return nil + } + out := new(VirtualMachineBackupStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualMachineBackupTracker) DeepCopyInto(out *VirtualMachineBackupTracker) { + *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(VirtualMachineBackupTrackerStatus) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineBackupTracker. +func (in *VirtualMachineBackupTracker) DeepCopy() *VirtualMachineBackupTracker { + if in == nil { + return nil + } + out := new(VirtualMachineBackupTracker) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *VirtualMachineBackupTracker) 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 *VirtualMachineBackupTrackerList) DeepCopyInto(out *VirtualMachineBackupTrackerList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]VirtualMachineBackupTracker, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineBackupTrackerList. +func (in *VirtualMachineBackupTrackerList) DeepCopy() *VirtualMachineBackupTrackerList { + if in == nil { + return nil + } + out := new(VirtualMachineBackupTrackerList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *VirtualMachineBackupTrackerList) 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 *VirtualMachineBackupTrackerSpec) DeepCopyInto(out *VirtualMachineBackupTrackerSpec) { + *out = *in + in.Source.DeepCopyInto(&out.Source) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineBackupTrackerSpec. +func (in *VirtualMachineBackupTrackerSpec) DeepCopy() *VirtualMachineBackupTrackerSpec { + if in == nil { + return nil + } + out := new(VirtualMachineBackupTrackerSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualMachineBackupTrackerStatus) DeepCopyInto(out *VirtualMachineBackupTrackerStatus) { + *out = *in + if in.LatestCheckpoint != nil { + in, out := &in.LatestCheckpoint, &out.LatestCheckpoint + *out = new(BackupCheckpoint) + (*in).DeepCopyInto(*out) + } + if in.CheckpointRedefinitionRequired != nil { + in, out := &in.CheckpointRedefinitionRequired, &out.CheckpointRedefinitionRequired + *out = new(bool) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineBackupTrackerStatus. +func (in *VirtualMachineBackupTrackerStatus) DeepCopy() *VirtualMachineBackupTrackerStatus { + if in == nil { + return nil + } + out := new(VirtualMachineBackupTrackerStatus) + in.DeepCopyInto(out) + return out +} diff --git a/vendor/kubevirt.io/api/instancetype/v1alpha2/doc.go b/vendor/kubevirt.io/api/backup/v1alpha1/doc.go similarity index 75% rename from vendor/kubevirt.io/api/instancetype/v1alpha2/doc.go rename to vendor/kubevirt.io/api/backup/v1alpha1/doc.go index 1f6750fce..66929dbb1 100644 --- a/vendor/kubevirt.io/api/instancetype/v1alpha2/doc.go +++ b/vendor/kubevirt.io/api/backup/v1alpha1/doc.go @@ -13,14 +13,12 @@ * See the License for the specific language governing permissions and * limitations under the License. * - * Copyright 2022 Red Hat, Inc. + * Copyright 2025 Red Hat, Inc. * */ // +k8s:deepcopy-gen=package -// +groupName=instancetype.kubevirt.io -// +k8s:conversion-gen=kubevirt.io/api/instancetype/v1alpha2 -// +k8s:conversion-gen-external-types=kubevirt.io/api/instancetype/v1beta1 +// +groupName=backup.kubevirt.io // +k8s:openapi-gen=true -package v1alpha2 +package v1alpha1 diff --git a/vendor/kubevirt.io/api/backup/v1alpha1/register.go b/vendor/kubevirt.io/api/backup/v1alpha1/register.go new file mode 100644 index 000000000..345a569d5 --- /dev/null +++ b/vendor/kubevirt.io/api/backup/v1alpha1/register.go @@ -0,0 +1,66 @@ +/* + * 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 2025 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/backup" +) + +// SchemeGroupVersion is group version used to register these objects +var SchemeGroupVersion = schema.GroupVersion{Group: backup.GroupName, Version: "v1alpha1"} + +var ( + // GroupVersionKind + VirtualMachineBackupGroupVersionKind = schema.GroupVersionKind{Group: backup.GroupName, Version: SchemeGroupVersion.Version, Kind: "VirtualMachineBackup"} + VirtualMachineBackupTrackerGroupVersionKind = schema.GroupVersionKind{Group: backup.GroupName, Version: SchemeGroupVersion.Version, Kind: "VirtualMachineBackupTracker"} +) + +// 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, + &VirtualMachineBackup{}, + &VirtualMachineBackupList{}, + &VirtualMachineBackupTracker{}, + &VirtualMachineBackupTrackerList{}, + ) + metav1.AddToGroupVersion(scheme, SchemeGroupVersion) + return nil +} diff --git a/vendor/kubevirt.io/api/backup/v1alpha1/types.go b/vendor/kubevirt.io/api/backup/v1alpha1/types.go new file mode 100644 index 000000000..abc0d0677 --- /dev/null +++ b/vendor/kubevirt.io/api/backup/v1alpha1/types.go @@ -0,0 +1,274 @@ +/* + * 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 2025 Red Hat, Inc. + * + */ + +package v1alpha1 + +import ( + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// BackupMode is the const type for the backup possible modes +type BackupMode string + +const ( + // PushMode defines backup which pushes the backup output + // to a provided PVC - this is the default behavior + PushMode BackupMode = "Push" + // PullMode defines backup which exposes a pull endpoint + // containing the backup disks and metadata + PullMode BackupMode = "Pull" +) + +// BackupVolumeInfo contains information about a volume included in a backup +type BackupVolumeInfo struct { + // VolumeName is the volume name from VMI spec + VolumeName string `json:"volumeName"` + // DiskTarget is the disk target device name at backup time + DiskTarget string `json:"diskTarget"` + // DataEndpoint is the URL of the endpoint for read for pull mode + DataEndpoint string `json:"dataEndpoint,omitempty"` + // MapEndpoint is the URL of the endpoint for map for pull mode + MapEndpoint string `json:"mapEndpoint,omitempty"` +} + +type BackupCheckpoint struct { + Name string `json:"name,omitempty"` + CreationTime *metav1.Time `json:"creationTime,omitempty"` + // Volumes lists volumes and their disk targets at backup time + // +optional + // +listType=atomic + Volumes []BackupVolumeInfo `json:"volumes,omitempty"` +} + +// BackupType is the const type for the backup possible types +type BackupType string + +const ( + // Full defines full backup, all the data is in the backup + Full BackupType = "Full" + // Incremental defines incremental backup, only changes from given checkpoint + // are in the backup + Incremental BackupType = "Incremental" +) + +// BackupCmd is the const type for the backup possible commands +type BackupCmd string + +const ( + Start BackupCmd = "Start" + Abort BackupCmd = "Abort" + Export BackupCmd = "Export" +) + +// BackupOptions are options used to configure virtual machine backup job +type BackupOptions struct { + BackupName string `json:"backupName,omitempty"` + Cmd BackupCmd `json:"cmd,omitempty"` + Mode BackupMode `json:"mode,omitempty"` + BackupStartTime *metav1.Time `json:"backupStartTime,omitempty"` + Incremental *string `json:"incremental,omitempty"` + TargetPath *string `json:"targetPath,omitempty"` + SkipQuiesce bool `json:"skipQuiesce,omitempty"` + ExportServerAddr *string `json:"exportServerAddr,omitempty"` + ExportServerName *string `json:"exportServerName,omitempty"` + BackupKey *string `json:"backupKey,omitempty"` + BackupCert *string `json:"backupCert,omitempty"` + CACert *string `json:"caCert,omitempty"` +} + +// VirtualMachineBackupTracker defines the way to track the latest checkpoint of +// a backup solution for a vm +// +k8s:openapi-gen=true +// +genclient +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +type VirtualMachineBackupTracker struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec VirtualMachineBackupTrackerSpec `json:"spec"` + + // +optional + Status *VirtualMachineBackupTrackerStatus `json:"status,omitempty"` +} + +// VirtualMachineBackupTrackerSpec is the spec for a VirtualMachineBackupTracker resource +// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="spec is immutable after creation" +type VirtualMachineBackupTrackerSpec struct { + // Source specifies the VM that this backupTracker is associated with + // +kubebuilder:validation:XValidation:rule="has(self.apiGroup) && self.apiGroup == 'kubevirt.io'",message="apiGroup must be kubevirt.io" + // +kubebuilder:validation:XValidation:rule="self.kind == 'VirtualMachine'",message="kind must be VirtualMachine" + // +kubebuilder:validation:XValidation:rule="self.name != ''",message="name is required" + Source corev1.TypedLocalObjectReference `json:"source"` +} + +type VirtualMachineBackupTrackerStatus struct { + // +optional + // LatestCheckpoint is the metadata of the checkpoint of + // the latest performed backup + LatestCheckpoint *BackupCheckpoint `json:"latestCheckpoint,omitempty"` + + // +optional + // CheckpointRedefinitionRequired is set to true by virt-handler when the VM + // restarts and has a checkpoint that needs to be redefined in libvirt. + // virt-controller will process this flag, attempt redefinition, and clear it. + CheckpointRedefinitionRequired *bool `json:"checkpointRedefinitionRequired,omitempty"` +} + +// VirtualMachineBackupTrackerList is a list of VirtualMachineBackupTracker resources +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +type VirtualMachineBackupTrackerList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata"` + // +listType=atomic + Items []VirtualMachineBackupTracker `json:"items"` +} + +// VirtualMachineBackup defines the operation of backing up a VM +// +genclient +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +type VirtualMachineBackup struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec VirtualMachineBackupSpec `json:"spec"` + + // +optional + Status *VirtualMachineBackupStatus `json:"status,omitempty"` +} + +// VirtualMachineBackupList is a list of VirtualMachineBackup resources +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +type VirtualMachineBackupList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata"` + + // +listType=atomic + Items []VirtualMachineBackup `json:"items"` +} + +// VirtualMachineBackupSpec is the spec for a VirtualMachineBackup resource +// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="spec is immutable after creation" +// +kubebuilder:validation:XValidation:rule="has(self.pvcName) && self.pvcName != \"\"",message="pvcName is required" +// +kubebuilder:validation:XValidation:rule="!has(self.mode) || self.mode != 'Pull' || (has(self.tokenSecretRef) && self.tokenSecretRef != \"\")",message="tokenSecretRef is required when mode is Pull" +type VirtualMachineBackupSpec struct { + // Source specifies the backup source - either a VirtualMachine or a VirtualMachineBackupTracker. + // When Kind is VirtualMachine: performs a backup of the specified VM. + // When Kind is VirtualMachineBackupTracker: uses the tracker to get the source VM + // and the base checkpoint for incremental backup. The tracker will be updated + // with the new checkpoint after backup completion. + // +kubebuilder:validation:XValidation:rule="has(self.apiGroup)",message="apiGroup is required" + // +kubebuilder:validation:XValidation:rule="!has(self.apiGroup) || self.apiGroup == 'kubevirt.io' || self.apiGroup == 'backup.kubevirt.io'",message="apiGroup must be kubevirt.io or backup.kubevirt.io" + // +kubebuilder:validation:XValidation:rule="!has(self.apiGroup) || (self.apiGroup == 'kubevirt.io' && self.kind == 'VirtualMachine') || (self.apiGroup == 'backup.kubevirt.io' && self.kind == 'VirtualMachineBackupTracker')",message="kind must be VirtualMachine for kubevirt.io or VirtualMachineBackupTracker for backup.kubevirt.io" + // +kubebuilder:validation:XValidation:rule="self.name != ''",message="name is required" + Source corev1.TypedLocalObjectReference `json:"source"` + // +optional + // +kubebuilder:validation:Enum=Push;Pull + // Mode specifies the way the backup output will be recieved + Mode *BackupMode `json:"mode,omitempty"` + // +optional + // PvcName required in push mode. Specifies the name of the PVC + // where the backup output will be stored + PvcName *string `json:"pvcName,omitempty"` + // +optional + // SkipQuiesce indicates whether the VM's filesystem shoule not be quiesced before the backup + SkipQuiesce bool `json:"skipQuiesce,omitempty"` + // +optional + // ForceFullBackup indicates that a full backup is desired + ForceFullBackup bool `json:"forceFullBackup,omitempty"` + // +optional + // TokenSecretRef is the name of the secret that + // will be used to pull the backup from an associated endpoint + TokenSecretRef string `json:"tokenSecretRef,omitempty"` + // +optional + // TtlDuration limits the lifetime of a pull mode backup and its export + // If this field is set, after this duration has passed from counting from CreationTimestamp, + // the backup is eligible to be automatically considered as complete. + // If this field is omitted, a reasonable default is applied. + // +optional + TTLDuration *metav1.Duration `json:"ttlDuration,omitempty"` +} + +// VirtualMachineBackupStatus is the status for a VirtualMachineBackup resource +type VirtualMachineBackupStatus struct { + // +optional + // Type indicates if the backup was full or incremental + Type BackupType `json:"type,omitempty"` + // +optional + // +listType=atomic + Conditions []Condition `json:"conditions,omitempty"` + // +optional + // CheckpointName the name of the checkpoint created for the current backup + CheckpointName *string `json:"checkpointName,omitempty"` + // +optional + // EndpointCert is the raw CACert that is to be used when connecting + // to an exported backup endpoint in pull mode. + EndpointCert *string `json:"endpointCert,omitempty"` + // +optional + // +listType=atomic + // IncludedVolumes lists the volumes that were included in the backup + IncludedVolumes []BackupVolumeInfo `json:"includedVolumes,omitempty"` +} + +// ConditionType is the const type for Conditions +type ConditionType string + +const ( + // ConditionDone indicates the backup was completed + ConditionDone ConditionType = "Done" + + // ConditionProgressing indicates the backup is in progress + ConditionProgressing ConditionType = "Progressing" + + // ConditionInitializing indicates the backup is initializing + ConditionInitializing ConditionType = "Initializing" + + // ConditionExportInitiated indicates the backup export has been initiated + ConditionExportInitiated ConditionType = "ExportInitiated" + + // ConditionExportReady indicates the backup export is ready + ConditionExportReady ConditionType = "ExportReady" + + // ConditionDeleting indicates the backup is deleteing + ConditionDeleting ConditionType = "Deleting" + + // ConditionAborting indicates the backup is aborting + ConditionAborting ConditionType = "Aborting" +) + +// 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"` +} diff --git a/vendor/kubevirt.io/api/backup/v1alpha1/types_swagger_generated.go b/vendor/kubevirt.io/api/backup/v1alpha1/types_swagger_generated.go new file mode 100644 index 000000000..6c808afcc --- /dev/null +++ b/vendor/kubevirt.io/api/backup/v1alpha1/types_swagger_generated.go @@ -0,0 +1,101 @@ +// Code generated by swagger-doc. DO NOT EDIT. + +package v1alpha1 + +func (BackupVolumeInfo) SwaggerDoc() map[string]string { + return map[string]string{ + "": "BackupVolumeInfo contains information about a volume included in a backup", + "volumeName": "VolumeName is the volume name from VMI spec", + "diskTarget": "DiskTarget is the disk target device name at backup time", + "dataEndpoint": "DataEndpoint is the URL of the endpoint for read for pull mode", + "mapEndpoint": "MapEndpoint is the URL of the endpoint for map for pull mode", + } +} + +func (BackupCheckpoint) SwaggerDoc() map[string]string { + return map[string]string{ + "volumes": "Volumes lists volumes and their disk targets at backup time\n+optional\n+listType=atomic", + } +} + +func (BackupOptions) SwaggerDoc() map[string]string { + return map[string]string{ + "": "BackupOptions are options used to configure virtual machine backup job", + } +} + +func (VirtualMachineBackupTracker) SwaggerDoc() map[string]string { + return map[string]string{ + "": "VirtualMachineBackupTracker defines the way to track the latest checkpoint of\na backup solution for a vm\n+k8s:openapi-gen=true\n+genclient\n+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object", + "status": "+optional", + } +} + +func (VirtualMachineBackupTrackerSpec) SwaggerDoc() map[string]string { + return map[string]string{ + "": "VirtualMachineBackupTrackerSpec is the spec for a VirtualMachineBackupTracker resource\n+kubebuilder:validation:XValidation:rule=\"self == oldSelf\",message=\"spec is immutable after creation\"", + "source": "Source specifies the VM that this backupTracker is associated with\n+kubebuilder:validation:XValidation:rule=\"has(self.apiGroup) && self.apiGroup == 'kubevirt.io'\",message=\"apiGroup must be kubevirt.io\"\n+kubebuilder:validation:XValidation:rule=\"self.kind == 'VirtualMachine'\",message=\"kind must be VirtualMachine\"\n+kubebuilder:validation:XValidation:rule=\"self.name != ''\",message=\"name is required\"", + } +} + +func (VirtualMachineBackupTrackerStatus) SwaggerDoc() map[string]string { + return map[string]string{ + "latestCheckpoint": "+optional\nLatestCheckpoint is the metadata of the checkpoint of\nthe latest performed backup", + "checkpointRedefinitionRequired": "+optional\nCheckpointRedefinitionRequired is set to true by virt-handler when the VM\nrestarts and has a checkpoint that needs to be redefined in libvirt.\nvirt-controller will process this flag, attempt redefinition, and clear it.", + } +} + +func (VirtualMachineBackupTrackerList) SwaggerDoc() map[string]string { + return map[string]string{ + "": "VirtualMachineBackupTrackerList is a list of VirtualMachineBackupTracker resources\n+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object", + "items": "+listType=atomic", + } +} + +func (VirtualMachineBackup) SwaggerDoc() map[string]string { + return map[string]string{ + "": "VirtualMachineBackup defines the operation of backing up a VM\n+genclient\n+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object", + "status": "+optional", + } +} + +func (VirtualMachineBackupList) SwaggerDoc() map[string]string { + return map[string]string{ + "": "VirtualMachineBackupList is a list of VirtualMachineBackup resources\n+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object", + "items": "+listType=atomic", + } +} + +func (VirtualMachineBackupSpec) SwaggerDoc() map[string]string { + return map[string]string{ + "": "VirtualMachineBackupSpec is the spec for a VirtualMachineBackup resource\n+kubebuilder:validation:XValidation:rule=\"self == oldSelf\",message=\"spec is immutable after creation\"\n+kubebuilder:validation:XValidation:rule=\"has(self.pvcName) && self.pvcName != \\\"\\\"\",message=\"pvcName is required\"\n+kubebuilder:validation:XValidation:rule=\"!has(self.mode) || self.mode != 'Pull' || (has(self.tokenSecretRef) && self.tokenSecretRef != \\\"\\\")\",message=\"tokenSecretRef is required when mode is Pull\"", + "source": "Source specifies the backup source - either a VirtualMachine or a VirtualMachineBackupTracker.\nWhen Kind is VirtualMachine: performs a backup of the specified VM.\nWhen Kind is VirtualMachineBackupTracker: uses the tracker to get the source VM\nand the base checkpoint for incremental backup. The tracker will be updated\nwith the new checkpoint after backup completion.\n+kubebuilder:validation:XValidation:rule=\"has(self.apiGroup)\",message=\"apiGroup is required\"\n+kubebuilder:validation:XValidation:rule=\"!has(self.apiGroup) || self.apiGroup == 'kubevirt.io' || self.apiGroup == 'backup.kubevirt.io'\",message=\"apiGroup must be kubevirt.io or backup.kubevirt.io\"\n+kubebuilder:validation:XValidation:rule=\"!has(self.apiGroup) || (self.apiGroup == 'kubevirt.io' && self.kind == 'VirtualMachine') || (self.apiGroup == 'backup.kubevirt.io' && self.kind == 'VirtualMachineBackupTracker')\",message=\"kind must be VirtualMachine for kubevirt.io or VirtualMachineBackupTracker for backup.kubevirt.io\"\n+kubebuilder:validation:XValidation:rule=\"self.name != ''\",message=\"name is required\"", + "mode": "+optional\n+kubebuilder:validation:Enum=Push;Pull\nMode specifies the way the backup output will be recieved", + "pvcName": "+optional\nPvcName required in push mode. Specifies the name of the PVC\nwhere the backup output will be stored", + "skipQuiesce": "+optional\nSkipQuiesce indicates whether the VM's filesystem shoule not be quiesced before the backup", + "forceFullBackup": "+optional\nForceFullBackup indicates that a full backup is desired", + "tokenSecretRef": "+optional\nTokenSecretRef is the name of the secret that\nwill be used to pull the backup from an associated endpoint", + "ttlDuration": "+optional\nTtlDuration limits the lifetime of a pull mode backup and its export\nIf this field is set, after this duration has passed from counting from CreationTimestamp,\nthe backup is eligible to be automatically considered as complete.\nIf this field is omitted, a reasonable default is applied.\n+optional", + } +} + +func (VirtualMachineBackupStatus) SwaggerDoc() map[string]string { + return map[string]string{ + "": "VirtualMachineBackupStatus is the status for a VirtualMachineBackup resource", + "type": "+optional\nType indicates if the backup was full or incremental", + "conditions": "+optional\n+listType=atomic", + "checkpointName": "+optional\nCheckpointName the name of the checkpoint created for the current backup", + "endpointCert": "+optional\nEndpointCert is the raw CACert that is to be used when connecting\nto an exported backup endpoint in pull mode.", + "includedVolumes": "+optional\n+listType=atomic\nIncludedVolumes lists the volumes that were included in the backup", + } +} + +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", + } +} diff --git a/vendor/kubevirt.io/api/clone/register.go b/vendor/kubevirt.io/api/clone/register.go index 85a24c26e..6c44142c0 100644 --- a/vendor/kubevirt.io/api/clone/register.go +++ b/vendor/kubevirt.io/api/clone/register.go @@ -21,10 +21,12 @@ package clone // GroupName is the group name used in this package const ( - GroupName = "clone.kubevirt.io" - LatestVersion = "v1alpha1" - Kind = "VirtualMachineClone" - ListKind = "VirtualMachineCloneList" + GroupName = "clone.kubevirt.io" + LatestAlphaVersion = "v1alpha1" + LatestBetaVersion = "v1beta1" + LatestVersion = LatestBetaVersion + Kind = "VirtualMachineClone" + ListKind = "VirtualMachineCloneList" ResourceVMCloneSingular = "virtualmachineclone" ResourceVMClonePlural = ResourceVMCloneSingular + "s" diff --git a/vendor/kubevirt.io/api/clone/v1alpha1/deepcopy_generated.go b/vendor/kubevirt.io/api/clone/v1alpha1/deepcopy_generated.go index c957478c1..82dc8e5f0 100644 --- a/vendor/kubevirt.io/api/clone/v1alpha1/deepcopy_generated.go +++ b/vendor/kubevirt.io/api/clone/v1alpha1/deepcopy_generated.go @@ -2,7 +2,7 @@ // +build !ignore_autogenerated /* -Copyright The KubeVirt Authors. +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. @@ -15,6 +15,8 @@ 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 The KubeVirt Authors. */ // Code generated by deepcopy-gen. DO NOT EDIT. diff --git a/vendor/kubevirt.io/api/clone/v1alpha1/register.go b/vendor/kubevirt.io/api/clone/v1alpha1/register.go index 9fb3d6253..234141534 100644 --- a/vendor/kubevirt.io/api/clone/v1alpha1/register.go +++ b/vendor/kubevirt.io/api/clone/v1alpha1/register.go @@ -29,10 +29,10 @@ import ( var ( // SchemeGroupVersion is group version used to register these objects - SchemeGroupVersion = schema.GroupVersion{Group: clone.GroupName, Version: clone.LatestVersion} + SchemeGroupVersion = schema.GroupVersion{Group: clone.GroupName, Version: clone.LatestAlphaVersion} - VirtualMachineCloneKind = schema.GroupVersionKind{Group: clone.GroupName, Version: clone.LatestVersion, Kind: clone.Kind} - VirtualMachineCloneListKind = schema.GroupVersionKind{Group: clone.GroupName, Version: clone.LatestVersion, Kind: clone.ListKind} + VirtualMachineCloneKind = schema.GroupVersionKind{Group: clone.GroupName, Version: clone.LatestAlphaVersion, Kind: clone.Kind} + VirtualMachineCloneListKind = schema.GroupVersionKind{Group: clone.GroupName, Version: clone.LatestAlphaVersion, Kind: clone.ListKind} ) // Kind takes an unqualified kind and returns back a Group qualified GroupKind diff --git a/vendor/kubevirt.io/api/clone/v1beta1/deepcopy_generated.go b/vendor/kubevirt.io/api/clone/v1beta1/deepcopy_generated.go new file mode 100644 index 000000000..1d966d272 --- /dev/null +++ b/vendor/kubevirt.io/api/clone/v1beta1/deepcopy_generated.go @@ -0,0 +1,235 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +/* +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 The KubeVirt Authors. +*/ + +// Code generated by deepcopy-gen. DO NOT EDIT. + +package v1beta1 + +import ( + v1 "k8s.io/api/core/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 *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 *VirtualMachineClone) DeepCopyInto(out *VirtualMachineClone) { + *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 VirtualMachineClone. +func (in *VirtualMachineClone) DeepCopy() *VirtualMachineClone { + if in == nil { + return nil + } + out := new(VirtualMachineClone) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *VirtualMachineClone) 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 *VirtualMachineCloneList) DeepCopyInto(out *VirtualMachineCloneList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]VirtualMachineClone, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineCloneList. +func (in *VirtualMachineCloneList) DeepCopy() *VirtualMachineCloneList { + if in == nil { + return nil + } + out := new(VirtualMachineCloneList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *VirtualMachineCloneList) 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 *VirtualMachineCloneSpec) DeepCopyInto(out *VirtualMachineCloneSpec) { + *out = *in + if in.Source != nil { + in, out := &in.Source, &out.Source + *out = new(v1.TypedLocalObjectReference) + (*in).DeepCopyInto(*out) + } + if in.Target != nil { + in, out := &in.Target, &out.Target + *out = new(v1.TypedLocalObjectReference) + (*in).DeepCopyInto(*out) + } + if in.AnnotationFilters != nil { + in, out := &in.AnnotationFilters, &out.AnnotationFilters + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.LabelFilters != nil { + in, out := &in.LabelFilters, &out.LabelFilters + *out = make([]string, len(*in)) + copy(*out, *in) + } + in.Template.DeepCopyInto(&out.Template) + if in.NewMacAddresses != nil { + in, out := &in.NewMacAddresses, &out.NewMacAddresses + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.NewSMBiosSerial != nil { + in, out := &in.NewSMBiosSerial, &out.NewSMBiosSerial + *out = new(string) + **out = **in + } + if in.Patches != nil { + in, out := &in.Patches, &out.Patches + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.VolumeNamePolicy != nil { + in, out := &in.VolumeNamePolicy, &out.VolumeNamePolicy + *out = new(VolumeNamePolicy) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineCloneSpec. +func (in *VirtualMachineCloneSpec) DeepCopy() *VirtualMachineCloneSpec { + if in == nil { + return nil + } + out := new(VirtualMachineCloneSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualMachineCloneStatus) DeepCopyInto(out *VirtualMachineCloneStatus) { + *out = *in + if in.CreationTime != nil { + in, out := &in.CreationTime, &out.CreationTime + *out = (*in).DeepCopy() + } + 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.SnapshotName != nil { + in, out := &in.SnapshotName, &out.SnapshotName + *out = new(string) + **out = **in + } + if in.RestoreName != nil { + in, out := &in.RestoreName, &out.RestoreName + *out = new(string) + **out = **in + } + if in.TargetName != nil { + in, out := &in.TargetName, &out.TargetName + *out = new(string) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineCloneStatus. +func (in *VirtualMachineCloneStatus) DeepCopy() *VirtualMachineCloneStatus { + if in == nil { + return nil + } + out := new(VirtualMachineCloneStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualMachineCloneTemplateFilters) DeepCopyInto(out *VirtualMachineCloneTemplateFilters) { + *out = *in + if in.AnnotationFilters != nil { + in, out := &in.AnnotationFilters, &out.AnnotationFilters + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.LabelFilters != nil { + in, out := &in.LabelFilters, &out.LabelFilters + *out = make([]string, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineCloneTemplateFilters. +func (in *VirtualMachineCloneTemplateFilters) DeepCopy() *VirtualMachineCloneTemplateFilters { + if in == nil { + return nil + } + out := new(VirtualMachineCloneTemplateFilters) + in.DeepCopyInto(out) + return out +} diff --git a/vendor/kubevirt.io/api/clone/v1beta1/doc.go b/vendor/kubevirt.io/api/clone/v1beta1/doc.go new file mode 100644 index 000000000..14b6eeda5 --- /dev/null +++ b/vendor/kubevirt.io/api/clone/v1beta1/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 2024 The KubeVirt Authors. + * + */ + +// +k8s:deepcopy-gen=package +// +groupName=clone.kubevirt.io +// +k8s:openapi-gen=true + +package v1beta1 diff --git a/vendor/kubevirt.io/api/instancetype/v1alpha2/register.go b/vendor/kubevirt.io/api/clone/v1beta1/register.go similarity index 73% rename from vendor/kubevirt.io/api/instancetype/v1alpha2/register.go rename to vendor/kubevirt.io/api/clone/v1beta1/register.go index 3c8a32fb2..40ec3558f 100644 --- a/vendor/kubevirt.io/api/instancetype/v1alpha2/register.go +++ b/vendor/kubevirt.io/api/clone/v1beta1/register.go @@ -17,18 +17,23 @@ * */ -package v1alpha2 +package v1beta1 import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" - "kubevirt.io/api/instancetype" + "kubevirt.io/api/clone" ) -// SchemeGroupVersion is group version used to register these objects -var SchemeGroupVersion = schema.GroupVersion{Group: instancetype.GroupName, Version: "v1alpha2"} +var ( + // SchemeGroupVersion is group version used to register these objects + SchemeGroupVersion = schema.GroupVersion{Group: clone.GroupName, Version: clone.LatestBetaVersion} + + VirtualMachineCloneKind = schema.GroupVersionKind{Group: clone.GroupName, Version: clone.LatestBetaVersion, Kind: clone.Kind} + VirtualMachineCloneListKind = schema.GroupVersionKind{Group: clone.GroupName, Version: clone.LatestBetaVersion, Kind: clone.ListKind} +) // Kind takes an unqualified kind and returns back a Group qualified GroupKind func Kind(kind string) schema.GroupKind { @@ -45,22 +50,15 @@ var ( SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) // AddToScheme is a global function that registers this API group & version to a scheme AddToScheme = SchemeBuilder.AddToScheme - // required by conversion-gen - localSchemeBuilder = &SchemeBuilder ) // Adds the list of known types to Scheme. func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, - &VirtualMachineInstancetype{}, - &VirtualMachineInstancetypeList{}, - &VirtualMachineClusterInstancetype{}, - &VirtualMachineClusterInstancetypeList{}, - &VirtualMachinePreference{}, - &VirtualMachinePreferenceList{}, - &VirtualMachineClusterPreference{}, - &VirtualMachineClusterPreferenceList{}, + &VirtualMachineClone{}, + &VirtualMachineCloneList{}, ) + metav1.AddToGroupVersion(scheme, SchemeGroupVersion) return nil } diff --git a/vendor/kubevirt.io/api/clone/v1beta1/types.go b/vendor/kubevirt.io/api/clone/v1beta1/types.go new file mode 100644 index 000000000..172a522f3 --- /dev/null +++ b/vendor/kubevirt.io/api/clone/v1beta1/types.go @@ -0,0 +1,208 @@ +/* + * 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 2024 The KubeVirt Authors. + * + */ + +package v1beta1 + +import ( + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + snapshotv1beta1 "kubevirt.io/api/snapshot/v1beta1" +) + +// VirtualMachineClone is a CRD that clones one VM into another. +// +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:openapi-gen=true +// +genclient +type VirtualMachineClone struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec VirtualMachineCloneSpec `json:"spec" valid:"required"` + Status VirtualMachineCloneStatus `json:"status,omitempty"` +} + +type VirtualMachineCloneTemplateFilters struct { + // Example use: "!some/key*". + // For a detailed description, please refer to https://kubevirt.io/user-guide/operations/clone_api/#label-annotation-filters. + // +optional + // +listType=atomic + AnnotationFilters []string `json:"annotationFilters,omitempty"` + // Example use: "!some/key*". + // For a detailed description, please refer to https://kubevirt.io/user-guide/operations/clone_api/#label-annotation-filters. + // +optional + // +listType=atomic + LabelFilters []string `json:"labelFilters,omitempty"` +} + +type VirtualMachineCloneSpec struct { + // Source is the object that would be cloned. Currently supported source types are: + // VirtualMachine of kubevirt.io API group, + // VirtualMachineSnapshot of snapshot.kubevirt.io API group + Source *corev1.TypedLocalObjectReference `json:"source"` + + // Target is the outcome of the cloning process. + // Currently supported source types are: + // - VirtualMachine of kubevirt.io API group + // - Empty (nil). + // If the target is not provided, the target type would default to VirtualMachine and a random + // name would be generated for the target. The target's name can be viewed by + // inspecting status "TargetName" field below. + // +optional + Target *corev1.TypedLocalObjectReference `json:"target,omitempty"` + + // Example use: "!some/key*". + // For a detailed description, please refer to https://kubevirt.io/user-guide/operations/clone_api/#label-annotation-filters. + // +optional + // +listType=atomic + AnnotationFilters []string `json:"annotationFilters,omitempty"` + // Example use: "!some/key*". + // For a detailed description, please refer to https://kubevirt.io/user-guide/operations/clone_api/#label-annotation-filters. + // +optional + // +listType=atomic + LabelFilters []string `json:"labelFilters,omitempty"` + // For a detailed description, please refer to https://kubevirt.io/user-guide/operations/clone_api/#label-annotation-filters. + // +optional + Template VirtualMachineCloneTemplateFilters `json:"template,omitempty"` + // NewMacAddresses manually sets that target interfaces' mac addresses. The key is the interface name and the + // value is the new mac address. If this field is not specified, a new MAC address will + // be generated automatically, as for any interface that is not included in this map. + // +optional + NewMacAddresses map[string]string `json:"newMacAddresses,omitempty"` + // NewSMBiosSerial manually sets that target's SMbios serial. If this field is not specified, a new serial will + // be generated automatically. + // +optional + NewSMBiosSerial *string `json:"newSMBiosSerial,omitempty"` + // Patches holds JSON patches to apply to target. Patches should fit the target's Kind. + // Example: '{"op": "add", "path": "/spec/template/metadata/labels/example", "value": "new-label"}' + // +optional + // +listType=atomic + Patches []string `json:"patches,omitempty"` + // VolumeNamePolicy defines how to handle volume naming during the clone operation + // +optional + // +kubebuilder:validation:Enum=RandomizeNames;PrefixTargetName + VolumeNamePolicy *VolumeNamePolicy `json:"volumeNamePolicy,omitempty"` +} + +// VolumeNamePolicy defines how to handle volume naming during the clone operation +type VolumeNamePolicy string + +const ( + // VolumeNamePolicyRandomizeNames creates new volumes with randomized names for each cloned volume. + // This is the default and currently only supported policy. + VolumeNamePolicyRandomizeNames VolumeNamePolicy = "RandomizeNames" + // VolumeNamePolicyPrefixTargetName defines a VolumeNamePolicy which creates + // new PVCs with names prefixed by the target VM name: {targetVMName}-{volumeName}. + // This provides predictable naming while avoiding collisions when restoring to different targets. + VolumeNamePolicyPrefixTargetName VolumeNamePolicy = "PrefixTargetName" +) + +// ToVolumeRestorePolicy converts a VolumeNamePolicy to the corresponding VolumeRestorePolicy +// for use with the snapshot/restore implementation. +func (p VolumeNamePolicy) ToVolumeRestorePolicy() snapshotv1beta1.VolumeRestorePolicy { + switch p { + case VolumeNamePolicyRandomizeNames: + return snapshotv1beta1.VolumeRestorePolicyRandomizeNames + case VolumeNamePolicyPrefixTargetName: + return snapshotv1beta1.VolumeRestorePolicyPrefixTargetName + default: + // Default to RandomizeNames for safety + return snapshotv1beta1.VolumeRestorePolicyRandomizeNames + } +} + +type VirtualMachineClonePhase string + +const ( + PhaseUnset VirtualMachineClonePhase = "" + SnapshotInProgress VirtualMachineClonePhase = "SnapshotInProgress" + CreatingTargetVM VirtualMachineClonePhase = "CreatingTargetVM" + RestoreInProgress VirtualMachineClonePhase = "RestoreInProgress" + Succeeded VirtualMachineClonePhase = "Succeeded" + Failed VirtualMachineClonePhase = "Failed" + Unknown VirtualMachineClonePhase = "Unknown" +) + +type VirtualMachineCloneStatus struct { + // +optional + // +nullable + CreationTime *metav1.Time `json:"creationTime,omitempty"` + + // +optional + Phase VirtualMachineClonePhase `json:"phase,omitempty"` + + // +optional + // +listType=atomic + Conditions []Condition `json:"conditions,omitempty"` + + // +optional + // +nullable + SnapshotName *string `json:"snapshotName,omitempty"` + + // +optional + // +nullable + RestoreName *string `json:"restoreName,omitempty"` + + // +optional + // +nullable + TargetName *string `json:"targetName,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" +) + +// 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"` +} + +// VirtualMachineCloneList is a list of MigrationPolicy +// +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +type VirtualMachineCloneList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + // +listType=atomic + Items []VirtualMachineClone `json:"items"` +} diff --git a/vendor/kubevirt.io/api/clone/v1beta1/types_swagger_generated.go b/vendor/kubevirt.io/api/clone/v1beta1/types_swagger_generated.go new file mode 100644 index 000000000..f2808cbb9 --- /dev/null +++ b/vendor/kubevirt.io/api/clone/v1beta1/types_swagger_generated.go @@ -0,0 +1,58 @@ +// Code generated by swagger-doc. DO NOT EDIT. + +package v1beta1 + +func (VirtualMachineClone) SwaggerDoc() map[string]string { + return map[string]string{ + "": "VirtualMachineClone is a CRD that clones one VM into another.\n\n+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object\n+k8s:openapi-gen=true\n+genclient", + } +} + +func (VirtualMachineCloneTemplateFilters) SwaggerDoc() map[string]string { + return map[string]string{ + "annotationFilters": "Example use: \"!some/key*\".\nFor a detailed description, please refer to https://kubevirt.io/user-guide/operations/clone_api/#label-annotation-filters.\n+optional\n+listType=atomic", + "labelFilters": "Example use: \"!some/key*\".\nFor a detailed description, please refer to https://kubevirt.io/user-guide/operations/clone_api/#label-annotation-filters.\n+optional\n+listType=atomic", + } +} + +func (VirtualMachineCloneSpec) SwaggerDoc() map[string]string { + return map[string]string{ + "source": "Source is the object that would be cloned. Currently supported source types are:\nVirtualMachine of kubevirt.io API group,\nVirtualMachineSnapshot of snapshot.kubevirt.io API group", + "target": "Target is the outcome of the cloning process.\nCurrently supported source types are:\n- VirtualMachine of kubevirt.io API group\n- Empty (nil).\nIf the target is not provided, the target type would default to VirtualMachine and a random\nname would be generated for the target. The target's name can be viewed by\ninspecting status \"TargetName\" field below.\n+optional", + "annotationFilters": "Example use: \"!some/key*\".\nFor a detailed description, please refer to https://kubevirt.io/user-guide/operations/clone_api/#label-annotation-filters.\n+optional\n+listType=atomic", + "labelFilters": "Example use: \"!some/key*\".\nFor a detailed description, please refer to https://kubevirt.io/user-guide/operations/clone_api/#label-annotation-filters.\n+optional\n+listType=atomic", + "template": "For a detailed description, please refer to https://kubevirt.io/user-guide/operations/clone_api/#label-annotation-filters.\n+optional", + "newMacAddresses": "NewMacAddresses manually sets that target interfaces' mac addresses. The key is the interface name and the\nvalue is the new mac address. If this field is not specified, a new MAC address will\nbe generated automatically, as for any interface that is not included in this map.\n+optional", + "newSMBiosSerial": "NewSMBiosSerial manually sets that target's SMbios serial. If this field is not specified, a new serial will\nbe generated automatically.\n+optional", + "patches": "Patches holds JSON patches to apply to target. Patches should fit the target's Kind.\nExample: '{\"op\": \"add\", \"path\": \"/spec/template/metadata/labels/example\", \"value\": \"new-label\"}'\n+optional\n+listType=atomic", + "volumeNamePolicy": "VolumeNamePolicy defines how to handle volume naming during the clone operation\n+optional\n+kubebuilder:validation:Enum=RandomizeNames;PrefixTargetName", + } +} + +func (VirtualMachineCloneStatus) SwaggerDoc() map[string]string { + return map[string]string{ + "creationTime": "+optional\n+nullable", + "phase": "+optional", + "conditions": "+optional\n+listType=atomic", + "snapshotName": "+optional\n+nullable", + "restoreName": "+optional\n+nullable", + "targetName": "+optional\n+nullable", + } +} + +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 (VirtualMachineCloneList) SwaggerDoc() map[string]string { + return map[string]string{ + "": "VirtualMachineCloneList is a list of MigrationPolicy\n\n+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object", + "items": "+listType=atomic", + } +} diff --git a/vendor/kubevirt.io/api/core/v1/deepcopy_generated.go b/vendor/kubevirt.io/api/core/v1/deepcopy_generated.go index abd5a495d..f2a4fbd38 100644 --- a/vendor/kubevirt.io/api/core/v1/deepcopy_generated.go +++ b/vendor/kubevirt.io/api/core/v1/deepcopy_generated.go @@ -2,7 +2,7 @@ // +build !ignore_autogenerated /* -Copyright The KubeVirt Authors. +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. @@ -15,6 +15,8 @@ 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 The KubeVirt Authors. */ // Code generated by deepcopy-gen. DO NOT EDIT. @@ -26,7 +28,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" types "k8s.io/apimachinery/pkg/types" - v1beta1 "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1" + v1alpha1 "kubevirt.io/api/backup/v1alpha1" ) // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -136,6 +138,11 @@ func (in *ArchConfiguration) DeepCopyInto(out *ArchConfiguration) { *out = new(ArchSpecificConfiguration) (*in).DeepCopyInto(*out) } + if in.S390x != nil { + in, out := &in.S390x, &out.S390x + *out = new(ArchSpecificConfiguration) + (*in).DeepCopyInto(*out) + } return } @@ -213,7 +220,7 @@ func (in *BlockSize) DeepCopyInto(out *BlockSize) { if in.Custom != nil { in, out := &in.Custom, &out.Custom *out = new(CustomBlockSize) - **out = **in + (*in).DeepCopyInto(*out) } if in.MatchVolume != nil { in, out := &in.MatchVolume, &out.MatchVolume @@ -369,6 +376,53 @@ func (in *CertConfig) DeepCopy() *CertConfig { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ChangedBlockTrackingSelectors) DeepCopyInto(out *ChangedBlockTrackingSelectors) { + *out = *in + if in.NamespaceLabelSelector != nil { + in, out := &in.NamespaceLabelSelector, &out.NamespaceLabelSelector + *out = new(metav1.LabelSelector) + (*in).DeepCopyInto(*out) + } + if in.VirtualMachineLabelSelector != nil { + in, out := &in.VirtualMachineLabelSelector, &out.VirtualMachineLabelSelector + *out = new(metav1.LabelSelector) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChangedBlockTrackingSelectors. +func (in *ChangedBlockTrackingSelectors) DeepCopy() *ChangedBlockTrackingSelectors { + if in == nil { + return nil + } + out := new(ChangedBlockTrackingSelectors) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ChangedBlockTrackingStatus) DeepCopyInto(out *ChangedBlockTrackingStatus) { + *out = *in + if in.BackupStatus != nil { + in, out := &in.BackupStatus, &out.BackupStatus + *out = new(VirtualMachineInstanceBackupStatus) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChangedBlockTrackingStatus. +func (in *ChangedBlockTrackingStatus) DeepCopy() *ChangedBlockTrackingStatus { + if in == nil { + return nil + } + out := new(ChangedBlockTrackingStatus) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Chassis) DeepCopyInto(out *Chassis) { *out = *in @@ -385,6 +439,32 @@ func (in *Chassis) DeepCopy() *Chassis { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClaimRequest) DeepCopyInto(out *ClaimRequest) { + *out = *in + if in.ClaimName != nil { + in, out := &in.ClaimName, &out.ClaimName + *out = new(string) + **out = **in + } + if in.RequestName != nil { + in, out := &in.RequestName, &out.RequestName + *out = new(string) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClaimRequest. +func (in *ClaimRequest) DeepCopy() *ClaimRequest { + if in == nil { + return nil + } + out := new(ClaimRequest) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ClientPassthroughDevices) DeepCopyInto(out *ClientPassthroughDevices) { *out = *in @@ -561,6 +641,27 @@ func (in *ClusterProfilerResults) DeepCopy() *ClusterProfilerResults { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CommonInstancetypesDeployment) DeepCopyInto(out *CommonInstancetypesDeployment) { + *out = *in + if in.Enabled != nil { + in, out := &in.Enabled, &out.Enabled + *out = new(bool) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CommonInstancetypesDeployment. +func (in *CommonInstancetypesDeployment) DeepCopy() *CommonInstancetypesDeployment { + if in == nil { + return nil + } + out := new(CommonInstancetypesDeployment) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ComponentConfig) DeepCopyInto(out *ComponentConfig) { *out = *in @@ -657,9 +758,51 @@ func (in *ContainerDiskSource) DeepCopy() *ContainerDiskSource { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ContainerPathVolumeSource) DeepCopyInto(out *ContainerPathVolumeSource) { + *out = *in + if in.ReadOnly != nil { + in, out := &in.ReadOnly, &out.ReadOnly + *out = new(bool) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ContainerPathVolumeSource. +func (in *ContainerPathVolumeSource) DeepCopy() *ContainerPathVolumeSource { + if in == nil { + return nil + } + out := new(ContainerPathVolumeSource) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ControllerRevisionRef) DeepCopyInto(out *ControllerRevisionRef) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControllerRevisionRef. +func (in *ControllerRevisionRef) DeepCopy() *ControllerRevisionRef { + if in == nil { + return nil + } + out := new(ControllerRevisionRef) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *CustomBlockSize) DeepCopyInto(out *CustomBlockSize) { *out = *in + if in.DiscardGranularity != nil { + in, out := &in.DiscardGranularity, &out.DiscardGranularity + *out = new(uint) + **out = **in + } return } @@ -890,6 +1033,11 @@ func (in *DeveloperConfiguration) DeepCopyInto(out *DeveloperConfiguration) { *out = make([]string, len(*in)) copy(*out, *in) } + if in.DisabledFeatureGates != nil { + in, out := &in.DisabledFeatureGates, &out.DisabledFeatureGates + *out = make([]string, len(*in)) + copy(*out, *in) + } if in.NodeSelectors != nil { in, out := &in.NodeSelectors, &out.NodeSelectors *out = make(map[string]string, len(*in)) @@ -1019,6 +1167,13 @@ func (in *Devices) DeepCopyInto(out *Devices) { *out = new(DownwardMetrics) **out = **in } + if in.PanicDevices != nil { + in, out := &in.PanicDevices, &out.PanicDevices + *out = make([]PanicDevice, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } if in.Filesystems != nil { in, out := &in.Filesystems, &out.Filesystems *out = make([]Filesystem, len(*in)) @@ -1029,7 +1184,9 @@ func (in *Devices) DeepCopyInto(out *Devices) { if in.HostDevices != nil { in, out := &in.HostDevices, &out.HostDevices *out = make([]HostDevice, len(*in)) - copy(*out, *in) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } } if in.ClientPassthrough != nil { in, out := &in.ClientPassthrough, &out.ClientPassthrough @@ -1046,6 +1203,11 @@ func (in *Devices) DeepCopyInto(out *Devices) { *out = new(TPMDevice) (*in).DeepCopyInto(*out) } + if in.Video != nil { + in, out := &in.Video, &out.Video + *out = new(VideoDevice) + **out = **in + } return } @@ -1059,6 +1221,22 @@ func (in *Devices) DeepCopy() *Devices { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Diag288Watchdog) DeepCopyInto(out *Diag288Watchdog) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Diag288Watchdog. +func (in *Diag288Watchdog) DeepCopy() *Diag288Watchdog { + if in == nil { + return nil + } + out := new(Diag288Watchdog) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *DisableFreePageReporting) DeepCopyInto(out *DisableFreePageReporting) { *out = *in @@ -1120,6 +1298,11 @@ func (in *Disk) DeepCopyInto(out *Disk) { *out = new(DiskErrorPolicy) **out = **in } + if in.ChangedBlockTracking != nil { + in, out := &in.ChangedBlockTracking, &out.ChangedBlockTracking + *out = new(bool) + **out = **in + } return } @@ -1164,6 +1347,27 @@ func (in *DiskDevice) DeepCopy() *DiskDevice { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DiskIOThreads) DeepCopyInto(out *DiskIOThreads) { + *out = *in + if in.SupplementalPoolThreadCount != nil { + in, out := &in.SupplementalPoolThreadCount, &out.SupplementalPoolThreadCount + *out = new(uint32) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DiskIOThreads. +func (in *DiskIOThreads) DeepCopy() *DiskIOThreads { + if in == nil { + return nil + } + out := new(DiskIOThreads) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *DiskTarget) DeepCopyInto(out *DiskTarget) { *out = *in @@ -1265,6 +1469,11 @@ func (in *DomainSpec) DeepCopyInto(out *DomainSpec) { *out = new(IOThreadsPolicy) **out = **in } + if in.IOThreads != nil { + in, out := &in.IOThreads, &out.IOThreads + *out = new(DiskIOThreads) + (*in).DeepCopyInto(*out) + } if in.Chassis != nil { in, out := &in.Chassis, &out.Chassis *out = new(Chassis) @@ -1275,6 +1484,11 @@ func (in *DomainSpec) DeepCopyInto(out *DomainSpec) { *out = new(LaunchSecurity) (*in).DeepCopyInto(*out) } + if in.RebootPolicy != nil { + in, out := &in.RebootPolicy, &out.RebootPolicy + *out = new(RebootPolicy) + **out = **in + } return } @@ -1407,14 +1621,32 @@ func (in *EphemeralVolumeSource) DeepCopy() *EphemeralVolumeSource { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *EvacuateCancelOptions) DeepCopyInto(out *EvacuateCancelOptions) { + *out = *in + out.TypeMeta = in.TypeMeta + if in.DryRun != nil { + in, out := &in.DryRun, &out.DryRun + *out = make([]string, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EvacuateCancelOptions. +func (in *EvacuateCancelOptions) DeepCopy() *EvacuateCancelOptions { + if in == nil { + return nil + } + out := new(EvacuateCancelOptions) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *FeatureAPIC) DeepCopyInto(out *FeatureAPIC) { *out = *in - if in.Enabled != nil { - in, out := &in.Enabled, &out.Enabled - *out = new(bool) - **out = **in - } + in.FeatureState.DeepCopyInto(&out.FeatureState) return } @@ -1488,7 +1720,7 @@ func (in *FeatureHyperv) DeepCopyInto(out *FeatureHyperv) { } if in.TLBFlush != nil { in, out := &in.TLBFlush, &out.TLBFlush - *out = new(FeatureState) + *out = new(TLBFlush) (*in).DeepCopyInto(*out) } if in.IPI != nil { @@ -1533,11 +1765,7 @@ func (in *FeatureKVM) DeepCopy() *FeatureKVM { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *FeatureSpinlocks) DeepCopyInto(out *FeatureSpinlocks) { *out = *in - if in.Enabled != nil { - in, out := &in.Enabled, &out.Enabled - *out = new(bool) - **out = **in - } + in.FeatureState.DeepCopyInto(&out.FeatureState) if in.Retries != nil { in, out := &in.Retries, &out.Retries *out = new(uint32) @@ -1580,11 +1808,7 @@ func (in *FeatureState) DeepCopy() *FeatureState { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *FeatureVendorID) DeepCopyInto(out *FeatureVendorID) { *out = *in - if in.Enabled != nil { - in, out := &in.Enabled, &out.Enabled - *out = new(bool) - **out = **in - } + in.FeatureState.DeepCopyInto(&out.FeatureState) return } @@ -1774,6 +1998,11 @@ func (in *FreezeUnfreezeTimeout) DeepCopy() *FreezeUnfreezeTimeout { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *GPU) DeepCopyInto(out *GPU) { *out = *in + if in.ClaimRequest != nil { + in, out := &in.ClaimRequest, &out.ClaimRequest + *out = new(ClaimRequest) + (*in).DeepCopyInto(*out) + } if in.VirtualGPUOptions != nil { in, out := &in.VirtualGPUOptions, &out.VirtualGPUOptions *out = new(VGPUOptions) @@ -1900,6 +2129,11 @@ func (in *Handler) DeepCopy() *Handler { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *HostDevice) DeepCopyInto(out *HostDevice) { *out = *in + if in.ClaimRequest != nil { + in, out := &in.ClaimRequest, &out.ClaimRequest + *out = new(ClaimRequest) + (*in).DeepCopyInto(*out) + } return } @@ -2035,6 +2269,22 @@ func (in *HypervTimer) DeepCopy() *HypervTimer { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *HypervisorConfiguration) DeepCopyInto(out *HypervisorConfiguration) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HypervisorConfiguration. +func (in *HypervisorConfiguration) DeepCopy() *HypervisorConfiguration { + if in == nil { + return nil + } + out := new(HypervisorConfiguration) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *I6300ESBWatchdog) DeepCopyInto(out *I6300ESBWatchdog) { *out = *in @@ -2083,6 +2333,27 @@ func (in *Input) DeepCopy() *Input { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *InstancetypeConfiguration) DeepCopyInto(out *InstancetypeConfiguration) { + *out = *in + if in.ReferencePolicy != nil { + in, out := &in.ReferencePolicy, &out.ReferencePolicy + *out = new(InstancetypeReferencePolicy) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InstancetypeConfiguration. +func (in *InstancetypeConfiguration) DeepCopy() *InstancetypeConfiguration { + if in == nil { + return nil + } + out := new(InstancetypeConfiguration) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *InstancetypeMatcher) DeepCopyInto(out *InstancetypeMatcher) { *out = *in @@ -2104,6 +2375,32 @@ func (in *InstancetypeMatcher) DeepCopy() *InstancetypeMatcher { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *InstancetypeStatusRef) DeepCopyInto(out *InstancetypeStatusRef) { + *out = *in + if in.ControllerRevisionRef != nil { + in, out := &in.ControllerRevisionRef, &out.ControllerRevisionRef + *out = new(ControllerRevisionRef) + **out = **in + } + if in.InferFromVolumeFailurePolicy != nil { + in, out := &in.InferFromVolumeFailurePolicy, &out.InferFromVolumeFailurePolicy + *out = new(InferFromVolumeFailurePolicy) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InstancetypeStatusRef. +func (in *InstancetypeStatusRef) DeepCopy() *InstancetypeStatusRef { + if in == nil { + return nil + } + out := new(InstancetypeStatusRef) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Interface) DeepCopyInto(out *Interface) { *out = *in @@ -2174,6 +2471,11 @@ func (in *InterfaceBindingMethod) DeepCopyInto(out *InterfaceBindingMethod) { *out = new(DeprecatedInterfacePasst) **out = **in } + if in.PasstBinding != nil { + in, out := &in.PasstBinding, &out.PasstBinding + *out = new(InterfacePasstBinding) + **out = **in + } return } @@ -2213,7 +2515,7 @@ func (in *InterfaceBindingPlugin) DeepCopyInto(out *InterfaceBindingPlugin) { } if in.ComputeResourceOverhead != nil { in, out := &in.ComputeResourceOverhead, &out.ComputeResourceOverhead - *out = new(corev1.ResourceRequirements) + *out = new(ResourceRequirementsWithoutClaims) (*in).DeepCopyInto(*out) } return @@ -2261,6 +2563,22 @@ func (in *InterfaceMasquerade) DeepCopy() *InterfaceMasquerade { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *InterfacePasstBinding) DeepCopyInto(out *InterfacePasstBinding) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InterfacePasstBinding. +func (in *InterfacePasstBinding) DeepCopy() *InterfacePasstBinding { + if in == nil { + return nil + } + out := new(InterfacePasstBinding) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *InterfaceSRIOV) DeepCopyInto(out *InterfaceSRIOV) { *out = *in @@ -2607,6 +2925,36 @@ func (in *KubeVirtConfiguration) DeepCopyInto(out *KubeVirtConfiguration) { *out = new(VMRolloutStrategy) **out = **in } + if in.CommonInstancetypesDeployment != nil { + in, out := &in.CommonInstancetypesDeployment, &out.CommonInstancetypesDeployment + *out = new(CommonInstancetypesDeployment) + (*in).DeepCopyInto(*out) + } + if in.VirtTemplateDeployment != nil { + in, out := &in.VirtTemplateDeployment, &out.VirtTemplateDeployment + *out = new(VirtTemplateDeployment) + (*in).DeepCopyInto(*out) + } + if in.Instancetype != nil { + in, out := &in.Instancetype, &out.Instancetype + *out = new(InstancetypeConfiguration) + (*in).DeepCopyInto(*out) + } + if in.Hypervisors != nil { + in, out := &in.Hypervisors, &out.Hypervisors + *out = make([]HypervisorConfiguration, len(*in)) + copy(*out, *in) + } + if in.ChangedBlockTrackingLabelSelectors != nil { + in, out := &in.ChangedBlockTrackingLabelSelectors, &out.ChangedBlockTrackingLabelSelectors + *out = new(ChangedBlockTrackingSelectors) + (*in).DeepCopyInto(*out) + } + if in.RoleAggregationStrategy != nil { + in, out := &in.RoleAggregationStrategy, &out.RoleAggregationStrategy + *out = new(RoleAggregationStrategy) + **out = **in + } return } @@ -2754,6 +3102,11 @@ func (in *KubeVirtStatus) DeepCopyInto(out *KubeVirtStatus) { *out = make([]GenerationStatus, len(*in)) copy(*out, *in) } + if in.SynchronizationAddresses != nil { + in, out := &in.SynchronizationAddresses, &out.SynchronizationAddresses + *out = make([]string, len(*in)) + copy(*out, *in) + } return } @@ -2806,6 +3159,16 @@ func (in *LaunchSecurity) DeepCopyInto(out *LaunchSecurity) { *out = new(SEV) (*in).DeepCopyInto(*out) } + if in.SNP != nil { + in, out := &in.SNP, &out.SNP + *out = new(SEVSNP) + **out = **in + } + if in.TDX != nil { + in, out := &in.TDX, &out.TDX + *out = new(TDX) + **out = **in + } return } @@ -2819,43 +3182,6 @@ func (in *LaunchSecurity) DeepCopy() *LaunchSecurity { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *LiveUpdateAffinity) DeepCopyInto(out *LiveUpdateAffinity) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LiveUpdateAffinity. -func (in *LiveUpdateAffinity) DeepCopy() *LiveUpdateAffinity { - if in == nil { - return nil - } - out := new(LiveUpdateAffinity) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *LiveUpdateCPU) DeepCopyInto(out *LiveUpdateCPU) { - *out = *in - if in.MaxSockets != nil { - in, out := &in.MaxSockets, &out.MaxSockets - *out = new(uint32) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LiveUpdateCPU. -func (in *LiveUpdateCPU) DeepCopy() *LiveUpdateCPU { - if in == nil { - return nil - } - out := new(LiveUpdateCPU) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *LiveUpdateConfiguration) DeepCopyInto(out *LiveUpdateConfiguration) { *out = *in @@ -2882,27 +3208,6 @@ func (in *LiveUpdateConfiguration) DeepCopy() *LiveUpdateConfiguration { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *LiveUpdateMemory) DeepCopyInto(out *LiveUpdateMemory) { - *out = *in - if in.MaxGuest != nil { - in, out := &in.MaxGuest, &out.MaxGuest - x := (*in).DeepCopy() - *out = &x - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LiveUpdateMemory. -func (in *LiveUpdateMemory) DeepCopy() *LiveUpdateMemory { - if in == nil { - return nil - } - out := new(LiveUpdateMemory) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *LogVerbosity) DeepCopyInto(out *LogVerbosity) { *out = *in @@ -2978,6 +3283,11 @@ func (in *MediatedDevicesConfiguration) DeepCopyInto(out *MediatedDevicesConfigu (*in)[i].DeepCopyInto(&(*out)[i]) } } + if in.Enabled != nil { + in, out := &in.Enabled, &out.Enabled + *out = new(bool) + **out = **in + } return } @@ -3025,6 +3335,11 @@ func (in *Memory) DeepCopyInto(out *Memory) { x := (*in).DeepCopy() *out = &x } + if in.ReservedOverhead != nil { + in, out := &in.ReservedOverhead, &out.ReservedOverhead + *out = new(ReservedOverhead) + (*in).DeepCopyInto(*out) + } return } @@ -3073,6 +3388,11 @@ func (in *MemoryStatus) DeepCopyInto(out *MemoryStatus) { x := (*in).DeepCopy() *out = &x } + if in.MemoryOverhead != nil { + in, out := &in.MemoryOverhead, &out.MemoryOverhead + x := (*in).DeepCopy() + *out = &x + } return } @@ -3095,6 +3415,13 @@ func (in *MigrateOptions) DeepCopyInto(out *MigrateOptions) { *out = make([]string, len(*in)) copy(*out, *in) } + if in.AddedNodeSelector != nil { + in, out := &in.AddedNodeSelector, &out.AddedNodeSelector + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } return } @@ -3146,6 +3473,11 @@ func (in *MigrationConfiguration) DeepCopyInto(out *MigrationConfiguration) { *out = new(int64) **out = **in } + if in.UtilityVolumesTimeout != nil { + in, out := &in.UtilityVolumesTimeout, &out.UtilityVolumesTimeout + *out = new(int64) + **out = **in + } if in.UnsafeMigrationOverride != nil { in, out := &in.UnsafeMigrationOverride, &out.UnsafeMigrationOverride *out = new(bool) @@ -3156,6 +3488,11 @@ func (in *MigrationConfiguration) DeepCopyInto(out *MigrationConfiguration) { *out = new(bool) **out = **in } + if in.AllowWorkloadDisruption != nil { + in, out := &in.AllowWorkloadDisruption, &out.AllowWorkloadDisruption + *out = new(bool) + **out = **in + } if in.DisableTLS != nil { in, out := &in.DisableTLS, &out.DisableTLS *out = new(bool) @@ -3397,6 +3734,77 @@ func (in *NodePlacement) DeepCopy() *NodePlacement { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ObjectGraphNode) DeepCopyInto(out *ObjectGraphNode) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectReference.DeepCopyInto(&out.ObjectReference) + if in.Labels != nil { + in, out := &in.Labels, &out.Labels + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Optional != nil { + in, out := &in.Optional, &out.Optional + *out = new(bool) + **out = **in + } + if in.Children != nil { + in, out := &in.Children, &out.Children + *out = make([]ObjectGraphNode, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ObjectGraphNode. +func (in *ObjectGraphNode) DeepCopy() *ObjectGraphNode { + if in == nil { + return nil + } + out := new(ObjectGraphNode) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ObjectGraphNode) 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 *ObjectGraphOptions) DeepCopyInto(out *ObjectGraphOptions) { + *out = *in + if in.IncludeOptionalNodes != nil { + in, out := &in.IncludeOptionalNodes, &out.IncludeOptionalNodes + *out = new(bool) + **out = **in + } + if in.LabelSelector != nil { + in, out := &in.LabelSelector, &out.LabelSelector + *out = new(metav1.LabelSelector) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ObjectGraphOptions. +func (in *ObjectGraphOptions) DeepCopy() *ObjectGraphOptions { + if in == nil { + return nil + } + out := new(ObjectGraphOptions) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *PITTimer) DeepCopyInto(out *PITTimer) { *out = *in @@ -3418,6 +3826,27 @@ func (in *PITTimer) DeepCopy() *PITTimer { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PanicDevice) DeepCopyInto(out *PanicDevice) { + *out = *in + if in.Model != nil { + in, out := &in.Model, &out.Model + *out = new(PanicDeviceModel) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PanicDevice. +func (in *PanicDevice) DeepCopy() *PanicDevice { + if in == nil { + return nil + } + out := new(PanicDevice) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *PauseOptions) DeepCopyInto(out *PauseOptions) { *out = *in @@ -3518,7 +3947,7 @@ func (in *PersistentVolumeClaimInfo) DeepCopyInto(out *PersistentVolumeClaimInfo } if in.FilesystemOverhead != nil { in, out := &in.FilesystemOverhead, &out.FilesystemOverhead - *out = new(v1beta1.Percent) + *out = new(Percent) **out = **in } return @@ -3826,6 +4255,32 @@ func (in *RemoveVolumeOptions) DeepCopy() *RemoveVolumeOptions { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ReservedOverhead) DeepCopyInto(out *ReservedOverhead) { + *out = *in + if in.AddedOverhead != nil { + in, out := &in.AddedOverhead, &out.AddedOverhead + x := (*in).DeepCopy() + *out = &x + } + if in.MemLock != nil { + in, out := &in.MemLock, &out.MemLock + *out = new(MemLockRequirement) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReservedOverhead. +func (in *ReservedOverhead) DeepCopy() *ReservedOverhead { + if in == nil { + return nil + } + out := new(ReservedOverhead) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ResourceRequirements) DeepCopyInto(out *ResourceRequirements) { *out = *in @@ -3856,6 +4311,36 @@ func (in *ResourceRequirements) DeepCopy() *ResourceRequirements { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ResourceRequirementsWithoutClaims) DeepCopyInto(out *ResourceRequirementsWithoutClaims) { + *out = *in + if in.Limits != nil { + in, out := &in.Limits, &out.Limits + *out = make(corev1.ResourceList, len(*in)) + for key, val := range *in { + (*out)[key] = val.DeepCopy() + } + } + if in.Requests != nil { + in, out := &in.Requests, &out.Requests + *out = make(corev1.ResourceList, len(*in)) + for key, val := range *in { + (*out)[key] = val.DeepCopy() + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceRequirementsWithoutClaims. +func (in *ResourceRequirementsWithoutClaims) DeepCopy() *ResourceRequirementsWithoutClaims { + if in == nil { + return nil + } + out := new(ResourceRequirementsWithoutClaims) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *RestartOptions) DeepCopyInto(out *RestartOptions) { *out = *in @@ -4012,6 +4497,22 @@ func (in *SEVPolicy) DeepCopy() *SEVPolicy { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SEVSNP) DeepCopyInto(out *SEVSNP) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SEVSNP. +func (in *SEVSNP) DeepCopy() *SEVSNP { + if in == nil { + return nil + } + out := new(SEVSNP) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *SEVSecretOptions) DeepCopyInto(out *SEVSecretOptions) { *out = *in @@ -4315,11 +4816,7 @@ func (in *SupportContainerResources) DeepCopy() *SupportContainerResources { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *SyNICTimer) DeepCopyInto(out *SyNICTimer) { *out = *in - if in.Enabled != nil { - in, out := &in.Enabled, &out.Enabled - *out = new(bool) - **out = **in - } + in.FeatureState.DeepCopyInto(&out.FeatureState) if in.Direct != nil { in, out := &in.Direct, &out.Direct *out = new(FeatureState) @@ -4364,6 +4861,49 @@ func (in *SysprepSource) DeepCopy() *SysprepSource { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TDX) DeepCopyInto(out *TDX) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TDX. +func (in *TDX) DeepCopy() *TDX { + if in == nil { + return nil + } + out := new(TDX) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TLBFlush) DeepCopyInto(out *TLBFlush) { + *out = *in + in.FeatureState.DeepCopyInto(&out.FeatureState) + if in.Direct != nil { + in, out := &in.Direct, &out.Direct + *out = new(FeatureState) + (*in).DeepCopyInto(*out) + } + if in.Extended != nil { + in, out := &in.Extended, &out.Extended + *out = new(FeatureState) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TLBFlush. +func (in *TLBFlush) DeepCopy() *TLBFlush { + if in == nil { + return nil + } + out := new(TLBFlush) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *TLSConfiguration) DeepCopyInto(out *TLSConfiguration) { *out = *in @@ -4388,6 +4928,11 @@ func (in *TLSConfiguration) DeepCopy() *TLSConfiguration { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *TPMDevice) DeepCopyInto(out *TPMDevice) { *out = *in + if in.Enabled != nil { + in, out := &in.Enabled, &out.Enabled + *out = new(bool) + **out = **in + } if in.Persistent != nil { in, out := &in.Persistent, &out.Persistent *out = new(bool) @@ -4603,6 +5148,28 @@ func (in *UserPasswordAccessCredentialSource) DeepCopy() *UserPasswordAccessCred return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *UtilityVolume) DeepCopyInto(out *UtilityVolume) { + *out = *in + out.PersistentVolumeClaimVolumeSource = in.PersistentVolumeClaimVolumeSource + if in.Type != nil { + in, out := &in.Type, &out.Type + *out = new(UtilityVolumeType) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UtilityVolume. +func (in *UtilityVolume) DeepCopy() *UtilityVolume { + if in == nil { + return nil + } + out := new(UtilityVolume) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *VGPUDisplayOptions) DeepCopyInto(out *VGPUDisplayOptions) { *out = *in @@ -4687,6 +5254,43 @@ func (in *VSOCKOptions) DeepCopy() *VSOCKOptions { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VideoDevice) DeepCopyInto(out *VideoDevice) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VideoDevice. +func (in *VideoDevice) DeepCopy() *VideoDevice { + if in == nil { + return nil + } + out := new(VideoDevice) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtTemplateDeployment) DeepCopyInto(out *VirtTemplateDeployment) { + *out = *in + if in.Enabled != nil { + in, out := &in.Enabled, &out.Enabled + *out = new(bool) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtTemplateDeployment. +func (in *VirtTemplateDeployment) DeepCopy() *VirtTemplateDeployment { + if in == nil { + return nil + } + out := new(VirtTemplateDeployment) + 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 @@ -4761,6 +5365,86 @@ func (in *VirtualMachineInstance) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualMachineInstanceBackupStatus) DeepCopyInto(out *VirtualMachineInstanceBackupStatus) { + *out = *in + if in.StartTimestamp != nil { + in, out := &in.StartTimestamp, &out.StartTimestamp + *out = (*in).DeepCopy() + } + if in.EndTimestamp != nil { + in, out := &in.EndTimestamp, &out.EndTimestamp + *out = (*in).DeepCopy() + } + if in.BackupMsg != nil { + in, out := &in.BackupMsg, &out.BackupMsg + *out = new(string) + **out = **in + } + if in.CheckpointName != nil { + in, out := &in.CheckpointName, &out.CheckpointName + *out = new(string) + **out = **in + } + if in.Volumes != nil { + in, out := &in.Volumes, &out.Volumes + *out = make([]v1alpha1.BackupVolumeInfo, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineInstanceBackupStatus. +func (in *VirtualMachineInstanceBackupStatus) DeepCopy() *VirtualMachineInstanceBackupStatus { + if in == nil { + return nil + } + out := new(VirtualMachineInstanceBackupStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualMachineInstanceCommonMigrationState) DeepCopyInto(out *VirtualMachineInstanceCommonMigrationState) { + *out = *in + if in.DomainName != nil { + in, out := &in.DomainName, &out.DomainName + *out = new(string) + **out = **in + } + if in.DomainNamespace != nil { + in, out := &in.DomainNamespace, &out.DomainNamespace + *out = new(string) + **out = **in + } + if in.SyncAddress != nil { + in, out := &in.SyncAddress, &out.SyncAddress + *out = new(string) + **out = **in + } + if in.PersistentStatePVCName != nil { + in, out := &in.PersistentStatePVCName, &out.PersistentStatePVCName + *out = new(string) + **out = **in + } + if in.VirtualMachineInstanceUID != nil { + in, out := &in.VirtualMachineInstanceUID, &out.VirtualMachineInstanceUID + *out = new(types.UID) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineInstanceCommonMigrationState. +func (in *VirtualMachineInstanceCommonMigrationState) DeepCopy() *VirtualMachineInstanceCommonMigrationState { + if in == nil { + return nil + } + out := new(VirtualMachineInstanceCommonMigrationState) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *VirtualMachineInstanceCondition) DeepCopyInto(out *VirtualMachineInstanceCondition) { *out = *in @@ -5010,7 +5694,7 @@ func (in *VirtualMachineInstanceMigration) DeepCopyInto(out *VirtualMachineInsta *out = *in out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - out.Spec = in.Spec + in.Spec.DeepCopyInto(&out.Spec) in.Status.DeepCopyInto(&out.Status) return } @@ -5101,9 +5785,71 @@ func (in *VirtualMachineInstanceMigrationPhaseTransitionTimestamp) DeepCopy() *V return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualMachineInstanceMigrationSource) DeepCopyInto(out *VirtualMachineInstanceMigrationSource) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineInstanceMigrationSource. +func (in *VirtualMachineInstanceMigrationSource) DeepCopy() *VirtualMachineInstanceMigrationSource { + if in == nil { + return nil + } + out := new(VirtualMachineInstanceMigrationSource) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualMachineInstanceMigrationSourceState) DeepCopyInto(out *VirtualMachineInstanceMigrationSourceState) { + *out = *in + in.VirtualMachineInstanceCommonMigrationState.DeepCopyInto(&out.VirtualMachineInstanceCommonMigrationState) + if in.NodeSelectors != nil { + in, out := &in.NodeSelectors, &out.NodeSelectors + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineInstanceMigrationSourceState. +func (in *VirtualMachineInstanceMigrationSourceState) DeepCopy() *VirtualMachineInstanceMigrationSourceState { + if in == nil { + return nil + } + out := new(VirtualMachineInstanceMigrationSourceState) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *VirtualMachineInstanceMigrationSpec) DeepCopyInto(out *VirtualMachineInstanceMigrationSpec) { *out = *in + if in.AddedNodeSelector != nil { + in, out := &in.AddedNodeSelector, &out.AddedNodeSelector + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.SendTo != nil { + in, out := &in.SendTo, &out.SendTo + *out = new(VirtualMachineInstanceMigrationSource) + **out = **in + } + if in.Receive != nil { + in, out := &in.Receive, &out.Receive + *out = new(VirtualMachineInstanceMigrationTarget) + **out = **in + } + if in.Priority != nil { + in, out := &in.Priority, &out.Priority + *out = new(MigrationPriority) + **out = **in + } return } @@ -5154,6 +5900,21 @@ func (in *VirtualMachineInstanceMigrationState) DeepCopyInto(out *VirtualMachine *out = make([]int, len(*in)) copy(*out, *in) } + if in.SourceState != nil { + in, out := &in.SourceState, &out.SourceState + *out = new(VirtualMachineInstanceMigrationSourceState) + (*in).DeepCopyInto(*out) + } + if in.TargetState != nil { + in, out := &in.TargetState, &out.TargetState + *out = new(VirtualMachineInstanceMigrationTargetState) + (*in).DeepCopyInto(*out) + } + if in.TargetMemoryOverhead != nil { + in, out := &in.TargetMemoryOverhead, &out.TargetMemoryOverhead + x := (*in).DeepCopy() + *out = &x + } return } @@ -5189,6 +5950,11 @@ func (in *VirtualMachineInstanceMigrationStatus) DeepCopyInto(out *VirtualMachin *out = new(VirtualMachineInstanceMigrationState) (*in).DeepCopyInto(*out) } + if in.SynchronizationAddresses != nil { + in, out := &in.SynchronizationAddresses, &out.SynchronizationAddresses + *out = make([]string, len(*in)) + copy(*out, *in) + } return } @@ -5202,6 +5968,70 @@ func (in *VirtualMachineInstanceMigrationStatus) DeepCopy() *VirtualMachineInsta return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualMachineInstanceMigrationTarget) DeepCopyInto(out *VirtualMachineInstanceMigrationTarget) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineInstanceMigrationTarget. +func (in *VirtualMachineInstanceMigrationTarget) DeepCopy() *VirtualMachineInstanceMigrationTarget { + if in == nil { + return nil + } + out := new(VirtualMachineInstanceMigrationTarget) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualMachineInstanceMigrationTargetState) DeepCopyInto(out *VirtualMachineInstanceMigrationTargetState) { + *out = *in + in.VirtualMachineInstanceCommonMigrationState.DeepCopyInto(&out.VirtualMachineInstanceCommonMigrationState) + if in.DomainReadyTimestamp != nil { + in, out := &in.DomainReadyTimestamp, &out.DomainReadyTimestamp + *out = (*in).DeepCopy() + } + if in.NodeAddress != nil { + in, out := &in.NodeAddress, &out.NodeAddress + *out = new(string) + **out = **in + } + if in.DirectMigrationNodePorts != nil { + in, out := &in.DirectMigrationNodePorts, &out.DirectMigrationNodePorts + *out = make(map[string]int, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.AttachmentPodUID != nil { + in, out := &in.AttachmentPodUID, &out.AttachmentPodUID + *out = new(types.UID) + **out = **in + } + if in.CPUSet != nil { + in, out := &in.CPUSet, &out.CPUSet + *out = make([]int, len(*in)) + copy(*out, *in) + } + if in.NodeTopology != nil { + in, out := &in.NodeTopology, &out.NodeTopology + *out = new(string) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineInstanceMigrationTargetState. +func (in *VirtualMachineInstanceMigrationTargetState) DeepCopy() *VirtualMachineInstanceMigrationTargetState { + if in == nil { + return nil + } + out := new(VirtualMachineInstanceMigrationTargetState) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *VirtualMachineInstanceNetworkInterface) DeepCopyInto(out *VirtualMachineInstanceNetworkInterface) { *out = *in @@ -5557,6 +6387,20 @@ func (in *VirtualMachineInstanceSpec) DeepCopyInto(out *VirtualMachineInstanceSp (*in)[i].DeepCopyInto(&(*out)[i]) } } + if in.ResourceClaims != nil { + in, out := &in.ResourceClaims, &out.ResourceClaims + *out = make([]corev1.PodResourceClaim, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.UtilityVolumes != nil { + in, out := &in.UtilityVolumes, &out.UtilityVolumes + *out = make([]UtilityVolume, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } return } @@ -5656,6 +6500,11 @@ func (in *VirtualMachineInstanceStatus) DeepCopyInto(out *VirtualMachineInstance (*in)[i].DeepCopyInto(&(*out)[i]) } } + if in.ChangedBlockTracking != nil { + in, out := &in.ChangedBlockTracking, &out.ChangedBlockTracking + *out = new(ChangedBlockTrackingStatus) + (*in).DeepCopyInto(*out) + } return } @@ -5925,6 +6774,26 @@ func (in *VirtualMachineStatus) DeepCopyInto(out *VirtualMachineStatus) { *out = new(VirtualMachineMemoryDumpRequest) (*in).DeepCopyInto(*out) } + if in.VolumeUpdateState != nil { + in, out := &in.VolumeUpdateState, &out.VolumeUpdateState + *out = new(VolumeUpdateState) + (*in).DeepCopyInto(*out) + } + if in.ChangedBlockTracking != nil { + in, out := &in.ChangedBlockTracking, &out.ChangedBlockTracking + *out = new(ChangedBlockTrackingStatus) + (*in).DeepCopyInto(*out) + } + if in.InstancetypeRef != nil { + in, out := &in.InstancetypeRef, &out.InstancetypeRef + *out = new(InstancetypeStatusRef) + (*in).DeepCopyInto(*out) + } + if in.PreferenceRef != nil { + in, out := &in.PreferenceRef, &out.PreferenceRef + *out = new(InstancetypeStatusRef) + (*in).DeepCopyInto(*out) + } return } @@ -5981,6 +6850,29 @@ func (in *Volume) DeepCopy() *Volume { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VolumeMigrationState) DeepCopyInto(out *VolumeMigrationState) { + *out = *in + if in.MigratedVolumes != nil { + in, out := &in.MigratedVolumes, &out.MigratedVolumes + *out = make([]StorageMigratedVolumeInfo, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeMigrationState. +func (in *VolumeMigrationState) DeepCopy() *VolumeMigrationState { + if in == nil { + return nil + } + out := new(VolumeMigrationState) + 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 @@ -6075,6 +6967,11 @@ func (in *VolumeSource) DeepCopyInto(out *VolumeSource) { *out = new(MemoryDumpVolumeSource) **out = **in } + if in.ContainerPath != nil { + in, out := &in.ContainerPath, &out.ContainerPath + *out = new(ContainerPathVolumeSource) + (*in).DeepCopyInto(*out) + } return } @@ -6124,6 +7021,27 @@ func (in *VolumeStatus) DeepCopy() *VolumeStatus { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VolumeUpdateState) DeepCopyInto(out *VolumeUpdateState) { + *out = *in + if in.VolumeMigrationState != nil { + in, out := &in.VolumeMigrationState, &out.VolumeMigrationState + *out = new(VolumeMigrationState) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeUpdateState. +func (in *VolumeUpdateState) DeepCopy() *VolumeUpdateState { + if in == nil { + return nil + } + out := new(VolumeUpdateState) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Watchdog) DeepCopyInto(out *Watchdog) { *out = *in @@ -6149,6 +7067,11 @@ func (in *WatchdogDevice) DeepCopyInto(out *WatchdogDevice) { *out = new(I6300ESBWatchdog) **out = **in } + if in.Diag288 != nil { + in, out := &in.Diag288, &out.Diag288 + *out = new(Diag288Watchdog) + **out = **in + } return } diff --git a/vendor/kubevirt.io/api/core/v1/defaults.go b/vendor/kubevirt.io/api/core/v1/defaults.go index 65074cd6f..85b8ebac1 100644 --- a/vendor/kubevirt.io/api/core/v1/defaults.go +++ b/vendor/kubevirt.io/api/core/v1/defaults.go @@ -74,12 +74,6 @@ func SetDefaults_DiskDevice(obj *DiskDevice) { } } -func SetDefaults_Watchdog(obj *Watchdog) { - if obj.I6300ESB == nil { - obj.I6300ESB = &I6300ESBWatchdog{} - } -} - func SetDefaults_CDRomTarget(obj *CDRomTarget) { if obj.ReadOnly == nil { obj.ReadOnly = _true @@ -98,12 +92,6 @@ func SetDefaults_FeatureSpinlocks(obj *FeatureSpinlocks) { } } -func SetDefaults_I6300ESBWatchdog(obj *I6300ESBWatchdog) { - if obj.Action == "" { - obj.Action = WatchdogActionReset - } -} - func SetDefaults_Firmware(obj *Firmware) { if obj.UUID == "" { obj.UUID = types.UID(uuid.NewString()) @@ -168,19 +156,6 @@ func SetDefaults_Probe(probe *Probe) { } } -func SetDefaults_NetworkInterface(obj *VirtualMachineInstance) { - autoAttach := obj.Spec.Domain.Devices.AutoattachPodInterface - if autoAttach != nil && *autoAttach == false { - return - } - - // Override only when nothing is specified - if len(obj.Spec.Networks) == 0 { - obj.Spec.Domain.Devices.Interfaces = []Interface{*DefaultBridgeNetworkInterface()} - obj.Spec.Networks = []Network{*DefaultPodNetwork()} - } -} - func DefaultBridgeNetworkInterface() *Interface { iface := &Interface{ Name: "default", diff --git a/vendor/kubevirt.io/api/core/v1/schema.go b/vendor/kubevirt.io/api/core/v1/schema.go index 29aa3932d..cdc422247 100644 --- a/vendor/kubevirt.io/api/core/v1/schema.go +++ b/vendor/kubevirt.io/api/core/v1/schema.go @@ -30,11 +30,12 @@ import ( type IOThreadsPolicy string const ( - IOThreadsPolicyShared IOThreadsPolicy = "shared" - IOThreadsPolicyAuto IOThreadsPolicy = "auto" - CPUModeHostPassthrough = "host-passthrough" - CPUModeHostModel = "host-model" - DefaultCPUModel = CPUModeHostModel + IOThreadsPolicyShared IOThreadsPolicy = "shared" + IOThreadsPolicyAuto IOThreadsPolicy = "auto" + IOThreadsPolicySupplementalPool IOThreadsPolicy = "supplementalPool" + CPUModeHostPassthrough = "host-passthrough" + CPUModeHostModel = "host-model" + DefaultCPUModel = CPUModeHostModel ) const HotplugDiskDir = "/var/run/kubevirt/hotplug-disks/" @@ -48,6 +49,26 @@ const ( DiskErrorPolicyEnospace DiskErrorPolicy = "enospace" ) +type PanicDeviceModel string + +const ( + Hyperv PanicDeviceModel = "hyperv" + Isa PanicDeviceModel = "isa" + Pvpanic PanicDeviceModel = "pvpanic" +) + +// RebootPolicy specifies how the domain should behave when a guest reboot is triggered. +// +kubebuilder:validation:Enum=Reboot;Terminate +type RebootPolicy string + +const ( + // RebootPolicyReboot allows the guest to silently reboot without notifying KubeVirt (default behavior). + RebootPolicyReboot RebootPolicy = "Reboot" + // RebootPolicyTerminate terminates the VMI on guest reboot, allowing the VMI to be recreated + // by the controllers (e.g., to pick up new configuration from VM). + RebootPolicyTerminate RebootPolicy = "Terminate" +) + /* ATTENTION: Rerun code generators when comments on structs or fields are modified. */ @@ -114,6 +135,24 @@ type ServiceAccountVolumeSource struct { ServiceAccountName string `json:"serviceAccountName,omitempty"` } +// ContainerPathVolumeSource represents a path from the virt-launcher container +// to be exposed to the VM via virtiofs. The path must correspond to an existing +// volumeMount in the virt-launcher pod's compute container. +type ContainerPathVolumeSource struct { + // Path is the absolute path within the virt-launcher container to expose to the VM. + // The path must correspond to an existing volumeMount in the compute container. + // +kubebuilder:validation:MaxLength=4096 + // +kubebuilder:validation:XValidation:rule="self.startsWith('/')",message="path must be absolute (start with '/')" + // +kubebuilder:validation:XValidation:rule="!self.contains('..')",message="path must not contain '..'" + Path string `json:"path"` + // ReadOnly controls whether the volume is exposed as read-only to the VM. + // Defaults to true. Write access is not currently supported. + // +optional + // +kubebuilder:default:=true + // +kubebuilder:validation:XValidation:rule="self == true",message="readOnly must be true, write access is not supported" + ReadOnly *bool `json:"readOnly,omitempty"` +} + // 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 DownwardMetricsVolumeSource struct { @@ -200,15 +239,25 @@ type DomainSpec struct { Devices Devices `json:"devices"` // Controls whether or not disks will share IOThreads. // Omitting IOThreadsPolicy disables use of IOThreads. - // One of: shared, auto + // One of: shared, auto, supplementalPool // +optional IOThreadsPolicy *IOThreadsPolicy `json:"ioThreadsPolicy,omitempty"` + // IOThreads specifies the IOThreads options. + // +optional + IOThreads *DiskIOThreads `json:"ioThreads,omitempty"` // Chassis specifies the chassis info passed to the domain. // +optional Chassis *Chassis `json:"chassis,omitempty"` // Launch Security setting of the vmi. // +optional LaunchSecurity *LaunchSecurity `json:"launchSecurity,omitempty"` + // RebootPolicy specifies how the guest should behave on reboot. + // Reboot (default): The guest is allowed to reboot silently. + // Terminate: The VMI will be terminated on guest reboot, allowing + // higher level controllers (such as the VM controller) to recreate + // the VMI with any updated configuration such as boot order changes. + // +optional + RebootPolicy *RebootPolicy `json:"rebootPolicy,omitempty"` } // Chassis specifies the chassis info passed to the domain. @@ -357,7 +406,7 @@ type NUMAGuestMappingPassthrough struct { type NUMA struct { // 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. - // +opitonal + // +optional GuestMappingPassthrough *NUMAGuestMappingPassthrough `json:"guestMappingPassthrough,omitempty"` } @@ -389,6 +438,10 @@ type Memory struct { // MaxGuest allows to specify the maximum amount of memory which is visible inside the Guest OS. // The delta between MaxGuest and Guest is the amount of memory that can be hot(un)plugged. MaxGuest *resource.Quantity `json:"maxGuest,omitempty"` + // ReservedOverhead configures the memory overhead applied to a VM + // and its characteristics. + // +optional + ReservedOverhead *ReservedOverhead `json:"reservedOverhead,omitempty"` } type MemoryStatus struct { @@ -401,6 +454,10 @@ type MemoryStatus struct { // GuestRequested specifies how much memory was requested (hotplug) for the VirtualMachine. // +optional GuestRequested *resource.Quantity `json:"guestRequested,omitempty"` + // MemoryOverhead specifies the memory overhead added by the virtualization infrastructure + // for the virt-launcher pod. + // +optional + MemoryOverhead *resource.Quantity `json:"memoryOverhead,omitempty"` } // Hugepages allow to use hugepages for the VirtualMachineInstance instead of regular memory. @@ -409,6 +466,36 @@ type Hugepages struct { PageSize string `json:"pageSize,omitempty"` } +type ReservedOverhead struct { + // AddedOverhead determines the memory overhead that will be reserved + // for the VM. It increases the virt-launcher pod memory limit. + // +optional + AddedOverhead *resource.Quantity `json:"addedOverhead,omitempty"` + // RequiresLock determines whether the VM's and its overhead memory + // need to be locked or not. It is a common practice to enable this + // if vDPA, VFIO or any other specialized hardware that depends on + // DMA is being used by the VM. + // False - (Default) memory lock RLimits are not modified. + // True - Memory lock RLimits will be updated to consider VM memory + // size and memory overhead + // +optional + // +kubebuilder:validation:Enum=NotRequired;Required + MemLock *MemLockRequirement `json:"memLock,omitempty"` +} + +// MemLockRequirement describes whether the VM memory and its overhead +// needs to be locked or not. +type MemLockRequirement string + +const ( + // MemLockRequired means that the VM memory and its overhead + // could be locked by a device or any other condition. + MemLockRequired = "Required" + // MemLockNotRequired means that the VM memory and its overhead + // is not going to be locked. + MemLockNotRequired = "NotRequired" +) + type Machine struct { // QEMU machine type is the actual chipset of the VirtualMachineInstance. // +optional @@ -436,6 +523,9 @@ type ACPI struct { // be a binary blob that follows the ACPI SLIC standard, see: // https://learn.microsoft.com/en-us/previous-versions/windows/hardware/design/dn653305(v=vs.85) SlicNameRef string `json:"slicNameRef,omitempty"` + // Similar to SlicNameRef, another ACPI entry that is used in more recent Windows versions. + // The above points to the spec of MSDM too. + MsdmNameRef string `json:"msdmNameRef,omitempty"` } type Devices struct { @@ -497,6 +587,10 @@ type Devices struct { // DownwardMetrics creates a virtio serials for exposing the downward metrics to the vmi. // +optional DownwardMetrics *DownwardMetrics `json:"downwardMetrics,omitempty"` + // PanicDevices provides additional crash information when a guest crashes. + // +optional + // +listtype=atomic + PanicDevices []PanicDevice `json:"panicDevices,omitempty"` // Filesystems describes filesystem which is connected to the vmi. // +optional // +listType=atomic @@ -514,6 +608,9 @@ type Devices struct { // Whether to emulate a TPM device. // +optional TPM *TPMDevice `json:"tpm,omitempty"` + // Video describes the video device configuration for the vmi. + // +optional + Video *VideoDevice `json:"video,omitempty"` } // Represent a subset of client devices that can be accessed by VMI. At the @@ -543,11 +640,21 @@ type SoundDevice struct { } type TPMDevice struct { + // Enabled allows a user to explicitly disable the vTPM even when one is enabled by a preference referenced by the VirtualMachine + // Defaults to True + Enabled *bool `json:"enabled,omitempty"` // Persistent indicates the state of the TPM device should be kept accross reboots // Defaults to false Persistent *bool `json:"persistent,omitempty"` } +type VideoDevice struct { + // Type specifies the video device type (e.g., virtio, vga, bochs, ramfb). + // If not specified, the default is architecture-dependent (VGA for BIOS-based VMs, Bochs for EFI-based VMs on AMD64; virtio for Arm and s390x). + // +optional + Type string `json:"type,omitempty"` +} + type InputBus string const ( @@ -586,14 +693,31 @@ type DownwardMetrics struct{} type GPU struct { // Name of the GPU device as exposed by a device plugin - Name string `json:"name"` - DeviceName string `json:"deviceName"` + Name string `json:"name"` + // DeviceName is the name of the device provisioned by device-plugins + DeviceName string `json:"deviceName,omitempty"` + // ClaimRequest provides the ClaimName from vmi.spec.resourceClaims[].name and + // requestName from resourceClaim.spec.devices.requests[].name + // This field should only be configured if one of the feature-gates GPUsWithDRA or HostDevicesWithDRA is enabled. + // This feature is in alpha. + *ClaimRequest `json:",inline"` VirtualGPUOptions *VGPUOptions `json:"virtualGPUOptions,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"` } +type ClaimRequest struct { + // ClaimName needs to be provided from the list vmi.spec.resourceClaims[].name where this + // device is allocated + // +optional + ClaimName *string `json:"claimName,omitempty"` + // RequestName needs to be provided from resourceClaim.spec.devices.requests[].name where this + // device is requested + // +optional + RequestName *string `json:"requestName,omitempty"` +} + type VGPUOptions struct { Display *VGPUDisplayOptions `json:"display,omitempty"` } @@ -609,10 +733,24 @@ type VGPUDisplayOptions struct { RamFB *FeatureState `json:"ramFB,omitempty"` } +type PanicDevice struct { + // Model specifies what type of panic device is provided. + // The panic model used when this attribute is missing depends on the hypervisor and guest arch. + // One of: isa, hyperv, pvpanic. + // +optional + Model *PanicDeviceModel `json:"model,omitempty"` +} + type HostDevice struct { Name string `json:"name"` - // DeviceName is the resource name of the host device exposed by a device plugin - DeviceName string `json:"deviceName"` + // DeviceName is the name of the device provisioned by device-plugins + DeviceName string `json:"deviceName,omitempty"` + // ClaimRequest provides the ClaimName from vmi.spec.resourceClaims[].name and + // requestName from resourceClaim.spec.devices.requests[].name + // this fields requires DRA feature gate enabled + // This field should only be configured if one of the feature-gates GPUsWithDRA or HostDevicesWithDRA is enabled. + // This feature is in alpha. + *ClaimRequest `json:",inline"` // 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"` @@ -639,7 +777,11 @@ type Disk struct { // +optional DedicatedIOThread *bool `json:"dedicatedIOThread,omitempty"` // Cache specifies which kvm disk cache mode should be used. - // Supported values are: CacheNone, CacheWriteThrough. + // Supported values are: + // none: Guest I/O not cached on the host, but may be kept in a disk cache. + // writethrough: Guest I/O cached on the host but written through to the physical medium. Slowest but with most guarantees. + // writeback: Guest I/O cached on the host. + // Defaults to none if the storage supports O_DIRECT, otherwise writethrough. // +optional Cache DriverCache `json:"cache,omitempty"` // IO specifies which QEMU disk IO mode should be used. @@ -658,12 +800,17 @@ type Disk struct { // If specified, it can change the default error policy (stop) for the disk // +optional ErrorPolicy *DiskErrorPolicy `json:"errorPolicy,omitempty"` + // ChangedBlockTracking indicates this disk should have CBT option + // Defaults to false. + // +optional + ChangedBlockTracking *bool `json:"changedBlockTracking,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"` + Logical uint `json:"logical,omitempty"` + Physical uint `json:"physical,omitempty"` + DiscardGranularity *uint `json:"discardGranularity,omitempty"` } // BlockSize provides the option to change the block size presented to the VM for a disk. @@ -708,6 +855,11 @@ type DiskTarget struct { type LaunchSecurity struct { // AMD Secure Encrypted Virtualization (SEV). SEV *SEV `json:"sev,omitempty"` + // AMD SEV-SNP flags defined by the SEV-SNP specifications. + // +optional + SNP *SEVSNP `json:"snp,omitempty"` + // Intel Trust Domain Extensions (TDX). + TDX *TDX `json:"tdx,omitempty"` } type SEV struct { @@ -715,7 +867,7 @@ type SEV struct { // Note: due to security reasons it is not allowed to enable guest debugging. Therefore NoDebug flag is not exposed to users and is always true. Policy *SEVPolicy `json:"policy,omitempty"` // If specified, run the attestation process for a vmi. - // +opitonal + // +optional Attestation *SEVAttestation `json:"attestation,omitempty"` // Base64 encoded session blob. Session string `json:"session,omitempty"` @@ -730,9 +882,15 @@ type SEVPolicy struct { EncryptedState *bool `json:"encryptedState,omitempty"` } +type SEVSNP struct { +} + type SEVAttestation struct { } +type TDX struct { +} + type LunTarget struct { // Bus indicates the type of disk device to emulate. // supported values: virtio, sata, scsi. @@ -839,6 +997,10 @@ type VolumeSource struct { DownwardMetrics *DownwardMetricsVolumeSource `json:"downwardMetrics,omitempty"` // MemoryDump is attached to the virt launcher and is populated with a memory dump of the vmi MemoryDump *MemoryDumpVolumeSource `json:"memoryDump,omitempty"` + // ContainerPath exposes a path from the virt-launcher container to the VM via virtiofs. + // The path must correspond to an existing volumeMount in the compute container. + // +optional + ContainerPath *ContainerPathVolumeSource `json:"containerPath,omitempty"` } // HotplugVolumeSource Represents the source of a volume to mount which are capable @@ -858,7 +1020,6 @@ type HotplugVolumeSource struct { type DataVolumeSource struct { // Name of both the DataVolume and the PVC in the same namespace. - // After PVC population the DataVolume is garbage collected by default. Name string `json:"name"` // Hotpluggable indicates whether the volume can be hotplugged and hotunplugged. // +optional @@ -913,6 +1074,28 @@ type ContainerDiskSource struct { ImagePullPolicy v1.PullPolicy `json:"imagePullPolicy,omitempty"` } +type UtilityVolumeType string + +const ( + // MemoryDump represents a utility volume which will be used to collect memory dump + MemoryDump UtilityVolumeType = "MemoryDump" + + // Backup represents a utility volume which will be used to collect backup output + Backup UtilityVolumeType = "Backup" +) + +type UtilityVolume struct { + // UtilityVolume's name. + // Must be unique within the vmi, including regular Volumes. + Name string `json:"name"` + // PersistentVolumeClaimVolumeSource defines the PVC + // that is hotplugged to virt-launcher + v1.PersistentVolumeClaimVolumeSource `json:",inline"` + // Type represents the type of the utility volume. + // +optional + Type *UtilityVolumeType `json:"type,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, @@ -1090,8 +1273,10 @@ type Features struct { } type SyNICTimer struct { - Enabled *bool `json:"enabled,omitempty"` - Direct *FeatureState `json:"direct,omitempty"` + FeatureState `json:",inline"` + + // +optional + Direct *FeatureState `json:"direct,omitempty"` } // Represents if a feature is enabled or disabled. @@ -1103,10 +1288,8 @@ type FeatureState struct { } 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"` + FeatureState `json:",inline"` + // EndOfInterrupt enables the end of interrupt notification in the guest. // Defaults to false. // +optional @@ -1114,10 +1297,8 @@ type FeatureAPIC struct { } 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"` + FeatureState `json:",inline"` + // Retries indicates the number of retries. // Must be a value greater or equal 4096. // Defaults to 4096. @@ -1126,15 +1307,25 @@ type FeatureSpinlocks struct { } 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"` + FeatureState `json:",inline"` + // VendorID sets the hypervisor vendor id, visible to the vmi. // String up to twelve characters. VendorID string `json:"vendorid,omitempty"` } +type TLBFlush struct { + FeatureState `json:",inline"` + + // Direct allows sending the TLB flush command directly to the hypervisor. + // It can be useful to optimize performance in nested virtualization cases, such as Windows VBS. + // +optional + Direct *FeatureState `json:"direct,omitempty"` + // Extended allows the guest to execute partial TLB flushes. It can be helpful for general purpose workloads. + // +optional + Extended *FeatureState `json:"extended,omitempty"` +} + // Hyperv specific features. type FeatureHyperv struct { // Relaxed instructs the guest OS to disable watchdog timeouts. @@ -1183,7 +1374,7 @@ type FeatureHyperv struct { // TLBFlush improves performances in overcommited environments. Requires vpindex. // Defaults to the machine type setting. // +optional - TLBFlush *FeatureState `json:"tlbflush,omitempty"` + TLBFlush *TLBFlush `json:"tlbflush,omitempty"` // IPI improves performances in overcommited environments. Requires vpindex. // Defaults to the machine type setting. // +optional @@ -1227,6 +1418,10 @@ type WatchdogDevice struct { // i6300esb watchdog device. // +optional I6300ESB *I6300ESBWatchdog `json:"i6300esb,omitempty"` + + // diag288 watchdog device (specific to s390x architecture). + // +optional + Diag288 *Diag288Watchdog `json:"diag288,omitempty"` } // i6300esb watchdog device. @@ -1236,12 +1431,19 @@ type I6300ESBWatchdog struct { Action WatchdogAction `json:"action,omitempty"` } +// diag288 watchdog device. +type Diag288Watchdog 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. + // One of: e1000, e1000e, igb, 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"` @@ -1277,7 +1479,11 @@ type Interface struct { // +optional ACPIIndex int `json:"acpiIndex,omitempty"` // State represents the requested operational state of the interface. - // The (only) value supported is `absent`, expressing a request to remove the interface. + // The supported values are: + // `absent`, expressing a request to remove the interface. + // `down`, expressing a request to set the link down. + // `up`, expressing a request to set the link up. + // Empty value functions as `up`. // +optional State InterfaceState `json:"state,omitempty"` } @@ -1285,7 +1491,9 @@ type Interface struct { type InterfaceState string const ( - InterfaceStateAbsent InterfaceState = "absent" + InterfaceStateAbsent InterfaceState = "absent" + InterfaceStateLinkUp InterfaceState = "up" + InterfaceStateLinkDown InterfaceState = "down" ) // Extra DHCP options to use in the interface. @@ -1351,6 +1559,7 @@ type InterfaceBindingMethod struct { // Deprecated: Removed in v1.3 // +optional DeprecatedPasst *DeprecatedInterfacePasst `json:"passt,omitempty"` + PasstBinding *InterfacePasstBinding `json:"passtBinding,omitempty"` } // InterfaceBridge connects to a given network via a linux bridge. @@ -1376,6 +1585,9 @@ type DeprecatedInterfaceMacvtap struct{} // Deprecated: Removed in v1.3 type DeprecatedInterfacePasst struct{} +// InterfacePasstBinding connects to a given network using passt usermode networking. +type InterfacePasstBinding struct{} + // PluginBinding represents a binding implemented in a plugin. type PluginBinding struct { // Name references to the binding name as denined in the kubevirt CR. @@ -1586,3 +1798,9 @@ type CPUTopology struct { // Must be a value greater or equal 1. Threads uint32 `json:"threads,omitempty"` } + +type DiskIOThreads struct { + // SupplementalPoolThreadCount specifies how many iothreads are allocated for the supplementalPool policy. + // +optional + SupplementalPoolThreadCount *uint32 `json:"supplementalPoolThreadCount,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 index 1ad98abbe..bd77f73a4 100644 --- a/vendor/kubevirt.io/api/core/v1/schema_swagger_generated.go +++ b/vendor/kubevirt.io/api/core/v1/schema_swagger_generated.go @@ -44,6 +44,14 @@ func (ServiceAccountVolumeSource) SwaggerDoc() map[string]string { } } +func (ContainerPathVolumeSource) SwaggerDoc() map[string]string { + return map[string]string{ + "": "ContainerPathVolumeSource represents a path from the virt-launcher container\nto be exposed to the VM via virtiofs. The path must correspond to an existing\nvolumeMount in the virt-launcher pod's compute container.", + "path": "Path is the absolute path within the virt-launcher container to expose to the VM.\nThe path must correspond to an existing volumeMount in the compute container.\n+kubebuilder:validation:MaxLength=4096\n+kubebuilder:validation:XValidation:rule=\"self.startsWith('/')\",message=\"path must be absolute (start with '/')\"\n+kubebuilder:validation:XValidation:rule=\"!self.contains('..')\",message=\"path must not contain '..'\"", + "readOnly": "ReadOnly controls whether the volume is exposed as read-only to the VM.\nDefaults to true. Write access is not currently supported.\n+optional\n+kubebuilder:default:=true\n+kubebuilder:validation:XValidation:rule=\"self == true\",message=\"readOnly must be true, write access is not supported\"", + } +} + 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.", @@ -92,9 +100,11 @@ func (DomainSpec) SwaggerDoc() map[string]string { "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", + "ioThreadsPolicy": "Controls whether or not disks will share IOThreads.\nOmitting IOThreadsPolicy disables use of IOThreads.\nOne of: shared, auto, supplementalPool\n+optional", + "ioThreads": "IOThreads specifies the IOThreads options.\n+optional", "chassis": "Chassis specifies the chassis info passed to the domain.\n+optional", "launchSecurity": "Launch Security setting of the vmi.\n+optional", + "rebootPolicy": "RebootPolicy specifies how the guest should behave on reboot.\nReboot (default): The guest is allowed to reboot silently.\nTerminate: The VMI will be terminated on guest reboot, allowing\nhigher level controllers (such as the VM controller) to recreate\nthe VMI with any updated configuration such as boot order changes.\n+optional", } } @@ -185,7 +195,7 @@ func (NUMAGuestMappingPassthrough) SwaggerDoc() map[string]string { 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", + "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+optional", } } @@ -199,10 +209,11 @@ func (CPUFeature) SwaggerDoc() map[string]string { 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", - "maxGuest": "MaxGuest allows to specify the maximum amount of memory which is visible inside the Guest OS.\nThe delta between MaxGuest and Guest is the amount of memory that can be hot(un)plugged.", + "": "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", + "maxGuest": "MaxGuest allows to specify the maximum amount of memory which is visible inside the Guest OS.\nThe delta between MaxGuest and Guest is the amount of memory that can be hot(un)plugged.", + "reservedOverhead": "ReservedOverhead configures the memory overhead applied to a VM\nand its characteristics.\n+optional", } } @@ -211,6 +222,7 @@ func (MemoryStatus) SwaggerDoc() map[string]string { "guestAtBoot": "GuestAtBoot specifies with how much memory the VirtualMachine intiallly booted with.\n+optional", "guestCurrent": "GuestCurrent specifies how much memory is currently available for the VirtualMachine.\n+optional", "guestRequested": "GuestRequested specifies how much memory was requested (hotplug) for the VirtualMachine.\n+optional", + "memoryOverhead": "MemoryOverhead specifies the memory overhead added by the virtualization infrastructure\nfor the virt-launcher pod.\n+optional", } } @@ -221,6 +233,13 @@ func (Hugepages) SwaggerDoc() map[string]string { } } +func (ReservedOverhead) SwaggerDoc() map[string]string { + return map[string]string{ + "addedOverhead": "AddedOverhead determines the memory overhead that will be reserved\nfor the VM. It increases the virt-launcher pod memory limit.\n+optional", + "memLock": "RequiresLock determines whether the VM's and its overhead memory\nneed to be locked or not. It is a common practice to enable this\nif vDPA, VFIO or any other specialized hardware that depends on\nDMA is being used by the VM.\nFalse - (Default) memory lock RLimits are not modified.\nTrue - Memory lock RLimits will be updated to consider VM memory\n size and memory overhead\n+optional\n+kubebuilder:validation:Enum=NotRequired;Required", + } +} + func (Machine) SwaggerDoc() map[string]string { return map[string]string{ "type": "QEMU machine type is the actual chipset of the VirtualMachineInstance.\n+optional", @@ -240,6 +259,7 @@ func (Firmware) SwaggerDoc() map[string]string { func (ACPI) SwaggerDoc() map[string]string { return map[string]string{ "slicNameRef": "SlicNameRef should match the volume name of a secret object. The data in the secret should\nbe a binary blob that follows the ACPI SLIC standard, see:\nhttps://learn.microsoft.com/en-us/previous-versions/windows/hardware/design/dn653305(v=vs.85)", + "msdmNameRef": "Similar to SlicNameRef, another ACPI entry that is used in more recent Windows versions.\nThe above points to the spec of MSDM too.", } } @@ -263,11 +283,13 @@ func (Devices) SwaggerDoc() map[string]string { "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", "downwardMetrics": "DownwardMetrics creates a virtio serials for exposing the downward metrics to the vmi.\n+optional", + "panicDevices": "PanicDevices provides additional crash information when a guest crashes.\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", + "video": "Video describes the video device configuration for the vmi.\n+optional", } } @@ -287,10 +309,17 @@ func (SoundDevice) SwaggerDoc() map[string]string { func (TPMDevice) SwaggerDoc() map[string]string { return map[string]string{ + "enabled": "Enabled allows a user to explicitly disable the vTPM even when one is enabled by a preference referenced by the VirtualMachine\nDefaults to True", "persistent": "Persistent indicates the state of the TPM device should be kept accross reboots\nDefaults to false", } } +func (VideoDevice) SwaggerDoc() map[string]string { + return map[string]string{ + "type": "Type specifies the video device type (e.g., virtio, vga, bochs, ramfb).\nIf not specified, the default is architecture-dependent (VGA for BIOS-based VMs, Bochs for EFI-based VMs on AMD64; virtio for Arm and s390x).\n+optional", + } +} + func (Input) SwaggerDoc() map[string]string { return map[string]string{ "bus": "Bus indicates the bus of input device to emulate.\nSupported values: virtio, usb.", @@ -316,8 +345,16 @@ func (DownwardMetrics) SwaggerDoc() 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", + "name": "Name of the GPU device as exposed by a device plugin", + "deviceName": "DeviceName is the name of the device provisioned by device-plugins", + "tag": "If specified, the virtual network interface address and its tag will be provided to the guest via config drive\n+optional", + } +} + +func (ClaimRequest) SwaggerDoc() map[string]string { + return map[string]string{ + "claimName": "ClaimName needs to be provided from the list vmi.spec.resourceClaims[].name where this\ndevice is allocated\n+optional", + "requestName": "RequestName needs to be provided from resourceClaim.spec.devices.requests[].name where this\ndevice is requested\n+optional", } } @@ -332,25 +369,32 @@ func (VGPUDisplayOptions) SwaggerDoc() map[string]string { } } +func (PanicDevice) SwaggerDoc() map[string]string { + return map[string]string{ + "model": "Model specifies what type of panic device is provided.\nThe panic model used when this attribute is missing depends on the hypervisor and guest arch.\nOne of: isa, hyperv, pvpanic.\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", + "deviceName": "DeviceName is the name of the device provisioned by device-plugins", "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", - "errorPolicy": "If specified, it can change the default error policy (stop) for the disk\n+optional", + "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:\nnone: Guest I/O not cached on the host, but may be kept in a disk cache.\nwritethrough: Guest I/O cached on the host but written through to the physical medium. Slowest but with most guarantees.\nwriteback: Guest I/O cached on the host.\nDefaults to none if the storage supports O_DIRECT, otherwise writethrough.\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", + "errorPolicy": "If specified, it can change the default error policy (stop) for the disk\n+optional", + "changedBlockTracking": "ChangedBlockTracking indicates this disk should have CBT option\nDefaults to false.\n+optional", } } @@ -386,13 +430,15 @@ func (DiskTarget) SwaggerDoc() map[string]string { func (LaunchSecurity) SwaggerDoc() map[string]string { return map[string]string{ "sev": "AMD Secure Encrypted Virtualization (SEV).", + "snp": "AMD SEV-SNP flags defined by the SEV-SNP specifications.\n+optional", + "tdx": "Intel Trust Domain Extensions (TDX).", } } func (SEV) SwaggerDoc() map[string]string { return map[string]string{ "policy": "Guest policy flags as defined in AMD SEV API specification.\nNote: due to security reasons it is not allowed to enable guest debugging. Therefore NoDebug flag is not exposed to users and is always true.", - "attestation": "If specified, run the attestation process for a vmi.\n+opitonal", + "attestation": "If specified, run the attestation process for a vmi.\n+optional", "session": "Base64 encoded session blob.", "dhCert": "Base64 encoded guest owner's Diffie-Hellman key.", } @@ -404,10 +450,18 @@ func (SEVPolicy) SwaggerDoc() map[string]string { } } +func (SEVSNP) SwaggerDoc() map[string]string { + return map[string]string{} +} + func (SEVAttestation) SwaggerDoc() map[string]string { return map[string]string{} } +func (TDX) 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.", @@ -449,6 +503,7 @@ func (VolumeSource) SwaggerDoc() map[string]string { "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.", "memoryDump": "MemoryDump is attached to the virt launcher and is populated with a memory dump of the vmi", + "containerPath": "ContainerPath exposes a path from the virt-launcher container to the VM via virtiofs.\nThe path must correspond to an existing volumeMount in the compute container.\n+optional", } } @@ -462,7 +517,7 @@ func (HotplugVolumeSource) SwaggerDoc() map[string]string { func (DataVolumeSource) SwaggerDoc() map[string]string { return map[string]string{ - "name": "Name of both the DataVolume and the PVC in the same namespace.\nAfter PVC population the DataVolume is garbage collected by default.", + "name": "Name of both the DataVolume and the PVC in the same namespace.", "hotpluggable": "Hotpluggable indicates whether the volume can be hotplugged and hotunplugged.\n+optional", } } @@ -501,6 +556,13 @@ func (ContainerDiskSource) SwaggerDoc() map[string]string { } } +func (UtilityVolume) SwaggerDoc() map[string]string { + return map[string]string{ + "name": "UtilityVolume's name.\nMust be unique within the vmi, including regular Volumes.", + "type": "Type represents the type of the utility volume.\n+optional", + } +} + func (ClockOffset) SwaggerDoc() map[string]string { return map[string]string{ "": "Exactly one of its members must be set.", @@ -587,7 +649,9 @@ func (Features) SwaggerDoc() map[string]string { } func (SyNICTimer) SwaggerDoc() map[string]string { - return map[string]string{} + return map[string]string{ + "direct": "+optional", + } } func (FeatureState) SwaggerDoc() map[string]string { @@ -599,25 +663,29 @@ func (FeatureState) SwaggerDoc() map[string]string { 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 (TLBFlush) SwaggerDoc() map[string]string { + return map[string]string{ + "direct": "Direct allows sending the TLB flush command directly to the hypervisor.\nIt can be useful to optimize performance in nested virtualization cases, such as Windows VBS.\n+optional", + "extended": "Extended allows the guest to execute partial TLB flushes. It can be helpful for general purpose workloads.\n+optional", + } +} + func (FeatureHyperv) SwaggerDoc() map[string]string { return map[string]string{ "": "Hyperv specific features.", @@ -655,6 +723,7 @@ 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", + "diag288": "diag288 watchdog device (specific to s390x architecture).\n+optional", } } @@ -665,10 +734,17 @@ func (I6300ESBWatchdog) SwaggerDoc() map[string]string { } } +func (Diag288Watchdog) SwaggerDoc() map[string]string { + return map[string]string{ + "": "diag288 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.", + "model": "Interface model.\nOne of: e1000, e1000e, igb, ne2k_pci, pcnet, rtl8139, virtio.\nDefaults to virtio.", "binding": "Binding specifies the binding plugin that will be used to connect the interface to the guest.\nIt provides an alternative to InterfaceBindingMethod.\nversion: 1alphav1", "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.", @@ -677,7 +753,7 @@ func (Interface) SwaggerDoc() map[string]string { "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", "acpiIndex": "If specified, the ACPI index is used to provide network interface device naming, that is stable across changes\nin PCI addresses assigned to the device.\nThis value is required to be unique across all devices and be between 1 and (16*1024-1).\n+optional", - "state": "State represents the requested operational state of the interface.\nThe (only) value supported is `absent`, expressing a request to remove the interface.\n+optional", + "state": "State represents the requested operational state of the interface.\nThe supported values are:\n`absent`, expressing a request to remove the interface.\n`down`, expressing a request to set the link down.\n`up`, expressing a request to set the link up.\nEmpty value functions as `up`.\n+optional", } } @@ -744,6 +820,12 @@ func (DeprecatedInterfacePasst) SwaggerDoc() map[string]string { } } +func (InterfacePasstBinding) SwaggerDoc() map[string]string { + return map[string]string{ + "": "InterfacePasstBinding connects to a given network using passt usermode networking.", + } +} + func (PluginBinding) SwaggerDoc() map[string]string { return map[string]string{ "": "PluginBinding represents a binding implemented in a plugin.", @@ -888,3 +970,9 @@ func (CPUTopology) SwaggerDoc() map[string]string { "threads": "Threads specifies the number of threads inside the vmi.\nMust be a value greater or equal 1.", } } + +func (DiskIOThreads) SwaggerDoc() map[string]string { + return map[string]string{ + "supplementalPoolThreadCount": "SupplementalPoolThreadCount specifies how many iothreads are allocated for the supplementalPool policy.\n+optional", + } +} diff --git a/vendor/kubevirt.io/api/core/v1/types.go b/vendor/kubevirt.io/api/core/v1/types.go index 64aa6e7a1..c30fa4d27 100644 --- a/vendor/kubevirt.io/api/core/v1/types.go +++ b/vendor/kubevirt.io/api/core/v1/types.go @@ -33,6 +33,7 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/types" + backupv1 "kubevirt.io/api/backup/v1alpha1" cdiv1 "kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1" ) @@ -42,6 +43,7 @@ const DefaultGracePeriodSeconds int64 = 30 // // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +genclient +// +genclient:noStatus type VirtualMachineInstance struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` @@ -114,7 +116,7 @@ type VirtualMachineInstanceSpec struct { // - "None": No action will be taken, according to the specified 'RunStrategy' the VirtualMachine will be restarted or shutdown. // - "LiveMigrate": the VirtualMachineInstance will be migrated instead of being shutdown. // - "LiveMigrateIfPossible": the same as "LiveMigrate" but only if the VirtualMachine is Live-Migratable, otherwise it will behave as "None". - // - "External": the VirtualMachineInstance will be protected by a PDB and `vmi.Status.EvacuationNodeName` will be set on eviction. This is mainly useful for cluster-api-provider-kubevirt (capk) which needs a way for VMI's to be blocked from eviction, yet signal capk that eviction has been called on the VMI so the capk controller can handle tearing the VMI down. Details can be found in the commit description https://github.com/kubevirt/kubevirt/commit/c1d77face705c8b126696bac9a3ee3825f27f1fa. + // - "External": the VirtualMachineInstance will be protected and `vmi.Status.EvacuationNodeName` will be set on eviction. This is mainly useful for cluster-api-provider-kubevirt (capk) which needs a way for VMI's to be blocked from eviction, yet signal capk that eviction has been called on the VMI so the capk controller can handle tearing the VMI down. Details can be found in the commit description https://github.com/kubevirt/kubevirt/commit/c1d77face705c8b126696bac9a3ee3825f27f1fa. // +optional EvictionStrategy *EvictionStrategy `json:"evictionStrategy,omitempty"` // StartStrategy can be set to "Paused" if Virtual Machine should be started in paused state. @@ -170,6 +172,29 @@ type VirtualMachineInstanceSpec struct { AccessCredentials []AccessCredential `json:"accessCredentials,omitempty"` // Specifies the architecture of the vm guest you are attempting to run. Defaults to the compiled architecture of the KubeVirt components Architecture string `json:"architecture,omitempty"` + // ResourceClaims define which ResourceClaims must be allocated + // and reserved before the VMI, hence virt-launcher pod is allowed to start. The resources + // will be made available to the domain which consumes them + // by name. + // + // This is an alpha field and requires enabling the + // DynamicResourceAllocation feature gate in kubernetes + // https://kubernetes.io/docs/concepts/scheduling-eviction/dynamic-resource-allocation/ + // This field should only be configured if one of the feature-gates GPUsWithDRA or HostDevicesWithDRA is enabled. + // This feature is in alpha. + // + // +listType=map + // +listMapKey=name + // +optional + ResourceClaims []k8sv1.PodResourceClaim `json:"resourceClaims,omitempty"` + // List of utility volumes that can be mounted to the vmi virt-launcher pod + // without having a matching disk in the domain. + // Used to collect data for various operational workflows. + // +kubebuilder:validation:MaxItems:=256 + // +listType=map + // +listMapKey=name + // +optional + UtilityVolumes []UtilityVolume `json:"utilityVolumes,omitempty"` } func (vmiSpec *VirtualMachineInstanceSpec) UnmarshalJSON(data []byte) error { @@ -257,8 +282,9 @@ type VirtualMachineInstanceStatus struct { // +optional KernelBootStatus *KernelBootStatus `json:"kernelBootStatus,omitempty"` - // FSFreezeStatus is the state of the fs of the guest - // it can be either frozen or thawed + // FSFreezeStatus indicates whether a freeze operation was requested for the guest filesystem. + // It will be set to "frozen" if the request was made, or unset otherwise. + // This does not reflect the actual state of the guest filesystem. // +optional FSFreezeStatus string `json:"fsFreezeStatus,omitempty"` @@ -299,6 +325,11 @@ type VirtualMachineInstanceStatus struct { // +listType=atomic // +optional MigratedVolumes []StorageMigratedVolumeInfo `json:"migratedVolumes,omitempty"` + + // ChangedBlockTracking represents the status of the changedBlockTracking + // +nullable + // +optional + ChangedBlockTracking *ChangedBlockTrackingStatus `json:"changedBlockTracking,omitempty" optional:"true"` } // StorageMigratedVolumeInfo tracks the information about the source and destination volumes during the volume migration @@ -340,9 +371,13 @@ type PersistentVolumeClaimInfo struct { // Percentage of filesystem's size to be reserved when resizing the PVC // +optional - FilesystemOverhead *cdiv1.Percent `json:"filesystemOverhead,omitempty"` + FilesystemOverhead *Percent `json:"filesystemOverhead,omitempty"` } +// Percent is a string that can only be a value between [0,1) +// +kubebuilder:validation:Pattern=`^(0(?:\.\d{1,3})?|1)$` +type Percent string + // VolumeStatus represents information about the status of volumes attached to the VirtualMachineInstance. type VolumeStatus struct { // Name is the name of the volume @@ -464,6 +499,11 @@ func (v *VirtualMachineInstance) IsMigratable() bool { return false } +func (v *VirtualMachineInstance) IsBlockMigration() bool { + return v.Status.MigrationMethod == BlockMigration || + len(v.Status.MigratedVolumes) > 0 +} + func (v *VirtualMachineInstance) IsFinal() bool { return v.Status.Phase == Failed || v.Status.Phase == Succeeded } @@ -490,12 +530,15 @@ func (v *VirtualMachineInstance) IsBootloaderEFI() bool { v.Spec.Domain.Firmware.Bootloader.EFI != nil } -// WantsToHaveQOSGuaranteed checks if cpu and memoyr limits and requests are identical on the VMI. +// WantsToHaveQOSGuaranteed checks if cpu and memory limits and requests are identical on the VMI. // This is the indicator that people want a VMI with QOS of guaranteed +// If memory limit is set but not its corresponding request, we will eventually set request=limit 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 + memoryWantsIt := (resources.Requests.Memory().IsZero() && !resources.Limits.Memory().IsZero()) || + (!resources.Requests.Memory().IsZero() && resources.Requests.Memory().Cmp(*resources.Limits.Memory()) == 0) + cpuWantsIt := !resources.Requests.Cpu().IsZero() && resources.Requests.Cpu().Cmp(*resources.Limits.Cpu()) == 0 + return memoryWantsIt && cpuWantsIt } // ShouldStartPaused returns true if VMI should be started in paused state @@ -526,6 +569,74 @@ func (v *VirtualMachineInstance) IsHighPerformanceVMI() bool { return false } +func (v *VirtualMachineInstance) IsMigrationSource() bool { + // Can use this after being fully synchronized. + return v.Status.MigrationState != nil && v.Status.MigrationState.TargetState != nil && v.Status.MigrationState.TargetState.SyncAddress != nil && v.Status.MigrationState.TargetState.NodeAddress != nil +} + +func (v *VirtualMachineInstance) IsMigrationTarget() bool { + return v.GetAnnotations()[CreateMigrationTarget] == "true" +} + +func (v *VirtualMachineInstance) IsWaitingForSync() bool { + return v.Status.Phase == WaitingForSync +} + +// Is set to true after the VMI is fully synced +func (v *VirtualMachineInstance) IsMigrationTargetNodeLabelSet() bool { + _, ok := v.Labels[MigrationTargetNodeNameLabel] + return ok +} + +// Assume that this only called when in decentralized live migration +func (v *VirtualMachineInstance) IsMigrationSourceSynchronized() bool { + return v.Status.MigrationState != nil && v.Status.MigrationState.SourceState != nil && + v.Status.MigrationState.TargetState != nil && + v.Status.MigrationState.SourceState.MigrationUID != "" && + v.Status.MigrationState.SourceState.Pod != "" && + v.Status.MigrationState.SourceState.NodeSelectors != nil && + v.Status.MigrationState.SourceState.Node != "" +} + +func (v *VirtualMachineInstance) IsMigrationCompleted() bool { + return v.Status.MigrationState != nil && v.Status.MigrationState.Completed +} + +// IsMigrationSynchronized is true after a decentralized migration VMI has sync with the other side. It +// checks if the SourceState and TargetState are not nil, and the migrationUIDs are set. This can only +// happen when both sides have synchronized at least once. For 'local' migrations this returns true if the +// migration state is not nil. Essentially this happens after the migration resource is created. +func (v *VirtualMachineInstance) IsMigrationSynchronized(migration *VirtualMachineInstanceMigration) bool { + + if migration.IsDecentralized() { + return v.Status.MigrationState != nil && v.Status.MigrationState.SourceState != nil && + v.Status.MigrationState.TargetState != nil && + v.Status.MigrationState.SourceState.MigrationUID != "" && + v.Status.MigrationState.TargetState.MigrationUID != "" + } else { + return v.Status.MigrationState != nil + } +} + +func (v *VirtualMachineInstance) IsTargetPreparing(migration *VirtualMachineInstanceMigration) bool { + if migration.IsDecentralized() { + return v.IsMigrationSynchronized(migration) && + v.Status.MigrationState.TargetState.Pod != "" && + v.Status.MigrationState.TargetState.Node != "" + } else { + return v.Status.MigrationState != nil && v.Status.MigrationState.MigrationUID == migration.UID && + v.Status.MigrationState.TargetNode != "" + } +} + +func (v *VirtualMachineInstance) IsDecentralizedMigration() bool { + return v.Status.MigrationState != nil && + v.Status.MigrationState.TargetState != nil && + v.Status.MigrationState.SourceState != nil && + ((v.Status.MigrationState.SourceState.SyncAddress == nil && v.Status.MigrationState.TargetState.SyncAddress != nil) || + (v.Status.MigrationState.SourceState.SyncAddress != nil && v.Status.MigrationState.TargetState.SyncAddress == nil)) +} + type VirtualMachineInstanceConditionType string // These are valid conditions of VMIs. @@ -568,17 +679,29 @@ const ( // Summarizes that all the DataVolumes attached to the VMI are Ready or not VirtualMachineInstanceDataVolumesReady VirtualMachineInstanceConditionType = "DataVolumesReady" + + // Indicates whether the VMI is live migratable + VirtualMachineInstanceIsStorageLiveMigratable VirtualMachineInstanceConditionType = "StorageLiveMigratable" + + // Indicates whether the VMI has any failure during decentralized live migration + VirtualMachineInstanceDecentralizedLiveMigrationFailure VirtualMachineInstanceConditionType = "DecentralizedLiveMigrationFailure" + + // VirtualMachineInstanceMigrationRequired Indicates that an automatic migration is required + VirtualMachineInstanceMigrationRequired VirtualMachineInstanceConditionType = "MigrationRequired" + + // VirtualMachineInstanceEvictionRequested indicates that an eviction has been requested for the VMI + VirtualMachineInstanceEvictionRequested VirtualMachineInstanceConditionType = "EvictionRequested" ) // These are valid reasons for VMI conditions. const ( - // Reason means that VMI is not live migratioable because of it's disks collection + // Reason means that VMI is not live migratable because of it's disks collection VirtualMachineInstanceReasonDisksNotMigratable = "DisksNotLiveMigratable" - // Reason means that VMI is not live migratioable because of it's network interfaces collection + // Reason means that VMI is not live migratable because of it's network interfaces collection VirtualMachineInstanceReasonInterfaceNotMigratable = "InterfaceNotLiveMigratable" - // Reason means that VMI is not live migratioable because it uses hotplug + // Reason means that VMI is not live migratable because it uses hotplug VirtualMachineInstanceReasonHotplugNotMigratable = "HotplugNotLiveMigratable" - // Reason means that VMI is not live migratioable because of it's CPU mode + // Reason means that VMI is not live migratable because of it's CPU mode VirtualMachineInstanceReasonCPUModeNotMigratable = "CPUModeLiveMigratable" // Reason means that VMI is not live migratable because it uses virtiofs VirtualMachineInstanceReasonVirtIOFSNotMigratable = "VirtIOFSNotLiveMigratable" @@ -586,16 +709,35 @@ const ( VirtualMachineInstanceReasonHostDeviceNotMigratable = "HostDeviceNotLiveMigratable" // Reason means that VMI is not live migratable because it uses Secure Encrypted Virtualization (SEV) VirtualMachineInstanceReasonSEVNotMigratable = "SEVNotLiveMigratable" + // Reason means that VMI is not live migratable because it uses IBM Secure Execution + VirtualMachineInstanceReasonSecureExecutionNotMigratable = "SecureExecutionNotLiveMigratable" + // Reason means that VMI is not live migratable because it uses Intel Trust Domain Extensions (TDX) + VirtualMachineInstanceReasonTDXNotMigratable = "TDXNotLiveMigratable" // Reason means that VMI is not live migratable because it uses HyperV Reenlightenment while TSC Frequency is not available VirtualMachineInstanceReasonNoTSCFrequencyMigratable = "NoTSCFrequencyNotLiveMigratable" // Reason means that VMI is not live migratable because it uses HyperV Reenlightenment while TSC Frequency is not available VirtualMachineInstanceReasonHypervPassthroughNotMigratable = "HypervPassthroughNotLiveMigratable" // Reason means that VMI is not live migratable because it requested SCSI persitent reservation VirtualMachineInstanceReasonPRNotMigratable = "PersistentReservationNotLiveMigratable" + // Reason means that VMI is not decentralized live migratable, the reason is specified in the condition message + VirtualMachineInstanceReasonDecentralizedNotMigratable = "DecentralizedNotLiveMigratable" // Reason means that not all of the VMI's DVs are ready VirtualMachineInstanceReasonNotAllDVsReady = "NotAllDVsReady" - // Reason means that all of the VMI's DVs are bound and not running + // Reason means that all of the VMI's DVs are bound and ready VirtualMachineInstanceReasonAllDVsReady = "AllDVsReady" + // Indicates a generic reason that the VMI isn't migratable and more details are specified in the condition message. + VirtualMachineInstanceReasonNotMigratable = "NotMigratable" + // Reason means that the volume update change was cancelled + VirtualMachineInstanceReasonVolumesChangeCancellation = "VolumesChangeCancellation" + + // Indicates that automatic migration is required due to a change made to a running VM + VirtualMachineInstanceReasonAutoMigrationDueToLiveUpdate = "AutoMigrationDueToLiveUpdate" + + // Indicates that automatic migration is pending + VirtualMachineInstanceReasonAutoMigrationPending = "AutoMigrationPending" + + // Indicates that an eviction has been requested for the VMI + VirtualMachineInstanceReasonEvictionRequested = "EvictionRequested" ) const ( @@ -610,6 +752,11 @@ const ( // GuestNotRunningReason indicates on the Ready condition on the VMI if the underlying guest VM is not running GuestNotRunningReason = "GuestNotRunning" + + // ContainerPathVolumesDisabledReason indicates that the VMI has ContainerPath volumes but the feature gate is disabled + ContainerPathVolumesDisabledReason = "ContainerPathVolumesDisabled" + // MissingVirtiofsContainersReason indicates that expected virtiofs containers for ContainerPath volumes are missing from the pod + MissingVirtiofsContainersReason = "MissingVirtiofsContainers" ) type VirtualMachineInstanceMigrationConditionType string @@ -619,6 +766,12 @@ const ( // VirtualMachineInstanceMigrationAbortRequested indicates that live migration abort has been requested VirtualMachineInstanceMigrationAbortRequested VirtualMachineInstanceMigrationConditionType = "migrationAbortRequested" VirtualMachineInstanceMigrationRejectedByResourceQuota VirtualMachineInstanceMigrationConditionType = "migrationRejectedByResourceQuota" + // VirtualMachineInstanceMigrationBlockedByUtilityVolumes indicates that migration is waiting for utility volumes to detach + VirtualMachineInstanceMigrationBlockedByUtilityVolumes VirtualMachineInstanceMigrationConditionType = "migrationBlockedByUtilityVolumes" + // VirtualMachineInstanceDecentralizedMigrationBlocked indicates that a decentralized migration is blocked + VirtualMachineInstanceDecentralizedMigrationBlocked VirtualMachineInstanceMigrationConditionType = "decentralizedMigrationBlocked" + // VirtualMachineInstanceMigrationBlockedByBackup indicates that migration is waiting for backup to complete or abort + VirtualMachineInstanceMigrationBlockedByBackup VirtualMachineInstanceMigrationConditionType = "migrationBlockedByBackup" ) type VirtualMachineInstanceCondition struct { @@ -650,8 +803,12 @@ func (m *VirtualMachineInstanceMigration) IsFinal() bool { func (m *VirtualMachineInstanceMigration) IsRunning() bool { switch m.Status.Phase { - case MigrationFailed, MigrationPending, MigrationPhaseUnset, MigrationSucceeded: + case MigrationFailed, MigrationPending, MigrationPhaseUnset, MigrationSucceeded, MigrationWaitingForSync, MigrationSynchronizing: return false + case MigrationScheduling: + if m.IsDecentralizedSource() { + return false + } } return true } @@ -659,7 +816,9 @@ func (m *VirtualMachineInstanceMigration) IsRunning() bool { // 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 + m.Status.Phase != MigrationPending && + m.Status.Phase != MigrationWaitingForSync && + m.Status.Phase != MigrationSynchronizing } // The migration phase indicates that job has been handed off to the VMI controllers to complete. @@ -667,7 +826,9 @@ func (m *VirtualMachineInstanceMigration) TargetIsHandedOff() bool { return m.Status.Phase != MigrationPhaseUnset && m.Status.Phase != MigrationPending && m.Status.Phase != MigrationScheduling && - m.Status.Phase != MigrationScheduled + m.Status.Phase != MigrationScheduled && + m.Status.Phase != MigrationWaitingForSync && + m.Status.Phase != MigrationSynchronizing } type VirtualMachineInstanceNetworkInterface struct { @@ -680,12 +841,16 @@ type VirtualMachineInstanceNetworkInterface struct { Name string `json:"name,omitempty"` // List of all IP addresses of a Virtual Machine interface IPs []string `json:"ipAddresses,omitempty"` + // PodInterfaceName represents the name of the pod network interface + PodInterfaceName string `json:"podInterfaceName,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, multus-status. InfoSource string `json:"infoSource,omitempty"` // Specifies how many queues are allocated by MultiQueue QueueCount int32 `json:"queueCount,omitempty"` + // LinkState Reports the current operational link state`. values: up, down. + LinkState string `json:"linkState,omitempty"` } type VirtualMachineInstanceGuestOSInfo struct { @@ -707,6 +872,69 @@ type VirtualMachineInstanceGuestOSInfo struct { ID string `json:"id,omitempty"` } +// +k8s:openapi-gen=true +type MigrationNetworkType string + +// +k8s:openapi-gen=true +const ( + // PodNetworkMigration indicates the migration will happen over the pod network + Pod MigrationNetworkType = "Pod" + // MigrationNetworkMigration indicates the migration will happen over a dedicated migration network + Migration MigrationNetworkType = "Migration" +) + +type VirtualMachineInstanceCommonMigrationState struct { + // The source node that the VMI originated on + Node string `json:"node,omitempty"` + // The source pod that the VMI is originated on + Pod string `json:"pod,omitempty"` + // The Source VirtualMachineInstanceMigration object associated with this migration + MigrationUID types.UID `json:"migrationUID,omitempty"` + // The name of the domain on the source libvirt domain + DomainName *string `json:"domainName,omitempty"` + // Namespace used in the name of the source libvirt domain. Can be used to find and modify paths in the domain + DomainNamespace *string `json:"domainNamespace,omitempty"` + // The ip address/fqdn:port combination to use to synchronize the VMI with the target. + SyncAddress *string `json:"syncAddress,omitempty"` + // If the VMI being migrated uses persistent features (backend-storage), its source PVC name is saved here + PersistentStatePVCName *string `json:"persistentStatePVCName,omitempty"` + // SELinuxContext is the actual SELinux context of the pod + SelinuxContext string `json:"selinuxContext,omitempty"` + // VirtualMachineInstanceUID is the UID of the target virtual machine instance + VirtualMachineInstanceUID *types.UID `json:"virtualMachineInstanceUID,omitempty"` +} + +// +k8s:openapi-gen=true +type VirtualMachineInstanceMigrationSourceState struct { + VirtualMachineInstanceCommonMigrationState `json:",inline"` + + // Node selectors needed by the target to start the receiving pod. + NodeSelectors map[string]string `json:"nodeSelectors,omitempty"` +} + +// +k8s:openapi-gen=true +type VirtualMachineInstanceMigrationTargetState struct { + VirtualMachineInstanceCommonMigrationState `json:",inline"` + + // The timestamp at which the target node detects the domain is active + DomainReadyTimestamp *metav1.Time `json:"domainReadyTimestamp,omitempty"` + // The Target Node has seen the Domain Start Event + DomainDetected bool `json:"domainDetected,omitempty"` + // The address of the target node to use for the migration + NodeAddress *string `json:"nodeAddress,omitempty"` + // The list of ports opened for live migration on the destination node + DirectMigrationNodePorts map[string]int `json:"directMigrationNodePorts,omitempty"` + // The UID of the target attachment pod for hotplug volumes + AttachmentPodUID *types.UID `json:"attachmentPodUID,omitempty"` + // If the VMI requires dedicated CPUs, this field will + // hold the dedicated CPU set on the target node + // +listType=atomic + CPUSet []int `json:"cpuSet,omitempty"` + // If the VMI requires dedicated CPUs, this field will + // hold the numa topology on the target node + NodeTopology *string `json:"nodeTopology,omitempty"` +} + // MigrationConfigSource indicates the source of migration configuration. // // +k8s:openapi-gen=true @@ -765,6 +993,20 @@ type VirtualMachineInstanceMigrationState struct { // If the VMI requires dedicated CPUs, this field will // hold the numa topology on the target node TargetNodeTopology string `json:"targetNodeTopology,omitempty"` + + // If the VMI being migrated uses persistent features (backend-storage), its source PVC name is saved here + SourcePersistentStatePVCName string `json:"sourcePersistentStatePVCName,omitempty"` + // If the VMI being migrated uses persistent features (backend-storage), its target PVC name is saved here + TargetPersistentStatePVCName string `json:"targetPersistentStatePVCName,omitempty"` + // SourceState contains migration state managed by the source virt handler + SourceState *VirtualMachineInstanceMigrationSourceState `json:"sourceState,omitempty"` + // TargetState contains migration state managed by the target virt handler + TargetState *VirtualMachineInstanceMigrationTargetState `json:"targetState,omitempty"` + // The type of migration network, either 'pod' or 'migration' + MigrationNetworkType MigrationNetworkType `json:"migrationNetworkType,omitempty"` + // TargetMemoryOverhead is the memory overhead of the target virt-launcher pod + // +optional + TargetMemoryOverhead *resource.Quantity `json:"targetMemoryOverhead,omitempty"` } type MigrationAbortStatus string @@ -785,6 +1027,8 @@ const ( MigrationPreCopy MigrationMode = "PreCopy" // MigrationPostCopy means the VMI migrations that is currently running is in post copy mode MigrationPostCopy MigrationMode = "PostCopy" + // MigrationPaused means that the VMI is currently paused and being migrated + MigrationPaused MigrationMode = "Paused" ) type VirtualMachineInstanceMigrationTransport string @@ -824,11 +1068,18 @@ const ( 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" + // WaitingForSync means that the vmi is waiting for synchronization from another VMI + WaitingForSync VirtualMachineInstancePhase = "WaitingForSync" // 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" ) +// Annotations in the KubeVirt custom resource are used to modify KubeVirt's behavior, often serving as workarounds for bugs in other layers. +const ( + // VGADisplayForEFIGuestsX86Annotation when set, x86 EFI guests will be started with VGA display instead of Bochs + VGADisplayForEFIGuestsX86Annotation string = "kubevirt.io/vga-display-efi-x86" +) const ( // AppLabel and AppName labels marks resources that belong to KubeVirt. An optional value // may indicate which specific KubeVirt component a resource belongs to. @@ -929,6 +1180,10 @@ const ( 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 annotation stores the memory overhead calculated for the virt-launcher pod + MemoryOverheadAnnotationBytes string = "kubevirt.io/memory-overhead-bytes" + // This annotation indicates the VMI contains an ephemeral hotplug volume + EphemeralHotplugAnnotation string = "kubevirt.io/ephemeral-hotplug-volumes" // This label indicates the object is a part of the install strategy retrieval process. InstallStrategyLabel = "kubevirt.io/install-strategy" @@ -937,16 +1192,34 @@ const ( VirtOperatorComponentFinalizer string = "kubevirt.io/virtOperatorFinalizer" // Set by VMI controller to ensure VMIs are processed during deletion - VirtualMachineInstanceFinalizer string = "foregroundDeleteVirtualMachine" + VirtualMachineInstanceFinalizer string = "kubevirt.io/foregroundDeleteVirtualMachine" + DeprecatedVirtualMachineInstanceFinalizer 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" + DeprecatedCPUManager string = "cpumanager" + CPUManager string = "kubevirt.io/cpumanager" // This annotation is used to inject ignition data // Used on VirtualMachineInstance. IgnitionAnnotation string = "kubevirt.io/ignitiondata" PlacePCIDevicesOnRootComplex string = "kubevirt.io/placePCIDevicesOnRootComplex" + // PciTopologyVersionAnnotation documents which PCI topology scheme was used to + // define the domain. Used to preserve PCI device addresses across reboots and upgrades. + PciTopologyVersionAnnotation string = "kubevirt.io/pci-topology-version" + // PciInterfaceSlotCountAnnotation stores the frozen total of placeholder interfaces + // plus boot-time non-hotplug interfaces. Set by virt-handler on detected v2 VMs. + // On subsequent boots, the placeholder count is derived as + // max(0, slotTotal - currentInterfaceCount), absorbing interface additions/removals + // while stopped without shifting PCI addresses. + PciInterfaceSlotCountAnnotation string = "kubevirt.io/pci-interface-slot-count" + // PciTopologyVersionV2 indicates the VM was created with the v2 hotplug port formula + // from PR #14754, which is unstable across spec changes. + PciTopologyVersionV2 string = "v2" + // PciTopologyVersionV3 indicates the VM uses v1 placeholders (for address stability) + // plus direct pcie-root-port controllers (for hotplug capacity). + PciTopologyVersionV3 string = "v3" + // This label represents supported cpu features on the node CPUFeatureLabel = "cpu-feature.node.kubevirt.io/" // This label represents supported cpu models on the node @@ -957,6 +1230,8 @@ const ( HypervLabel = "hyperv.node.kubevirt.io/" // This label represents vendor of cpu model on the node CPUModelVendorLabel = "cpu-vendor.node.kubevirt.io/" + // This label represents supported machine type on the node + SupportedMachineTypeLabel = "machine-type.node.kubevirt.io/" VirtIO = "virtio" @@ -971,10 +1246,14 @@ const ( MemfdMemoryBackend string = "kubevirt.io/memfd" MigrationSelectorLabel = "kubevirt.io/vmi-name" + // RestoreRunStrategy is how to restore the run strategy of the VMI + RestoreRunStrategy = "kubevirt.io/restore-run-strategy" // This annotation represents vmi running nonroot implementation DeprecatedNonRootVMIAnnotation = "kubevirt.io/nonroot" + // This annotation is used to mark a VMI as a migration target, and to start a receiver pod. + CreateMigrationTarget = "kubevirt.io/create-migration-target" // 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" @@ -989,6 +1268,10 @@ const ( // This exists for functional testing MigrationPendingPodTimeoutSecondsAnnotation string = "kubevirt.io/migrationPendingPodTimeoutSeconds" + // MigrationUtilityVolumesTimeoutSecondsAnnotation represents a custom timeout period for migrations waiting for utility volumes to detach + // Migration will stay in Pending state while utility volumes exist, and will fail if they are not removed before timeout + MigrationUtilityVolumesTimeoutSecondsAnnotation string = "kubevirt.io/migrationUtilityVolumesTimeoutSeconds" + // 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 @@ -1007,6 +1290,15 @@ const ( // SEVESLabel marks the node as capable of running workloads with SEV-ES SEVESLabel string = "kubevirt.io/sev-es" + // SecureExecutionLabel marks the node as capable of running workloads with IBM Secure Execution + SecureExecutionLabel string = "kubevirt.io/s390-pv" + + // SEVSNPLabel marks the node as capable of running workloads with SEV-SNP + SEVSNPLabel string = "kubevirt.io/sev-snp" + + // TDXLabel marks the node as capable of running workloads with Intel TDX + TDXLabel string = "kubevirt.io/tdx" + // KSMEnabledLabel marks the node as KSM-handling enabled KSMEnabledLabel string = "kubevirt.io/ksm-enabled" @@ -1038,8 +1330,15 @@ const ( // originated from. VirtualMachinePoolRevisionName string = "kubevirt.io/vm-pool-revision-name" - // VirtualMachineNameLabel is the name of the Virtual Machine - VirtualMachineNameLabel string = "vm.kubevirt.io/name" + // DeprecatedVirtualMachineNameLabel is the name of the Virtual Machine + // Deprecated: Use VirtualMachineInstanceSelectorLabel instead. Kept for backwards compatibility. + DeprecatedVirtualMachineNameLabel string = "vm.kubevirt.io/name" + + // VirtualMachineInstanceIDLabel is applied to virt-launcher pods to provide a + // stable and unique identifier for a VMI, suitable for use in service selectors. + // For VMI names longer than 63 characters, its value is a truncated and hashed + // representation of the name to ensure uniqueness. + VirtualMachineInstanceIDLabel = "vmi.kubevirt.io/id" // PVCMemoryDumpAnnotation is the name of the memory dump representing the vm name, // pvc name and the timestamp the memory dump was collected @@ -1073,6 +1372,8 @@ const ( // The label is used to store this value when memory hotplug is requested as it may change // between the creation of the target pod and when the evaluation of `MemoryHotplugReadyLabel` // happens. + // TODO: Remove this label and related code once VmiMemoryOverheadReport feature gate is GA + // and we are sure that all VMIs include the MemoryOverhead status field MemoryHotplugOverheadRatioLabel string = "kubevirt.io/memory-hotplug-overhead-ratio" // AutoMemoryLimitsRatioLabel allows to use a custom ratio for auto memory limits calculation. @@ -1088,6 +1389,65 @@ const ( // VolumesUpdateMigration indicates that the migration copies and update // the volumes VolumesUpdateMigration string = "kubevirt.io/volume-update-migration" + + // ImmediateDataVolumeCreation indicates that the data volumes should be created immediately + // Even if the VM is halted + ImmediateDataVolumeCreation string = "kubevirt.io/immediate-data-volume-creation" + + // DisablePCIHole64 indicates that the 64-Bit PCI hole should be disabled on a VirtualMachineInstance. + // This annotation might be deprecated in the future if we decided to add a struct for it. + DisablePCIHole64 string = "kubevirt.io/disablePCIHole64" + + // EvictionSourceAnnotation indicates the origin of an api initiated eviction in the VirtualMachineInstance. + // This annotation might be empty if the source is not a recognized actor (an admin for example). + // This could be useful to distinguish evictions originated from the descheduler. + EvictionSourceAnnotation = "kubevirt.io/eviction-source" + + // AllowAccessClusterServicesNPLabel is a pod label to be set by virt-components to indicate that they require + // access to cluster services otherwise blocked by the strict network policy (NP). + // This label will be applied to the following virt pods: + // - virt-operator + // - virt-api + // - virt-handler + // - virt-controller + // - virt-exportproxy + // - virt-synchronization-controller + // - the installer strategy job pod + // This label is then used as pod selector to create a NP to give the pod access to cluster services (apiserver/dns). + // An example of a NP might be: + // --- + // apiVersion: networking.k8s.io/v1 + // kind: NetworkPolicy + // metadata: + // name: kv-allow-egress-to-api-server + // namespace: kubevirt + // spec: + // podSelector: + // matchExpressions: + // - key: np.kubevirt.io/allow-access-cluster-services + // operator: In + // values: + // - "true" + // policyTypes: + // - Egress + // egress: + // - ports: + // - protocol: TCP + // port: 6443 + // - to: + // # allow talking to the kube-dns pods in kubevirt + // - namespaceSelector: + // matchLabels: + // kubernetes.io/metadata.name: kube-system + // podSelector: + // matchLabels: + // k8s-app: kube-dns + // ports: + // - protocol: TCP + // port: dns-tcp + // - protocol: UDP + // port: dns + AllowAccessClusterServicesNPLabel string = "np.kubevirt.io/allow-access-cluster-services" ) func NewVMI(name string, uid types.UID) *VirtualMachineInstance { @@ -1344,9 +1704,46 @@ type VirtualMachineInstanceMigrationList struct { Items []VirtualMachineInstanceMigration `json:"items"` } +type MigrationPriority string + +const ( + PrioritySystemCritical MigrationPriority = "system-critical" + PriorityUserTriggered MigrationPriority = "user-triggered" + PrioritySystemMaintenance MigrationPriority = "system-maintenance" +) + 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"` + + // AddedNodeSelector is an additional selector that can be used to + // complement a NodeSelector or NodeAffinity as set on the VM + // to restrict the set of allowed target nodes for a migration. + // In case of key collisions, values set on the VM objects + // are going to be preserved to ensure that addedNodeSelector + // can only restrict but not bypass constraints already set on the VM object. + // +optional + AddedNodeSelector map[string]string `json:"addedNodeSelector,omitempty"` + + // If sendTo is specified, this VirtualMachineInstanceMigration will be considered the source + SendTo *VirtualMachineInstanceMigrationSource `json:"sendTo,omitempty"` + // If receieve is specified, this VirtualMachineInstanceMigration will be considered the target + Receive *VirtualMachineInstanceMigrationTarget `json:"receive,omitempty"` + // Priority of the migration. This can be one of `system-critical`, `user-triggered`, `system-maintenance`. + // +optional + Priority *MigrationPriority `json:"priority,omitempty"` +} + +type VirtualMachineInstanceMigrationSource struct { + // A unique identifier to identify this migration. + MigrationID string `json:"migrationID"` + // The synchronization controller URL to connect to. + ConnectURL string `json:"connectURL"` +} + +type VirtualMachineInstanceMigrationTarget struct { + // A unique identifier to identify this migration. + MigrationID string `json:"migrationID"` } // VirtualMachineInstanceMigrationPhaseTransitionTimestamp gives a timestamp in relation to when a phase is set on a vmi @@ -1367,6 +1764,11 @@ type VirtualMachineInstanceMigrationStatus struct { PhaseTransitionTimestamps []VirtualMachineInstanceMigrationPhaseTransitionTimestamp `json:"phaseTransitionTimestamps,omitempty"` // Represents the status of a live migration MigrationState *VirtualMachineInstanceMigrationState `json:"migrationState,omitempty"` + // The synchronization addresses one can use to connect to the synchronization controller, includes the port, if multiple + // addresses are available, the first one is reported in the synchronizationAddress field. + // +optional + // +listType=atomic + SynchronizationAddresses []string `json:"synchronizationAddresses,omitempty" optional:"true"` } // VirtualMachineInstanceMigrationPhase is a label for the condition of a VirtualMachineInstanceMigration at the current time. @@ -1391,8 +1793,33 @@ const ( MigrationSucceeded VirtualMachineInstanceMigrationPhase = "Succeeded" // The migration failed MigrationFailed VirtualMachineInstanceMigrationPhase = "Failed" + // The migration is waiting for the VMI to synchronize + MigrationWaitingForSync VirtualMachineInstanceMigrationPhase = "WaitingForSync" + // The migration is actively synchronizing the VMI with the target + MigrationSynchronizing VirtualMachineInstanceMigrationPhase = "Synchronizing" ) +func (m *VirtualMachineInstanceMigration) IsLocalOrDecentralizedSource() bool { + return !m.IsDecentralized() || m.Spec.SendTo != nil +} + +func (m *VirtualMachineInstanceMigration) IsDecentralizedSource() bool { + return m.IsDecentralized() && m.Spec.SendTo != nil +} + +func (m *VirtualMachineInstanceMigration) IsLocalOrDecentralizedTarget() bool { + return !m.IsDecentralized() || m.Spec.Receive != nil +} + +func (m *VirtualMachineInstanceMigration) IsDecentralizedTarget() bool { + return m.IsDecentralized() && m.Spec.Receive != nil +} + +func (m *VirtualMachineInstanceMigration) IsDecentralized() bool { + return (m.Spec.SendTo != nil && m.Spec.Receive == nil) || + (m.Spec.SendTo == nil && m.Spec.Receive != nil) +} + // Deprecated for removal in v2, please use VirtualMachineInstanceType and VirtualMachinePreference instead. // // VirtualMachineInstancePreset defines a VMI spec.domain to be applied to all VMIs that match the provided label selector @@ -1494,19 +1921,15 @@ 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. + RunStrategyUnknown VirtualMachineRunStrategy = "" + RunStrategyAlways VirtualMachineRunStrategy = "Always" + RunStrategyHalted VirtualMachineRunStrategy = "Halted" + RunStrategyManual VirtualMachineRunStrategy = "Manual" 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" + RunStrategyOnce VirtualMachineRunStrategy = "Once" + // Receiver pod will be created waiting for an incoming migration. Switch after to expected + // RunStrategy. + RunStrategyWaitAsReceiver VirtualMachineRunStrategy = "WaitAsReceiver" ) type UpdateVolumesStrategy string @@ -1521,10 +1944,17 @@ const ( type VirtualMachineSpec struct { // Running controls whether the associatied VirtualMachineInstance is created or not // Mutually exclusive with RunStrategy + // Deprecated: VirtualMachineInstance field "Running" is now deprecated, please use RunStrategy instead. Running *bool `json:"running,omitempty" optional:"true"` // Running state indicates the requested running state of the VirtualMachineInstance // mutually exclusive with Running + // Following are allowed values: + // - "Always": VMI should always be running. + // - "Halted": VMI should never be running. + // - "Manual": VMI can be started/stopped using API endpoints. + // - "RerunOnFailure": VMI will initially be running and restarted if a failure occurs, but will not be restarted upon successful completion. + // - "Once": VMI will run once and not be restarted upon completion regardless if the completion is of phase Failure or Success. RunStrategy *VirtualMachineRunStrategy `json:"runStrategy,omitempty" optional:"true"` // InstancetypeMatcher references a instancetype that is used to fill fields in Template @@ -1599,6 +2029,9 @@ const ( // VirtualMachineStatusWaitingForVolumeBinding indicates that some PersistentVolumeClaims backing // the virtual machine volume are still not bound. VirtualMachineStatusWaitingForVolumeBinding VirtualMachinePrintableStatus = "WaitingForVolumeBinding" + // VirtualMachineStatusWaitingForReceiver indicates that this virtual machine is a receiver VM and + // migration should start next. + VirtualMachineStatusWaitingForReceiver VirtualMachinePrintableStatus = "WaitingForReceiver" ) // VirtualMachineStartFailure tracks VMIs which failed to transition successfully @@ -1664,6 +2097,124 @@ type VirtualMachineStatus struct { // RunStrategy tracks the last recorded RunStrategy used by the VM. // This is needed to correctly process the next strategy (for now only the RerunOnFailure) RunStrategy VirtualMachineRunStrategy `json:"runStrategy,omitempty" optional:"true"` + + // VolumeUpdateState contains the information about the volumes set + // updates related to the volumeUpdateStrategy + VolumeUpdateState *VolumeUpdateState `json:"volumeUpdateState,omitempty" optional:"true"` + + // ChangedBlockTracking represents the status of the changedBlockTracking + // +nullable + // +optional + ChangedBlockTracking *ChangedBlockTrackingStatus `json:"changedBlockTracking,omitempty" optional:"true"` + + // InstancetypeRef captures the state of any referenced instance type from the VirtualMachine + //+nullable + //+optional + InstancetypeRef *InstancetypeStatusRef `json:"instancetypeRef,omitempty"` + + // PreferenceRef captures the state of any referenced preference from the VirtualMachine + //+nullable + //+optional + PreferenceRef *InstancetypeStatusRef `json:"preferenceRef,omitempty"` +} + +type ControllerRevisionRef struct { + // Name of the ControllerRevision + Name string `json:"name,omitempty"` +} + +type InstancetypeStatusRef struct { + // Name is the name of resource + Name string `json:"name,omitempty"` + + // Kind specifies the kind of resource + Kind string `json:"kind,omitempty"` + + // ControllerRef specifies the ControllerRevision storing a copy of the object captured + // when it is first seen by the VirtualMachine controller + ControllerRevisionRef *ControllerRevisionRef `json:"controllerRevisionRef,omitempty"` + + // InferFromVolume lists the name of a volume that should be used to infer or discover the resource + // + // +optional + InferFromVolume string `json:"inferFromVolume,omitempty"` + + // InferFromVolumeFailurePolicy controls what should happen on failure when inferring the resource + // + // +optional + InferFromVolumeFailurePolicy *InferFromVolumeFailurePolicy `json:"inferFromVolumeFailurePolicy,omitempty"` +} + +type ChangedBlockTrackingState string + +const ( + // ChangedBlockTrackingUndefined indicates no updates for changedBlockTracking was made + ChangedBlockTrackingUndefined ChangedBlockTrackingState = "" + + // ChangedBlockTrackingPendingRestart indicates the VM needs a restart for the changes to take effect. This state field will be deprecated once dynamic QCOW2 overylay addition will be supported + ChangedBlockTrackingPendingRestart ChangedBlockTrackingState = "PendingRestart" + + // ChangedBlockTrackingInitializing VM restart has occurred, necessary steps for changedBlockTracking are in progress + ChangedBlockTrackingInitializing ChangedBlockTrackingState = "Initializing" + + // ChangedBlockTrackingEnabled the VM's supported volumes now have Changed Block Tracking enabled with a QCOW2 overlay + ChangedBlockTrackingEnabled ChangedBlockTrackingState = "Enabled" + + // ChangedBlockTrackingDisabled VM no longer matches changedBlockTracking label selector + ChangedBlockTrackingDisabled ChangedBlockTrackingState = "Disabled" + + // ChangedBlockTrackingFGDisabled indicates the vm matches the labelselector but the IncrementalBackupGate is disabled + // so until the gate is enabled no changed will be made. + ChangedBlockTrackingFGDisabled ChangedBlockTrackingState = "IncrementalBackupFeatureGateDisabled" +) + +// VirtualMachineInstanceBackupStatus tracks the information of the executed backup +// +k8s:openapi-gen=true +type VirtualMachineInstanceBackupStatus struct { + // BackupName is the name of the executed backup + BackupName string `json:"backupName,omitempty"` + // StartTimestamp is the timestamp when the backup started + StartTimestamp *metav1.Time `json:"startTimestamp,omitempty"` + // EndTimestamp is the timestamp when the backup ended + EndTimestamp *metav1.Time `json:"endTimestamp,omitempty"` + // Completed indicates the backup completed + Completed bool `json:"completed,omitempty"` + // Failed indicates that the backup failed + Failed bool `json:"failed,omitempty"` + // BackupMsg resturns any relevant information like failure reason + // unfreeze failed etc... + // +optional + BackupMsg *string `json:"backupMsg,omitempty"` + // CheckpointName is the name of the checkpoint created for the backup + // +optional + CheckpointName *string `json:"checkpointName,omitempty"` + // Volumes lists the volumes included in the backup + // +optional + // +listType=atomic + Volumes []backupv1.BackupVolumeInfo `json:"volumes,omitempty"` +} + +// ChangedBlockTrackingStatus represents the status of ChangedBlockTracking for a VM +// +k8s:openapi-gen=true +type ChangedBlockTrackingStatus struct { + // State represents the current CBT state + State ChangedBlockTrackingState `json:"state"` + // BackupStatus represents the status of vmi backup + // +nullable + // +optional + BackupStatus *VirtualMachineInstanceBackupStatus `json:"backupStatus,omitempty"` +} + +type VolumeUpdateState struct { + // VolumeMigrationState tracks the information related to the volume migration + VolumeMigrationState *VolumeMigrationState `json:"volumeMigrationState,omitempty" optional:"true"` +} + +type VolumeMigrationState struct { + // MigratedVolumes lists the source and destination volumes during the volume migration + // +listType=atomic + // +optional + MigratedVolumes []StorageMigratedVolumeInfo `json:"migratedVolumes,omitempty"` } type VolumeSnapshotStatus struct { @@ -1722,6 +2273,9 @@ const ( // VirtualMachineRestartRequired is added when changes made to the VM can't be live-propagated to the VMI VirtualMachineRestartRequired VirtualMachineConditionType = "RestartRequired" + + // VirtualMachineManualRecoveryRequired is added when the VM spec needs to be manually recovered by the user + VirtualMachineManualRecoveryRequired VirtualMachineConditionType = "ManualRecoveryRequired" ) type HostDiskType string @@ -1744,9 +2298,6 @@ const ( DeprecatedSlirpInterface NetworkInterfaceType = "slirp" // Virtual machine instance masquerade interface MasqueradeInterface NetworkInterfaceType = "masquerade" - // Virtual machine instance passt interface is deprecated - // Deprecated: Removed in v1.3. - DeprecatedPasstInterface NetworkInterfaceType = "passt" ) type DriverCache string @@ -1973,6 +2524,9 @@ type KubeVirtSpec struct { // If ProductComponent is not specified, the component label default value is kubevirt. ProductComponent string `json:"productComponent,omitempty"` + // Specify the port to listen on for VMI status synchronization traffic. Default is 9185 + SynchronizationPort string `json:"synchronizationPort,omitempty"` + // holds kubevirt configurations. // same as the virt-configMap Configuration KubeVirtConfiguration `json:"configuration,omitempty"` @@ -2066,6 +2620,9 @@ type KubeVirtStatus struct { DefaultArchitecture string `json:"defaultArchitecture,omitempty"` // +listType=atomic Generations []GenerationStatus `json:"generations,omitempty" optional:"true"` + // +optional + // +listType=atomic + SynchronizationAddresses []string `json:"synchronizationAddresses,omitempty" optional:"true"` } // KubeVirtPhase is a label for the phase of a KubeVirt deployment at the current time. @@ -2222,6 +2779,30 @@ type MigrateOptions struct { // +optional // +listType=atomic DryRun []string `json:"dryRun,omitempty" protobuf:"bytes,1,rep,name=dryRun"` + + // AddedNodeSelector is an additional selector that can be used to + // complement a NodeSelector or NodeAffinity as set on the VM + // to restrict the set of allowed target nodes for a migration. + // In case of key collisions, values set on the VM objects + // are going to be preserved to ensure that addedNodeSelector + // can only restrict but not bypass constraints already set on the VM object. + // +optional + AddedNodeSelector map[string]string `json:"addedNodeSelector,omitempty"` +} + +// EvacuateCancelOptions may be provided on evacuate cancel request. +type EvacuateCancelOptions 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"` + + EvacuationNodeName string `json:"evacuationNodeName"` } // VirtualMachineInstanceGuestAgentInfo represents information from the installed guest agent @@ -2244,8 +2825,9 @@ type VirtualMachineInstanceGuestAgentInfo struct { 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 indicates whether a freeze operation was requested for the guest filesystem. + // It will be set to "frozen" if the request was made, or unset otherwise. + // This does not reflect the actual state of the guest filesystem. FSFreezeStatus string `json:"fsFreezeStatus,omitempty"` } @@ -2266,8 +2848,10 @@ type VirtualMachineInstanceGuestOSUserList struct { // VirtualMachineGuestOSUser is the single user of the guest os type VirtualMachineInstanceGuestOSUser struct { - UserName string `json:"userName"` - Domain string `json:"domain,omitempty"` + UserName string `json:"userName"` + Domain string `json:"domain,omitempty"` + + // Time of login of this user on the computer. If multiple instances of the user are logged in, the earliest login time is reported. The value is in fractional seconds since epoch time. LoginTime float64 `json:"loginTime,omitempty"` } @@ -2454,11 +3038,12 @@ type KubeVirtConfiguration struct { SupportContainerResources []SupportContainerResources `json:"supportContainerResources,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"` + SupportedGuestAgentVersions []string `json:"supportedGuestAgentVersions,omitempty"` + MemBalloonStatsPeriod *uint32 `json:"memBalloonStatsPeriod,omitempty"` + PermittedHostDevices *PermittedHostDevices `json:"permittedHostDevices,omitempty"` + MediatedDevicesConfiguration *MediatedDevicesConfiguration `json:"mediatedDevicesConfiguration,omitempty"` + // deprecated + DeprecatedMinCPUModel string `json:"minCPUModel,omitempty"` ObsoleteCPUModels map[string]bool `json:"obsoleteCPUModels,omitempty"` VirtualMachineInstancesPerNode *int `json:"virtualMachineInstancesPerNode,omitempty"` APIConfiguration *ReloadableComponentConfiguration `json:"apiConfiguration,omitempty"` @@ -2469,7 +3054,6 @@ type KubeVirtConfiguration struct { SeccompConfiguration *SeccompConfiguration `json:"seccompConfiguration,omitempty"` // VMStateStorageClass is the name of the storage class to use for the PVCs created to preserve VM state, like TPM. - // The storage class must support RWX in filesystem mode. VMStateStorageClass string `json:"vmStateStorageClass,omitempty"` VirtualMachineOptions *VirtualMachineOptions `json:"virtualMachineOptions,omitempty"` @@ -2484,12 +3068,113 @@ type KubeVirtConfiguration struct { // LiveUpdateConfiguration holds defaults for live update features LiveUpdateConfiguration *LiveUpdateConfiguration `json:"liveUpdateConfiguration,omitempty"` - // VMRolloutStrategy defines how changes to a VM object propagate to its VMI + // VMRolloutStrategy defines how live-updatable fields, like CPU sockets, memory, + // tolerations, and affinity, are propagated from a VM to its VMI. // +nullable // +kubebuilder:validation:Enum=Stage;LiveUpdate VMRolloutStrategy *VMRolloutStrategy `json:"vmRolloutStrategy,omitempty"` + + // CommonInstancetypesDeployment controls the deployment of common-instancetypes resources + // +nullable + CommonInstancetypesDeployment *CommonInstancetypesDeployment `json:"commonInstancetypesDeployment,omitempty"` + + // VirtTemplateDeployment controls the deployment of virt-template components + // +nullable + VirtTemplateDeployment *VirtTemplateDeployment `json:"virtTemplateDeployment,omitempty"` + + // Instancetype configuration + // +nullable + Instancetype *InstancetypeConfiguration `json:"instancetype,omitempty"` + + // Hypervisors holds information regarding the hypervisor configurations supported on this cluster. + // +listType=atomic + // +kubebuilder:validation:MaxItems:=1 + Hypervisors []HypervisorConfiguration `json:"hypervisors,omitempty"` + + // ChangedBlockTrackingLabelSelectors defines label selectors. VMs matching these selectors will have changed block tracking enabled. + // Enabling changedBlockTracking is mandatory for performing storage-agnostic backups and incremental backups. + // +nullable + ChangedBlockTrackingLabelSelectors *ChangedBlockTrackingSelectors `json:"changedBlockTrackingLabelSelectors,omitempty"` + + // RoleAggregationStrategy controls whether RBAC cluster roles should be aggregated + // to the default Kubernetes roles (admin, edit, view). + // When set to "AggregateToDefault" (default) or not specified, the aggregate-to-* labels are added to the cluster roles. + // When set to "Manual", the labels are not added, and roles will not be aggregated to the default roles. + // Setting this field to "Manual" requires the OptOutRoleAggregation feature gate to be enabled. + // This is an Alpha feature and subject to change. + // +optional + // +kubebuilder:validation:Enum=AggregateToDefault;Manual + RoleAggregationStrategy *RoleAggregationStrategy `json:"roleAggregationStrategy,omitempty"` } +const ( + // KVM is the default and most common hypervisor used with KubeVirt. + KvmHypervisorName string = "kvm" + + // HyperV with Direct Virtualization support. + HyperVDirectHypervisorName string = "hyperv-direct" +) + +// HypervisorConfiguration holds information regarding the hypervisor present on cluster nodes. +type HypervisorConfiguration struct { + // Name is the name of the hypervisor. + // Supported values are: "kvm", "hyperv-direct". + // +kubebuilder:validation:Enum=kvm;hyperv-direct + Name string `json:"name,omitempty"` +} + +type ChangedBlockTrackingSelectors struct { + // NamespaceSelector will enable changedBlockTracking on all VMs running inside namespaces that match the label selector. + //+optional + NamespaceLabelSelector *metav1.LabelSelector `json:"namespaceLabelSelector,omitempty"` + // VirtualMachineSelector will enable changedBlockTracking on all VMs that match the label selector. + //+optional + VirtualMachineLabelSelector *metav1.LabelSelector `json:"virtualMachineLabelSelector,omitempty"` +} + +type InstancetypeConfiguration struct { + // ReferencePolicy defines how an instance type or preference should be referenced by the VM after submission, supported values are: + // reference (default) - Where a copy of the original object is stashed in a ControllerRevision and referenced by the VM. + // expand - Where the instance type or preference are expanded into the VM if no revisionNames have been populated. + // expandAll - Where the instance type or preference are expanded into the VM regardless of revisionNames previously being populated. + // +nullable + // +kubebuilder:validation:Enum=reference;expand;expandAll + ReferencePolicy *InstancetypeReferencePolicy `json:"referencePolicy,omitempty"` +} + +type InstancetypeReferencePolicy string + +const ( + // Copy any instance type or preference and reference from the VirtualMachine + Reference InstancetypeReferencePolicy = "reference" + // Expand any instance type or preference into VirtualMachines without a revisionName already captured + Expand InstancetypeReferencePolicy = "expand" + // Expand any instance type or preferences into all VirtualMachines + ExpandAll InstancetypeReferencePolicy = "expandAll" +) + +type CommonInstancetypesDeployment struct { + // Enabled controls the deployment of common-instancetypes resources, defaults to True. + // +nullable + Enabled *bool `json:"enabled,omitempty"` +} + +type VirtTemplateDeployment struct { + // Enabled controls the deployment of virt-template resources, defaults to True when feature gate is enabled. + // +nullable + Enabled *bool `json:"enabled,omitempty"` +} + +// RoleAggregationStrategy represents the strategy for RBAC role aggregation +type RoleAggregationStrategy string + +const ( + // RoleAggregationStrategyAggregateToDefault enables aggregation of KubeVirt ClusterRoles to default Kubernetes roles + RoleAggregationStrategyAggregateToDefault RoleAggregationStrategy = "AggregateToDefault" + // RoleAggregationStrategyManual disables aggregation, requiring manual RBAC assignments for KubeVirt resources + RoleAggregationStrategyManual RoleAggregationStrategy = "Manual" +) + type VMRolloutStrategy string const ( @@ -2500,9 +3185,12 @@ const ( ) type ArchConfiguration struct { - Amd64 *ArchSpecificConfiguration `json:"amd64,omitempty"` - Arm64 *ArchSpecificConfiguration `json:"arm64,omitempty"` + Amd64 *ArchSpecificConfiguration `json:"amd64,omitempty"` + Arm64 *ArchSpecificConfiguration `json:"arm64,omitempty"` + + // Deprecated: ppc64le architecture is no longer supported. Ppc64le *ArchSpecificConfiguration `json:"ppc64le,omitempty"` + S390x *ArchSpecificConfiguration `json:"s390x,omitempty"` DefaultArchitecture string `json:"defaultArchitecture,omitempty"` } @@ -2540,8 +3228,8 @@ const ( // SupportContainerResources are used to specify the cpu/memory request and limits for the containers that support various features of Virtual Machines. These containers are usually idle and don't require a lot of memory or cpu. type SupportContainerResources struct { - Type SupportContainerType `json:"type"` - Resources k8sv1.ResourceRequirements `json:"resources"` + Type SupportContainerType `json:"type"` + Resources ResourceRequirementsWithoutClaims `json:"resources"` } type TLSProtocolVersion string @@ -2626,13 +3314,17 @@ type MigrationConfiguration struct { // The value is in quantity per second. Defaults to 0 (no limit) BandwidthPerMigration *resource.Quantity `json:"bandwidthPerMigration,omitempty"` // CompletionTimeoutPerGiB is the maximum number of seconds per GiB a migration is allowed to take. - // If a live-migration takes longer to migrate than this value multiplied by the size of the VMI, - // the migration will be cancelled, unless AllowPostCopy is true. Defaults to 800 + // If the timeout is reached, the migration will be either paused, switched + // to post-copy or cancelled depending on other settings. Defaults to 150 CompletionTimeoutPerGiB *int64 `json:"completionTimeoutPerGiB,omitempty"` // ProgressTimeout is the maximum number of seconds a live migration is allowed to make no progress. // Hitting this timeout means a migration transferred 0 data for that many seconds. The migration is // then considered stuck and therefore cancelled. Defaults to 150 ProgressTimeout *int64 `json:"progressTimeout,omitempty"` + // UtilityVolumesTimeout is the maximum number of seconds a migration can wait in Pending state + // for utility volumes to be detached. If utility volumes are still present after this timeout, + // the migration will be marked as Failed. Defaults to 150 + UtilityVolumesTimeout *int64 `json:"utilityVolumesTimeout,omitempty"` // UnsafeMigrationOverride allows live migrations to occur even if the compatibility check // indicates the migration will be unsafe to the guest. Defaults to false UnsafeMigrationOverride *bool `json:"unsafeMigrationOverride,omitempty"` @@ -2641,6 +3333,11 @@ type MigrationConfiguration struct { // If set to true, migrations will still start in pre-copy, but switch to post-copy when // CompletionTimeoutPerGiB triggers. Defaults to false AllowPostCopy *bool `json:"allowPostCopy,omitempty"` + // AllowWorkloadDisruption indicates that the migration shouldn't be + // canceled after acceptableCompletionTime is exceeded. Instead, if + // permitted, migration will be switched to post-copy or the VMI will be + // paused to allow the migration to complete + AllowWorkloadDisruption *bool `json:"allowWorkloadDisruption,omitempty"` // When set to true, DisableTLS will disable the additional layer of live migration encryption // provided by KubeVirt. This is usually a bad idea. Defaults to false DisableTLS *bool `json:"disableTLS,omitempty"` @@ -2661,8 +3358,16 @@ type DiskVerification struct { // DeveloperConfiguration holds developer options type DeveloperConfiguration struct { - // FeatureGates is the list of experimental features to enable. Defaults to none + // FeatureGates specifies a list of experimental feature gates to enable. Defaults to none. + // A feature gate must not appear in both FeatureGates and DisabledFeatureGates. + // +optional + // +listType=atomic FeatureGates []string `json:"featureGates,omitempty"` + // DisabledFeatureGates specifies a list of experimental feature gates to disable. + // A feature gate must not appear in both FeatureGates and DisabledFeatureGates. + // +optional + // +listType=atomic + DisabledFeatureGates []string `json:"disabledFeatureGates,omitempty"` // LessPVCSpaceToleration determines how much smaller, in percentage, disk PVCs are // allowed to be compared to the requested size (to account for various overheads). // Defaults to 10 @@ -2675,6 +3380,7 @@ type DeveloperConfiguration struct { // "see" 2% more memory than its parent pod. Values under 100 are effectively "undercommits". // Overcommits can lead to memory exhaustion, which in turn can lead to crashes. Use carefully. // Defaults to 100 + // +kubebuilder:validation:Minimum:=10 MemoryOvercommit int `json:"memoryOvercommit,omitempty"` // NodeSelectors allows restricting VMI creation to nodes that match a set of labels. // Defaults to none @@ -2695,15 +3401,19 @@ type DeveloperConfiguration struct { MinimumClusterTSCFrequency *int64 `json:"minimumClusterTSCFrequency,omitempty"` DiskVerification *DiskVerification `json:"diskVerification,omitempty"` LogVerbosity *LogVerbosity `json:"logVerbosity,omitempty"` + + // Enable the ability to pprof profile KubeVirt control plane + ClusterProfiler bool `json:"clusterProfiler,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"` + 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"` + VirtSynchronizationController uint `json:"virtSynchronizationController,omitempty"` // NodeVerbosity represents a map of nodes with a specific verbosity level NodeVerbosity map[string]uint `json:"nodeVerbosity,omitempty"` } @@ -2772,6 +3482,11 @@ type MediatedDevicesConfiguration struct { // +optional // +listType=atomic NodeMediatedDeviceTypes []NodeMediatedDeviceTypesConfig `json:"nodeMediatedDeviceTypes,omitempty"` + // Enable the creation and removal of mediated devices by virt-handler + // Replaces the deprecated DisableMDEVConfiguration feature gate + // Defaults to true + // +optional + Enabled *bool `json:"enabled,omitempty"` } // NodeMediatedDeviceTypesConfig holds information about MDEV types to be defined in a specific node that matches the NodeSelector field. @@ -2820,7 +3535,7 @@ type InterfaceBindingPlugin struct { // version: 1alphav1 NetworkAttachmentDefinition string `json:"networkAttachmentDefinition,omitempty"` // DomainAttachmentType is a standard domain network attachment method kubevirt supports. - // Supported values: "tap". + // Supported values: "tap", "managedTap" (since v1.4). // The standard domain attachment can be used instead or in addition to the sidecarImage. // version: 1alphav1 DomainAttachmentType DomainAttachmentType `json:"domainAttachmentType,omitempty"` @@ -2836,7 +3551,22 @@ type InterfaceBindingPlugin struct { // ComputeResourceOverhead specifies the resource overhead that should be added to the compute container when using the binding. // version: v1alphav1 // +optional - ComputeResourceOverhead *k8sv1.ResourceRequirements `json:"computeResourceOverhead,omitempty"` + ComputeResourceOverhead *ResourceRequirementsWithoutClaims `json:"computeResourceOverhead,omitempty"` +} + +// ResourceRequirementsWithoutClaims describes the compute resource requirements. +// This struct was taken from the k8s.ResourceRequirements and cleaned up the `Claims` field. +type ResourceRequirementsWithoutClaims struct { + // Limits describes the maximum amount of compute resources allowed. + // More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + // +optional + Limits k8sv1.ResourceList `json:"limits,omitempty" protobuf:"bytes,1,rep,name=limits,casttype=ResourceList,castkey=ResourceName"` + // 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. Requests cannot exceed Limits. + // More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + // +optional + Requests k8sv1.ResourceList `json:"requests,omitempty" protobuf:"bytes,2,rep,name=requests,casttype=ResourceList,castkey=ResourceName"` } type DomainAttachmentType string @@ -2845,6 +3575,9 @@ const ( // Tap domain attachment type is a generic way to bind ethernet connection into guests using tap device // https://libvirt.org/formatdomain.html#generic-ethernet-connection. Tap DomainAttachmentType = "tap" + // ManagedTap domain attachment type is binding an ethernet connection into guests using a tap device. + // The tap device is created (unless already present) on the network pod interface with a Linux bridge. + ManagedTap DomainAttachmentType = "managedTap" ) type NetworkBindingDownwardAPIType string @@ -2890,7 +3623,10 @@ type ClusterProfilerRequest struct { type Matcher interface { GetName() string + GetKind() string GetRevisionName() string + GetInferFromVolume() string + GetInferFromVolumeFailurePolicy() *InferFromVolumeFailurePolicy } type InferFromVolumeFailurePolicy string @@ -2940,10 +3676,22 @@ func (i InstancetypeMatcher) GetName() string { return i.Name } +func (i InstancetypeMatcher) GetKind() string { + return i.Kind +} + func (i InstancetypeMatcher) GetRevisionName() string { return i.RevisionName } +func (i InstancetypeMatcher) GetInferFromVolume() string { + return i.InferFromVolume +} + +func (i InstancetypeMatcher) GetInferFromVolumeFailurePolicy() *InferFromVolumeFailurePolicy { + return i.InferFromVolumeFailurePolicy +} + // PreferenceMatcher references a set of preference that is used to fill fields in the VMI template. type PreferenceMatcher struct { // Name is the name of the VirtualMachinePreference or VirtualMachineClusterPreference @@ -2984,15 +3732,20 @@ func (p PreferenceMatcher) GetName() string { return p.Name } +func (p PreferenceMatcher) GetKind() string { + return p.Kind +} + func (p PreferenceMatcher) GetRevisionName() string { return p.RevisionName } -type LiveUpdateAffinity struct{} +func (p PreferenceMatcher) GetInferFromVolume() string { + return p.InferFromVolume +} -type LiveUpdateCPU struct { - // The maximum amount of sockets that can be hot-plugged to the Virtual Machine - MaxSockets *uint32 `json:"maxSockets,omitempty" optional:"true"` +func (p PreferenceMatcher) GetInferFromVolumeFailurePolicy() *InferFromVolumeFailurePolicy { + return p.InferFromVolumeFailurePolicy } type LiveUpdateConfiguration struct { @@ -3003,19 +3756,14 @@ type LiveUpdateConfiguration struct { // defined and MaxHotplugRatio is 2 then MaxGuest = 1Gi // defaults to 4 MaxHotplugRatio uint32 `json:"maxHotplugRatio,omitempty"` - // MaxCpuSockets holds the maximum amount of sockets that can be hotplugged + // MaxCpuSockets provides a MaxSockets value for VMs that do not provide their own. + // For VMs with more sockets than maximum the MaxSockets will be set to equal number of sockets. MaxCpuSockets *uint32 `json:"maxCpuSockets,omitempty"` // MaxGuest defines the maximum amount memory that can be allocated // to the guest using hotplug. MaxGuest *resource.Quantity `json:"maxGuest,omitempty"` } -type LiveUpdateMemory struct { - // MaxGuest defines the maximum amount memory that can be allocated for the VM. - // +optional - MaxGuest *resource.Quantity `json:"maxGuest,omitempty"` -} - // SEVPlatformInfo contains information about the AMD SEV features for the node. // // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object @@ -3061,3 +3809,25 @@ type SEVSecretOptions struct { // Base64 encoded encrypted launch secret. Secret string `json:"secret,omitempty"` } + +// ObjectGraphNode represents an individual node in the graph. +// +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +type ObjectGraphNode struct { + metav1.TypeMeta `json:",inline"` + ObjectReference k8sv1.TypedObjectReference `json:"objectReference"` + Labels map[string]string `json:"labels,omitempty"` + // +optional + Optional *bool `json:"optional,omitempty"` + // +listType=atomic + Children []ObjectGraphNode `json:"children,omitempty"` +} + +// ObjectGraphOptions holds options for the object graph. +type ObjectGraphOptions struct { + // IncludeOptionalNodes indicates whether to include optional nodes in the graph. + // True by default. + IncludeOptionalNodes *bool `json:"includeOptionalNodes,omitempty"` + // LabelSelector is used to filter nodes in the graph based on their labels. + LabelSelector *metav1.LabelSelector `json:"labelSelector,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 index 728136ed6..06ea23e9a 100644 --- a/vendor/kubevirt.io/api/core/v1/types_swagger_generated.go +++ b/vendor/kubevirt.io/api/core/v1/types_swagger_generated.go @@ -4,7 +4,7 @@ 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", + "": "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\n+genclient:noStatus", "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.", } @@ -26,7 +26,7 @@ func (VirtualMachineInstanceSpec) SwaggerDoc() map[string]string { "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.", "topologySpreadConstraints": "TopologySpreadConstraints describes how a group of VMIs will be spread across a given topology\ndomains. K8s scheduler will schedule VMI pods in a way which abides by the constraints.\n+optional\n+patchMergeKey=topologyKey\n+patchStrategy=merge\n+listType=map\n+listMapKey=topologyKey\n+listMapKey=whenUnsatisfiable", - "evictionStrategy": "EvictionStrategy describes the strategy to follow when a node drain occurs.\nThe possible options are:\n- \"None\": No action will be taken, according to the specified 'RunStrategy' the VirtualMachine will be restarted or shutdown.\n- \"LiveMigrate\": the VirtualMachineInstance will be migrated instead of being shutdown.\n- \"LiveMigrateIfPossible\": the same as \"LiveMigrate\" but only if the VirtualMachine is Live-Migratable, otherwise it will behave as \"None\".\n- \"External\": the VirtualMachineInstance will be protected by a PDB and `vmi.Status.EvacuationNodeName` will be set on eviction. This is mainly useful for cluster-api-provider-kubevirt (capk) which needs a way for VMI's to be blocked from eviction, yet signal capk that eviction has been called on the VMI so the capk controller can handle tearing the VMI down. Details can be found in the commit description https://github.com/kubevirt/kubevirt/commit/c1d77face705c8b126696bac9a3ee3825f27f1fa.\n+optional", + "evictionStrategy": "EvictionStrategy describes the strategy to follow when a node drain occurs.\nThe possible options are:\n- \"None\": No action will be taken, according to the specified 'RunStrategy' the VirtualMachine will be restarted or shutdown.\n- \"LiveMigrate\": the VirtualMachineInstance will be migrated instead of being shutdown.\n- \"LiveMigrateIfPossible\": the same as \"LiveMigrate\" but only if the VirtualMachine is Live-Migratable, otherwise it will behave as \"None\".\n- \"External\": the VirtualMachineInstance will be protected and `vmi.Status.EvacuationNodeName` will be set on eviction. This is mainly useful for cluster-api-provider-kubevirt (capk) which needs a way for VMI's to be blocked from eviction, yet signal capk that eviction has been called on the VMI so the capk controller can handle tearing the VMI down. Details can be found in the commit description https://github.com/kubevirt/kubevirt/commit/c1d77face705c8b126696bac9a3ee3825f27f1fa.\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.\n+kubebuilder:validation:MaxItems:=256", @@ -39,6 +39,8 @@ func (VirtualMachineInstanceSpec) SwaggerDoc() map[string]string { "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\n+kubebuilder:validation:MaxItems:=256", "architecture": "Specifies the architecture of the vm guest you are attempting to run. Defaults to the compiled architecture of the KubeVirt components", + "resourceClaims": "ResourceClaims define which ResourceClaims must be allocated\nand reserved before the VMI, hence virt-launcher pod is allowed to start. The resources\nwill be made available to the domain which consumes them\nby name.\n\nThis is an alpha field and requires enabling the\nDynamicResourceAllocation feature gate in kubernetes\n https://kubernetes.io/docs/concepts/scheduling-eviction/dynamic-resource-allocation/\nThis field should only be configured if one of the feature-gates GPUsWithDRA or HostDevicesWithDRA is enabled.\nThis feature is in alpha.\n\n+listType=map\n+listMapKey=name\n+optional", + "utilityVolumes": "List of utility volumes that can be mounted to the vmi virt-launcher pod\nwithout having a matching disk in the domain.\nUsed to collect data for various operational workflows.\n+kubebuilder:validation:MaxItems:=256\n+listType=map\n+listMapKey=name\n+optional", } } @@ -73,7 +75,7 @@ func (VirtualMachineInstanceStatus) SwaggerDoc() map[string]string { "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", "kernelBootStatus": "KernelBootStatus contains info about the kernelBootContainer\n+optional", - "fsFreezeStatus": "FSFreezeStatus is the state of the fs of the guest\nit can be either frozen or thawed\n+optional", + "fsFreezeStatus": "FSFreezeStatus indicates whether a freeze operation was requested for the guest filesystem.\nIt will be set to \"frozen\" if the request was made, or unset otherwise.\nThis does not reflect the actual state of the guest filesystem.\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", @@ -83,6 +85,7 @@ func (VirtualMachineInstanceStatus) SwaggerDoc() map[string]string { "currentCPUTopology": "CurrentCPUTopology specifies the current CPU topology used by the VM workload.\nCurrent topology may differ from the desired topology in the spec while CPU hotplug\ntakes place.", "memory": "Memory shows various informations about the VirtualMachine memory.\n+optional", "migratedVolumes": "MigratedVolumes lists the source and destination volumes during the volume migration\n+listType=atomic\n+optional", + "changedBlockTracking": "ChangedBlockTracking represents the status of the changedBlockTracking\n+nullable\n+optional", } } @@ -187,13 +190,15 @@ func (VirtualMachineInstanceMigrationCondition) SwaggerDoc() map[string]string { 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, multus-status.", - "queueCount": "Specifies how many queues are allocated by MultiQueue", + "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", + "podInterfaceName": "PodInterfaceName represents the name of the pod network interface", + "interfaceName": "The interface name inside the Virtual Machine", + "infoSource": "Specifies the origin of the interface data collected. values: domain, guest-agent, multus-status.", + "queueCount": "Specifies how many queues are allocated by MultiQueue", + "linkState": "LinkState Reports the current operational link state`. values: up, down.", } } @@ -210,6 +215,40 @@ func (VirtualMachineInstanceGuestOSInfo) SwaggerDoc() map[string]string { } } +func (VirtualMachineInstanceCommonMigrationState) SwaggerDoc() map[string]string { + return map[string]string{ + "node": "The source node that the VMI originated on", + "pod": "The source pod that the VMI is originated on", + "migrationUID": "The Source VirtualMachineInstanceMigration object associated with this migration", + "domainName": "The name of the domain on the source libvirt domain", + "domainNamespace": "Namespace used in the name of the source libvirt domain. Can be used to find and modify paths in the domain", + "syncAddress": "The ip address/fqdn:port combination to use to synchronize the VMI with the target.", + "persistentStatePVCName": "If the VMI being migrated uses persistent features (backend-storage), its source PVC name is saved here", + "selinuxContext": "SELinuxContext is the actual SELinux context of the pod", + "virtualMachineInstanceUID": "VirtualMachineInstanceUID is the UID of the target virtual machine instance", + } +} + +func (VirtualMachineInstanceMigrationSourceState) SwaggerDoc() map[string]string { + return map[string]string{ + "": "+k8s:openapi-gen=true", + "nodeSelectors": "Node selectors needed by the target to start the receiving pod.", + } +} + +func (VirtualMachineInstanceMigrationTargetState) SwaggerDoc() map[string]string { + return map[string]string{ + "": "+k8s:openapi-gen=true", + "domainReadyTimestamp": "The timestamp at which the target node detects the domain is active", + "domainDetected": "The Target Node has seen the Domain Start Event", + "nodeAddress": "The address of the target node to use for the migration", + "directMigrationNodePorts": "The list of ports opened for live migration on the destination node", + "attachmentPodUID": "The UID of the target attachment pod for hotplug volumes", + "cpuSet": "If the VMI requires dedicated CPUs, this field will\nhold the dedicated CPU set on the target node\n+listType=atomic", + "nodeTopology": "If the VMI requires dedicated CPUs, this field will\nhold the numa topology on the target node", + } +} + func (VirtualMachineInstanceMigrationState) SwaggerDoc() map[string]string { return map[string]string{ "": "+k8s:openapi-gen=true", @@ -234,6 +273,12 @@ func (VirtualMachineInstanceMigrationState) SwaggerDoc() map[string]string { "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", + "sourcePersistentStatePVCName": "If the VMI being migrated uses persistent features (backend-storage), its source PVC name is saved here", + "targetPersistentStatePVCName": "If the VMI being migrated uses persistent features (backend-storage), its target PVC name is saved here", + "sourceState": "SourceState contains migration state managed by the source virt handler", + "targetState": "TargetState contains migration state managed by the target virt handler", + "migrationNetworkType": "The type of migration network, either 'pod' or 'migration'", + "targetMemoryOverhead": "TargetMemoryOverhead is the memory overhead of the target virt-launcher pod\n+optional", } } @@ -313,7 +358,24 @@ func (VirtualMachineInstanceMigrationList) SwaggerDoc() map[string]string { 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", + "vmiName": "The name of the VMI to perform the migration on. VMI must exist in the migration objects namespace", + "addedNodeSelector": "AddedNodeSelector is an additional selector that can be used to\ncomplement a NodeSelector or NodeAffinity as set on the VM\nto restrict the set of allowed target nodes for a migration.\nIn case of key collisions, values set on the VM objects\nare going to be preserved to ensure that addedNodeSelector\ncan only restrict but not bypass constraints already set on the VM object.\n+optional", + "sendTo": "If sendTo is specified, this VirtualMachineInstanceMigration will be considered the source", + "receive": "If receieve is specified, this VirtualMachineInstanceMigration will be considered the target", + "priority": "Priority of the migration. This can be one of `system-critical`, `user-triggered`, `system-maintenance`.\n+optional", + } +} + +func (VirtualMachineInstanceMigrationSource) SwaggerDoc() map[string]string { + return map[string]string{ + "migrationID": "A unique identifier to identify this migration.", + "connectURL": "The synchronization controller URL to connect to.", + } +} + +func (VirtualMachineInstanceMigrationTarget) SwaggerDoc() map[string]string { + return map[string]string{ + "migrationID": "A unique identifier to identify this migration.", } } @@ -330,6 +392,7 @@ func (VirtualMachineInstanceMigrationStatus) SwaggerDoc() map[string]string { "": "VirtualMachineInstanceMigration reprents information pertaining to a VMI's migration.", "phaseTransitionTimestamps": "PhaseTransitionTimestamp is the timestamp of when the last phase change occurred\n+listType=atomic\n+optional", "migrationState": "Represents the status of a live migration", + "synchronizationAddresses": "The synchronization addresses one can use to connect to the synchronization controller, includes the port, if multiple\naddresses are available, the first one is reported in the synchronizationAddress field.\n+optional\n+listType=atomic", } } @@ -370,8 +433,8 @@ func (VirtualMachineList) SwaggerDoc() map[string]string { 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", + "running": "Running controls whether the associatied VirtualMachineInstance is created or not\nMutually exclusive with RunStrategy\nDeprecated: VirtualMachineInstance field \"Running\" is now deprecated, please use RunStrategy instead.", + "runStrategy": "Running state indicates the requested running state of the VirtualMachineInstance\nmutually exclusive with Running\nFollowing are allowed values:\n- \"Always\": VMI should always be running.\n- \"Halted\": VMI should never be running.\n- \"Manual\": VMI can be started/stopped using API endpoints.\n- \"RerunOnFailure\": VMI will initially be running and restarted if a failure occurs, but will not be restarted upon successful completion.\n- \"Once\": VMI will run once and not be restarted upon completion regardless if the completion is of phase Failure or Success.", "instancetype": "InstancetypeMatcher references a instancetype that is used to fill fields in Template", "preference": "PreferenceMatcher references a set of preference that is used to fill fields in Template", "template": "Template is the direct specification of VirtualMachineInstance", @@ -403,6 +466,60 @@ func (VirtualMachineStatus) SwaggerDoc() map[string]string { "observedGeneration": "ObservedGeneration is the generation observed by the vmi when started.\n+optional", "desiredGeneration": "DesiredGeneration is the generation which is desired for the VMI.\nThis will be used in comparisons with ObservedGeneration to understand when\nthe VMI is out of sync. This will be changed at the same time as\nObservedGeneration to remove errors which could occur if Generation is\nupdated through an Update() before ObservedGeneration in Status.\n+optional", "runStrategy": "RunStrategy tracks the last recorded RunStrategy used by the VM.\nThis is needed to correctly process the next strategy (for now only the RerunOnFailure)", + "volumeUpdateState": "VolumeUpdateState contains the information about the volumes set\nupdates related to the volumeUpdateStrategy", + "changedBlockTracking": "ChangedBlockTracking represents the status of the changedBlockTracking\n+nullable\n+optional", + "instancetypeRef": "InstancetypeRef captures the state of any referenced instance type from the VirtualMachine\n+nullable\n+optional", + "preferenceRef": "PreferenceRef captures the state of any referenced preference from the VirtualMachine\n+nullable\n+optional", + } +} + +func (ControllerRevisionRef) SwaggerDoc() map[string]string { + return map[string]string{ + "name": "Name of the ControllerRevision", + } +} + +func (InstancetypeStatusRef) SwaggerDoc() map[string]string { + return map[string]string{ + "name": "Name is the name of resource", + "kind": "Kind specifies the kind of resource", + "controllerRevisionRef": "ControllerRef specifies the ControllerRevision storing a copy of the object captured\nwhen it is first seen by the VirtualMachine controller", + "inferFromVolume": "InferFromVolume lists the name of a volume that should be used to infer or discover the resource\n\n+optional", + "inferFromVolumeFailurePolicy": "InferFromVolumeFailurePolicy controls what should happen on failure when inferring the resource\n\n+optional", + } +} + +func (VirtualMachineInstanceBackupStatus) SwaggerDoc() map[string]string { + return map[string]string{ + "": "VirtualMachineInstanceBackupStatus tracks the information of the executed backup\n+k8s:openapi-gen=true", + "backupName": "BackupName is the name of the executed backup", + "startTimestamp": "StartTimestamp is the timestamp when the backup started", + "endTimestamp": "EndTimestamp is the timestamp when the backup ended", + "completed": "Completed indicates the backup completed", + "failed": "Failed indicates that the backup failed", + "backupMsg": "BackupMsg resturns any relevant information like failure reason\nunfreeze failed etc...\n+optional", + "checkpointName": "CheckpointName is the name of the checkpoint created for the backup\n+optional", + "volumes": "Volumes lists the volumes included in the backup\n+optional\n+listType=atomic", + } +} + +func (ChangedBlockTrackingStatus) SwaggerDoc() map[string]string { + return map[string]string{ + "": "ChangedBlockTrackingStatus represents the status of ChangedBlockTracking for a VM\n+k8s:openapi-gen=true", + "state": "State represents the current CBT state", + "backupStatus": "BackupStatus represents the status of vmi backup\n+nullable\n+optional", + } +} + +func (VolumeUpdateState) SwaggerDoc() map[string]string { + return map[string]string{ + "volumeMigrationState": "VolumeMigrationState tracks the information related to the volume migration", + } +} + +func (VolumeMigrationState) SwaggerDoc() map[string]string { + return map[string]string{ + "migratedVolumes": "MigratedVolumes lists the source and destination volumes during the volume migration\n+listType=atomic\n+optional", } } @@ -515,6 +632,7 @@ func (KubeVirtSpec) SwaggerDoc() map[string]string { "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.", + "synchronizationPort": "Specify the port to listen on for VMI status synchronization traffic. Default is 9185", "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", @@ -555,8 +673,9 @@ func (GenerationStatus) SwaggerDoc() map[string]string { func (KubeVirtStatus) SwaggerDoc() map[string]string { return map[string]string{ - "": "KubeVirtStatus represents information pertaining to a KubeVirt deployment.", - "generations": "+listType=atomic", + "": "KubeVirtStatus represents information pertaining to a KubeVirt deployment.", + "generations": "+listType=atomic", + "synchronizationAddresses": "+optional\n+listType=atomic", } } @@ -608,7 +727,15 @@ func (StopOptions) SwaggerDoc() map[string]string { func (MigrateOptions) SwaggerDoc() map[string]string { return map[string]string{ - "": "MigrateOptions may be provided on migrate request.", + "": "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", + "addedNodeSelector": "AddedNodeSelector is an additional selector that can be used to\ncomplement a NodeSelector or NodeAffinity as set on the VM\nto restrict the set of allowed target nodes for a migration.\nIn case of key collisions, values set on the VM objects\nare going to be preserved to ensure that addedNodeSelector\ncan only restrict but not bypass constraints already set on the VM object.\n+optional", + } +} + +func (EvacuateCancelOptions) SwaggerDoc() map[string]string { + return map[string]string{ + "": "EvacuateCancelOptions may be provided on evacuate cancel 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", } } @@ -623,7 +750,7 @@ func (VirtualMachineInstanceGuestAgentInfo) SwaggerDoc() map[string]string { "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", + "fsFreezeStatus": "FSFreezeStatus indicates whether a freeze operation was requested for the guest filesystem.\nIt will be set to \"frozen\" if the request was made, or unset otherwise.\nThis does not reflect the actual state of the guest filesystem.", } } @@ -641,7 +768,8 @@ func (VirtualMachineInstanceGuestOSUserList) SwaggerDoc() map[string]string { func (VirtualMachineInstanceGuestOSUser) SwaggerDoc() map[string]string { return map[string]string{ - "": "VirtualMachineGuestOSUser is the single user of the guest os", + "": "VirtualMachineGuestOSUser is the single user of the guest os", + "loginTime": "Time of login of this user on the computer. If multiple instances of the user are logged in, the earliest login time is reported. The value is in fractional seconds since epoch time.", } } @@ -749,16 +877,57 @@ func (KubeVirtConfiguration) SwaggerDoc() map[string]string { "additionalGuestMemoryOverheadRatio": "AdditionalGuestMemoryOverheadRatio can be used to increase the virtualization infrastructure\noverhead. This is useful, since the calculation of this overhead is not accurate and cannot\nbe entirely known in advance. The ratio that is being set determines by which factor to increase\nthe overhead calculated by Kubevirt. A higher ratio means that the VMs would be less compromised\nby node pressures, but would mean that fewer VMs could be scheduled to a node.\nIf not set, the default is 1.", "supportContainerResources": "+listType=map\n+listMapKey=type\nSupportContainerResources specifies the resource requirements for various types of supporting containers such as container disks/virtiofs/sidecars and hotplug attachment pods. If omitted a sensible default will be supplied.", "supportedGuestAgentVersions": "deprecated", - "vmStateStorageClass": "VMStateStorageClass is the name of the storage class to use for the PVCs created to preserve VM state, like TPM.\nThe storage class must support RWX in filesystem mode.", + "minCPUModel": "deprecated", + "vmStateStorageClass": "VMStateStorageClass is the name of the storage class to use for the PVCs created to preserve VM state, like TPM.", "ksmConfiguration": "KSMConfiguration holds the information regarding the enabling the KSM in the nodes (if available).", "autoCPULimitNamespaceLabelSelector": "When set, AutoCPULimitNamespaceLabelSelector will set a CPU limit on virt-launcher for VMIs running inside\nnamespaces that match the label selector.\nThe CPU limit will equal the number of requested vCPUs.\nThis setting does not apply to VMIs with dedicated CPUs.", "liveUpdateConfiguration": "LiveUpdateConfiguration holds defaults for live update features", - "vmRolloutStrategy": "VMRolloutStrategy defines how changes to a VM object propagate to its VMI\n+nullable\n+kubebuilder:validation:Enum=Stage;LiveUpdate", + "vmRolloutStrategy": "VMRolloutStrategy defines how live-updatable fields, like CPU sockets, memory,\ntolerations, and affinity, are propagated from a VM to its VMI.\n+nullable\n+kubebuilder:validation:Enum=Stage;LiveUpdate", + "commonInstancetypesDeployment": "CommonInstancetypesDeployment controls the deployment of common-instancetypes resources\n+nullable", + "virtTemplateDeployment": "VirtTemplateDeployment controls the deployment of virt-template components\n+nullable", + "instancetype": "Instancetype configuration\n+nullable", + "hypervisors": "Hypervisors holds information regarding the hypervisor configurations supported on this cluster.\n+listType=atomic\n+kubebuilder:validation:MaxItems:=1", + "changedBlockTrackingLabelSelectors": "ChangedBlockTrackingLabelSelectors defines label selectors. VMs matching these selectors will have changed block tracking enabled.\nEnabling changedBlockTracking is mandatory for performing storage-agnostic backups and incremental backups.\n+nullable", + "roleAggregationStrategy": "RoleAggregationStrategy controls whether RBAC cluster roles should be aggregated\nto the default Kubernetes roles (admin, edit, view).\nWhen set to \"AggregateToDefault\" (default) or not specified, the aggregate-to-* labels are added to the cluster roles.\nWhen set to \"Manual\", the labels are not added, and roles will not be aggregated to the default roles.\nSetting this field to \"Manual\" requires the OptOutRoleAggregation feature gate to be enabled.\nThis is an Alpha feature and subject to change.\n+optional\n+kubebuilder:validation:Enum=AggregateToDefault;Manual", + } +} + +func (HypervisorConfiguration) SwaggerDoc() map[string]string { + return map[string]string{ + "": "HypervisorConfiguration holds information regarding the hypervisor present on cluster nodes.", + "name": "Name is the name of the hypervisor.\nSupported values are: \"kvm\", \"hyperv-direct\".\n+kubebuilder:validation:Enum=kvm;hyperv-direct", + } +} + +func (ChangedBlockTrackingSelectors) SwaggerDoc() map[string]string { + return map[string]string{ + "namespaceLabelSelector": "NamespaceSelector will enable changedBlockTracking on all VMs running inside namespaces that match the label selector.\n+optional", + "virtualMachineLabelSelector": "VirtualMachineSelector will enable changedBlockTracking on all VMs that match the label selector.\n+optional", + } +} + +func (InstancetypeConfiguration) SwaggerDoc() map[string]string { + return map[string]string{ + "referencePolicy": "ReferencePolicy defines how an instance type or preference should be referenced by the VM after submission, supported values are:\nreference (default) - Where a copy of the original object is stashed in a ControllerRevision and referenced by the VM.\nexpand - Where the instance type or preference are expanded into the VM if no revisionNames have been populated.\nexpandAll - Where the instance type or preference are expanded into the VM regardless of revisionNames previously being populated.\n+nullable\n+kubebuilder:validation:Enum=reference;expand;expandAll", + } +} + +func (CommonInstancetypesDeployment) SwaggerDoc() map[string]string { + return map[string]string{ + "enabled": "Enabled controls the deployment of common-instancetypes resources, defaults to True.\n+nullable", + } +} + +func (VirtTemplateDeployment) SwaggerDoc() map[string]string { + return map[string]string{ + "enabled": "Enabled controls the deployment of virt-template resources, defaults to True when feature gate is enabled.\n+nullable", } } func (ArchConfiguration) SwaggerDoc() map[string]string { - return map[string]string{} + return map[string]string{ + "ppc64le": "Deprecated: ppc64le architecture is no longer supported.", + } } func (ArchSpecificConfiguration) SwaggerDoc() map[string]string { @@ -826,10 +995,12 @@ func (MigrationConfiguration) SwaggerDoc() map[string]string { "parallelMigrationsPerCluster": "ParallelMigrationsPerCluster is the total number of concurrent live migrations\nallowed cluster-wide. Defaults to 5", "allowAutoConverge": "AllowAutoConverge allows the platform to compromise performance/availability of VMIs to\nguarantee successful VMI live migrations. Defaults to false", "bandwidthPerMigration": "BandwidthPerMigration limits the amount of network bandwidth live migrations are allowed to use.\nThe value is in quantity per second. Defaults to 0 (no limit)", - "completionTimeoutPerGiB": "CompletionTimeoutPerGiB is the maximum number of seconds per GiB a migration is allowed to take.\nIf a live-migration takes longer to migrate than this value multiplied by the size of the VMI,\nthe migration will be cancelled, unless AllowPostCopy is true. Defaults to 800", + "completionTimeoutPerGiB": "CompletionTimeoutPerGiB is the maximum number of seconds per GiB a migration is allowed to take.\nIf the timeout is reached, the migration will be either paused, switched\nto post-copy or cancelled depending on other settings. Defaults to 150", "progressTimeout": "ProgressTimeout is the maximum number of seconds a live migration is allowed to make no progress.\nHitting this timeout means a migration transferred 0 data for that many seconds. The migration is\nthen considered stuck and therefore cancelled. Defaults to 150", + "utilityVolumesTimeout": "UtilityVolumesTimeout is the maximum number of seconds a migration can wait in Pending state\nfor utility volumes to be detached. If utility volumes are still present after this timeout,\nthe migration will be marked as Failed. Defaults to 150", "unsafeMigrationOverride": "UnsafeMigrationOverride allows live migrations to occur even if the compatibility check\nindicates the migration will be unsafe to the guest. Defaults to false", "allowPostCopy": "AllowPostCopy enables post-copy live migrations. Such migrations allow even the busiest VMIs\nto successfully live-migrate. However, events like a network failure can cause a VMI crash.\nIf set to true, migrations will still start in pre-copy, but switch to post-copy when\nCompletionTimeoutPerGiB triggers. Defaults to false", + "allowWorkloadDisruption": "AllowWorkloadDisruption indicates that the migration shouldn't be\ncanceled after acceptableCompletionTime is exceeded. Instead, if\npermitted, migration will be switched to post-copy or the VMI will be\npaused to allow the migration to complete", "disableTLS": "When set to true, DisableTLS will disable the additional layer of live migration encryption\nprovided by KubeVirt. This is usually a bad idea. Defaults to false", "network": "Network is the name of the CNI network to use for live migrations. By default, migrations go\nthrough the pod network.", "matchSELinuxLevelOnMigration": "By default, the SELinux level of target virt-launcher pods is forced to the level of the source virt-launcher.\nWhen set to true, MatchSELinuxLevelOnMigration lets the CRI auto-assign a random level to the target.\nThat will ensure the target virt-launcher doesn't share categories with another pod on the node.\nHowever, migrations will fail when using RWX volumes that don't automatically deal with SELinux levels.", @@ -845,14 +1016,16 @@ func (DiskVerification) SwaggerDoc() map[string]string { func (DeveloperConfiguration) SwaggerDoc() map[string]string { return map[string]string{ "": "DeveloperConfiguration holds developer options", - "featureGates": "FeatureGates is the list of experimental features to enable. Defaults to none", + "featureGates": "FeatureGates specifies a list of experimental feature gates to enable. Defaults to none.\nA feature gate must not appear in both FeatureGates and DisabledFeatureGates.\n+optional\n+listType=atomic", + "disabledFeatureGates": "DisabledFeatureGates specifies a list of experimental feature gates to disable.\nA feature gate must not appear in both FeatureGates and DisabledFeatureGates.\n+optional\n+listType=atomic", "pvcTolerateLessSpaceUpToPercent": "LessPVCSpaceToleration determines how much smaller, in percentage, disk PVCs are\nallowed to be compared to the requested size (to account for various overheads).\nDefaults to 10", "minimumReservePVCBytes": "MinimumReservePVCBytes is the amount of space, in bytes, to leave unused on disks.\nDefaults to 131072 (128KiB)", - "memoryOvercommit": "MemoryOvercommit is the percentage of memory we want to give VMIs compared to the amount\ngiven to its parent pod (virt-launcher). For example, a value of 102 means the VMI will\n\"see\" 2% more memory than its parent pod. Values under 100 are effectively \"undercommits\".\nOvercommits can lead to memory exhaustion, which in turn can lead to crashes. Use carefully.\nDefaults to 100", + "memoryOvercommit": "MemoryOvercommit is the percentage of memory we want to give VMIs compared to the amount\ngiven to its parent pod (virt-launcher). For example, a value of 102 means the VMI will\n\"see\" 2% more memory than its parent pod. Values under 100 are effectively \"undercommits\".\nOvercommits can lead to memory exhaustion, which in turn can lead to crashes. Use carefully.\nDefaults to 100\n+kubebuilder:validation:Minimum:=10", "nodeSelectors": "NodeSelectors allows restricting VMI creation to nodes that match a set of labels.\nDefaults to none", "useEmulation": "UseEmulation can be set to true to allow fallback to software emulation\nin case hardware-assisted emulation is not available. Defaults to false", "cpuAllocationRatio": "For each requested virtual CPU, CPUAllocationRatio defines how much physical CPU to request per VMI\nfrom the hosting node. The value is in fraction of a CPU thread (or core on non-hyperthreaded nodes).\nFor example, a value of 1 means 1 physical CPU thread per VMI CPU thread.\nA value of 100 would be 1% of a physical thread allocated for each requested VMI thread.\nThis option has no effect on VMIs that request dedicated CPUs. More information at:\nhttps://kubevirt.io/user-guide/operations/node_overcommit/#node-cpu-allocation-ratio\nDefaults to 10", "minimumClusterTSCFrequency": "Allow overriding the automatically determined minimum TSC frequency of the cluster\nand fixate the minimum to this frequency.", + "clusterProfiler": "Enable the ability to pprof profile KubeVirt control plane", } } @@ -905,6 +1078,7 @@ func (MediatedDevicesConfiguration) SwaggerDoc() map[string]string { "mediatedDevicesTypes": "Deprecated. Use mediatedDeviceTypes instead.\n+optional\n+listType=atomic", "mediatedDeviceTypes": "+optional\n+listType=atomic", "nodeMediatedDeviceTypes": "+optional\n+listType=atomic", + "enabled": "Enable the creation and removal of mediated devices by virt-handler\nReplaces the deprecated DisableMDEVConfiguration feature gate\nDefaults to true\n+optional", } } @@ -935,13 +1109,21 @@ func (InterfaceBindingPlugin) SwaggerDoc() map[string]string { return map[string]string{ "sidecarImage": "SidecarImage references a container image that runs in the virt-launcher pod.\nThe sidecar handles (libvirt) domain configuration and optional services.\nversion: 1alphav1", "networkAttachmentDefinition": "NetworkAttachmentDefinition references to a NetworkAttachmentDefinition CR object.\nFormat: , /.\nIf namespace is not specified, VMI namespace is assumed.\nversion: 1alphav1", - "domainAttachmentType": "DomainAttachmentType is a standard domain network attachment method kubevirt supports.\nSupported values: \"tap\".\nThe standard domain attachment can be used instead or in addition to the sidecarImage.\nversion: 1alphav1", + "domainAttachmentType": "DomainAttachmentType is a standard domain network attachment method kubevirt supports.\nSupported values: \"tap\", \"managedTap\" (since v1.4).\nThe standard domain attachment can be used instead or in addition to the sidecarImage.\nversion: 1alphav1", "migration": "Migration means the VM using the plugin can be safely migrated\nversion: 1alphav1", "downwardAPI": "DownwardAPI specifies what kind of data should be exposed to the binding plugin sidecar.\nSupported values: \"device-info\"\nversion: v1alphav1\n+optional", "computeResourceOverhead": "ComputeResourceOverhead specifies the resource overhead that should be added to the compute container when using the binding.\nversion: v1alphav1\n+optional", } } +func (ResourceRequirementsWithoutClaims) SwaggerDoc() map[string]string { + return map[string]string{ + "": "ResourceRequirementsWithoutClaims describes the compute resource requirements.\nThis struct was taken from the k8s.ResourceRequirements and cleaned up the `Claims` field.", + "limits": "Limits describes the maximum amount of compute resources allowed.\nMore info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/\n+optional", + "requests": "Requests describes the minimum amount of compute resources required.\nIf Requests is omitted for a container, it defaults to Limits if that is explicitly specified,\notherwise to an implementation-defined value. Requests cannot exceed Limits.\nMore info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/\n+optional", + } +} + func (InterfaceBindingMigration) SwaggerDoc() map[string]string { return map[string]string{ "method": "Method defines a pre-defined migration methodology\nversion: 1alphav1", @@ -988,30 +1170,14 @@ func (PreferenceMatcher) SwaggerDoc() map[string]string { } } -func (LiveUpdateAffinity) SwaggerDoc() map[string]string { - return map[string]string{} -} - -func (LiveUpdateCPU) SwaggerDoc() map[string]string { - return map[string]string{ - "maxSockets": "The maximum amount of sockets that can be hot-plugged to the Virtual Machine", - } -} - func (LiveUpdateConfiguration) SwaggerDoc() map[string]string { return map[string]string{ "maxHotplugRatio": "MaxHotplugRatio is the ratio used to define the max amount\nof a hotplug resource that can be made available to a VM\nwhen the specific Max* setting is not defined (MaxCpuSockets, MaxGuest)\nExample: VM is configured with 512Mi of guest memory, if MaxGuest is not\ndefined and MaxHotplugRatio is 2 then MaxGuest = 1Gi\ndefaults to 4", - "maxCpuSockets": "MaxCpuSockets holds the maximum amount of sockets that can be hotplugged", + "maxCpuSockets": "MaxCpuSockets provides a MaxSockets value for VMs that do not provide their own.\nFor VMs with more sockets than maximum the MaxSockets will be set to equal number of sockets.", "maxGuest": "MaxGuest defines the maximum amount memory that can be allocated\nto the guest using hotplug.", } } -func (LiveUpdateMemory) SwaggerDoc() map[string]string { - return map[string]string{ - "maxGuest": "MaxGuest defines the maximum amount memory that can be allocated for the VM.\n+optional", - } -} - func (SEVPlatformInfo) SwaggerDoc() map[string]string { return map[string]string{ "": "SEVPlatformInfo contains information about the AMD SEV features for the node.\n\n+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object", @@ -1047,3 +1213,19 @@ func (SEVSecretOptions) SwaggerDoc() map[string]string { "secret": "Base64 encoded encrypted launch secret.", } } + +func (ObjectGraphNode) SwaggerDoc() map[string]string { + return map[string]string{ + "": "ObjectGraphNode represents an individual node in the graph.\n\n+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object", + "optional": "+optional", + "children": "+listType=atomic", + } +} + +func (ObjectGraphOptions) SwaggerDoc() map[string]string { + return map[string]string{ + "": "ObjectGraphOptions holds options for the object graph.", + "includeOptionalNodes": "IncludeOptionalNodes indicates whether to include optional nodes in the graph.\nTrue by default.", + "labelSelector": "LabelSelector is used to filter nodes in the graph based on their labels.", + } +} diff --git a/vendor/kubevirt.io/api/core/v1/zz_generated.defaults.go b/vendor/kubevirt.io/api/core/v1/zz_generated.defaults.go index 6cf7f0bc0..3b31f53bf 100644 --- a/vendor/kubevirt.io/api/core/v1/zz_generated.defaults.go +++ b/vendor/kubevirt.io/api/core/v1/zz_generated.defaults.go @@ -2,7 +2,7 @@ // +build !ignore_autogenerated /* -Copyright The KubeVirt Authors. +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. @@ -15,6 +15,8 @@ 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 The KubeVirt Authors. */ // Code generated by defaulter-gen. DO NOT EDIT. @@ -76,6 +78,7 @@ func SetObjectDefaults_VirtualMachine(in *VirtualMachine) { 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) + SetDefaults_FeatureState(&in.Spec.Template.Spec.Domain.Features.APIC.FeatureState) } if in.Spec.Template.Spec.Domain.Features.Hyperv != nil { if in.Spec.Template.Spec.Domain.Features.Hyperv.Relaxed != nil { @@ -86,6 +89,7 @@ func SetObjectDefaults_VirtualMachine(in *VirtualMachine) { } if in.Spec.Template.Spec.Domain.Features.Hyperv.Spinlocks != nil { SetDefaults_FeatureSpinlocks(in.Spec.Template.Spec.Domain.Features.Hyperv.Spinlocks) + SetDefaults_FeatureState(&in.Spec.Template.Spec.Domain.Features.Hyperv.Spinlocks.FeatureState) } if in.Spec.Template.Spec.Domain.Features.Hyperv.VPIndex != nil { SetDefaults_FeatureState(in.Spec.Template.Spec.Domain.Features.Hyperv.VPIndex) @@ -98,6 +102,7 @@ func SetObjectDefaults_VirtualMachine(in *VirtualMachine) { } if in.Spec.Template.Spec.Domain.Features.Hyperv.SyNICTimer != nil { SetDefaults_SyNICTimer(in.Spec.Template.Spec.Domain.Features.Hyperv.SyNICTimer) + SetDefaults_FeatureState(&in.Spec.Template.Spec.Domain.Features.Hyperv.SyNICTimer.FeatureState) if in.Spec.Template.Spec.Domain.Features.Hyperv.SyNICTimer.Direct != nil { SetDefaults_FeatureState(in.Spec.Template.Spec.Domain.Features.Hyperv.SyNICTimer.Direct) } @@ -107,6 +112,7 @@ func SetObjectDefaults_VirtualMachine(in *VirtualMachine) { } if in.Spec.Template.Spec.Domain.Features.Hyperv.VendorID != nil { SetDefaults_FeatureVendorID(in.Spec.Template.Spec.Domain.Features.Hyperv.VendorID) + SetDefaults_FeatureState(&in.Spec.Template.Spec.Domain.Features.Hyperv.VendorID.FeatureState) } if in.Spec.Template.Spec.Domain.Features.Hyperv.Frequencies != nil { SetDefaults_FeatureState(in.Spec.Template.Spec.Domain.Features.Hyperv.Frequencies) @@ -115,7 +121,13 @@ func SetObjectDefaults_VirtualMachine(in *VirtualMachine) { 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) + SetDefaults_FeatureState(&in.Spec.Template.Spec.Domain.Features.Hyperv.TLBFlush.FeatureState) + if in.Spec.Template.Spec.Domain.Features.Hyperv.TLBFlush.Direct != nil { + SetDefaults_FeatureState(in.Spec.Template.Spec.Domain.Features.Hyperv.TLBFlush.Direct) + } + if in.Spec.Template.Spec.Domain.Features.Hyperv.TLBFlush.Extended != nil { + SetDefaults_FeatureState(in.Spec.Template.Spec.Domain.Features.Hyperv.TLBFlush.Extended) + } } if in.Spec.Template.Spec.Domain.Features.Hyperv.IPI != nil { SetDefaults_FeatureState(in.Spec.Template.Spec.Domain.Features.Hyperv.IPI) @@ -143,12 +155,6 @@ func SetObjectDefaults_VirtualMachine(in *VirtualMachine) { } } } - 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 { @@ -212,6 +218,7 @@ func SetObjectDefaults_VirtualMachineInstance(in *VirtualMachineInstance) { SetDefaults_FeatureState(&in.Spec.Domain.Features.ACPI) if in.Spec.Domain.Features.APIC != nil { SetDefaults_FeatureAPIC(in.Spec.Domain.Features.APIC) + SetDefaults_FeatureState(&in.Spec.Domain.Features.APIC.FeatureState) } if in.Spec.Domain.Features.Hyperv != nil { if in.Spec.Domain.Features.Hyperv.Relaxed != nil { @@ -222,6 +229,7 @@ func SetObjectDefaults_VirtualMachineInstance(in *VirtualMachineInstance) { } if in.Spec.Domain.Features.Hyperv.Spinlocks != nil { SetDefaults_FeatureSpinlocks(in.Spec.Domain.Features.Hyperv.Spinlocks) + SetDefaults_FeatureState(&in.Spec.Domain.Features.Hyperv.Spinlocks.FeatureState) } if in.Spec.Domain.Features.Hyperv.VPIndex != nil { SetDefaults_FeatureState(in.Spec.Domain.Features.Hyperv.VPIndex) @@ -234,6 +242,7 @@ func SetObjectDefaults_VirtualMachineInstance(in *VirtualMachineInstance) { } if in.Spec.Domain.Features.Hyperv.SyNICTimer != nil { SetDefaults_SyNICTimer(in.Spec.Domain.Features.Hyperv.SyNICTimer) + SetDefaults_FeatureState(&in.Spec.Domain.Features.Hyperv.SyNICTimer.FeatureState) if in.Spec.Domain.Features.Hyperv.SyNICTimer.Direct != nil { SetDefaults_FeatureState(in.Spec.Domain.Features.Hyperv.SyNICTimer.Direct) } @@ -243,6 +252,7 @@ func SetObjectDefaults_VirtualMachineInstance(in *VirtualMachineInstance) { } if in.Spec.Domain.Features.Hyperv.VendorID != nil { SetDefaults_FeatureVendorID(in.Spec.Domain.Features.Hyperv.VendorID) + SetDefaults_FeatureState(&in.Spec.Domain.Features.Hyperv.VendorID.FeatureState) } if in.Spec.Domain.Features.Hyperv.Frequencies != nil { SetDefaults_FeatureState(in.Spec.Domain.Features.Hyperv.Frequencies) @@ -251,7 +261,13 @@ func SetObjectDefaults_VirtualMachineInstance(in *VirtualMachineInstance) { SetDefaults_FeatureState(in.Spec.Domain.Features.Hyperv.Reenlightenment) } if in.Spec.Domain.Features.Hyperv.TLBFlush != nil { - SetDefaults_FeatureState(in.Spec.Domain.Features.Hyperv.TLBFlush) + SetDefaults_FeatureState(&in.Spec.Domain.Features.Hyperv.TLBFlush.FeatureState) + if in.Spec.Domain.Features.Hyperv.TLBFlush.Direct != nil { + SetDefaults_FeatureState(in.Spec.Domain.Features.Hyperv.TLBFlush.Direct) + } + if in.Spec.Domain.Features.Hyperv.TLBFlush.Extended != nil { + SetDefaults_FeatureState(in.Spec.Domain.Features.Hyperv.TLBFlush.Extended) + } } if in.Spec.Domain.Features.Hyperv.IPI != nil { SetDefaults_FeatureState(in.Spec.Domain.Features.Hyperv.IPI) @@ -279,12 +295,6 @@ func SetObjectDefaults_VirtualMachineInstance(in *VirtualMachineInstance) { } } } - 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 { @@ -338,6 +348,7 @@ func SetObjectDefaults_VirtualMachineInstancePreset(in *VirtualMachineInstancePr SetDefaults_FeatureState(&in.Spec.Domain.Features.ACPI) if in.Spec.Domain.Features.APIC != nil { SetDefaults_FeatureAPIC(in.Spec.Domain.Features.APIC) + SetDefaults_FeatureState(&in.Spec.Domain.Features.APIC.FeatureState) } if in.Spec.Domain.Features.Hyperv != nil { if in.Spec.Domain.Features.Hyperv.Relaxed != nil { @@ -348,6 +359,7 @@ func SetObjectDefaults_VirtualMachineInstancePreset(in *VirtualMachineInstancePr } if in.Spec.Domain.Features.Hyperv.Spinlocks != nil { SetDefaults_FeatureSpinlocks(in.Spec.Domain.Features.Hyperv.Spinlocks) + SetDefaults_FeatureState(&in.Spec.Domain.Features.Hyperv.Spinlocks.FeatureState) } if in.Spec.Domain.Features.Hyperv.VPIndex != nil { SetDefaults_FeatureState(in.Spec.Domain.Features.Hyperv.VPIndex) @@ -360,6 +372,7 @@ func SetObjectDefaults_VirtualMachineInstancePreset(in *VirtualMachineInstancePr } if in.Spec.Domain.Features.Hyperv.SyNICTimer != nil { SetDefaults_SyNICTimer(in.Spec.Domain.Features.Hyperv.SyNICTimer) + SetDefaults_FeatureState(&in.Spec.Domain.Features.Hyperv.SyNICTimer.FeatureState) if in.Spec.Domain.Features.Hyperv.SyNICTimer.Direct != nil { SetDefaults_FeatureState(in.Spec.Domain.Features.Hyperv.SyNICTimer.Direct) } @@ -369,6 +382,7 @@ func SetObjectDefaults_VirtualMachineInstancePreset(in *VirtualMachineInstancePr } if in.Spec.Domain.Features.Hyperv.VendorID != nil { SetDefaults_FeatureVendorID(in.Spec.Domain.Features.Hyperv.VendorID) + SetDefaults_FeatureState(&in.Spec.Domain.Features.Hyperv.VendorID.FeatureState) } if in.Spec.Domain.Features.Hyperv.Frequencies != nil { SetDefaults_FeatureState(in.Spec.Domain.Features.Hyperv.Frequencies) @@ -377,7 +391,13 @@ func SetObjectDefaults_VirtualMachineInstancePreset(in *VirtualMachineInstancePr SetDefaults_FeatureState(in.Spec.Domain.Features.Hyperv.Reenlightenment) } if in.Spec.Domain.Features.Hyperv.TLBFlush != nil { - SetDefaults_FeatureState(in.Spec.Domain.Features.Hyperv.TLBFlush) + SetDefaults_FeatureState(&in.Spec.Domain.Features.Hyperv.TLBFlush.FeatureState) + if in.Spec.Domain.Features.Hyperv.TLBFlush.Direct != nil { + SetDefaults_FeatureState(in.Spec.Domain.Features.Hyperv.TLBFlush.Direct) + } + if in.Spec.Domain.Features.Hyperv.TLBFlush.Extended != nil { + SetDefaults_FeatureState(in.Spec.Domain.Features.Hyperv.TLBFlush.Extended) + } } if in.Spec.Domain.Features.Hyperv.IPI != nil { SetDefaults_FeatureState(in.Spec.Domain.Features.Hyperv.IPI) @@ -405,12 +425,6 @@ func SetObjectDefaults_VirtualMachineInstancePreset(in *VirtualMachineInstancePr } } } - 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 { @@ -459,6 +473,7 @@ func SetObjectDefaults_VirtualMachineInstanceReplicaSet(in *VirtualMachineInstan 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) + SetDefaults_FeatureState(&in.Spec.Template.Spec.Domain.Features.APIC.FeatureState) } if in.Spec.Template.Spec.Domain.Features.Hyperv != nil { if in.Spec.Template.Spec.Domain.Features.Hyperv.Relaxed != nil { @@ -469,6 +484,7 @@ func SetObjectDefaults_VirtualMachineInstanceReplicaSet(in *VirtualMachineInstan } if in.Spec.Template.Spec.Domain.Features.Hyperv.Spinlocks != nil { SetDefaults_FeatureSpinlocks(in.Spec.Template.Spec.Domain.Features.Hyperv.Spinlocks) + SetDefaults_FeatureState(&in.Spec.Template.Spec.Domain.Features.Hyperv.Spinlocks.FeatureState) } if in.Spec.Template.Spec.Domain.Features.Hyperv.VPIndex != nil { SetDefaults_FeatureState(in.Spec.Template.Spec.Domain.Features.Hyperv.VPIndex) @@ -481,6 +497,7 @@ func SetObjectDefaults_VirtualMachineInstanceReplicaSet(in *VirtualMachineInstan } if in.Spec.Template.Spec.Domain.Features.Hyperv.SyNICTimer != nil { SetDefaults_SyNICTimer(in.Spec.Template.Spec.Domain.Features.Hyperv.SyNICTimer) + SetDefaults_FeatureState(&in.Spec.Template.Spec.Domain.Features.Hyperv.SyNICTimer.FeatureState) if in.Spec.Template.Spec.Domain.Features.Hyperv.SyNICTimer.Direct != nil { SetDefaults_FeatureState(in.Spec.Template.Spec.Domain.Features.Hyperv.SyNICTimer.Direct) } @@ -490,6 +507,7 @@ func SetObjectDefaults_VirtualMachineInstanceReplicaSet(in *VirtualMachineInstan } if in.Spec.Template.Spec.Domain.Features.Hyperv.VendorID != nil { SetDefaults_FeatureVendorID(in.Spec.Template.Spec.Domain.Features.Hyperv.VendorID) + SetDefaults_FeatureState(&in.Spec.Template.Spec.Domain.Features.Hyperv.VendorID.FeatureState) } if in.Spec.Template.Spec.Domain.Features.Hyperv.Frequencies != nil { SetDefaults_FeatureState(in.Spec.Template.Spec.Domain.Features.Hyperv.Frequencies) @@ -498,7 +516,13 @@ func SetObjectDefaults_VirtualMachineInstanceReplicaSet(in *VirtualMachineInstan 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) + SetDefaults_FeatureState(&in.Spec.Template.Spec.Domain.Features.Hyperv.TLBFlush.FeatureState) + if in.Spec.Template.Spec.Domain.Features.Hyperv.TLBFlush.Direct != nil { + SetDefaults_FeatureState(in.Spec.Template.Spec.Domain.Features.Hyperv.TLBFlush.Direct) + } + if in.Spec.Template.Spec.Domain.Features.Hyperv.TLBFlush.Extended != nil { + SetDefaults_FeatureState(in.Spec.Template.Spec.Domain.Features.Hyperv.TLBFlush.Extended) + } } if in.Spec.Template.Spec.Domain.Features.Hyperv.IPI != nil { SetDefaults_FeatureState(in.Spec.Template.Spec.Domain.Features.Hyperv.IPI) @@ -526,12 +550,6 @@ func SetObjectDefaults_VirtualMachineInstanceReplicaSet(in *VirtualMachineInstan } } } - 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 { diff --git a/vendor/kubevirt.io/api/export/v1alpha1/deepcopy_generated.go b/vendor/kubevirt.io/api/export/v1alpha1/deepcopy_generated.go index 693b28cee..f2501e3e8 100644 --- a/vendor/kubevirt.io/api/export/v1alpha1/deepcopy_generated.go +++ b/vendor/kubevirt.io/api/export/v1alpha1/deepcopy_generated.go @@ -2,7 +2,7 @@ // +build !ignore_autogenerated /* -Copyright The KubeVirt Authors. +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. @@ -15,6 +15,8 @@ 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 The KubeVirt Authors. */ // Code generated by deepcopy-gen. DO NOT EDIT. diff --git a/vendor/kubevirt.io/api/export/v1beta1/deepcopy_generated.go b/vendor/kubevirt.io/api/export/v1beta1/deepcopy_generated.go index 4a3e0e324..76e7e50b5 100644 --- a/vendor/kubevirt.io/api/export/v1beta1/deepcopy_generated.go +++ b/vendor/kubevirt.io/api/export/v1beta1/deepcopy_generated.go @@ -2,7 +2,7 @@ // +build !ignore_autogenerated /* -Copyright The KubeVirt Authors. +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. @@ -15,6 +15,8 @@ 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 The KubeVirt Authors. */ // Code generated by deepcopy-gen. DO NOT EDIT. @@ -76,6 +78,43 @@ func (in *VirtualMachineExport) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualMachineExportBackup) DeepCopyInto(out *VirtualMachineExportBackup) { + *out = *in + if in.Endpoints != nil { + in, out := &in.Endpoints, &out.Endpoints + *out = make([]VirtualMachineExportBackupEndpoint, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineExportBackup. +func (in *VirtualMachineExportBackup) DeepCopy() *VirtualMachineExportBackup { + if in == nil { + return nil + } + out := new(VirtualMachineExportBackup) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualMachineExportBackupEndpoint) DeepCopyInto(out *VirtualMachineExportBackupEndpoint) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineExportBackupEndpoint. +func (in *VirtualMachineExportBackupEndpoint) DeepCopy() *VirtualMachineExportBackupEndpoint { + if in == nil { + return nil + } + out := new(VirtualMachineExportBackupEndpoint) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *VirtualMachineExportLink) DeepCopyInto(out *VirtualMachineExportLink) { *out = *in @@ -86,6 +125,13 @@ func (in *VirtualMachineExportLink) DeepCopyInto(out *VirtualMachineExportLink) (*in)[i].DeepCopyInto(&(*out)[i]) } } + if in.Backups != nil { + in, out := &in.Backups, &out.Backups + *out = make([]VirtualMachineExportBackup, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } if in.Manifests != nil { in, out := &in.Manifests, &out.Manifests *out = make([]VirtualMachineExportManifest, len(*in)) diff --git a/vendor/kubevirt.io/api/export/v1beta1/types.go b/vendor/kubevirt.io/api/export/v1beta1/types.go index affff0b15..84b05f753 100644 --- a/vendor/kubevirt.io/api/export/v1beta1/types.go +++ b/vendor/kubevirt.io/api/export/v1beta1/types.go @@ -134,6 +134,12 @@ type VirtualMachineExportLink struct { // +optional Volumes []VirtualMachineExportVolume `json:"volumes,omitempty"` + // Backups is a list of available backups for the export + // +listType=map + // +listMapKey=name + // +optional + Backups []VirtualMachineExportBackup `json:"backups,omitempty"` + // Manifests is a list of available manifests for the export // +listType=map // +listMapKey=type @@ -190,6 +196,33 @@ type VirtualMachineExportVolumeFormat struct { Url string `json:"url"` } +// VirtualMachineExportBackup contains the URL and available formats for the exported backup +type VirtualMachineExportBackup struct { + // Name is the name of the exported volume + Name string `json:"name"` + // +listType=map + // +listMapKey=endpoint + // +optional + Endpoints []VirtualMachineExportBackupEndpoint `json:"endpoints,omitempty"` +} + +type ExportBackupEndpoint string + +const ( + // Map is the bitmap endpoint of the backup + Map ExportBackupEndpoint = "map" + // Data is the read endpoint of the backup + Data ExportBackupEndpoint = "data" +) + +// VirtualMachineExportBackupEndpoint contains the endpoint type and URL to interact with a backup export +type VirtualMachineExportBackupEndpoint struct { + // Endpoint is the endpoint of the backup export at the specified URL + Endpoint ExportBackupEndpoint `json:"endpoint"` + // Url is the url that contains the volume in the format specified + Url string `json:"url"` +} + // ConditionType is the const type for Conditions type ConditionType string diff --git a/vendor/kubevirt.io/api/export/v1beta1/types_swagger_generated.go b/vendor/kubevirt.io/api/export/v1beta1/types_swagger_generated.go index db4d56709..19ebe348f 100644 --- a/vendor/kubevirt.io/api/export/v1beta1/types_swagger_generated.go +++ b/vendor/kubevirt.io/api/export/v1beta1/types_swagger_generated.go @@ -50,6 +50,7 @@ func (VirtualMachineExportLink) SwaggerDoc() map[string]string { "": "VirtualMachineExportLink contains a list of volumes available for export, as well as the URLs to obtain these volumes", "cert": "Cert is the public CA certificate base64 encoded", "volumes": "Volumes is a list of available volumes to export\n+listType=map\n+listMapKey=name\n+optional", + "backups": "Backups is a list of available backups for the export\n+listType=map\n+listMapKey=name\n+optional", "manifests": "Manifests is a list of available manifests for the export\n+listType=map\n+listMapKey=type\n+optional", } } @@ -78,6 +79,22 @@ func (VirtualMachineExportVolumeFormat) SwaggerDoc() map[string]string { } } +func (VirtualMachineExportBackup) SwaggerDoc() map[string]string { + return map[string]string{ + "": "VirtualMachineExportBackup contains the URL and available formats for the exported backup", + "name": "Name is the name of the exported volume", + "endpoints": "+listType=map\n+listMapKey=endpoint\n+optional", + } +} + +func (VirtualMachineExportBackupEndpoint) SwaggerDoc() map[string]string { + return map[string]string{ + "": "VirtualMachineExportBackupEndpoint contains the endpoint type and URL to interact with a backup export", + "endpoint": "Endpoint is the endpoint of the backup export at the specified URL", + "url": "Url is the url that contains the volume in the format specified", + } +} + func (Condition) SwaggerDoc() map[string]string { return map[string]string{ "": "Condition defines conditions", diff --git a/vendor/kubevirt.io/api/instancetype/OWNERS b/vendor/kubevirt.io/api/instancetype/OWNERS new file mode 100644 index 000000000..b02f6480f --- /dev/null +++ b/vendor/kubevirt.io/api/instancetype/OWNERS @@ -0,0 +1,10 @@ +# See the OWNERS docs at https://go.k8s.io/owners +approvers: + - sig-compute-approvers + - sig-compute-instancetype-approvers +reviewers: + - sig-compute-reviewers + - sig-compute-instancetype-reviewers +labels: + - sig/compute + - area/instancetype diff --git a/vendor/kubevirt.io/api/instancetype/v1alpha1/conversion.go b/vendor/kubevirt.io/api/instancetype/v1alpha1/conversion.go deleted file mode 100644 index a318b446d..000000000 --- a/vendor/kubevirt.io/api/instancetype/v1alpha1/conversion.go +++ /dev/null @@ -1,73 +0,0 @@ -/* - * 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 2023 Red Hat, Inc. - * - */ - -package v1alpha1 - -import ( - conversion "k8s.io/apimachinery/pkg/conversion" - "kubevirt.io/api/instancetype/v1beta1" -) - -// Manually defined function to convert from pointer to value -func Convert_v1beta1_CPUPreferences_To_v1alpha1_CPUPreferences(in *v1beta1.CPUPreferences, out *CPUPreferences, s conversion.Scope) error { - if in.PreferredCPUTopology != nil { - out.PreferredCPUTopology = (PreferredCPUTopology)(*in.PreferredCPUTopology) - } - - return autoConvert_v1beta1_CPUPreferences_To_v1alpha1_CPUPreferences(in, out, s) -} - -// Manually defined function to convert from value to pointer -func Convert_v1alpha1_CPUPreferences_To_v1beta1_CPUPreferences(in *CPUPreferences, out *v1beta1.CPUPreferences, s conversion.Scope) error { - if in.PreferredCPUTopology != "" { - out.PreferredCPUTopology = (*v1beta1.PreferredCPUTopology)(&in.PreferredCPUTopology) - } - - return autoConvert_v1alpha1_CPUPreferences_To_v1beta1_CPUPreferences(in, out, s) -} - -/* - * The following functions are manually defined to workaround conversion-gen - * warnings about attributes in newer versions not being present in older - * versions of the API. - * - * No custom code should be needed in such cases with each attribute - * automatically being documented in generated comments within the used - * autoConvert funcs. - */ - -func Convert_v1beta1_VirtualMachinePreferenceSpec_To_v1alpha1_VirtualMachinePreferenceSpec(in *v1beta1.VirtualMachinePreferenceSpec, out *VirtualMachinePreferenceSpec, s conversion.Scope) error { - return autoConvert_v1beta1_VirtualMachinePreferenceSpec_To_v1alpha1_VirtualMachinePreferenceSpec(in, out, s) -} - -func Convert_v1beta1_DevicePreferences_To_v1alpha1_DevicePreferences(in *v1beta1.DevicePreferences, out *DevicePreferences, s conversion.Scope) error { - return autoConvert_v1beta1_DevicePreferences_To_v1alpha1_DevicePreferences(in, out, s) -} - -func Convert_v1beta1_MemoryInstancetype_To_v1alpha1_MemoryInstancetype(in *v1beta1.MemoryInstancetype, out *MemoryInstancetype, s conversion.Scope) error { - return autoConvert_v1beta1_MemoryInstancetype_To_v1alpha1_MemoryInstancetype(in, out, s) -} - -func Convert_v1beta1_VirtualMachineInstancetypeSpec_To_v1alpha1_VirtualMachineInstancetypeSpec(in *v1beta1.VirtualMachineInstancetypeSpec, out *VirtualMachineInstancetypeSpec, s conversion.Scope) error { - return autoConvert_v1beta1_VirtualMachineInstancetypeSpec_To_v1alpha1_VirtualMachineInstancetypeSpec(in, out, s) -} - -func Convert_v1beta1_CPUInstancetype_To_v1alpha1_CPUInstancetype(in *v1beta1.CPUInstancetype, out *CPUInstancetype, s conversion.Scope) error { - return autoConvert_v1beta1_CPUInstancetype_To_v1alpha1_CPUInstancetype(in, out, s) -} diff --git a/vendor/kubevirt.io/api/instancetype/v1alpha1/conversion_generated.go b/vendor/kubevirt.io/api/instancetype/v1alpha1/conversion_generated.go deleted file mode 100644 index 415525482..000000000 --- a/vendor/kubevirt.io/api/instancetype/v1alpha1/conversion_generated.go +++ /dev/null @@ -1,820 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -Copyright 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 conversion-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - unsafe "unsafe" - - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - conversion "k8s.io/apimachinery/pkg/conversion" - runtime "k8s.io/apimachinery/pkg/runtime" - corev1 "kubevirt.io/api/core/v1" - v1beta1 "kubevirt.io/api/instancetype/v1beta1" -) - -func init() { - localSchemeBuilder.Register(RegisterConversions) -} - -// RegisterConversions adds conversion functions to the given scheme. -// Public to allow building arbitrary schemes. -func RegisterConversions(s *runtime.Scheme) error { - if err := s.AddGeneratedConversionFunc((*CPUInstancetype)(nil), (*v1beta1.CPUInstancetype)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_CPUInstancetype_To_v1beta1_CPUInstancetype(a.(*CPUInstancetype), b.(*v1beta1.CPUInstancetype), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.ClockPreferences)(nil), (*ClockPreferences)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_ClockPreferences_To_v1alpha1_ClockPreferences(a.(*v1beta1.ClockPreferences), b.(*ClockPreferences), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ClockPreferences)(nil), (*v1beta1.ClockPreferences)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_ClockPreferences_To_v1beta1_ClockPreferences(a.(*ClockPreferences), b.(*v1beta1.ClockPreferences), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*DevicePreferences)(nil), (*v1beta1.DevicePreferences)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_DevicePreferences_To_v1beta1_DevicePreferences(a.(*DevicePreferences), b.(*v1beta1.DevicePreferences), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.FeaturePreferences)(nil), (*FeaturePreferences)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_FeaturePreferences_To_v1alpha1_FeaturePreferences(a.(*v1beta1.FeaturePreferences), b.(*FeaturePreferences), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*FeaturePreferences)(nil), (*v1beta1.FeaturePreferences)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_FeaturePreferences_To_v1beta1_FeaturePreferences(a.(*FeaturePreferences), b.(*v1beta1.FeaturePreferences), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.FirmwarePreferences)(nil), (*FirmwarePreferences)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_FirmwarePreferences_To_v1alpha1_FirmwarePreferences(a.(*v1beta1.FirmwarePreferences), b.(*FirmwarePreferences), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*FirmwarePreferences)(nil), (*v1beta1.FirmwarePreferences)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_FirmwarePreferences_To_v1beta1_FirmwarePreferences(a.(*FirmwarePreferences), b.(*v1beta1.FirmwarePreferences), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.MachinePreferences)(nil), (*MachinePreferences)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_MachinePreferences_To_v1alpha1_MachinePreferences(a.(*v1beta1.MachinePreferences), b.(*MachinePreferences), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*MachinePreferences)(nil), (*v1beta1.MachinePreferences)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_MachinePreferences_To_v1beta1_MachinePreferences(a.(*MachinePreferences), b.(*v1beta1.MachinePreferences), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*MemoryInstancetype)(nil), (*v1beta1.MemoryInstancetype)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_MemoryInstancetype_To_v1beta1_MemoryInstancetype(a.(*MemoryInstancetype), b.(*v1beta1.MemoryInstancetype), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.VirtualMachineClusterInstancetype)(nil), (*VirtualMachineClusterInstancetype)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_VirtualMachineClusterInstancetype_To_v1alpha1_VirtualMachineClusterInstancetype(a.(*v1beta1.VirtualMachineClusterInstancetype), b.(*VirtualMachineClusterInstancetype), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*VirtualMachineClusterInstancetype)(nil), (*v1beta1.VirtualMachineClusterInstancetype)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_VirtualMachineClusterInstancetype_To_v1beta1_VirtualMachineClusterInstancetype(a.(*VirtualMachineClusterInstancetype), b.(*v1beta1.VirtualMachineClusterInstancetype), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.VirtualMachineClusterInstancetypeList)(nil), (*VirtualMachineClusterInstancetypeList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_VirtualMachineClusterInstancetypeList_To_v1alpha1_VirtualMachineClusterInstancetypeList(a.(*v1beta1.VirtualMachineClusterInstancetypeList), b.(*VirtualMachineClusterInstancetypeList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*VirtualMachineClusterInstancetypeList)(nil), (*v1beta1.VirtualMachineClusterInstancetypeList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_VirtualMachineClusterInstancetypeList_To_v1beta1_VirtualMachineClusterInstancetypeList(a.(*VirtualMachineClusterInstancetypeList), b.(*v1beta1.VirtualMachineClusterInstancetypeList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.VirtualMachineClusterPreference)(nil), (*VirtualMachineClusterPreference)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_VirtualMachineClusterPreference_To_v1alpha1_VirtualMachineClusterPreference(a.(*v1beta1.VirtualMachineClusterPreference), b.(*VirtualMachineClusterPreference), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*VirtualMachineClusterPreference)(nil), (*v1beta1.VirtualMachineClusterPreference)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_VirtualMachineClusterPreference_To_v1beta1_VirtualMachineClusterPreference(a.(*VirtualMachineClusterPreference), b.(*v1beta1.VirtualMachineClusterPreference), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.VirtualMachineClusterPreferenceList)(nil), (*VirtualMachineClusterPreferenceList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_VirtualMachineClusterPreferenceList_To_v1alpha1_VirtualMachineClusterPreferenceList(a.(*v1beta1.VirtualMachineClusterPreferenceList), b.(*VirtualMachineClusterPreferenceList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*VirtualMachineClusterPreferenceList)(nil), (*v1beta1.VirtualMachineClusterPreferenceList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_VirtualMachineClusterPreferenceList_To_v1beta1_VirtualMachineClusterPreferenceList(a.(*VirtualMachineClusterPreferenceList), b.(*v1beta1.VirtualMachineClusterPreferenceList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.VirtualMachineInstancetype)(nil), (*VirtualMachineInstancetype)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_VirtualMachineInstancetype_To_v1alpha1_VirtualMachineInstancetype(a.(*v1beta1.VirtualMachineInstancetype), b.(*VirtualMachineInstancetype), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*VirtualMachineInstancetype)(nil), (*v1beta1.VirtualMachineInstancetype)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_VirtualMachineInstancetype_To_v1beta1_VirtualMachineInstancetype(a.(*VirtualMachineInstancetype), b.(*v1beta1.VirtualMachineInstancetype), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.VirtualMachineInstancetypeList)(nil), (*VirtualMachineInstancetypeList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_VirtualMachineInstancetypeList_To_v1alpha1_VirtualMachineInstancetypeList(a.(*v1beta1.VirtualMachineInstancetypeList), b.(*VirtualMachineInstancetypeList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*VirtualMachineInstancetypeList)(nil), (*v1beta1.VirtualMachineInstancetypeList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_VirtualMachineInstancetypeList_To_v1beta1_VirtualMachineInstancetypeList(a.(*VirtualMachineInstancetypeList), b.(*v1beta1.VirtualMachineInstancetypeList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*VirtualMachineInstancetypeSpec)(nil), (*v1beta1.VirtualMachineInstancetypeSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_VirtualMachineInstancetypeSpec_To_v1beta1_VirtualMachineInstancetypeSpec(a.(*VirtualMachineInstancetypeSpec), b.(*v1beta1.VirtualMachineInstancetypeSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.VirtualMachinePreference)(nil), (*VirtualMachinePreference)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_VirtualMachinePreference_To_v1alpha1_VirtualMachinePreference(a.(*v1beta1.VirtualMachinePreference), b.(*VirtualMachinePreference), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*VirtualMachinePreference)(nil), (*v1beta1.VirtualMachinePreference)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_VirtualMachinePreference_To_v1beta1_VirtualMachinePreference(a.(*VirtualMachinePreference), b.(*v1beta1.VirtualMachinePreference), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.VirtualMachinePreferenceList)(nil), (*VirtualMachinePreferenceList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_VirtualMachinePreferenceList_To_v1alpha1_VirtualMachinePreferenceList(a.(*v1beta1.VirtualMachinePreferenceList), b.(*VirtualMachinePreferenceList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*VirtualMachinePreferenceList)(nil), (*v1beta1.VirtualMachinePreferenceList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_VirtualMachinePreferenceList_To_v1beta1_VirtualMachinePreferenceList(a.(*VirtualMachinePreferenceList), b.(*v1beta1.VirtualMachinePreferenceList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*VirtualMachinePreferenceSpec)(nil), (*v1beta1.VirtualMachinePreferenceSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_VirtualMachinePreferenceSpec_To_v1beta1_VirtualMachinePreferenceSpec(a.(*VirtualMachinePreferenceSpec), b.(*v1beta1.VirtualMachinePreferenceSpec), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*CPUPreferences)(nil), (*v1beta1.CPUPreferences)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_CPUPreferences_To_v1beta1_CPUPreferences(a.(*CPUPreferences), b.(*v1beta1.CPUPreferences), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*v1beta1.CPUInstancetype)(nil), (*CPUInstancetype)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_CPUInstancetype_To_v1alpha1_CPUInstancetype(a.(*v1beta1.CPUInstancetype), b.(*CPUInstancetype), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*v1beta1.CPUPreferences)(nil), (*CPUPreferences)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_CPUPreferences_To_v1alpha1_CPUPreferences(a.(*v1beta1.CPUPreferences), b.(*CPUPreferences), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*v1beta1.DevicePreferences)(nil), (*DevicePreferences)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_DevicePreferences_To_v1alpha1_DevicePreferences(a.(*v1beta1.DevicePreferences), b.(*DevicePreferences), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*v1beta1.MemoryInstancetype)(nil), (*MemoryInstancetype)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_MemoryInstancetype_To_v1alpha1_MemoryInstancetype(a.(*v1beta1.MemoryInstancetype), b.(*MemoryInstancetype), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*v1beta1.VirtualMachineInstancetypeSpec)(nil), (*VirtualMachineInstancetypeSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_VirtualMachineInstancetypeSpec_To_v1alpha1_VirtualMachineInstancetypeSpec(a.(*v1beta1.VirtualMachineInstancetypeSpec), b.(*VirtualMachineInstancetypeSpec), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*v1beta1.VirtualMachinePreferenceSpec)(nil), (*VirtualMachinePreferenceSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_VirtualMachinePreferenceSpec_To_v1alpha1_VirtualMachinePreferenceSpec(a.(*v1beta1.VirtualMachinePreferenceSpec), b.(*VirtualMachinePreferenceSpec), scope) - }); err != nil { - return err - } - return nil -} - -func autoConvert_v1beta1_CPUInstancetype_To_v1alpha1_CPUInstancetype(in *v1beta1.CPUInstancetype, out *CPUInstancetype, s conversion.Scope) error { - out.Guest = in.Guest - if err := v1.Convert_Pointer_string_To_string(&in.Model, &out.Model, s); err != nil { - return err - } - if err := v1.Convert_Pointer_bool_To_bool(&in.DedicatedCPUPlacement, &out.DedicatedCPUPlacement, s); err != nil { - return err - } - out.NUMA = (*corev1.NUMA)(unsafe.Pointer(in.NUMA)) - if err := v1.Convert_Pointer_bool_To_bool(&in.IsolateEmulatorThread, &out.IsolateEmulatorThread, s); err != nil { - return err - } - out.Realtime = (*corev1.Realtime)(unsafe.Pointer(in.Realtime)) - // WARNING: in.MaxSockets requires manual conversion: does not exist in peer-type - return nil -} - -func autoConvert_v1alpha1_CPUInstancetype_To_v1beta1_CPUInstancetype(in *CPUInstancetype, out *v1beta1.CPUInstancetype, s conversion.Scope) error { - out.Guest = in.Guest - if err := v1.Convert_string_To_Pointer_string(&in.Model, &out.Model, s); err != nil { - return err - } - if err := v1.Convert_bool_To_Pointer_bool(&in.DedicatedCPUPlacement, &out.DedicatedCPUPlacement, s); err != nil { - return err - } - out.NUMA = (*corev1.NUMA)(unsafe.Pointer(in.NUMA)) - if err := v1.Convert_bool_To_Pointer_bool(&in.IsolateEmulatorThread, &out.IsolateEmulatorThread, s); err != nil { - return err - } - out.Realtime = (*corev1.Realtime)(unsafe.Pointer(in.Realtime)) - return nil -} - -// Convert_v1alpha1_CPUInstancetype_To_v1beta1_CPUInstancetype is an autogenerated conversion function. -func Convert_v1alpha1_CPUInstancetype_To_v1beta1_CPUInstancetype(in *CPUInstancetype, out *v1beta1.CPUInstancetype, s conversion.Scope) error { - return autoConvert_v1alpha1_CPUInstancetype_To_v1beta1_CPUInstancetype(in, out, s) -} - -func autoConvert_v1beta1_CPUPreferences_To_v1alpha1_CPUPreferences(in *v1beta1.CPUPreferences, out *CPUPreferences, s conversion.Scope) error { - // WARNING: in.PreferredCPUTopology requires manual conversion: inconvertible types (*kubevirt.io/api/instancetype/v1beta1.PreferredCPUTopology vs kubevirt.io/api/instancetype/v1alpha1.PreferredCPUTopology) - // WARNING: in.SpreadOptions requires manual conversion: does not exist in peer-type - // WARNING: in.PreferredCPUFeatures requires manual conversion: does not exist in peer-type - return nil -} - -func autoConvert_v1alpha1_CPUPreferences_To_v1beta1_CPUPreferences(in *CPUPreferences, out *v1beta1.CPUPreferences, s conversion.Scope) error { - // WARNING: in.PreferredCPUTopology requires manual conversion: inconvertible types (kubevirt.io/api/instancetype/v1alpha1.PreferredCPUTopology vs *kubevirt.io/api/instancetype/v1beta1.PreferredCPUTopology) - return nil -} - -func autoConvert_v1beta1_ClockPreferences_To_v1alpha1_ClockPreferences(in *v1beta1.ClockPreferences, out *ClockPreferences, s conversion.Scope) error { - out.PreferredClockOffset = (*corev1.ClockOffset)(unsafe.Pointer(in.PreferredClockOffset)) - out.PreferredTimer = (*corev1.Timer)(unsafe.Pointer(in.PreferredTimer)) - return nil -} - -// Convert_v1beta1_ClockPreferences_To_v1alpha1_ClockPreferences is an autogenerated conversion function. -func Convert_v1beta1_ClockPreferences_To_v1alpha1_ClockPreferences(in *v1beta1.ClockPreferences, out *ClockPreferences, s conversion.Scope) error { - return autoConvert_v1beta1_ClockPreferences_To_v1alpha1_ClockPreferences(in, out, s) -} - -func autoConvert_v1alpha1_ClockPreferences_To_v1beta1_ClockPreferences(in *ClockPreferences, out *v1beta1.ClockPreferences, s conversion.Scope) error { - out.PreferredClockOffset = (*corev1.ClockOffset)(unsafe.Pointer(in.PreferredClockOffset)) - out.PreferredTimer = (*corev1.Timer)(unsafe.Pointer(in.PreferredTimer)) - return nil -} - -// Convert_v1alpha1_ClockPreferences_To_v1beta1_ClockPreferences is an autogenerated conversion function. -func Convert_v1alpha1_ClockPreferences_To_v1beta1_ClockPreferences(in *ClockPreferences, out *v1beta1.ClockPreferences, s conversion.Scope) error { - return autoConvert_v1alpha1_ClockPreferences_To_v1beta1_ClockPreferences(in, out, s) -} - -func autoConvert_v1beta1_DevicePreferences_To_v1alpha1_DevicePreferences(in *v1beta1.DevicePreferences, out *DevicePreferences, s conversion.Scope) error { - out.PreferredAutoattachGraphicsDevice = (*bool)(unsafe.Pointer(in.PreferredAutoattachGraphicsDevice)) - out.PreferredAutoattachMemBalloon = (*bool)(unsafe.Pointer(in.PreferredAutoattachMemBalloon)) - out.PreferredAutoattachPodInterface = (*bool)(unsafe.Pointer(in.PreferredAutoattachPodInterface)) - out.PreferredAutoattachSerialConsole = (*bool)(unsafe.Pointer(in.PreferredAutoattachSerialConsole)) - out.PreferredAutoattachInputDevice = (*bool)(unsafe.Pointer(in.PreferredAutoattachInputDevice)) - out.PreferredDisableHotplug = (*bool)(unsafe.Pointer(in.PreferredDisableHotplug)) - out.PreferredVirtualGPUOptions = (*corev1.VGPUOptions)(unsafe.Pointer(in.PreferredVirtualGPUOptions)) - out.PreferredSoundModel = in.PreferredSoundModel - out.PreferredUseVirtioTransitional = (*bool)(unsafe.Pointer(in.PreferredUseVirtioTransitional)) - out.PreferredInputBus = corev1.InputBus(in.PreferredInputBus) - out.PreferredInputType = corev1.InputType(in.PreferredInputType) - out.PreferredDiskBus = corev1.DiskBus(in.PreferredDiskBus) - out.PreferredLunBus = corev1.DiskBus(in.PreferredLunBus) - out.PreferredCdromBus = corev1.DiskBus(in.PreferredCdromBus) - out.PreferredDiskDedicatedIoThread = (*bool)(unsafe.Pointer(in.PreferredDiskDedicatedIoThread)) - out.PreferredDiskCache = corev1.DriverCache(in.PreferredDiskCache) - out.PreferredDiskIO = corev1.DriverIO(in.PreferredDiskIO) - out.PreferredDiskBlockSize = (*corev1.BlockSize)(unsafe.Pointer(in.PreferredDiskBlockSize)) - out.PreferredInterfaceModel = in.PreferredInterfaceModel - out.PreferredRng = (*corev1.Rng)(unsafe.Pointer(in.PreferredRng)) - out.PreferredBlockMultiQueue = (*bool)(unsafe.Pointer(in.PreferredBlockMultiQueue)) - out.PreferredNetworkInterfaceMultiQueue = (*bool)(unsafe.Pointer(in.PreferredNetworkInterfaceMultiQueue)) - out.PreferredTPM = (*corev1.TPMDevice)(unsafe.Pointer(in.PreferredTPM)) - // WARNING: in.PreferredInterfaceMasquerade requires manual conversion: does not exist in peer-type - return nil -} - -func autoConvert_v1alpha1_DevicePreferences_To_v1beta1_DevicePreferences(in *DevicePreferences, out *v1beta1.DevicePreferences, s conversion.Scope) error { - out.PreferredAutoattachGraphicsDevice = (*bool)(unsafe.Pointer(in.PreferredAutoattachGraphicsDevice)) - out.PreferredAutoattachMemBalloon = (*bool)(unsafe.Pointer(in.PreferredAutoattachMemBalloon)) - out.PreferredAutoattachPodInterface = (*bool)(unsafe.Pointer(in.PreferredAutoattachPodInterface)) - out.PreferredAutoattachSerialConsole = (*bool)(unsafe.Pointer(in.PreferredAutoattachSerialConsole)) - out.PreferredAutoattachInputDevice = (*bool)(unsafe.Pointer(in.PreferredAutoattachInputDevice)) - out.PreferredDisableHotplug = (*bool)(unsafe.Pointer(in.PreferredDisableHotplug)) - out.PreferredVirtualGPUOptions = (*corev1.VGPUOptions)(unsafe.Pointer(in.PreferredVirtualGPUOptions)) - out.PreferredSoundModel = in.PreferredSoundModel - out.PreferredUseVirtioTransitional = (*bool)(unsafe.Pointer(in.PreferredUseVirtioTransitional)) - out.PreferredInputBus = corev1.InputBus(in.PreferredInputBus) - out.PreferredInputType = corev1.InputType(in.PreferredInputType) - out.PreferredDiskBus = corev1.DiskBus(in.PreferredDiskBus) - out.PreferredLunBus = corev1.DiskBus(in.PreferredLunBus) - out.PreferredCdromBus = corev1.DiskBus(in.PreferredCdromBus) - out.PreferredDiskDedicatedIoThread = (*bool)(unsafe.Pointer(in.PreferredDiskDedicatedIoThread)) - out.PreferredDiskCache = corev1.DriverCache(in.PreferredDiskCache) - out.PreferredDiskIO = corev1.DriverIO(in.PreferredDiskIO) - out.PreferredDiskBlockSize = (*corev1.BlockSize)(unsafe.Pointer(in.PreferredDiskBlockSize)) - out.PreferredInterfaceModel = in.PreferredInterfaceModel - out.PreferredRng = (*corev1.Rng)(unsafe.Pointer(in.PreferredRng)) - out.PreferredBlockMultiQueue = (*bool)(unsafe.Pointer(in.PreferredBlockMultiQueue)) - out.PreferredNetworkInterfaceMultiQueue = (*bool)(unsafe.Pointer(in.PreferredNetworkInterfaceMultiQueue)) - out.PreferredTPM = (*corev1.TPMDevice)(unsafe.Pointer(in.PreferredTPM)) - return nil -} - -// Convert_v1alpha1_DevicePreferences_To_v1beta1_DevicePreferences is an autogenerated conversion function. -func Convert_v1alpha1_DevicePreferences_To_v1beta1_DevicePreferences(in *DevicePreferences, out *v1beta1.DevicePreferences, s conversion.Scope) error { - return autoConvert_v1alpha1_DevicePreferences_To_v1beta1_DevicePreferences(in, out, s) -} - -func autoConvert_v1beta1_FeaturePreferences_To_v1alpha1_FeaturePreferences(in *v1beta1.FeaturePreferences, out *FeaturePreferences, s conversion.Scope) error { - out.PreferredAcpi = (*corev1.FeatureState)(unsafe.Pointer(in.PreferredAcpi)) - out.PreferredApic = (*corev1.FeatureAPIC)(unsafe.Pointer(in.PreferredApic)) - out.PreferredHyperv = (*corev1.FeatureHyperv)(unsafe.Pointer(in.PreferredHyperv)) - out.PreferredKvm = (*corev1.FeatureKVM)(unsafe.Pointer(in.PreferredKvm)) - out.PreferredPvspinlock = (*corev1.FeatureState)(unsafe.Pointer(in.PreferredPvspinlock)) - out.PreferredSmm = (*corev1.FeatureState)(unsafe.Pointer(in.PreferredSmm)) - return nil -} - -// Convert_v1beta1_FeaturePreferences_To_v1alpha1_FeaturePreferences is an autogenerated conversion function. -func Convert_v1beta1_FeaturePreferences_To_v1alpha1_FeaturePreferences(in *v1beta1.FeaturePreferences, out *FeaturePreferences, s conversion.Scope) error { - return autoConvert_v1beta1_FeaturePreferences_To_v1alpha1_FeaturePreferences(in, out, s) -} - -func autoConvert_v1alpha1_FeaturePreferences_To_v1beta1_FeaturePreferences(in *FeaturePreferences, out *v1beta1.FeaturePreferences, s conversion.Scope) error { - out.PreferredAcpi = (*corev1.FeatureState)(unsafe.Pointer(in.PreferredAcpi)) - out.PreferredApic = (*corev1.FeatureAPIC)(unsafe.Pointer(in.PreferredApic)) - out.PreferredHyperv = (*corev1.FeatureHyperv)(unsafe.Pointer(in.PreferredHyperv)) - out.PreferredKvm = (*corev1.FeatureKVM)(unsafe.Pointer(in.PreferredKvm)) - out.PreferredPvspinlock = (*corev1.FeatureState)(unsafe.Pointer(in.PreferredPvspinlock)) - out.PreferredSmm = (*corev1.FeatureState)(unsafe.Pointer(in.PreferredSmm)) - return nil -} - -// Convert_v1alpha1_FeaturePreferences_To_v1beta1_FeaturePreferences is an autogenerated conversion function. -func Convert_v1alpha1_FeaturePreferences_To_v1beta1_FeaturePreferences(in *FeaturePreferences, out *v1beta1.FeaturePreferences, s conversion.Scope) error { - return autoConvert_v1alpha1_FeaturePreferences_To_v1beta1_FeaturePreferences(in, out, s) -} - -func autoConvert_v1beta1_FirmwarePreferences_To_v1alpha1_FirmwarePreferences(in *v1beta1.FirmwarePreferences, out *FirmwarePreferences, s conversion.Scope) error { - out.PreferredUseBios = (*bool)(unsafe.Pointer(in.PreferredUseBios)) - out.PreferredUseBiosSerial = (*bool)(unsafe.Pointer(in.PreferredUseBiosSerial)) - out.PreferredUseEfi = (*bool)(unsafe.Pointer(in.PreferredUseEfi)) - out.PreferredUseSecureBoot = (*bool)(unsafe.Pointer(in.PreferredUseSecureBoot)) - return nil -} - -// Convert_v1beta1_FirmwarePreferences_To_v1alpha1_FirmwarePreferences is an autogenerated conversion function. -func Convert_v1beta1_FirmwarePreferences_To_v1alpha1_FirmwarePreferences(in *v1beta1.FirmwarePreferences, out *FirmwarePreferences, s conversion.Scope) error { - return autoConvert_v1beta1_FirmwarePreferences_To_v1alpha1_FirmwarePreferences(in, out, s) -} - -func autoConvert_v1alpha1_FirmwarePreferences_To_v1beta1_FirmwarePreferences(in *FirmwarePreferences, out *v1beta1.FirmwarePreferences, s conversion.Scope) error { - out.PreferredUseBios = (*bool)(unsafe.Pointer(in.PreferredUseBios)) - out.PreferredUseBiosSerial = (*bool)(unsafe.Pointer(in.PreferredUseBiosSerial)) - out.PreferredUseEfi = (*bool)(unsafe.Pointer(in.PreferredUseEfi)) - out.PreferredUseSecureBoot = (*bool)(unsafe.Pointer(in.PreferredUseSecureBoot)) - return nil -} - -// Convert_v1alpha1_FirmwarePreferences_To_v1beta1_FirmwarePreferences is an autogenerated conversion function. -func Convert_v1alpha1_FirmwarePreferences_To_v1beta1_FirmwarePreferences(in *FirmwarePreferences, out *v1beta1.FirmwarePreferences, s conversion.Scope) error { - return autoConvert_v1alpha1_FirmwarePreferences_To_v1beta1_FirmwarePreferences(in, out, s) -} - -func autoConvert_v1beta1_MachinePreferences_To_v1alpha1_MachinePreferences(in *v1beta1.MachinePreferences, out *MachinePreferences, s conversion.Scope) error { - out.PreferredMachineType = in.PreferredMachineType - return nil -} - -// Convert_v1beta1_MachinePreferences_To_v1alpha1_MachinePreferences is an autogenerated conversion function. -func Convert_v1beta1_MachinePreferences_To_v1alpha1_MachinePreferences(in *v1beta1.MachinePreferences, out *MachinePreferences, s conversion.Scope) error { - return autoConvert_v1beta1_MachinePreferences_To_v1alpha1_MachinePreferences(in, out, s) -} - -func autoConvert_v1alpha1_MachinePreferences_To_v1beta1_MachinePreferences(in *MachinePreferences, out *v1beta1.MachinePreferences, s conversion.Scope) error { - out.PreferredMachineType = in.PreferredMachineType - return nil -} - -// Convert_v1alpha1_MachinePreferences_To_v1beta1_MachinePreferences is an autogenerated conversion function. -func Convert_v1alpha1_MachinePreferences_To_v1beta1_MachinePreferences(in *MachinePreferences, out *v1beta1.MachinePreferences, s conversion.Scope) error { - return autoConvert_v1alpha1_MachinePreferences_To_v1beta1_MachinePreferences(in, out, s) -} - -func autoConvert_v1beta1_MemoryInstancetype_To_v1alpha1_MemoryInstancetype(in *v1beta1.MemoryInstancetype, out *MemoryInstancetype, s conversion.Scope) error { - out.Guest = in.Guest - out.Hugepages = (*corev1.Hugepages)(unsafe.Pointer(in.Hugepages)) - // WARNING: in.OvercommitPercent requires manual conversion: does not exist in peer-type - // WARNING: in.MaxGuest requires manual conversion: does not exist in peer-type - return nil -} - -func autoConvert_v1alpha1_MemoryInstancetype_To_v1beta1_MemoryInstancetype(in *MemoryInstancetype, out *v1beta1.MemoryInstancetype, s conversion.Scope) error { - out.Guest = in.Guest - out.Hugepages = (*corev1.Hugepages)(unsafe.Pointer(in.Hugepages)) - return nil -} - -// Convert_v1alpha1_MemoryInstancetype_To_v1beta1_MemoryInstancetype is an autogenerated conversion function. -func Convert_v1alpha1_MemoryInstancetype_To_v1beta1_MemoryInstancetype(in *MemoryInstancetype, out *v1beta1.MemoryInstancetype, s conversion.Scope) error { - return autoConvert_v1alpha1_MemoryInstancetype_To_v1beta1_MemoryInstancetype(in, out, s) -} - -func autoConvert_v1beta1_VirtualMachineClusterInstancetype_To_v1alpha1_VirtualMachineClusterInstancetype(in *v1beta1.VirtualMachineClusterInstancetype, out *VirtualMachineClusterInstancetype, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1beta1_VirtualMachineInstancetypeSpec_To_v1alpha1_VirtualMachineInstancetypeSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - return nil -} - -// Convert_v1beta1_VirtualMachineClusterInstancetype_To_v1alpha1_VirtualMachineClusterInstancetype is an autogenerated conversion function. -func Convert_v1beta1_VirtualMachineClusterInstancetype_To_v1alpha1_VirtualMachineClusterInstancetype(in *v1beta1.VirtualMachineClusterInstancetype, out *VirtualMachineClusterInstancetype, s conversion.Scope) error { - return autoConvert_v1beta1_VirtualMachineClusterInstancetype_To_v1alpha1_VirtualMachineClusterInstancetype(in, out, s) -} - -func autoConvert_v1alpha1_VirtualMachineClusterInstancetype_To_v1beta1_VirtualMachineClusterInstancetype(in *VirtualMachineClusterInstancetype, out *v1beta1.VirtualMachineClusterInstancetype, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha1_VirtualMachineInstancetypeSpec_To_v1beta1_VirtualMachineInstancetypeSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha1_VirtualMachineClusterInstancetype_To_v1beta1_VirtualMachineClusterInstancetype is an autogenerated conversion function. -func Convert_v1alpha1_VirtualMachineClusterInstancetype_To_v1beta1_VirtualMachineClusterInstancetype(in *VirtualMachineClusterInstancetype, out *v1beta1.VirtualMachineClusterInstancetype, s conversion.Scope) error { - return autoConvert_v1alpha1_VirtualMachineClusterInstancetype_To_v1beta1_VirtualMachineClusterInstancetype(in, out, s) -} - -func autoConvert_v1beta1_VirtualMachineClusterInstancetypeList_To_v1alpha1_VirtualMachineClusterInstancetypeList(in *v1beta1.VirtualMachineClusterInstancetypeList, out *VirtualMachineClusterInstancetypeList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]VirtualMachineClusterInstancetype, len(*in)) - for i := range *in { - if err := Convert_v1beta1_VirtualMachineClusterInstancetype_To_v1alpha1_VirtualMachineClusterInstancetype(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_v1beta1_VirtualMachineClusterInstancetypeList_To_v1alpha1_VirtualMachineClusterInstancetypeList is an autogenerated conversion function. -func Convert_v1beta1_VirtualMachineClusterInstancetypeList_To_v1alpha1_VirtualMachineClusterInstancetypeList(in *v1beta1.VirtualMachineClusterInstancetypeList, out *VirtualMachineClusterInstancetypeList, s conversion.Scope) error { - return autoConvert_v1beta1_VirtualMachineClusterInstancetypeList_To_v1alpha1_VirtualMachineClusterInstancetypeList(in, out, s) -} - -func autoConvert_v1alpha1_VirtualMachineClusterInstancetypeList_To_v1beta1_VirtualMachineClusterInstancetypeList(in *VirtualMachineClusterInstancetypeList, out *v1beta1.VirtualMachineClusterInstancetypeList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]v1beta1.VirtualMachineClusterInstancetype, len(*in)) - for i := range *in { - if err := Convert_v1alpha1_VirtualMachineClusterInstancetype_To_v1beta1_VirtualMachineClusterInstancetype(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_v1alpha1_VirtualMachineClusterInstancetypeList_To_v1beta1_VirtualMachineClusterInstancetypeList is an autogenerated conversion function. -func Convert_v1alpha1_VirtualMachineClusterInstancetypeList_To_v1beta1_VirtualMachineClusterInstancetypeList(in *VirtualMachineClusterInstancetypeList, out *v1beta1.VirtualMachineClusterInstancetypeList, s conversion.Scope) error { - return autoConvert_v1alpha1_VirtualMachineClusterInstancetypeList_To_v1beta1_VirtualMachineClusterInstancetypeList(in, out, s) -} - -func autoConvert_v1beta1_VirtualMachineClusterPreference_To_v1alpha1_VirtualMachineClusterPreference(in *v1beta1.VirtualMachineClusterPreference, out *VirtualMachineClusterPreference, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1beta1_VirtualMachinePreferenceSpec_To_v1alpha1_VirtualMachinePreferenceSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - return nil -} - -// Convert_v1beta1_VirtualMachineClusterPreference_To_v1alpha1_VirtualMachineClusterPreference is an autogenerated conversion function. -func Convert_v1beta1_VirtualMachineClusterPreference_To_v1alpha1_VirtualMachineClusterPreference(in *v1beta1.VirtualMachineClusterPreference, out *VirtualMachineClusterPreference, s conversion.Scope) error { - return autoConvert_v1beta1_VirtualMachineClusterPreference_To_v1alpha1_VirtualMachineClusterPreference(in, out, s) -} - -func autoConvert_v1alpha1_VirtualMachineClusterPreference_To_v1beta1_VirtualMachineClusterPreference(in *VirtualMachineClusterPreference, out *v1beta1.VirtualMachineClusterPreference, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha1_VirtualMachinePreferenceSpec_To_v1beta1_VirtualMachinePreferenceSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha1_VirtualMachineClusterPreference_To_v1beta1_VirtualMachineClusterPreference is an autogenerated conversion function. -func Convert_v1alpha1_VirtualMachineClusterPreference_To_v1beta1_VirtualMachineClusterPreference(in *VirtualMachineClusterPreference, out *v1beta1.VirtualMachineClusterPreference, s conversion.Scope) error { - return autoConvert_v1alpha1_VirtualMachineClusterPreference_To_v1beta1_VirtualMachineClusterPreference(in, out, s) -} - -func autoConvert_v1beta1_VirtualMachineClusterPreferenceList_To_v1alpha1_VirtualMachineClusterPreferenceList(in *v1beta1.VirtualMachineClusterPreferenceList, out *VirtualMachineClusterPreferenceList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]VirtualMachineClusterPreference, len(*in)) - for i := range *in { - if err := Convert_v1beta1_VirtualMachineClusterPreference_To_v1alpha1_VirtualMachineClusterPreference(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_v1beta1_VirtualMachineClusterPreferenceList_To_v1alpha1_VirtualMachineClusterPreferenceList is an autogenerated conversion function. -func Convert_v1beta1_VirtualMachineClusterPreferenceList_To_v1alpha1_VirtualMachineClusterPreferenceList(in *v1beta1.VirtualMachineClusterPreferenceList, out *VirtualMachineClusterPreferenceList, s conversion.Scope) error { - return autoConvert_v1beta1_VirtualMachineClusterPreferenceList_To_v1alpha1_VirtualMachineClusterPreferenceList(in, out, s) -} - -func autoConvert_v1alpha1_VirtualMachineClusterPreferenceList_To_v1beta1_VirtualMachineClusterPreferenceList(in *VirtualMachineClusterPreferenceList, out *v1beta1.VirtualMachineClusterPreferenceList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]v1beta1.VirtualMachineClusterPreference, len(*in)) - for i := range *in { - if err := Convert_v1alpha1_VirtualMachineClusterPreference_To_v1beta1_VirtualMachineClusterPreference(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_v1alpha1_VirtualMachineClusterPreferenceList_To_v1beta1_VirtualMachineClusterPreferenceList is an autogenerated conversion function. -func Convert_v1alpha1_VirtualMachineClusterPreferenceList_To_v1beta1_VirtualMachineClusterPreferenceList(in *VirtualMachineClusterPreferenceList, out *v1beta1.VirtualMachineClusterPreferenceList, s conversion.Scope) error { - return autoConvert_v1alpha1_VirtualMachineClusterPreferenceList_To_v1beta1_VirtualMachineClusterPreferenceList(in, out, s) -} - -func autoConvert_v1beta1_VirtualMachineInstancetype_To_v1alpha1_VirtualMachineInstancetype(in *v1beta1.VirtualMachineInstancetype, out *VirtualMachineInstancetype, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1beta1_VirtualMachineInstancetypeSpec_To_v1alpha1_VirtualMachineInstancetypeSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - return nil -} - -// Convert_v1beta1_VirtualMachineInstancetype_To_v1alpha1_VirtualMachineInstancetype is an autogenerated conversion function. -func Convert_v1beta1_VirtualMachineInstancetype_To_v1alpha1_VirtualMachineInstancetype(in *v1beta1.VirtualMachineInstancetype, out *VirtualMachineInstancetype, s conversion.Scope) error { - return autoConvert_v1beta1_VirtualMachineInstancetype_To_v1alpha1_VirtualMachineInstancetype(in, out, s) -} - -func autoConvert_v1alpha1_VirtualMachineInstancetype_To_v1beta1_VirtualMachineInstancetype(in *VirtualMachineInstancetype, out *v1beta1.VirtualMachineInstancetype, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha1_VirtualMachineInstancetypeSpec_To_v1beta1_VirtualMachineInstancetypeSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha1_VirtualMachineInstancetype_To_v1beta1_VirtualMachineInstancetype is an autogenerated conversion function. -func Convert_v1alpha1_VirtualMachineInstancetype_To_v1beta1_VirtualMachineInstancetype(in *VirtualMachineInstancetype, out *v1beta1.VirtualMachineInstancetype, s conversion.Scope) error { - return autoConvert_v1alpha1_VirtualMachineInstancetype_To_v1beta1_VirtualMachineInstancetype(in, out, s) -} - -func autoConvert_v1beta1_VirtualMachineInstancetypeList_To_v1alpha1_VirtualMachineInstancetypeList(in *v1beta1.VirtualMachineInstancetypeList, out *VirtualMachineInstancetypeList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]VirtualMachineInstancetype, len(*in)) - for i := range *in { - if err := Convert_v1beta1_VirtualMachineInstancetype_To_v1alpha1_VirtualMachineInstancetype(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_v1beta1_VirtualMachineInstancetypeList_To_v1alpha1_VirtualMachineInstancetypeList is an autogenerated conversion function. -func Convert_v1beta1_VirtualMachineInstancetypeList_To_v1alpha1_VirtualMachineInstancetypeList(in *v1beta1.VirtualMachineInstancetypeList, out *VirtualMachineInstancetypeList, s conversion.Scope) error { - return autoConvert_v1beta1_VirtualMachineInstancetypeList_To_v1alpha1_VirtualMachineInstancetypeList(in, out, s) -} - -func autoConvert_v1alpha1_VirtualMachineInstancetypeList_To_v1beta1_VirtualMachineInstancetypeList(in *VirtualMachineInstancetypeList, out *v1beta1.VirtualMachineInstancetypeList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]v1beta1.VirtualMachineInstancetype, len(*in)) - for i := range *in { - if err := Convert_v1alpha1_VirtualMachineInstancetype_To_v1beta1_VirtualMachineInstancetype(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_v1alpha1_VirtualMachineInstancetypeList_To_v1beta1_VirtualMachineInstancetypeList is an autogenerated conversion function. -func Convert_v1alpha1_VirtualMachineInstancetypeList_To_v1beta1_VirtualMachineInstancetypeList(in *VirtualMachineInstancetypeList, out *v1beta1.VirtualMachineInstancetypeList, s conversion.Scope) error { - return autoConvert_v1alpha1_VirtualMachineInstancetypeList_To_v1beta1_VirtualMachineInstancetypeList(in, out, s) -} - -func autoConvert_v1beta1_VirtualMachineInstancetypeSpec_To_v1alpha1_VirtualMachineInstancetypeSpec(in *v1beta1.VirtualMachineInstancetypeSpec, out *VirtualMachineInstancetypeSpec, s conversion.Scope) error { - // WARNING: in.NodeSelector requires manual conversion: does not exist in peer-type - // WARNING: in.SchedulerName requires manual conversion: does not exist in peer-type - if err := Convert_v1beta1_CPUInstancetype_To_v1alpha1_CPUInstancetype(&in.CPU, &out.CPU, s); err != nil { - return err - } - if err := Convert_v1beta1_MemoryInstancetype_To_v1alpha1_MemoryInstancetype(&in.Memory, &out.Memory, s); err != nil { - return err - } - out.GPUs = *(*[]corev1.GPU)(unsafe.Pointer(&in.GPUs)) - out.HostDevices = *(*[]corev1.HostDevice)(unsafe.Pointer(&in.HostDevices)) - out.IOThreadsPolicy = (*corev1.IOThreadsPolicy)(unsafe.Pointer(in.IOThreadsPolicy)) - out.LaunchSecurity = (*corev1.LaunchSecurity)(unsafe.Pointer(in.LaunchSecurity)) - // WARNING: in.Annotations requires manual conversion: does not exist in peer-type - return nil -} - -func autoConvert_v1alpha1_VirtualMachineInstancetypeSpec_To_v1beta1_VirtualMachineInstancetypeSpec(in *VirtualMachineInstancetypeSpec, out *v1beta1.VirtualMachineInstancetypeSpec, s conversion.Scope) error { - if err := Convert_v1alpha1_CPUInstancetype_To_v1beta1_CPUInstancetype(&in.CPU, &out.CPU, s); err != nil { - return err - } - if err := Convert_v1alpha1_MemoryInstancetype_To_v1beta1_MemoryInstancetype(&in.Memory, &out.Memory, s); err != nil { - return err - } - out.GPUs = *(*[]corev1.GPU)(unsafe.Pointer(&in.GPUs)) - out.HostDevices = *(*[]corev1.HostDevice)(unsafe.Pointer(&in.HostDevices)) - out.IOThreadsPolicy = (*corev1.IOThreadsPolicy)(unsafe.Pointer(in.IOThreadsPolicy)) - out.LaunchSecurity = (*corev1.LaunchSecurity)(unsafe.Pointer(in.LaunchSecurity)) - return nil -} - -// Convert_v1alpha1_VirtualMachineInstancetypeSpec_To_v1beta1_VirtualMachineInstancetypeSpec is an autogenerated conversion function. -func Convert_v1alpha1_VirtualMachineInstancetypeSpec_To_v1beta1_VirtualMachineInstancetypeSpec(in *VirtualMachineInstancetypeSpec, out *v1beta1.VirtualMachineInstancetypeSpec, s conversion.Scope) error { - return autoConvert_v1alpha1_VirtualMachineInstancetypeSpec_To_v1beta1_VirtualMachineInstancetypeSpec(in, out, s) -} - -func autoConvert_v1beta1_VirtualMachinePreference_To_v1alpha1_VirtualMachinePreference(in *v1beta1.VirtualMachinePreference, out *VirtualMachinePreference, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1beta1_VirtualMachinePreferenceSpec_To_v1alpha1_VirtualMachinePreferenceSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - return nil -} - -// Convert_v1beta1_VirtualMachinePreference_To_v1alpha1_VirtualMachinePreference is an autogenerated conversion function. -func Convert_v1beta1_VirtualMachinePreference_To_v1alpha1_VirtualMachinePreference(in *v1beta1.VirtualMachinePreference, out *VirtualMachinePreference, s conversion.Scope) error { - return autoConvert_v1beta1_VirtualMachinePreference_To_v1alpha1_VirtualMachinePreference(in, out, s) -} - -func autoConvert_v1alpha1_VirtualMachinePreference_To_v1beta1_VirtualMachinePreference(in *VirtualMachinePreference, out *v1beta1.VirtualMachinePreference, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha1_VirtualMachinePreferenceSpec_To_v1beta1_VirtualMachinePreferenceSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha1_VirtualMachinePreference_To_v1beta1_VirtualMachinePreference is an autogenerated conversion function. -func Convert_v1alpha1_VirtualMachinePreference_To_v1beta1_VirtualMachinePreference(in *VirtualMachinePreference, out *v1beta1.VirtualMachinePreference, s conversion.Scope) error { - return autoConvert_v1alpha1_VirtualMachinePreference_To_v1beta1_VirtualMachinePreference(in, out, s) -} - -func autoConvert_v1beta1_VirtualMachinePreferenceList_To_v1alpha1_VirtualMachinePreferenceList(in *v1beta1.VirtualMachinePreferenceList, out *VirtualMachinePreferenceList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]VirtualMachinePreference, len(*in)) - for i := range *in { - if err := Convert_v1beta1_VirtualMachinePreference_To_v1alpha1_VirtualMachinePreference(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_v1beta1_VirtualMachinePreferenceList_To_v1alpha1_VirtualMachinePreferenceList is an autogenerated conversion function. -func Convert_v1beta1_VirtualMachinePreferenceList_To_v1alpha1_VirtualMachinePreferenceList(in *v1beta1.VirtualMachinePreferenceList, out *VirtualMachinePreferenceList, s conversion.Scope) error { - return autoConvert_v1beta1_VirtualMachinePreferenceList_To_v1alpha1_VirtualMachinePreferenceList(in, out, s) -} - -func autoConvert_v1alpha1_VirtualMachinePreferenceList_To_v1beta1_VirtualMachinePreferenceList(in *VirtualMachinePreferenceList, out *v1beta1.VirtualMachinePreferenceList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]v1beta1.VirtualMachinePreference, len(*in)) - for i := range *in { - if err := Convert_v1alpha1_VirtualMachinePreference_To_v1beta1_VirtualMachinePreference(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_v1alpha1_VirtualMachinePreferenceList_To_v1beta1_VirtualMachinePreferenceList is an autogenerated conversion function. -func Convert_v1alpha1_VirtualMachinePreferenceList_To_v1beta1_VirtualMachinePreferenceList(in *VirtualMachinePreferenceList, out *v1beta1.VirtualMachinePreferenceList, s conversion.Scope) error { - return autoConvert_v1alpha1_VirtualMachinePreferenceList_To_v1beta1_VirtualMachinePreferenceList(in, out, s) -} - -func autoConvert_v1beta1_VirtualMachinePreferenceSpec_To_v1alpha1_VirtualMachinePreferenceSpec(in *v1beta1.VirtualMachinePreferenceSpec, out *VirtualMachinePreferenceSpec, s conversion.Scope) error { - out.Clock = (*ClockPreferences)(unsafe.Pointer(in.Clock)) - if in.CPU != nil { - in, out := &in.CPU, &out.CPU - *out = new(CPUPreferences) - if err := Convert_v1beta1_CPUPreferences_To_v1alpha1_CPUPreferences(*in, *out, s); err != nil { - return err - } - } else { - out.CPU = nil - } - if in.Devices != nil { - in, out := &in.Devices, &out.Devices - *out = new(DevicePreferences) - if err := Convert_v1beta1_DevicePreferences_To_v1alpha1_DevicePreferences(*in, *out, s); err != nil { - return err - } - } else { - out.Devices = nil - } - out.Features = (*FeaturePreferences)(unsafe.Pointer(in.Features)) - out.Firmware = (*FirmwarePreferences)(unsafe.Pointer(in.Firmware)) - out.Machine = (*MachinePreferences)(unsafe.Pointer(in.Machine)) - // WARNING: in.Volumes requires manual conversion: does not exist in peer-type - // WARNING: in.PreferredSubdomain requires manual conversion: does not exist in peer-type - // WARNING: in.PreferredTerminationGracePeriodSeconds requires manual conversion: does not exist in peer-type - // WARNING: in.Requirements requires manual conversion: does not exist in peer-type - // WARNING: in.Annotations requires manual conversion: does not exist in peer-type - // WARNING: in.PreferSpreadSocketToCoreRatio requires manual conversion: does not exist in peer-type - return nil -} - -func autoConvert_v1alpha1_VirtualMachinePreferenceSpec_To_v1beta1_VirtualMachinePreferenceSpec(in *VirtualMachinePreferenceSpec, out *v1beta1.VirtualMachinePreferenceSpec, s conversion.Scope) error { - out.Clock = (*v1beta1.ClockPreferences)(unsafe.Pointer(in.Clock)) - if in.CPU != nil { - in, out := &in.CPU, &out.CPU - *out = new(v1beta1.CPUPreferences) - if err := Convert_v1alpha1_CPUPreferences_To_v1beta1_CPUPreferences(*in, *out, s); err != nil { - return err - } - } else { - out.CPU = nil - } - if in.Devices != nil { - in, out := &in.Devices, &out.Devices - *out = new(v1beta1.DevicePreferences) - if err := Convert_v1alpha1_DevicePreferences_To_v1beta1_DevicePreferences(*in, *out, s); err != nil { - return err - } - } else { - out.Devices = nil - } - out.Features = (*v1beta1.FeaturePreferences)(unsafe.Pointer(in.Features)) - out.Firmware = (*v1beta1.FirmwarePreferences)(unsafe.Pointer(in.Firmware)) - out.Machine = (*v1beta1.MachinePreferences)(unsafe.Pointer(in.Machine)) - return nil -} - -// Convert_v1alpha1_VirtualMachinePreferenceSpec_To_v1beta1_VirtualMachinePreferenceSpec is an autogenerated conversion function. -func Convert_v1alpha1_VirtualMachinePreferenceSpec_To_v1beta1_VirtualMachinePreferenceSpec(in *VirtualMachinePreferenceSpec, out *v1beta1.VirtualMachinePreferenceSpec, s conversion.Scope) error { - return autoConvert_v1alpha1_VirtualMachinePreferenceSpec_To_v1beta1_VirtualMachinePreferenceSpec(in, out, s) -} diff --git a/vendor/kubevirt.io/api/instancetype/v1alpha1/deepcopy_generated.go b/vendor/kubevirt.io/api/instancetype/v1alpha1/deepcopy_generated.go deleted file mode 100644 index 3efc4afeb..000000000 --- a/vendor/kubevirt.io/api/instancetype/v1alpha1/deepcopy_generated.go +++ /dev/null @@ -1,669 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -Copyright 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 *CPUInstancetype) DeepCopyInto(out *CPUInstancetype) { - *out = *in - if in.NUMA != nil { - in, out := &in.NUMA, &out.NUMA - *out = new(v1.NUMA) - (*in).DeepCopyInto(*out) - } - if in.Realtime != nil { - in, out := &in.Realtime, &out.Realtime - *out = new(v1.Realtime) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CPUInstancetype. -func (in *CPUInstancetype) DeepCopy() *CPUInstancetype { - if in == nil { - return nil - } - out := new(CPUInstancetype) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CPUPreferences) DeepCopyInto(out *CPUPreferences) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CPUPreferences. -func (in *CPUPreferences) DeepCopy() *CPUPreferences { - if in == nil { - return nil - } - out := new(CPUPreferences) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClockPreferences) DeepCopyInto(out *ClockPreferences) { - *out = *in - if in.PreferredClockOffset != nil { - in, out := &in.PreferredClockOffset, &out.PreferredClockOffset - *out = new(v1.ClockOffset) - (*in).DeepCopyInto(*out) - } - if in.PreferredTimer != nil { - in, out := &in.PreferredTimer, &out.PreferredTimer - *out = new(v1.Timer) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClockPreferences. -func (in *ClockPreferences) DeepCopy() *ClockPreferences { - if in == nil { - return nil - } - out := new(ClockPreferences) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DevicePreferences) DeepCopyInto(out *DevicePreferences) { - *out = *in - if in.PreferredAutoattachGraphicsDevice != nil { - in, out := &in.PreferredAutoattachGraphicsDevice, &out.PreferredAutoattachGraphicsDevice - *out = new(bool) - **out = **in - } - if in.PreferredAutoattachMemBalloon != nil { - in, out := &in.PreferredAutoattachMemBalloon, &out.PreferredAutoattachMemBalloon - *out = new(bool) - **out = **in - } - if in.PreferredAutoattachPodInterface != nil { - in, out := &in.PreferredAutoattachPodInterface, &out.PreferredAutoattachPodInterface - *out = new(bool) - **out = **in - } - if in.PreferredAutoattachSerialConsole != nil { - in, out := &in.PreferredAutoattachSerialConsole, &out.PreferredAutoattachSerialConsole - *out = new(bool) - **out = **in - } - if in.PreferredAutoattachInputDevice != nil { - in, out := &in.PreferredAutoattachInputDevice, &out.PreferredAutoattachInputDevice - *out = new(bool) - **out = **in - } - if in.PreferredDisableHotplug != nil { - in, out := &in.PreferredDisableHotplug, &out.PreferredDisableHotplug - *out = new(bool) - **out = **in - } - if in.PreferredVirtualGPUOptions != nil { - in, out := &in.PreferredVirtualGPUOptions, &out.PreferredVirtualGPUOptions - *out = new(v1.VGPUOptions) - (*in).DeepCopyInto(*out) - } - if in.PreferredUseVirtioTransitional != nil { - in, out := &in.PreferredUseVirtioTransitional, &out.PreferredUseVirtioTransitional - *out = new(bool) - **out = **in - } - if in.PreferredDiskDedicatedIoThread != nil { - in, out := &in.PreferredDiskDedicatedIoThread, &out.PreferredDiskDedicatedIoThread - *out = new(bool) - **out = **in - } - if in.PreferredDiskBlockSize != nil { - in, out := &in.PreferredDiskBlockSize, &out.PreferredDiskBlockSize - *out = new(v1.BlockSize) - (*in).DeepCopyInto(*out) - } - if in.PreferredRng != nil { - in, out := &in.PreferredRng, &out.PreferredRng - *out = new(v1.Rng) - **out = **in - } - if in.PreferredBlockMultiQueue != nil { - in, out := &in.PreferredBlockMultiQueue, &out.PreferredBlockMultiQueue - *out = new(bool) - **out = **in - } - if in.PreferredNetworkInterfaceMultiQueue != nil { - in, out := &in.PreferredNetworkInterfaceMultiQueue, &out.PreferredNetworkInterfaceMultiQueue - *out = new(bool) - **out = **in - } - if in.PreferredTPM != nil { - in, out := &in.PreferredTPM, &out.PreferredTPM - *out = new(v1.TPMDevice) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevicePreferences. -func (in *DevicePreferences) DeepCopy() *DevicePreferences { - if in == nil { - return nil - } - out := new(DevicePreferences) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *FeaturePreferences) DeepCopyInto(out *FeaturePreferences) { - *out = *in - if in.PreferredAcpi != nil { - in, out := &in.PreferredAcpi, &out.PreferredAcpi - *out = new(v1.FeatureState) - (*in).DeepCopyInto(*out) - } - if in.PreferredApic != nil { - in, out := &in.PreferredApic, &out.PreferredApic - *out = new(v1.FeatureAPIC) - (*in).DeepCopyInto(*out) - } - if in.PreferredHyperv != nil { - in, out := &in.PreferredHyperv, &out.PreferredHyperv - *out = new(v1.FeatureHyperv) - (*in).DeepCopyInto(*out) - } - if in.PreferredKvm != nil { - in, out := &in.PreferredKvm, &out.PreferredKvm - *out = new(v1.FeatureKVM) - **out = **in - } - if in.PreferredPvspinlock != nil { - in, out := &in.PreferredPvspinlock, &out.PreferredPvspinlock - *out = new(v1.FeatureState) - (*in).DeepCopyInto(*out) - } - if in.PreferredSmm != nil { - in, out := &in.PreferredSmm, &out.PreferredSmm - *out = new(v1.FeatureState) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FeaturePreferences. -func (in *FeaturePreferences) DeepCopy() *FeaturePreferences { - if in == nil { - return nil - } - out := new(FeaturePreferences) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *FirmwarePreferences) DeepCopyInto(out *FirmwarePreferences) { - *out = *in - if in.PreferredUseBios != nil { - in, out := &in.PreferredUseBios, &out.PreferredUseBios - *out = new(bool) - **out = **in - } - if in.PreferredUseBiosSerial != nil { - in, out := &in.PreferredUseBiosSerial, &out.PreferredUseBiosSerial - *out = new(bool) - **out = **in - } - if in.PreferredUseEfi != nil { - in, out := &in.PreferredUseEfi, &out.PreferredUseEfi - *out = new(bool) - **out = **in - } - if in.PreferredUseSecureBoot != nil { - in, out := &in.PreferredUseSecureBoot, &out.PreferredUseSecureBoot - *out = new(bool) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FirmwarePreferences. -func (in *FirmwarePreferences) DeepCopy() *FirmwarePreferences { - if in == nil { - return nil - } - out := new(FirmwarePreferences) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *MachinePreferences) DeepCopyInto(out *MachinePreferences) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachinePreferences. -func (in *MachinePreferences) DeepCopy() *MachinePreferences { - if in == nil { - return nil - } - out := new(MachinePreferences) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *MemoryInstancetype) DeepCopyInto(out *MemoryInstancetype) { - *out = *in - out.Guest = in.Guest.DeepCopy() - if in.Hugepages != nil { - in, out := &in.Hugepages, &out.Hugepages - *out = new(v1.Hugepages) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MemoryInstancetype. -func (in *MemoryInstancetype) DeepCopy() *MemoryInstancetype { - if in == nil { - return nil - } - out := new(MemoryInstancetype) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VirtualMachineClusterInstancetype) DeepCopyInto(out *VirtualMachineClusterInstancetype) { - *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 VirtualMachineClusterInstancetype. -func (in *VirtualMachineClusterInstancetype) DeepCopy() *VirtualMachineClusterInstancetype { - if in == nil { - return nil - } - out := new(VirtualMachineClusterInstancetype) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *VirtualMachineClusterInstancetype) 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 *VirtualMachineClusterInstancetypeList) DeepCopyInto(out *VirtualMachineClusterInstancetypeList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]VirtualMachineClusterInstancetype, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineClusterInstancetypeList. -func (in *VirtualMachineClusterInstancetypeList) DeepCopy() *VirtualMachineClusterInstancetypeList { - if in == nil { - return nil - } - out := new(VirtualMachineClusterInstancetypeList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *VirtualMachineClusterInstancetypeList) 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 *VirtualMachineClusterPreference) DeepCopyInto(out *VirtualMachineClusterPreference) { - *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 VirtualMachineClusterPreference. -func (in *VirtualMachineClusterPreference) DeepCopy() *VirtualMachineClusterPreference { - if in == nil { - return nil - } - out := new(VirtualMachineClusterPreference) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *VirtualMachineClusterPreference) 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 *VirtualMachineClusterPreferenceList) DeepCopyInto(out *VirtualMachineClusterPreferenceList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]VirtualMachineClusterPreference, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineClusterPreferenceList. -func (in *VirtualMachineClusterPreferenceList) DeepCopy() *VirtualMachineClusterPreferenceList { - if in == nil { - return nil - } - out := new(VirtualMachineClusterPreferenceList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *VirtualMachineClusterPreferenceList) 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 *VirtualMachineInstancetype) DeepCopyInto(out *VirtualMachineInstancetype) { - *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 VirtualMachineInstancetype. -func (in *VirtualMachineInstancetype) DeepCopy() *VirtualMachineInstancetype { - if in == nil { - return nil - } - out := new(VirtualMachineInstancetype) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *VirtualMachineInstancetype) 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 *VirtualMachineInstancetypeList) DeepCopyInto(out *VirtualMachineInstancetypeList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]VirtualMachineInstancetype, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineInstancetypeList. -func (in *VirtualMachineInstancetypeList) DeepCopy() *VirtualMachineInstancetypeList { - if in == nil { - return nil - } - out := new(VirtualMachineInstancetypeList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *VirtualMachineInstancetypeList) 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 *VirtualMachineInstancetypeSpec) DeepCopyInto(out *VirtualMachineInstancetypeSpec) { - *out = *in - in.CPU.DeepCopyInto(&out.CPU) - in.Memory.DeepCopyInto(&out.Memory) - if in.GPUs != nil { - in, out := &in.GPUs, &out.GPUs - *out = make([]v1.GPU, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.HostDevices != nil { - in, out := &in.HostDevices, &out.HostDevices - *out = make([]v1.HostDevice, len(*in)) - copy(*out, *in) - } - if in.IOThreadsPolicy != nil { - in, out := &in.IOThreadsPolicy, &out.IOThreadsPolicy - *out = new(v1.IOThreadsPolicy) - **out = **in - } - if in.LaunchSecurity != nil { - in, out := &in.LaunchSecurity, &out.LaunchSecurity - *out = new(v1.LaunchSecurity) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineInstancetypeSpec. -func (in *VirtualMachineInstancetypeSpec) DeepCopy() *VirtualMachineInstancetypeSpec { - if in == nil { - return nil - } - out := new(VirtualMachineInstancetypeSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VirtualMachineInstancetypeSpecRevision) DeepCopyInto(out *VirtualMachineInstancetypeSpecRevision) { - *out = *in - if in.Spec != nil { - in, out := &in.Spec, &out.Spec - *out = make([]byte, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineInstancetypeSpecRevision. -func (in *VirtualMachineInstancetypeSpecRevision) DeepCopy() *VirtualMachineInstancetypeSpecRevision { - if in == nil { - return nil - } - out := new(VirtualMachineInstancetypeSpecRevision) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VirtualMachinePreference) DeepCopyInto(out *VirtualMachinePreference) { - *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 VirtualMachinePreference. -func (in *VirtualMachinePreference) DeepCopy() *VirtualMachinePreference { - if in == nil { - return nil - } - out := new(VirtualMachinePreference) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *VirtualMachinePreference) 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 *VirtualMachinePreferenceList) DeepCopyInto(out *VirtualMachinePreferenceList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]VirtualMachinePreference, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachinePreferenceList. -func (in *VirtualMachinePreferenceList) DeepCopy() *VirtualMachinePreferenceList { - if in == nil { - return nil - } - out := new(VirtualMachinePreferenceList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *VirtualMachinePreferenceList) 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 *VirtualMachinePreferenceSpec) DeepCopyInto(out *VirtualMachinePreferenceSpec) { - *out = *in - if in.Clock != nil { - in, out := &in.Clock, &out.Clock - *out = new(ClockPreferences) - (*in).DeepCopyInto(*out) - } - if in.CPU != nil { - in, out := &in.CPU, &out.CPU - *out = new(CPUPreferences) - **out = **in - } - if in.Devices != nil { - in, out := &in.Devices, &out.Devices - *out = new(DevicePreferences) - (*in).DeepCopyInto(*out) - } - if in.Features != nil { - in, out := &in.Features, &out.Features - *out = new(FeaturePreferences) - (*in).DeepCopyInto(*out) - } - if in.Firmware != nil { - in, out := &in.Firmware, &out.Firmware - *out = new(FirmwarePreferences) - (*in).DeepCopyInto(*out) - } - if in.Machine != nil { - in, out := &in.Machine, &out.Machine - *out = new(MachinePreferences) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachinePreferenceSpec. -func (in *VirtualMachinePreferenceSpec) DeepCopy() *VirtualMachinePreferenceSpec { - if in == nil { - return nil - } - out := new(VirtualMachinePreferenceSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VirtualMachinePreferenceSpecRevision) DeepCopyInto(out *VirtualMachinePreferenceSpecRevision) { - *out = *in - if in.Spec != nil { - in, out := &in.Spec, &out.Spec - *out = make([]byte, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachinePreferenceSpecRevision. -func (in *VirtualMachinePreferenceSpecRevision) DeepCopy() *VirtualMachinePreferenceSpecRevision { - if in == nil { - return nil - } - out := new(VirtualMachinePreferenceSpecRevision) - in.DeepCopyInto(out) - return out -} diff --git a/vendor/kubevirt.io/api/instancetype/v1alpha1/types.go b/vendor/kubevirt.io/api/instancetype/v1alpha1/types.go deleted file mode 100644 index 1f7a623d6..000000000 --- a/vendor/kubevirt.io/api/instancetype/v1alpha1/types.go +++ /dev/null @@ -1,488 +0,0 @@ -/* - * 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" - - "k8s.io/apimachinery/pkg/api/resource" -) - -// VirtualMachineInstancetype resource contains quantitative and resource related VirtualMachine configuration -// that can be used by multiple VirtualMachine resources. -// -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +genclient -type VirtualMachineInstancetype struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - // Required spec describing the instancetype - Spec VirtualMachineInstancetypeSpec `json:"spec"` -} - -// VirtualMachineInstancetypeList is a list of VirtualMachineInstancetype resources. -// -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -type VirtualMachineInstancetypeList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []VirtualMachineInstancetype `json:"items"` -} - -// VirtualMachineClusterInstancetype is a cluster scoped version of VirtualMachineInstancetype resource. -// -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +genclient -// +genclient:nonNamespaced -type VirtualMachineClusterInstancetype struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - // Required spec describing the instancetype - Spec VirtualMachineInstancetypeSpec `json:"spec"` -} - -// VirtualMachineClusterInstancetypeList is a list of VirtualMachineClusterInstancetype resources. -// -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -type VirtualMachineClusterInstancetypeList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []VirtualMachineClusterInstancetype `json:"items"` -} - -// VirtualMachineInstancetypeSpecRevision is used to capture a versioned copy of VirtualMachineInstancetypeSpec within a ControllerRevision -// -// **WARNING** This struct should never change ensuring it can always be unmarshaled from a ControllerRevision -type VirtualMachineInstancetypeSpecRevision struct { - - // The specific version of VirtualMachineInstancetypeSpec that is contained below - APIVersion string `json:"apiVersion" protobuf:"bytes,2,opt,name=apiVersion"` - - // This is a marshaled version of the VirtualMachineInstancetypeSpec - // +listType=atomic - Spec []byte `json:"spec"` -} - -// VirtualMachineInstancetypeSpec is a description of the VirtualMachineInstancetype or VirtualMachineClusterInstancetype. -// -// CPU and Memory are required attributes with both requiring that their Guest attribute is defined, ensuring a number of vCPUs and amount of RAM is always provided by each instancetype. -type VirtualMachineInstancetypeSpec struct { - - // Required CPU related attributes of the instancetype. - CPU CPUInstancetype `json:"cpu"` - - // Required Memory related attributes of the instancetype. - Memory MemoryInstancetype `json:"memory"` - - // Optionally defines any GPU devices associated with the instancetype. - // - // +optional - // +listType=atomic - GPUs []v1.GPU `json:"gpus,omitempty"` - - // Optionally defines any HostDevices associated with the instancetype. - // - // +optional - // +listType=atomic - HostDevices []v1.HostDevice `json:"hostDevices,omitempty"` - - // Optionally defines the IOThreadsPolicy to be used by the instancetype. - // - // +optional - IOThreadsPolicy *v1.IOThreadsPolicy `json:"ioThreadsPolicy,omitempty"` - - // Optionally defines the LaunchSecurity to be used by the instancetype. - // - // +optional - LaunchSecurity *v1.LaunchSecurity `json:"launchSecurity,omitempty"` -} - -// CPUInstancetype contains the CPU related configuration of a given VirtualMachineInstancetypeSpec. -// -// Guest is a required attribute and defines the number of vCPUs to be exposed to the guest by the instancetype. -type CPUInstancetype struct { - - // Required number of vCPUs to expose to the guest. - // - // The resulting CPU topology being derived from the optional PreferredCPUTopology attribute of CPUPreferences that itself defaults to PreferSockets. - Guest uint32 `json:"guest"` - - // 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. - // +optional - Model string `json:"model,omitempty"` - - // DedicatedCPUPlacement requests the scheduler to place the VirtualMachineInstance on a node - // with enough dedicated pCPUs and pin the vCPUs to it. - // +optional - DedicatedCPUPlacement bool `json:"dedicatedCPUPlacement,omitempty"` - - // NUMA allows specifying settings for the guest NUMA topology - // +optional - NUMA *v1.NUMA `json:"numa,omitempty"` - - // IsolateEmulatorThread requests one more dedicated pCPU to be allocated for the VMI to place - // the emulator thread on it. - // +optional - IsolateEmulatorThread bool `json:"isolateEmulatorThread,omitempty"` - - // Realtime instructs the virt-launcher to tune the VMI for lower latency, optional for real time workloads - // +optional - Realtime *v1.Realtime `json:"realtime,omitempty"` -} - -// MemoryInstancetype contains the Memory related configuration of a given VirtualMachineInstancetypeSpec. -// -// Guest is a required attribute and defines the amount of RAM to be exposed to the guest by the instancetype. -type MemoryInstancetype struct { - - // Required amount of memory which is visible inside the guest OS. - Guest resource.Quantity `json:"guest"` - - // Optionally enables the use of hugepages for the VirtualMachineInstance instead of regular memory. - // +optional - Hugepages *v1.Hugepages `json:"hugepages,omitempty"` -} - -// VirtualMachinePreference resource contains optional preferences related to the VirtualMachine. -// -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +genclient -type VirtualMachinePreference struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - // Required spec describing the preferences - Spec VirtualMachinePreferenceSpec `json:"spec"` -} - -// VirtualMachinePreferenceList is a list of VirtualMachinePreference resources. -// -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -type VirtualMachinePreferenceList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - // +listType=set - Items []VirtualMachinePreference `json:"items"` -} - -// VirtualMachineClusterPreference is a cluster scoped version of the VirtualMachinePreference resource. -// -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +genclient -// +genclient:nonNamespaced -type VirtualMachineClusterPreference struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - // Required spec describing the preferences - Spec VirtualMachinePreferenceSpec `json:"spec"` -} - -// VirtualMachineClusterPreferenceList is a list of VirtualMachineClusterPreference resources. -// -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -type VirtualMachineClusterPreferenceList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - // +listType=set - Items []VirtualMachineClusterPreference `json:"items"` -} - -// VirtualMachinePreferenceSpecRevision is used to capture a versioned copy of VirtualMachinePreferenceSpec within a ControllerRevision -// -// **WARNING** This struct should never change ensuring it can always be unmarshaled from a ControllerRevision -type VirtualMachinePreferenceSpecRevision struct { - // The specific version of VirtualMachinePreferenceSpec that is contained below - APIVersion string `json:"apiVersion" protobuf:"bytes,2,opt,name=apiVersion"` - - // This is a marshaled version of the VirtualMachinePreferenceSpec - // +listType=atomic - Spec []byte `json:"spec"` -} - -// VirtualMachinePreferenceSpec is a description of the VirtualMachinePreference or VirtualMachineClusterPreference. -type VirtualMachinePreferenceSpec struct { - - // Clock optionally defines preferences associated with the Clock attribute of a VirtualMachineInstance DomainSpec - // - //+optional - Clock *ClockPreferences `json:"clock,omitempty"` - - // CPU optionally defines preferences associated with the CPU attribute of a VirtualMachineInstance DomainSpec - // - //+optional - CPU *CPUPreferences `json:"cpu,omitempty"` - - // Devices optionally defines preferences associated with the Devices attribute of a VirtualMachineInstance DomainSpec - // - //+optional - Devices *DevicePreferences `json:"devices,omitempty"` - - // Features optionally defines preferences associated with the Features attribute of a VirtualMachineInstance DomainSpec - // - //+optional - Features *FeaturePreferences `json:"features,omitempty"` - - // Firmware optionally defines preferences associated with the Firmware attribute of a VirtualMachineInstance DomainSpec - // - //+optional - Firmware *FirmwarePreferences `json:"firmware,omitempty"` - - // Machine optionally defines preferences associated with the Machine attribute of a VirtualMachineInstance DomainSpec - // - //+optional - Machine *MachinePreferences `json:"machine,omitempty"` -} - -// PreferredCPUTopology defines a preferred CPU topology to be exposed to the guest -type PreferredCPUTopology string - -const ( - - // Prefer vCPUs to be exposed as cores to the guest - PreferCores PreferredCPUTopology = "preferCores" - - // Prefer vCPUs to be exposed as sockets to the guest, this is the default for the PreferredCPUTopology attribute of CPUPreferences. - PreferSockets PreferredCPUTopology = "preferSockets" - - // Prefer vCPUs to be exposed as threads to the guest - PreferThreads PreferredCPUTopology = "preferThreads" -) - -// CPUPreferences contains various optional CPU preferences. -type CPUPreferences struct { - - // PreferredCPUTopology optionally defines the preferred guest visible CPU topology, defaults to PreferSockets. - // - //+optional - PreferredCPUTopology PreferredCPUTopology `json:"preferredCPUTopology,omitempty"` -} - -// DevicePreferences contains various optional Device preferences. -type DevicePreferences struct { - - // PreferredAutoattachGraphicsDevice optionally defines the preferred value of AutoattachGraphicsDevice - // - // +optional - PreferredAutoattachGraphicsDevice *bool `json:"preferredAutoattachGraphicsDevice,omitempty"` - - // PreferredAutoattachMemBalloon optionally defines the preferred value of AutoattachMemBalloon - // - // +optional - PreferredAutoattachMemBalloon *bool `json:"preferredAutoattachMemBalloon,omitempty"` - - // PreferredAutoattachPodInterface optionally defines the preferred value of AutoattachPodInterface - // - // +optional - PreferredAutoattachPodInterface *bool `json:"preferredAutoattachPodInterface,omitempty"` - - // PreferredAutoattachSerialConsole optionally defines the preferred value of AutoattachSerialConsole - // - // +optional - PreferredAutoattachSerialConsole *bool `json:"preferredAutoattachSerialConsole,omitempty"` - - // PreferredAutoattachInputDevice optionally defines the preferred value of AutoattachInputDevice - // - // +optional - PreferredAutoattachInputDevice *bool `json:"preferredAutoattachInputDevice,omitempty"` - - // PreferredDisableHotplug optionally defines the preferred value of DisableHotplug - // - // +optional - PreferredDisableHotplug *bool `json:"preferredDisableHotplug,omitempty"` - - // PreferredVirtualGPUOptions optionally defines the preferred value of VirtualGPUOptions - // - // +optional - PreferredVirtualGPUOptions *v1.VGPUOptions `json:"preferredVirtualGPUOptions,omitempty"` - - // PreferredSoundModel optionally defines the preferred model for Sound devices. - // - // +optional - PreferredSoundModel string `json:"preferredSoundModel,omitempty"` - - // PreferredUseVirtioTransitional optionally defines the preferred value of UseVirtioTransitional - // - // +optional - PreferredUseVirtioTransitional *bool `json:"preferredUseVirtioTransitional,omitempty"` - - // PreferredInputBus optionally defines the preferred bus for Input devices. - // - // +optional - PreferredInputBus v1.InputBus `json:"preferredInputBus,omitempty"` - - // PreferredInputType optionally defines the preferred type for Input devices. - // - // +optional - PreferredInputType v1.InputType `json:"preferredInputType,omitempty"` - - // PreferredDiskBus optionally defines the preferred bus for Disk Disk devices. - // - // +optional - PreferredDiskBus v1.DiskBus `json:"preferredDiskBus,omitempty"` - - // PreferredLunBus optionally defines the preferred bus for Lun Disk devices. - // - // +optional - PreferredLunBus v1.DiskBus `json:"preferredLunBus,omitempty"` - - // PreferredCdromBus optionally defines the preferred bus for Cdrom Disk devices. - // - // +optional - PreferredCdromBus v1.DiskBus `json:"preferredCdromBus,omitempty"` - - // PreferredDedicatedIoThread optionally enables dedicated IO threads for Disk devices. - // - // +optional - PreferredDiskDedicatedIoThread *bool `json:"preferredDiskDedicatedIoThread,omitempty"` - - // PreferredCache optionally defines the DriverCache to be used by Disk devices. - // - // +optional - PreferredDiskCache v1.DriverCache `json:"preferredDiskCache,omitempty"` - - // PreferredIo optionally defines the QEMU disk IO mode to be used by Disk devices. - // - // +optional - PreferredDiskIO v1.DriverIO `json:"preferredDiskIO,omitempty"` - - // PreferredBlockSize optionally defines the block size of Disk devices. - // - // +optional - PreferredDiskBlockSize *v1.BlockSize `json:"preferredDiskBlockSize,omitempty"` - - // PreferredInterfaceModel optionally defines the preferred model to be used by Interface devices. - // - // +optional - PreferredInterfaceModel string `json:"preferredInterfaceModel,omitempty"` - - // PreferredRng optionally defines the preferred rng device to be used. - // - // +optional - PreferredRng *v1.Rng `json:"preferredRng,omitempty"` - - // PreferredBlockMultiQueue optionally enables the vhost multiqueue feature for virtio disks. - // - // +optional - PreferredBlockMultiQueue *bool `json:"preferredBlockMultiQueue,omitempty"` - - // PreferredNetworkInterfaceMultiQueue optionally enables the vhost multiqueue feature for virtio interfaces. - // - // +optional - PreferredNetworkInterfaceMultiQueue *bool `json:"preferredNetworkInterfaceMultiQueue,omitempty"` - - // PreferredTPM optionally defines the preferred TPM device to be used. - // - // +optional - PreferredTPM *v1.TPMDevice `json:"preferredTPM,omitempty"` -} - -// FeaturePreferences contains various optional defaults for Features. -type FeaturePreferences struct { - - // PreferredAcpi optionally enables the ACPI feature - // - // +optional - PreferredAcpi *v1.FeatureState `json:"preferredAcpi,omitempty"` - - // PreferredApic optionally enables and configures the APIC feature - // - // +optional - PreferredApic *v1.FeatureAPIC `json:"preferredApic,omitempty"` - - // PreferredHyperv optionally enables and configures HyperV features - // - // +optional - PreferredHyperv *v1.FeatureHyperv `json:"preferredHyperv,omitempty"` - - // PreferredKvm optionally enables and configures KVM features - // - // +optional - PreferredKvm *v1.FeatureKVM `json:"preferredKvm,omitempty"` - - // PreferredPvspinlock optionally enables the Pvspinlock feature - // - // +optional - PreferredPvspinlock *v1.FeatureState `json:"preferredPvspinlock,omitempty"` - - // PreferredSmm optionally enables the SMM feature - // - // +optional - PreferredSmm *v1.FeatureState `json:"preferredSmm,omitempty"` -} - -// FirmwarePreferences contains various optional defaults for Firmware. -type FirmwarePreferences struct { - - // PreferredUseBios optionally enables BIOS - // - // +optional - PreferredUseBios *bool `json:"preferredUseBios,omitempty"` - - // PreferredUseBiosSerial optionally transmitts BIOS output over the serial. - // - // Requires PreferredUseBios to be enabled. - // - // +optional - PreferredUseBiosSerial *bool `json:"preferredUseBiosSerial,omitempty"` - - // PreferredUseEfi optionally enables EFI - // - // +optional - PreferredUseEfi *bool `json:"preferredUseEfi,omitempty"` - - // PreferredUseSecureBoot optionally enables SecureBoot and the OVMF roms will be swapped for SecureBoot-enabled ones. - // - // Requires PreferredUseEfi and PreferredSmm to be enabled. - // - // +optional - PreferredUseSecureBoot *bool `json:"preferredUseSecureBoot,omitempty"` -} - -// MachinePreferences contains various optional defaults for Machine. -type MachinePreferences struct { - - // PreferredMachineType optionally defines the preferred machine type to use. - // - // +optional - PreferredMachineType string `json:"preferredMachineType,omitempty"` -} - -// ClockPreferences contains various optional defaults for Clock. -type ClockPreferences struct { - - // ClockOffset allows specifying the UTC offset or the timezone of the guest clock. - // - // +optional - PreferredClockOffset *v1.ClockOffset `json:"preferredClockOffset,omitempty"` - - // Timer specifies whih timers are attached to the vmi. - // - // +optional - PreferredTimer *v1.Timer `json:"preferredTimer,omitempty"` -} diff --git a/vendor/kubevirt.io/api/instancetype/v1alpha1/types_swagger_generated.go b/vendor/kubevirt.io/api/instancetype/v1alpha1/types_swagger_generated.go deleted file mode 100644 index 46ad0a319..000000000 --- a/vendor/kubevirt.io/api/instancetype/v1alpha1/types_swagger_generated.go +++ /dev/null @@ -1,190 +0,0 @@ -// Code generated by swagger-doc. DO NOT EDIT. - -package v1alpha1 - -func (VirtualMachineInstancetype) SwaggerDoc() map[string]string { - return map[string]string{ - "": "VirtualMachineInstancetype resource contains quantitative and resource related VirtualMachine configuration\nthat can be used by multiple VirtualMachine resources.\n\n+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object\n+genclient", - "spec": "Required spec describing the instancetype", - } -} - -func (VirtualMachineInstancetypeList) SwaggerDoc() map[string]string { - return map[string]string{ - "": "VirtualMachineInstancetypeList is a list of VirtualMachineInstancetype resources.\n\n+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object", - } -} - -func (VirtualMachineClusterInstancetype) SwaggerDoc() map[string]string { - return map[string]string{ - "": "VirtualMachineClusterInstancetype is a cluster scoped version of VirtualMachineInstancetype resource.\n\n+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object\n+genclient\n+genclient:nonNamespaced", - "spec": "Required spec describing the instancetype", - } -} - -func (VirtualMachineClusterInstancetypeList) SwaggerDoc() map[string]string { - return map[string]string{ - "": "VirtualMachineClusterInstancetypeList is a list of VirtualMachineClusterInstancetype resources.\n\n+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object", - } -} - -func (VirtualMachineInstancetypeSpecRevision) SwaggerDoc() map[string]string { - return map[string]string{ - "": "VirtualMachineInstancetypeSpecRevision is used to capture a versioned copy of VirtualMachineInstancetypeSpec within a ControllerRevision\n\n**WARNING** This struct should never change ensuring it can always be unmarshaled from a ControllerRevision", - "apiVersion": "The specific version of VirtualMachineInstancetypeSpec that is contained below", - "spec": "This is a marshaled version of the VirtualMachineInstancetypeSpec\n+listType=atomic", - } -} - -func (VirtualMachineInstancetypeSpec) SwaggerDoc() map[string]string { - return map[string]string{ - "": "VirtualMachineInstancetypeSpec is a description of the VirtualMachineInstancetype or VirtualMachineClusterInstancetype.\n\nCPU and Memory are required attributes with both requiring that their Guest attribute is defined, ensuring a number of vCPUs and amount of RAM is always provided by each instancetype.", - "cpu": "Required CPU related attributes of the instancetype.", - "memory": "Required Memory related attributes of the instancetype.", - "gpus": "Optionally defines any GPU devices associated with the instancetype.\n\n+optional\n+listType=atomic", - "hostDevices": "Optionally defines any HostDevices associated with the instancetype.\n\n+optional\n+listType=atomic", - "ioThreadsPolicy": "Optionally defines the IOThreadsPolicy to be used by the instancetype.\n\n+optional", - "launchSecurity": "Optionally defines the LaunchSecurity to be used by the instancetype.\n\n+optional", - } -} - -func (CPUInstancetype) SwaggerDoc() map[string]string { - return map[string]string{ - "": "CPUInstancetype contains the CPU related configuration of a given VirtualMachineInstancetypeSpec.\n\nGuest is a required attribute and defines the number of vCPUs to be exposed to the guest by the instancetype.", - "guest": "Required number of vCPUs to expose to the guest.\n\nThe resulting CPU topology being derived from the optional PreferredCPUTopology attribute of CPUPreferences that itself defaults to PreferSockets.", - "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", - "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 (MemoryInstancetype) SwaggerDoc() map[string]string { - return map[string]string{ - "": "MemoryInstancetype contains the Memory related configuration of a given VirtualMachineInstancetypeSpec.\n\nGuest is a required attribute and defines the amount of RAM to be exposed to the guest by the instancetype.", - "guest": "Required amount of memory which is visible inside the guest OS.", - "hugepages": "Optionally enables the use of hugepages for the VirtualMachineInstance instead of regular memory.\n+optional", - } -} - -func (VirtualMachinePreference) SwaggerDoc() map[string]string { - return map[string]string{ - "": "VirtualMachinePreference resource contains optional preferences related to the VirtualMachine.\n\n+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object\n+genclient", - "spec": "Required spec describing the preferences", - } -} - -func (VirtualMachinePreferenceList) SwaggerDoc() map[string]string { - return map[string]string{ - "": "VirtualMachinePreferenceList is a list of VirtualMachinePreference resources.\n\n+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object", - "items": "+listType=set", - } -} - -func (VirtualMachineClusterPreference) SwaggerDoc() map[string]string { - return map[string]string{ - "": "VirtualMachineClusterPreference is a cluster scoped version of the VirtualMachinePreference resource.\n\n+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object\n+genclient\n+genclient:nonNamespaced", - "spec": "Required spec describing the preferences", - } -} - -func (VirtualMachineClusterPreferenceList) SwaggerDoc() map[string]string { - return map[string]string{ - "": "VirtualMachineClusterPreferenceList is a list of VirtualMachineClusterPreference resources.\n\n+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object", - "items": "+listType=set", - } -} - -func (VirtualMachinePreferenceSpecRevision) SwaggerDoc() map[string]string { - return map[string]string{ - "": "VirtualMachinePreferenceSpecRevision is used to capture a versioned copy of VirtualMachinePreferenceSpec within a ControllerRevision\n\n**WARNING** This struct should never change ensuring it can always be unmarshaled from a ControllerRevision", - "apiVersion": "The specific version of VirtualMachinePreferenceSpec that is contained below", - "spec": "This is a marshaled version of the VirtualMachinePreferenceSpec\n+listType=atomic", - } -} - -func (VirtualMachinePreferenceSpec) SwaggerDoc() map[string]string { - return map[string]string{ - "": "VirtualMachinePreferenceSpec is a description of the VirtualMachinePreference or VirtualMachineClusterPreference.", - "clock": "Clock optionally defines preferences associated with the Clock attribute of a VirtualMachineInstance DomainSpec\n\n+optional", - "cpu": "CPU optionally defines preferences associated with the CPU attribute of a VirtualMachineInstance DomainSpec\n\n+optional", - "devices": "Devices optionally defines preferences associated with the Devices attribute of a VirtualMachineInstance DomainSpec\n\n+optional", - "features": "Features optionally defines preferences associated with the Features attribute of a VirtualMachineInstance DomainSpec\n\n+optional", - "firmware": "Firmware optionally defines preferences associated with the Firmware attribute of a VirtualMachineInstance DomainSpec\n\n+optional", - "machine": "Machine optionally defines preferences associated with the Machine attribute of a VirtualMachineInstance DomainSpec\n\n+optional", - } -} - -func (CPUPreferences) SwaggerDoc() map[string]string { - return map[string]string{ - "": "CPUPreferences contains various optional CPU preferences.", - "preferredCPUTopology": "PreferredCPUTopology optionally defines the preferred guest visible CPU topology, defaults to PreferSockets.\n\n+optional", - } -} - -func (DevicePreferences) SwaggerDoc() map[string]string { - return map[string]string{ - "": "DevicePreferences contains various optional Device preferences.", - "preferredAutoattachGraphicsDevice": "PreferredAutoattachGraphicsDevice optionally defines the preferred value of AutoattachGraphicsDevice\n\n+optional", - "preferredAutoattachMemBalloon": "PreferredAutoattachMemBalloon optionally defines the preferred value of AutoattachMemBalloon\n\n+optional", - "preferredAutoattachPodInterface": "PreferredAutoattachPodInterface optionally defines the preferred value of AutoattachPodInterface\n\n+optional", - "preferredAutoattachSerialConsole": "PreferredAutoattachSerialConsole optionally defines the preferred value of AutoattachSerialConsole\n\n+optional", - "preferredAutoattachInputDevice": "PreferredAutoattachInputDevice optionally defines the preferred value of AutoattachInputDevice\n\n+optional", - "preferredDisableHotplug": "PreferredDisableHotplug optionally defines the preferred value of DisableHotplug\n\n+optional", - "preferredVirtualGPUOptions": "PreferredVirtualGPUOptions optionally defines the preferred value of VirtualGPUOptions\n\n+optional", - "preferredSoundModel": "PreferredSoundModel optionally defines the preferred model for Sound devices.\n\n+optional", - "preferredUseVirtioTransitional": "PreferredUseVirtioTransitional optionally defines the preferred value of UseVirtioTransitional\n\n+optional", - "preferredInputBus": "PreferredInputBus optionally defines the preferred bus for Input devices.\n\n+optional", - "preferredInputType": "PreferredInputType optionally defines the preferred type for Input devices.\n\n+optional", - "preferredDiskBus": "PreferredDiskBus optionally defines the preferred bus for Disk Disk devices.\n\n+optional", - "preferredLunBus": "PreferredLunBus optionally defines the preferred bus for Lun Disk devices.\n\n+optional", - "preferredCdromBus": "PreferredCdromBus optionally defines the preferred bus for Cdrom Disk devices.\n\n+optional", - "preferredDiskDedicatedIoThread": "PreferredDedicatedIoThread optionally enables dedicated IO threads for Disk devices.\n\n+optional", - "preferredDiskCache": "PreferredCache optionally defines the DriverCache to be used by Disk devices.\n\n+optional", - "preferredDiskIO": "PreferredIo optionally defines the QEMU disk IO mode to be used by Disk devices.\n\n+optional", - "preferredDiskBlockSize": "PreferredBlockSize optionally defines the block size of Disk devices.\n\n+optional", - "preferredInterfaceModel": "PreferredInterfaceModel optionally defines the preferred model to be used by Interface devices.\n\n+optional", - "preferredRng": "PreferredRng optionally defines the preferred rng device to be used.\n\n+optional", - "preferredBlockMultiQueue": "PreferredBlockMultiQueue optionally enables the vhost multiqueue feature for virtio disks.\n\n+optional", - "preferredNetworkInterfaceMultiQueue": "PreferredNetworkInterfaceMultiQueue optionally enables the vhost multiqueue feature for virtio interfaces.\n\n+optional", - "preferredTPM": "PreferredTPM optionally defines the preferred TPM device to be used.\n\n+optional", - } -} - -func (FeaturePreferences) SwaggerDoc() map[string]string { - return map[string]string{ - "": "FeaturePreferences contains various optional defaults for Features.", - "preferredAcpi": "PreferredAcpi optionally enables the ACPI feature\n\n+optional", - "preferredApic": "PreferredApic optionally enables and configures the APIC feature\n\n+optional", - "preferredHyperv": "PreferredHyperv optionally enables and configures HyperV features\n\n+optional", - "preferredKvm": "PreferredKvm optionally enables and configures KVM features\n\n+optional", - "preferredPvspinlock": "PreferredPvspinlock optionally enables the Pvspinlock feature\n\n+optional", - "preferredSmm": "PreferredSmm optionally enables the SMM feature\n\n+optional", - } -} - -func (FirmwarePreferences) SwaggerDoc() map[string]string { - return map[string]string{ - "": "FirmwarePreferences contains various optional defaults for Firmware.", - "preferredUseBios": "PreferredUseBios optionally enables BIOS\n\n+optional", - "preferredUseBiosSerial": "PreferredUseBiosSerial optionally transmitts BIOS output over the serial.\n\nRequires PreferredUseBios to be enabled.\n\n+optional", - "preferredUseEfi": "PreferredUseEfi optionally enables EFI\n\n+optional", - "preferredUseSecureBoot": "PreferredUseSecureBoot optionally enables SecureBoot and the OVMF roms will be swapped for SecureBoot-enabled ones.\n\nRequires PreferredUseEfi and PreferredSmm to be enabled.\n\n+optional", - } -} - -func (MachinePreferences) SwaggerDoc() map[string]string { - return map[string]string{ - "": "MachinePreferences contains various optional defaults for Machine.", - "preferredMachineType": "PreferredMachineType optionally defines the preferred machine type to use.\n\n+optional", - } -} - -func (ClockPreferences) SwaggerDoc() map[string]string { - return map[string]string{ - "": "ClockPreferences contains various optional defaults for Clock.", - "preferredClockOffset": "ClockOffset allows specifying the UTC offset or the timezone of the guest clock.\n\n+optional", - "preferredTimer": "Timer specifies whih timers are attached to the vmi.\n\n+optional", - } -} diff --git a/vendor/kubevirt.io/api/instancetype/v1alpha2/conversion.go b/vendor/kubevirt.io/api/instancetype/v1alpha2/conversion.go deleted file mode 100644 index eeb179f77..000000000 --- a/vendor/kubevirt.io/api/instancetype/v1alpha2/conversion.go +++ /dev/null @@ -1,73 +0,0 @@ -/* - * 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 2023 Red Hat, Inc. - * - */ - -package v1alpha2 - -import ( - conversion "k8s.io/apimachinery/pkg/conversion" - v1beta1 "kubevirt.io/api/instancetype/v1beta1" -) - -// Manually defined function to convert from pointer to value -func Convert_v1beta1_CPUPreferences_To_v1alpha2_CPUPreferences(in *v1beta1.CPUPreferences, out *CPUPreferences, s conversion.Scope) error { - if in.PreferredCPUTopology != nil { - out.PreferredCPUTopology = (PreferredCPUTopology)(*in.PreferredCPUTopology) - } - - return autoConvert_v1beta1_CPUPreferences_To_v1alpha2_CPUPreferences(in, out, s) -} - -// Manually defined function to convert from value to pointer -func Convert_v1alpha2_CPUPreferences_To_v1beta1_CPUPreferences(in *CPUPreferences, out *v1beta1.CPUPreferences, s conversion.Scope) error { - if in.PreferredCPUTopology != "" { - out.PreferredCPUTopology = (*v1beta1.PreferredCPUTopology)(&in.PreferredCPUTopology) - } - - return autoConvert_v1alpha2_CPUPreferences_To_v1beta1_CPUPreferences(in, out, s) -} - -/* - * The following functions are manually defined to workaround conversion-gen - * warnings about attributes in newer versions not being present in older - * versions of the API. - * - * No custom code should be needed in such cases with each attribute - * automatically being documented in generated comments within the used - * autoConvert funcs. - */ - -func Convert_v1beta1_VirtualMachinePreferenceSpec_To_v1alpha2_VirtualMachinePreferenceSpec(in *v1beta1.VirtualMachinePreferenceSpec, out *VirtualMachinePreferenceSpec, s conversion.Scope) error { - return autoConvert_v1beta1_VirtualMachinePreferenceSpec_To_v1alpha2_VirtualMachinePreferenceSpec(in, out, s) -} - -func Convert_v1beta1_DevicePreferences_To_v1alpha2_DevicePreferences(in *v1beta1.DevicePreferences, out *DevicePreferences, s conversion.Scope) error { - return autoConvert_v1beta1_DevicePreferences_To_v1alpha2_DevicePreferences(in, out, s) -} - -func Convert_v1beta1_MemoryInstancetype_To_v1alpha2_MemoryInstancetype(in *v1beta1.MemoryInstancetype, out *MemoryInstancetype, s conversion.Scope) error { - return autoConvert_v1beta1_MemoryInstancetype_To_v1alpha2_MemoryInstancetype(in, out, s) -} - -func Convert_v1beta1_VirtualMachineInstancetypeSpec_To_v1alpha2_VirtualMachineInstancetypeSpec(in *v1beta1.VirtualMachineInstancetypeSpec, out *VirtualMachineInstancetypeSpec, s conversion.Scope) error { - return autoConvert_v1beta1_VirtualMachineInstancetypeSpec_To_v1alpha2_VirtualMachineInstancetypeSpec(in, out, s) -} - -func Convert_v1beta1_CPUInstancetype_To_v1alpha2_CPUInstancetype(in *v1beta1.CPUInstancetype, out *CPUInstancetype, s conversion.Scope) error { - return autoConvert_v1beta1_CPUInstancetype_To_v1alpha2_CPUInstancetype(in, out, s) -} diff --git a/vendor/kubevirt.io/api/instancetype/v1alpha2/conversion_generated.go b/vendor/kubevirt.io/api/instancetype/v1alpha2/conversion_generated.go deleted file mode 100644 index 59a90f349..000000000 --- a/vendor/kubevirt.io/api/instancetype/v1alpha2/conversion_generated.go +++ /dev/null @@ -1,851 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -Copyright 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 conversion-gen. DO NOT EDIT. - -package v1alpha2 - -import ( - unsafe "unsafe" - - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - conversion "k8s.io/apimachinery/pkg/conversion" - runtime "k8s.io/apimachinery/pkg/runtime" - corev1 "kubevirt.io/api/core/v1" - v1beta1 "kubevirt.io/api/instancetype/v1beta1" -) - -func init() { - localSchemeBuilder.Register(RegisterConversions) -} - -// RegisterConversions adds conversion functions to the given scheme. -// Public to allow building arbitrary schemes. -func RegisterConversions(s *runtime.Scheme) error { - if err := s.AddGeneratedConversionFunc((*CPUInstancetype)(nil), (*v1beta1.CPUInstancetype)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_CPUInstancetype_To_v1beta1_CPUInstancetype(a.(*CPUInstancetype), b.(*v1beta1.CPUInstancetype), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.ClockPreferences)(nil), (*ClockPreferences)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_ClockPreferences_To_v1alpha2_ClockPreferences(a.(*v1beta1.ClockPreferences), b.(*ClockPreferences), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ClockPreferences)(nil), (*v1beta1.ClockPreferences)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_ClockPreferences_To_v1beta1_ClockPreferences(a.(*ClockPreferences), b.(*v1beta1.ClockPreferences), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*DevicePreferences)(nil), (*v1beta1.DevicePreferences)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_DevicePreferences_To_v1beta1_DevicePreferences(a.(*DevicePreferences), b.(*v1beta1.DevicePreferences), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.FeaturePreferences)(nil), (*FeaturePreferences)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_FeaturePreferences_To_v1alpha2_FeaturePreferences(a.(*v1beta1.FeaturePreferences), b.(*FeaturePreferences), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*FeaturePreferences)(nil), (*v1beta1.FeaturePreferences)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_FeaturePreferences_To_v1beta1_FeaturePreferences(a.(*FeaturePreferences), b.(*v1beta1.FeaturePreferences), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.FirmwarePreferences)(nil), (*FirmwarePreferences)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_FirmwarePreferences_To_v1alpha2_FirmwarePreferences(a.(*v1beta1.FirmwarePreferences), b.(*FirmwarePreferences), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*FirmwarePreferences)(nil), (*v1beta1.FirmwarePreferences)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_FirmwarePreferences_To_v1beta1_FirmwarePreferences(a.(*FirmwarePreferences), b.(*v1beta1.FirmwarePreferences), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.MachinePreferences)(nil), (*MachinePreferences)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_MachinePreferences_To_v1alpha2_MachinePreferences(a.(*v1beta1.MachinePreferences), b.(*MachinePreferences), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*MachinePreferences)(nil), (*v1beta1.MachinePreferences)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_MachinePreferences_To_v1beta1_MachinePreferences(a.(*MachinePreferences), b.(*v1beta1.MachinePreferences), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*MemoryInstancetype)(nil), (*v1beta1.MemoryInstancetype)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_MemoryInstancetype_To_v1beta1_MemoryInstancetype(a.(*MemoryInstancetype), b.(*v1beta1.MemoryInstancetype), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.VirtualMachineClusterInstancetype)(nil), (*VirtualMachineClusterInstancetype)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_VirtualMachineClusterInstancetype_To_v1alpha2_VirtualMachineClusterInstancetype(a.(*v1beta1.VirtualMachineClusterInstancetype), b.(*VirtualMachineClusterInstancetype), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*VirtualMachineClusterInstancetype)(nil), (*v1beta1.VirtualMachineClusterInstancetype)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_VirtualMachineClusterInstancetype_To_v1beta1_VirtualMachineClusterInstancetype(a.(*VirtualMachineClusterInstancetype), b.(*v1beta1.VirtualMachineClusterInstancetype), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.VirtualMachineClusterInstancetypeList)(nil), (*VirtualMachineClusterInstancetypeList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_VirtualMachineClusterInstancetypeList_To_v1alpha2_VirtualMachineClusterInstancetypeList(a.(*v1beta1.VirtualMachineClusterInstancetypeList), b.(*VirtualMachineClusterInstancetypeList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*VirtualMachineClusterInstancetypeList)(nil), (*v1beta1.VirtualMachineClusterInstancetypeList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_VirtualMachineClusterInstancetypeList_To_v1beta1_VirtualMachineClusterInstancetypeList(a.(*VirtualMachineClusterInstancetypeList), b.(*v1beta1.VirtualMachineClusterInstancetypeList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.VirtualMachineClusterPreference)(nil), (*VirtualMachineClusterPreference)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_VirtualMachineClusterPreference_To_v1alpha2_VirtualMachineClusterPreference(a.(*v1beta1.VirtualMachineClusterPreference), b.(*VirtualMachineClusterPreference), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*VirtualMachineClusterPreference)(nil), (*v1beta1.VirtualMachineClusterPreference)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_VirtualMachineClusterPreference_To_v1beta1_VirtualMachineClusterPreference(a.(*VirtualMachineClusterPreference), b.(*v1beta1.VirtualMachineClusterPreference), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.VirtualMachineClusterPreferenceList)(nil), (*VirtualMachineClusterPreferenceList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_VirtualMachineClusterPreferenceList_To_v1alpha2_VirtualMachineClusterPreferenceList(a.(*v1beta1.VirtualMachineClusterPreferenceList), b.(*VirtualMachineClusterPreferenceList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*VirtualMachineClusterPreferenceList)(nil), (*v1beta1.VirtualMachineClusterPreferenceList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_VirtualMachineClusterPreferenceList_To_v1beta1_VirtualMachineClusterPreferenceList(a.(*VirtualMachineClusterPreferenceList), b.(*v1beta1.VirtualMachineClusterPreferenceList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.VirtualMachineInstancetype)(nil), (*VirtualMachineInstancetype)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_VirtualMachineInstancetype_To_v1alpha2_VirtualMachineInstancetype(a.(*v1beta1.VirtualMachineInstancetype), b.(*VirtualMachineInstancetype), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*VirtualMachineInstancetype)(nil), (*v1beta1.VirtualMachineInstancetype)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_VirtualMachineInstancetype_To_v1beta1_VirtualMachineInstancetype(a.(*VirtualMachineInstancetype), b.(*v1beta1.VirtualMachineInstancetype), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.VirtualMachineInstancetypeList)(nil), (*VirtualMachineInstancetypeList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_VirtualMachineInstancetypeList_To_v1alpha2_VirtualMachineInstancetypeList(a.(*v1beta1.VirtualMachineInstancetypeList), b.(*VirtualMachineInstancetypeList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*VirtualMachineInstancetypeList)(nil), (*v1beta1.VirtualMachineInstancetypeList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_VirtualMachineInstancetypeList_To_v1beta1_VirtualMachineInstancetypeList(a.(*VirtualMachineInstancetypeList), b.(*v1beta1.VirtualMachineInstancetypeList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*VirtualMachineInstancetypeSpec)(nil), (*v1beta1.VirtualMachineInstancetypeSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_VirtualMachineInstancetypeSpec_To_v1beta1_VirtualMachineInstancetypeSpec(a.(*VirtualMachineInstancetypeSpec), b.(*v1beta1.VirtualMachineInstancetypeSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.VirtualMachinePreference)(nil), (*VirtualMachinePreference)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_VirtualMachinePreference_To_v1alpha2_VirtualMachinePreference(a.(*v1beta1.VirtualMachinePreference), b.(*VirtualMachinePreference), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*VirtualMachinePreference)(nil), (*v1beta1.VirtualMachinePreference)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_VirtualMachinePreference_To_v1beta1_VirtualMachinePreference(a.(*VirtualMachinePreference), b.(*v1beta1.VirtualMachinePreference), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.VirtualMachinePreferenceList)(nil), (*VirtualMachinePreferenceList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_VirtualMachinePreferenceList_To_v1alpha2_VirtualMachinePreferenceList(a.(*v1beta1.VirtualMachinePreferenceList), b.(*VirtualMachinePreferenceList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*VirtualMachinePreferenceList)(nil), (*v1beta1.VirtualMachinePreferenceList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_VirtualMachinePreferenceList_To_v1beta1_VirtualMachinePreferenceList(a.(*VirtualMachinePreferenceList), b.(*v1beta1.VirtualMachinePreferenceList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*VirtualMachinePreferenceSpec)(nil), (*v1beta1.VirtualMachinePreferenceSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_VirtualMachinePreferenceSpec_To_v1beta1_VirtualMachinePreferenceSpec(a.(*VirtualMachinePreferenceSpec), b.(*v1beta1.VirtualMachinePreferenceSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.VolumePreferences)(nil), (*VolumePreferences)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_VolumePreferences_To_v1alpha2_VolumePreferences(a.(*v1beta1.VolumePreferences), b.(*VolumePreferences), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*VolumePreferences)(nil), (*v1beta1.VolumePreferences)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_VolumePreferences_To_v1beta1_VolumePreferences(a.(*VolumePreferences), b.(*v1beta1.VolumePreferences), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*CPUPreferences)(nil), (*v1beta1.CPUPreferences)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_CPUPreferences_To_v1beta1_CPUPreferences(a.(*CPUPreferences), b.(*v1beta1.CPUPreferences), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*v1beta1.CPUInstancetype)(nil), (*CPUInstancetype)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_CPUInstancetype_To_v1alpha2_CPUInstancetype(a.(*v1beta1.CPUInstancetype), b.(*CPUInstancetype), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*v1beta1.CPUPreferences)(nil), (*CPUPreferences)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_CPUPreferences_To_v1alpha2_CPUPreferences(a.(*v1beta1.CPUPreferences), b.(*CPUPreferences), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*v1beta1.DevicePreferences)(nil), (*DevicePreferences)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_DevicePreferences_To_v1alpha2_DevicePreferences(a.(*v1beta1.DevicePreferences), b.(*DevicePreferences), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*v1beta1.MemoryInstancetype)(nil), (*MemoryInstancetype)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_MemoryInstancetype_To_v1alpha2_MemoryInstancetype(a.(*v1beta1.MemoryInstancetype), b.(*MemoryInstancetype), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*v1beta1.VirtualMachineInstancetypeSpec)(nil), (*VirtualMachineInstancetypeSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_VirtualMachineInstancetypeSpec_To_v1alpha2_VirtualMachineInstancetypeSpec(a.(*v1beta1.VirtualMachineInstancetypeSpec), b.(*VirtualMachineInstancetypeSpec), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*v1beta1.VirtualMachinePreferenceSpec)(nil), (*VirtualMachinePreferenceSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_VirtualMachinePreferenceSpec_To_v1alpha2_VirtualMachinePreferenceSpec(a.(*v1beta1.VirtualMachinePreferenceSpec), b.(*VirtualMachinePreferenceSpec), scope) - }); err != nil { - return err - } - return nil -} - -func autoConvert_v1beta1_CPUInstancetype_To_v1alpha2_CPUInstancetype(in *v1beta1.CPUInstancetype, out *CPUInstancetype, s conversion.Scope) error { - out.Guest = in.Guest - if err := v1.Convert_Pointer_string_To_string(&in.Model, &out.Model, s); err != nil { - return err - } - if err := v1.Convert_Pointer_bool_To_bool(&in.DedicatedCPUPlacement, &out.DedicatedCPUPlacement, s); err != nil { - return err - } - out.NUMA = (*corev1.NUMA)(unsafe.Pointer(in.NUMA)) - if err := v1.Convert_Pointer_bool_To_bool(&in.IsolateEmulatorThread, &out.IsolateEmulatorThread, s); err != nil { - return err - } - out.Realtime = (*corev1.Realtime)(unsafe.Pointer(in.Realtime)) - // WARNING: in.MaxSockets requires manual conversion: does not exist in peer-type - return nil -} - -func autoConvert_v1alpha2_CPUInstancetype_To_v1beta1_CPUInstancetype(in *CPUInstancetype, out *v1beta1.CPUInstancetype, s conversion.Scope) error { - out.Guest = in.Guest - if err := v1.Convert_string_To_Pointer_string(&in.Model, &out.Model, s); err != nil { - return err - } - if err := v1.Convert_bool_To_Pointer_bool(&in.DedicatedCPUPlacement, &out.DedicatedCPUPlacement, s); err != nil { - return err - } - out.NUMA = (*corev1.NUMA)(unsafe.Pointer(in.NUMA)) - if err := v1.Convert_bool_To_Pointer_bool(&in.IsolateEmulatorThread, &out.IsolateEmulatorThread, s); err != nil { - return err - } - out.Realtime = (*corev1.Realtime)(unsafe.Pointer(in.Realtime)) - return nil -} - -// Convert_v1alpha2_CPUInstancetype_To_v1beta1_CPUInstancetype is an autogenerated conversion function. -func Convert_v1alpha2_CPUInstancetype_To_v1beta1_CPUInstancetype(in *CPUInstancetype, out *v1beta1.CPUInstancetype, s conversion.Scope) error { - return autoConvert_v1alpha2_CPUInstancetype_To_v1beta1_CPUInstancetype(in, out, s) -} - -func autoConvert_v1beta1_CPUPreferences_To_v1alpha2_CPUPreferences(in *v1beta1.CPUPreferences, out *CPUPreferences, s conversion.Scope) error { - // WARNING: in.PreferredCPUTopology requires manual conversion: inconvertible types (*kubevirt.io/api/instancetype/v1beta1.PreferredCPUTopology vs kubevirt.io/api/instancetype/v1alpha2.PreferredCPUTopology) - // WARNING: in.SpreadOptions requires manual conversion: does not exist in peer-type - // WARNING: in.PreferredCPUFeatures requires manual conversion: does not exist in peer-type - return nil -} - -func autoConvert_v1alpha2_CPUPreferences_To_v1beta1_CPUPreferences(in *CPUPreferences, out *v1beta1.CPUPreferences, s conversion.Scope) error { - // WARNING: in.PreferredCPUTopology requires manual conversion: inconvertible types (kubevirt.io/api/instancetype/v1alpha2.PreferredCPUTopology vs *kubevirt.io/api/instancetype/v1beta1.PreferredCPUTopology) - return nil -} - -func autoConvert_v1beta1_ClockPreferences_To_v1alpha2_ClockPreferences(in *v1beta1.ClockPreferences, out *ClockPreferences, s conversion.Scope) error { - out.PreferredClockOffset = (*corev1.ClockOffset)(unsafe.Pointer(in.PreferredClockOffset)) - out.PreferredTimer = (*corev1.Timer)(unsafe.Pointer(in.PreferredTimer)) - return nil -} - -// Convert_v1beta1_ClockPreferences_To_v1alpha2_ClockPreferences is an autogenerated conversion function. -func Convert_v1beta1_ClockPreferences_To_v1alpha2_ClockPreferences(in *v1beta1.ClockPreferences, out *ClockPreferences, s conversion.Scope) error { - return autoConvert_v1beta1_ClockPreferences_To_v1alpha2_ClockPreferences(in, out, s) -} - -func autoConvert_v1alpha2_ClockPreferences_To_v1beta1_ClockPreferences(in *ClockPreferences, out *v1beta1.ClockPreferences, s conversion.Scope) error { - out.PreferredClockOffset = (*corev1.ClockOffset)(unsafe.Pointer(in.PreferredClockOffset)) - out.PreferredTimer = (*corev1.Timer)(unsafe.Pointer(in.PreferredTimer)) - return nil -} - -// Convert_v1alpha2_ClockPreferences_To_v1beta1_ClockPreferences is an autogenerated conversion function. -func Convert_v1alpha2_ClockPreferences_To_v1beta1_ClockPreferences(in *ClockPreferences, out *v1beta1.ClockPreferences, s conversion.Scope) error { - return autoConvert_v1alpha2_ClockPreferences_To_v1beta1_ClockPreferences(in, out, s) -} - -func autoConvert_v1beta1_DevicePreferences_To_v1alpha2_DevicePreferences(in *v1beta1.DevicePreferences, out *DevicePreferences, s conversion.Scope) error { - out.PreferredAutoattachGraphicsDevice = (*bool)(unsafe.Pointer(in.PreferredAutoattachGraphicsDevice)) - out.PreferredAutoattachMemBalloon = (*bool)(unsafe.Pointer(in.PreferredAutoattachMemBalloon)) - out.PreferredAutoattachPodInterface = (*bool)(unsafe.Pointer(in.PreferredAutoattachPodInterface)) - out.PreferredAutoattachSerialConsole = (*bool)(unsafe.Pointer(in.PreferredAutoattachSerialConsole)) - out.PreferredAutoattachInputDevice = (*bool)(unsafe.Pointer(in.PreferredAutoattachInputDevice)) - out.PreferredDisableHotplug = (*bool)(unsafe.Pointer(in.PreferredDisableHotplug)) - out.PreferredVirtualGPUOptions = (*corev1.VGPUOptions)(unsafe.Pointer(in.PreferredVirtualGPUOptions)) - out.PreferredSoundModel = in.PreferredSoundModel - out.PreferredUseVirtioTransitional = (*bool)(unsafe.Pointer(in.PreferredUseVirtioTransitional)) - out.PreferredInputBus = corev1.InputBus(in.PreferredInputBus) - out.PreferredInputType = corev1.InputType(in.PreferredInputType) - out.PreferredDiskBus = corev1.DiskBus(in.PreferredDiskBus) - out.PreferredLunBus = corev1.DiskBus(in.PreferredLunBus) - out.PreferredCdromBus = corev1.DiskBus(in.PreferredCdromBus) - out.PreferredDiskDedicatedIoThread = (*bool)(unsafe.Pointer(in.PreferredDiskDedicatedIoThread)) - out.PreferredDiskCache = corev1.DriverCache(in.PreferredDiskCache) - out.PreferredDiskIO = corev1.DriverIO(in.PreferredDiskIO) - out.PreferredDiskBlockSize = (*corev1.BlockSize)(unsafe.Pointer(in.PreferredDiskBlockSize)) - out.PreferredInterfaceModel = in.PreferredInterfaceModel - out.PreferredRng = (*corev1.Rng)(unsafe.Pointer(in.PreferredRng)) - out.PreferredBlockMultiQueue = (*bool)(unsafe.Pointer(in.PreferredBlockMultiQueue)) - out.PreferredNetworkInterfaceMultiQueue = (*bool)(unsafe.Pointer(in.PreferredNetworkInterfaceMultiQueue)) - out.PreferredTPM = (*corev1.TPMDevice)(unsafe.Pointer(in.PreferredTPM)) - // WARNING: in.PreferredInterfaceMasquerade requires manual conversion: does not exist in peer-type - return nil -} - -func autoConvert_v1alpha2_DevicePreferences_To_v1beta1_DevicePreferences(in *DevicePreferences, out *v1beta1.DevicePreferences, s conversion.Scope) error { - out.PreferredAutoattachGraphicsDevice = (*bool)(unsafe.Pointer(in.PreferredAutoattachGraphicsDevice)) - out.PreferredAutoattachMemBalloon = (*bool)(unsafe.Pointer(in.PreferredAutoattachMemBalloon)) - out.PreferredAutoattachPodInterface = (*bool)(unsafe.Pointer(in.PreferredAutoattachPodInterface)) - out.PreferredAutoattachSerialConsole = (*bool)(unsafe.Pointer(in.PreferredAutoattachSerialConsole)) - out.PreferredAutoattachInputDevice = (*bool)(unsafe.Pointer(in.PreferredAutoattachInputDevice)) - out.PreferredDisableHotplug = (*bool)(unsafe.Pointer(in.PreferredDisableHotplug)) - out.PreferredVirtualGPUOptions = (*corev1.VGPUOptions)(unsafe.Pointer(in.PreferredVirtualGPUOptions)) - out.PreferredSoundModel = in.PreferredSoundModel - out.PreferredUseVirtioTransitional = (*bool)(unsafe.Pointer(in.PreferredUseVirtioTransitional)) - out.PreferredInputBus = corev1.InputBus(in.PreferredInputBus) - out.PreferredInputType = corev1.InputType(in.PreferredInputType) - out.PreferredDiskBus = corev1.DiskBus(in.PreferredDiskBus) - out.PreferredLunBus = corev1.DiskBus(in.PreferredLunBus) - out.PreferredCdromBus = corev1.DiskBus(in.PreferredCdromBus) - out.PreferredDiskDedicatedIoThread = (*bool)(unsafe.Pointer(in.PreferredDiskDedicatedIoThread)) - out.PreferredDiskCache = corev1.DriverCache(in.PreferredDiskCache) - out.PreferredDiskIO = corev1.DriverIO(in.PreferredDiskIO) - out.PreferredDiskBlockSize = (*corev1.BlockSize)(unsafe.Pointer(in.PreferredDiskBlockSize)) - out.PreferredInterfaceModel = in.PreferredInterfaceModel - out.PreferredRng = (*corev1.Rng)(unsafe.Pointer(in.PreferredRng)) - out.PreferredBlockMultiQueue = (*bool)(unsafe.Pointer(in.PreferredBlockMultiQueue)) - out.PreferredNetworkInterfaceMultiQueue = (*bool)(unsafe.Pointer(in.PreferredNetworkInterfaceMultiQueue)) - out.PreferredTPM = (*corev1.TPMDevice)(unsafe.Pointer(in.PreferredTPM)) - return nil -} - -// Convert_v1alpha2_DevicePreferences_To_v1beta1_DevicePreferences is an autogenerated conversion function. -func Convert_v1alpha2_DevicePreferences_To_v1beta1_DevicePreferences(in *DevicePreferences, out *v1beta1.DevicePreferences, s conversion.Scope) error { - return autoConvert_v1alpha2_DevicePreferences_To_v1beta1_DevicePreferences(in, out, s) -} - -func autoConvert_v1beta1_FeaturePreferences_To_v1alpha2_FeaturePreferences(in *v1beta1.FeaturePreferences, out *FeaturePreferences, s conversion.Scope) error { - out.PreferredAcpi = (*corev1.FeatureState)(unsafe.Pointer(in.PreferredAcpi)) - out.PreferredApic = (*corev1.FeatureAPIC)(unsafe.Pointer(in.PreferredApic)) - out.PreferredHyperv = (*corev1.FeatureHyperv)(unsafe.Pointer(in.PreferredHyperv)) - out.PreferredKvm = (*corev1.FeatureKVM)(unsafe.Pointer(in.PreferredKvm)) - out.PreferredPvspinlock = (*corev1.FeatureState)(unsafe.Pointer(in.PreferredPvspinlock)) - out.PreferredSmm = (*corev1.FeatureState)(unsafe.Pointer(in.PreferredSmm)) - return nil -} - -// Convert_v1beta1_FeaturePreferences_To_v1alpha2_FeaturePreferences is an autogenerated conversion function. -func Convert_v1beta1_FeaturePreferences_To_v1alpha2_FeaturePreferences(in *v1beta1.FeaturePreferences, out *FeaturePreferences, s conversion.Scope) error { - return autoConvert_v1beta1_FeaturePreferences_To_v1alpha2_FeaturePreferences(in, out, s) -} - -func autoConvert_v1alpha2_FeaturePreferences_To_v1beta1_FeaturePreferences(in *FeaturePreferences, out *v1beta1.FeaturePreferences, s conversion.Scope) error { - out.PreferredAcpi = (*corev1.FeatureState)(unsafe.Pointer(in.PreferredAcpi)) - out.PreferredApic = (*corev1.FeatureAPIC)(unsafe.Pointer(in.PreferredApic)) - out.PreferredHyperv = (*corev1.FeatureHyperv)(unsafe.Pointer(in.PreferredHyperv)) - out.PreferredKvm = (*corev1.FeatureKVM)(unsafe.Pointer(in.PreferredKvm)) - out.PreferredPvspinlock = (*corev1.FeatureState)(unsafe.Pointer(in.PreferredPvspinlock)) - out.PreferredSmm = (*corev1.FeatureState)(unsafe.Pointer(in.PreferredSmm)) - return nil -} - -// Convert_v1alpha2_FeaturePreferences_To_v1beta1_FeaturePreferences is an autogenerated conversion function. -func Convert_v1alpha2_FeaturePreferences_To_v1beta1_FeaturePreferences(in *FeaturePreferences, out *v1beta1.FeaturePreferences, s conversion.Scope) error { - return autoConvert_v1alpha2_FeaturePreferences_To_v1beta1_FeaturePreferences(in, out, s) -} - -func autoConvert_v1beta1_FirmwarePreferences_To_v1alpha2_FirmwarePreferences(in *v1beta1.FirmwarePreferences, out *FirmwarePreferences, s conversion.Scope) error { - out.PreferredUseBios = (*bool)(unsafe.Pointer(in.PreferredUseBios)) - out.PreferredUseBiosSerial = (*bool)(unsafe.Pointer(in.PreferredUseBiosSerial)) - out.PreferredUseEfi = (*bool)(unsafe.Pointer(in.PreferredUseEfi)) - out.PreferredUseSecureBoot = (*bool)(unsafe.Pointer(in.PreferredUseSecureBoot)) - return nil -} - -// Convert_v1beta1_FirmwarePreferences_To_v1alpha2_FirmwarePreferences is an autogenerated conversion function. -func Convert_v1beta1_FirmwarePreferences_To_v1alpha2_FirmwarePreferences(in *v1beta1.FirmwarePreferences, out *FirmwarePreferences, s conversion.Scope) error { - return autoConvert_v1beta1_FirmwarePreferences_To_v1alpha2_FirmwarePreferences(in, out, s) -} - -func autoConvert_v1alpha2_FirmwarePreferences_To_v1beta1_FirmwarePreferences(in *FirmwarePreferences, out *v1beta1.FirmwarePreferences, s conversion.Scope) error { - out.PreferredUseBios = (*bool)(unsafe.Pointer(in.PreferredUseBios)) - out.PreferredUseBiosSerial = (*bool)(unsafe.Pointer(in.PreferredUseBiosSerial)) - out.PreferredUseEfi = (*bool)(unsafe.Pointer(in.PreferredUseEfi)) - out.PreferredUseSecureBoot = (*bool)(unsafe.Pointer(in.PreferredUseSecureBoot)) - return nil -} - -// Convert_v1alpha2_FirmwarePreferences_To_v1beta1_FirmwarePreferences is an autogenerated conversion function. -func Convert_v1alpha2_FirmwarePreferences_To_v1beta1_FirmwarePreferences(in *FirmwarePreferences, out *v1beta1.FirmwarePreferences, s conversion.Scope) error { - return autoConvert_v1alpha2_FirmwarePreferences_To_v1beta1_FirmwarePreferences(in, out, s) -} - -func autoConvert_v1beta1_MachinePreferences_To_v1alpha2_MachinePreferences(in *v1beta1.MachinePreferences, out *MachinePreferences, s conversion.Scope) error { - out.PreferredMachineType = in.PreferredMachineType - return nil -} - -// Convert_v1beta1_MachinePreferences_To_v1alpha2_MachinePreferences is an autogenerated conversion function. -func Convert_v1beta1_MachinePreferences_To_v1alpha2_MachinePreferences(in *v1beta1.MachinePreferences, out *MachinePreferences, s conversion.Scope) error { - return autoConvert_v1beta1_MachinePreferences_To_v1alpha2_MachinePreferences(in, out, s) -} - -func autoConvert_v1alpha2_MachinePreferences_To_v1beta1_MachinePreferences(in *MachinePreferences, out *v1beta1.MachinePreferences, s conversion.Scope) error { - out.PreferredMachineType = in.PreferredMachineType - return nil -} - -// Convert_v1alpha2_MachinePreferences_To_v1beta1_MachinePreferences is an autogenerated conversion function. -func Convert_v1alpha2_MachinePreferences_To_v1beta1_MachinePreferences(in *MachinePreferences, out *v1beta1.MachinePreferences, s conversion.Scope) error { - return autoConvert_v1alpha2_MachinePreferences_To_v1beta1_MachinePreferences(in, out, s) -} - -func autoConvert_v1beta1_MemoryInstancetype_To_v1alpha2_MemoryInstancetype(in *v1beta1.MemoryInstancetype, out *MemoryInstancetype, s conversion.Scope) error { - out.Guest = in.Guest - out.Hugepages = (*corev1.Hugepages)(unsafe.Pointer(in.Hugepages)) - // WARNING: in.OvercommitPercent requires manual conversion: does not exist in peer-type - // WARNING: in.MaxGuest requires manual conversion: does not exist in peer-type - return nil -} - -func autoConvert_v1alpha2_MemoryInstancetype_To_v1beta1_MemoryInstancetype(in *MemoryInstancetype, out *v1beta1.MemoryInstancetype, s conversion.Scope) error { - out.Guest = in.Guest - out.Hugepages = (*corev1.Hugepages)(unsafe.Pointer(in.Hugepages)) - return nil -} - -// Convert_v1alpha2_MemoryInstancetype_To_v1beta1_MemoryInstancetype is an autogenerated conversion function. -func Convert_v1alpha2_MemoryInstancetype_To_v1beta1_MemoryInstancetype(in *MemoryInstancetype, out *v1beta1.MemoryInstancetype, s conversion.Scope) error { - return autoConvert_v1alpha2_MemoryInstancetype_To_v1beta1_MemoryInstancetype(in, out, s) -} - -func autoConvert_v1beta1_VirtualMachineClusterInstancetype_To_v1alpha2_VirtualMachineClusterInstancetype(in *v1beta1.VirtualMachineClusterInstancetype, out *VirtualMachineClusterInstancetype, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1beta1_VirtualMachineInstancetypeSpec_To_v1alpha2_VirtualMachineInstancetypeSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - return nil -} - -// Convert_v1beta1_VirtualMachineClusterInstancetype_To_v1alpha2_VirtualMachineClusterInstancetype is an autogenerated conversion function. -func Convert_v1beta1_VirtualMachineClusterInstancetype_To_v1alpha2_VirtualMachineClusterInstancetype(in *v1beta1.VirtualMachineClusterInstancetype, out *VirtualMachineClusterInstancetype, s conversion.Scope) error { - return autoConvert_v1beta1_VirtualMachineClusterInstancetype_To_v1alpha2_VirtualMachineClusterInstancetype(in, out, s) -} - -func autoConvert_v1alpha2_VirtualMachineClusterInstancetype_To_v1beta1_VirtualMachineClusterInstancetype(in *VirtualMachineClusterInstancetype, out *v1beta1.VirtualMachineClusterInstancetype, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha2_VirtualMachineInstancetypeSpec_To_v1beta1_VirtualMachineInstancetypeSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha2_VirtualMachineClusterInstancetype_To_v1beta1_VirtualMachineClusterInstancetype is an autogenerated conversion function. -func Convert_v1alpha2_VirtualMachineClusterInstancetype_To_v1beta1_VirtualMachineClusterInstancetype(in *VirtualMachineClusterInstancetype, out *v1beta1.VirtualMachineClusterInstancetype, s conversion.Scope) error { - return autoConvert_v1alpha2_VirtualMachineClusterInstancetype_To_v1beta1_VirtualMachineClusterInstancetype(in, out, s) -} - -func autoConvert_v1beta1_VirtualMachineClusterInstancetypeList_To_v1alpha2_VirtualMachineClusterInstancetypeList(in *v1beta1.VirtualMachineClusterInstancetypeList, out *VirtualMachineClusterInstancetypeList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]VirtualMachineClusterInstancetype, len(*in)) - for i := range *in { - if err := Convert_v1beta1_VirtualMachineClusterInstancetype_To_v1alpha2_VirtualMachineClusterInstancetype(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_v1beta1_VirtualMachineClusterInstancetypeList_To_v1alpha2_VirtualMachineClusterInstancetypeList is an autogenerated conversion function. -func Convert_v1beta1_VirtualMachineClusterInstancetypeList_To_v1alpha2_VirtualMachineClusterInstancetypeList(in *v1beta1.VirtualMachineClusterInstancetypeList, out *VirtualMachineClusterInstancetypeList, s conversion.Scope) error { - return autoConvert_v1beta1_VirtualMachineClusterInstancetypeList_To_v1alpha2_VirtualMachineClusterInstancetypeList(in, out, s) -} - -func autoConvert_v1alpha2_VirtualMachineClusterInstancetypeList_To_v1beta1_VirtualMachineClusterInstancetypeList(in *VirtualMachineClusterInstancetypeList, out *v1beta1.VirtualMachineClusterInstancetypeList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]v1beta1.VirtualMachineClusterInstancetype, len(*in)) - for i := range *in { - if err := Convert_v1alpha2_VirtualMachineClusterInstancetype_To_v1beta1_VirtualMachineClusterInstancetype(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_v1alpha2_VirtualMachineClusterInstancetypeList_To_v1beta1_VirtualMachineClusterInstancetypeList is an autogenerated conversion function. -func Convert_v1alpha2_VirtualMachineClusterInstancetypeList_To_v1beta1_VirtualMachineClusterInstancetypeList(in *VirtualMachineClusterInstancetypeList, out *v1beta1.VirtualMachineClusterInstancetypeList, s conversion.Scope) error { - return autoConvert_v1alpha2_VirtualMachineClusterInstancetypeList_To_v1beta1_VirtualMachineClusterInstancetypeList(in, out, s) -} - -func autoConvert_v1beta1_VirtualMachineClusterPreference_To_v1alpha2_VirtualMachineClusterPreference(in *v1beta1.VirtualMachineClusterPreference, out *VirtualMachineClusterPreference, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1beta1_VirtualMachinePreferenceSpec_To_v1alpha2_VirtualMachinePreferenceSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - return nil -} - -// Convert_v1beta1_VirtualMachineClusterPreference_To_v1alpha2_VirtualMachineClusterPreference is an autogenerated conversion function. -func Convert_v1beta1_VirtualMachineClusterPreference_To_v1alpha2_VirtualMachineClusterPreference(in *v1beta1.VirtualMachineClusterPreference, out *VirtualMachineClusterPreference, s conversion.Scope) error { - return autoConvert_v1beta1_VirtualMachineClusterPreference_To_v1alpha2_VirtualMachineClusterPreference(in, out, s) -} - -func autoConvert_v1alpha2_VirtualMachineClusterPreference_To_v1beta1_VirtualMachineClusterPreference(in *VirtualMachineClusterPreference, out *v1beta1.VirtualMachineClusterPreference, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha2_VirtualMachinePreferenceSpec_To_v1beta1_VirtualMachinePreferenceSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha2_VirtualMachineClusterPreference_To_v1beta1_VirtualMachineClusterPreference is an autogenerated conversion function. -func Convert_v1alpha2_VirtualMachineClusterPreference_To_v1beta1_VirtualMachineClusterPreference(in *VirtualMachineClusterPreference, out *v1beta1.VirtualMachineClusterPreference, s conversion.Scope) error { - return autoConvert_v1alpha2_VirtualMachineClusterPreference_To_v1beta1_VirtualMachineClusterPreference(in, out, s) -} - -func autoConvert_v1beta1_VirtualMachineClusterPreferenceList_To_v1alpha2_VirtualMachineClusterPreferenceList(in *v1beta1.VirtualMachineClusterPreferenceList, out *VirtualMachineClusterPreferenceList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]VirtualMachineClusterPreference, len(*in)) - for i := range *in { - if err := Convert_v1beta1_VirtualMachineClusterPreference_To_v1alpha2_VirtualMachineClusterPreference(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_v1beta1_VirtualMachineClusterPreferenceList_To_v1alpha2_VirtualMachineClusterPreferenceList is an autogenerated conversion function. -func Convert_v1beta1_VirtualMachineClusterPreferenceList_To_v1alpha2_VirtualMachineClusterPreferenceList(in *v1beta1.VirtualMachineClusterPreferenceList, out *VirtualMachineClusterPreferenceList, s conversion.Scope) error { - return autoConvert_v1beta1_VirtualMachineClusterPreferenceList_To_v1alpha2_VirtualMachineClusterPreferenceList(in, out, s) -} - -func autoConvert_v1alpha2_VirtualMachineClusterPreferenceList_To_v1beta1_VirtualMachineClusterPreferenceList(in *VirtualMachineClusterPreferenceList, out *v1beta1.VirtualMachineClusterPreferenceList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]v1beta1.VirtualMachineClusterPreference, len(*in)) - for i := range *in { - if err := Convert_v1alpha2_VirtualMachineClusterPreference_To_v1beta1_VirtualMachineClusterPreference(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_v1alpha2_VirtualMachineClusterPreferenceList_To_v1beta1_VirtualMachineClusterPreferenceList is an autogenerated conversion function. -func Convert_v1alpha2_VirtualMachineClusterPreferenceList_To_v1beta1_VirtualMachineClusterPreferenceList(in *VirtualMachineClusterPreferenceList, out *v1beta1.VirtualMachineClusterPreferenceList, s conversion.Scope) error { - return autoConvert_v1alpha2_VirtualMachineClusterPreferenceList_To_v1beta1_VirtualMachineClusterPreferenceList(in, out, s) -} - -func autoConvert_v1beta1_VirtualMachineInstancetype_To_v1alpha2_VirtualMachineInstancetype(in *v1beta1.VirtualMachineInstancetype, out *VirtualMachineInstancetype, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1beta1_VirtualMachineInstancetypeSpec_To_v1alpha2_VirtualMachineInstancetypeSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - return nil -} - -// Convert_v1beta1_VirtualMachineInstancetype_To_v1alpha2_VirtualMachineInstancetype is an autogenerated conversion function. -func Convert_v1beta1_VirtualMachineInstancetype_To_v1alpha2_VirtualMachineInstancetype(in *v1beta1.VirtualMachineInstancetype, out *VirtualMachineInstancetype, s conversion.Scope) error { - return autoConvert_v1beta1_VirtualMachineInstancetype_To_v1alpha2_VirtualMachineInstancetype(in, out, s) -} - -func autoConvert_v1alpha2_VirtualMachineInstancetype_To_v1beta1_VirtualMachineInstancetype(in *VirtualMachineInstancetype, out *v1beta1.VirtualMachineInstancetype, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha2_VirtualMachineInstancetypeSpec_To_v1beta1_VirtualMachineInstancetypeSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha2_VirtualMachineInstancetype_To_v1beta1_VirtualMachineInstancetype is an autogenerated conversion function. -func Convert_v1alpha2_VirtualMachineInstancetype_To_v1beta1_VirtualMachineInstancetype(in *VirtualMachineInstancetype, out *v1beta1.VirtualMachineInstancetype, s conversion.Scope) error { - return autoConvert_v1alpha2_VirtualMachineInstancetype_To_v1beta1_VirtualMachineInstancetype(in, out, s) -} - -func autoConvert_v1beta1_VirtualMachineInstancetypeList_To_v1alpha2_VirtualMachineInstancetypeList(in *v1beta1.VirtualMachineInstancetypeList, out *VirtualMachineInstancetypeList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]VirtualMachineInstancetype, len(*in)) - for i := range *in { - if err := Convert_v1beta1_VirtualMachineInstancetype_To_v1alpha2_VirtualMachineInstancetype(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_v1beta1_VirtualMachineInstancetypeList_To_v1alpha2_VirtualMachineInstancetypeList is an autogenerated conversion function. -func Convert_v1beta1_VirtualMachineInstancetypeList_To_v1alpha2_VirtualMachineInstancetypeList(in *v1beta1.VirtualMachineInstancetypeList, out *VirtualMachineInstancetypeList, s conversion.Scope) error { - return autoConvert_v1beta1_VirtualMachineInstancetypeList_To_v1alpha2_VirtualMachineInstancetypeList(in, out, s) -} - -func autoConvert_v1alpha2_VirtualMachineInstancetypeList_To_v1beta1_VirtualMachineInstancetypeList(in *VirtualMachineInstancetypeList, out *v1beta1.VirtualMachineInstancetypeList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]v1beta1.VirtualMachineInstancetype, len(*in)) - for i := range *in { - if err := Convert_v1alpha2_VirtualMachineInstancetype_To_v1beta1_VirtualMachineInstancetype(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_v1alpha2_VirtualMachineInstancetypeList_To_v1beta1_VirtualMachineInstancetypeList is an autogenerated conversion function. -func Convert_v1alpha2_VirtualMachineInstancetypeList_To_v1beta1_VirtualMachineInstancetypeList(in *VirtualMachineInstancetypeList, out *v1beta1.VirtualMachineInstancetypeList, s conversion.Scope) error { - return autoConvert_v1alpha2_VirtualMachineInstancetypeList_To_v1beta1_VirtualMachineInstancetypeList(in, out, s) -} - -func autoConvert_v1beta1_VirtualMachineInstancetypeSpec_To_v1alpha2_VirtualMachineInstancetypeSpec(in *v1beta1.VirtualMachineInstancetypeSpec, out *VirtualMachineInstancetypeSpec, s conversion.Scope) error { - // WARNING: in.NodeSelector requires manual conversion: does not exist in peer-type - // WARNING: in.SchedulerName requires manual conversion: does not exist in peer-type - if err := Convert_v1beta1_CPUInstancetype_To_v1alpha2_CPUInstancetype(&in.CPU, &out.CPU, s); err != nil { - return err - } - if err := Convert_v1beta1_MemoryInstancetype_To_v1alpha2_MemoryInstancetype(&in.Memory, &out.Memory, s); err != nil { - return err - } - out.GPUs = *(*[]corev1.GPU)(unsafe.Pointer(&in.GPUs)) - out.HostDevices = *(*[]corev1.HostDevice)(unsafe.Pointer(&in.HostDevices)) - out.IOThreadsPolicy = (*corev1.IOThreadsPolicy)(unsafe.Pointer(in.IOThreadsPolicy)) - out.LaunchSecurity = (*corev1.LaunchSecurity)(unsafe.Pointer(in.LaunchSecurity)) - // WARNING: in.Annotations requires manual conversion: does not exist in peer-type - return nil -} - -func autoConvert_v1alpha2_VirtualMachineInstancetypeSpec_To_v1beta1_VirtualMachineInstancetypeSpec(in *VirtualMachineInstancetypeSpec, out *v1beta1.VirtualMachineInstancetypeSpec, s conversion.Scope) error { - if err := Convert_v1alpha2_CPUInstancetype_To_v1beta1_CPUInstancetype(&in.CPU, &out.CPU, s); err != nil { - return err - } - if err := Convert_v1alpha2_MemoryInstancetype_To_v1beta1_MemoryInstancetype(&in.Memory, &out.Memory, s); err != nil { - return err - } - out.GPUs = *(*[]corev1.GPU)(unsafe.Pointer(&in.GPUs)) - out.HostDevices = *(*[]corev1.HostDevice)(unsafe.Pointer(&in.HostDevices)) - out.IOThreadsPolicy = (*corev1.IOThreadsPolicy)(unsafe.Pointer(in.IOThreadsPolicy)) - out.LaunchSecurity = (*corev1.LaunchSecurity)(unsafe.Pointer(in.LaunchSecurity)) - return nil -} - -// Convert_v1alpha2_VirtualMachineInstancetypeSpec_To_v1beta1_VirtualMachineInstancetypeSpec is an autogenerated conversion function. -func Convert_v1alpha2_VirtualMachineInstancetypeSpec_To_v1beta1_VirtualMachineInstancetypeSpec(in *VirtualMachineInstancetypeSpec, out *v1beta1.VirtualMachineInstancetypeSpec, s conversion.Scope) error { - return autoConvert_v1alpha2_VirtualMachineInstancetypeSpec_To_v1beta1_VirtualMachineInstancetypeSpec(in, out, s) -} - -func autoConvert_v1beta1_VirtualMachinePreference_To_v1alpha2_VirtualMachinePreference(in *v1beta1.VirtualMachinePreference, out *VirtualMachinePreference, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1beta1_VirtualMachinePreferenceSpec_To_v1alpha2_VirtualMachinePreferenceSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - return nil -} - -// Convert_v1beta1_VirtualMachinePreference_To_v1alpha2_VirtualMachinePreference is an autogenerated conversion function. -func Convert_v1beta1_VirtualMachinePreference_To_v1alpha2_VirtualMachinePreference(in *v1beta1.VirtualMachinePreference, out *VirtualMachinePreference, s conversion.Scope) error { - return autoConvert_v1beta1_VirtualMachinePreference_To_v1alpha2_VirtualMachinePreference(in, out, s) -} - -func autoConvert_v1alpha2_VirtualMachinePreference_To_v1beta1_VirtualMachinePreference(in *VirtualMachinePreference, out *v1beta1.VirtualMachinePreference, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha2_VirtualMachinePreferenceSpec_To_v1beta1_VirtualMachinePreferenceSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha2_VirtualMachinePreference_To_v1beta1_VirtualMachinePreference is an autogenerated conversion function. -func Convert_v1alpha2_VirtualMachinePreference_To_v1beta1_VirtualMachinePreference(in *VirtualMachinePreference, out *v1beta1.VirtualMachinePreference, s conversion.Scope) error { - return autoConvert_v1alpha2_VirtualMachinePreference_To_v1beta1_VirtualMachinePreference(in, out, s) -} - -func autoConvert_v1beta1_VirtualMachinePreferenceList_To_v1alpha2_VirtualMachinePreferenceList(in *v1beta1.VirtualMachinePreferenceList, out *VirtualMachinePreferenceList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]VirtualMachinePreference, len(*in)) - for i := range *in { - if err := Convert_v1beta1_VirtualMachinePreference_To_v1alpha2_VirtualMachinePreference(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_v1beta1_VirtualMachinePreferenceList_To_v1alpha2_VirtualMachinePreferenceList is an autogenerated conversion function. -func Convert_v1beta1_VirtualMachinePreferenceList_To_v1alpha2_VirtualMachinePreferenceList(in *v1beta1.VirtualMachinePreferenceList, out *VirtualMachinePreferenceList, s conversion.Scope) error { - return autoConvert_v1beta1_VirtualMachinePreferenceList_To_v1alpha2_VirtualMachinePreferenceList(in, out, s) -} - -func autoConvert_v1alpha2_VirtualMachinePreferenceList_To_v1beta1_VirtualMachinePreferenceList(in *VirtualMachinePreferenceList, out *v1beta1.VirtualMachinePreferenceList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]v1beta1.VirtualMachinePreference, len(*in)) - for i := range *in { - if err := Convert_v1alpha2_VirtualMachinePreference_To_v1beta1_VirtualMachinePreference(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_v1alpha2_VirtualMachinePreferenceList_To_v1beta1_VirtualMachinePreferenceList is an autogenerated conversion function. -func Convert_v1alpha2_VirtualMachinePreferenceList_To_v1beta1_VirtualMachinePreferenceList(in *VirtualMachinePreferenceList, out *v1beta1.VirtualMachinePreferenceList, s conversion.Scope) error { - return autoConvert_v1alpha2_VirtualMachinePreferenceList_To_v1beta1_VirtualMachinePreferenceList(in, out, s) -} - -func autoConvert_v1beta1_VirtualMachinePreferenceSpec_To_v1alpha2_VirtualMachinePreferenceSpec(in *v1beta1.VirtualMachinePreferenceSpec, out *VirtualMachinePreferenceSpec, s conversion.Scope) error { - out.Clock = (*ClockPreferences)(unsafe.Pointer(in.Clock)) - if in.CPU != nil { - in, out := &in.CPU, &out.CPU - *out = new(CPUPreferences) - if err := Convert_v1beta1_CPUPreferences_To_v1alpha2_CPUPreferences(*in, *out, s); err != nil { - return err - } - } else { - out.CPU = nil - } - if in.Devices != nil { - in, out := &in.Devices, &out.Devices - *out = new(DevicePreferences) - if err := Convert_v1beta1_DevicePreferences_To_v1alpha2_DevicePreferences(*in, *out, s); err != nil { - return err - } - } else { - out.Devices = nil - } - out.Features = (*FeaturePreferences)(unsafe.Pointer(in.Features)) - out.Firmware = (*FirmwarePreferences)(unsafe.Pointer(in.Firmware)) - out.Machine = (*MachinePreferences)(unsafe.Pointer(in.Machine)) - out.Volumes = (*VolumePreferences)(unsafe.Pointer(in.Volumes)) - // WARNING: in.PreferredSubdomain requires manual conversion: does not exist in peer-type - // WARNING: in.PreferredTerminationGracePeriodSeconds requires manual conversion: does not exist in peer-type - // WARNING: in.Requirements requires manual conversion: does not exist in peer-type - // WARNING: in.Annotations requires manual conversion: does not exist in peer-type - // WARNING: in.PreferSpreadSocketToCoreRatio requires manual conversion: does not exist in peer-type - return nil -} - -func autoConvert_v1alpha2_VirtualMachinePreferenceSpec_To_v1beta1_VirtualMachinePreferenceSpec(in *VirtualMachinePreferenceSpec, out *v1beta1.VirtualMachinePreferenceSpec, s conversion.Scope) error { - out.Clock = (*v1beta1.ClockPreferences)(unsafe.Pointer(in.Clock)) - if in.CPU != nil { - in, out := &in.CPU, &out.CPU - *out = new(v1beta1.CPUPreferences) - if err := Convert_v1alpha2_CPUPreferences_To_v1beta1_CPUPreferences(*in, *out, s); err != nil { - return err - } - } else { - out.CPU = nil - } - if in.Devices != nil { - in, out := &in.Devices, &out.Devices - *out = new(v1beta1.DevicePreferences) - if err := Convert_v1alpha2_DevicePreferences_To_v1beta1_DevicePreferences(*in, *out, s); err != nil { - return err - } - } else { - out.Devices = nil - } - out.Features = (*v1beta1.FeaturePreferences)(unsafe.Pointer(in.Features)) - out.Firmware = (*v1beta1.FirmwarePreferences)(unsafe.Pointer(in.Firmware)) - out.Machine = (*v1beta1.MachinePreferences)(unsafe.Pointer(in.Machine)) - out.Volumes = (*v1beta1.VolumePreferences)(unsafe.Pointer(in.Volumes)) - return nil -} - -// Convert_v1alpha2_VirtualMachinePreferenceSpec_To_v1beta1_VirtualMachinePreferenceSpec is an autogenerated conversion function. -func Convert_v1alpha2_VirtualMachinePreferenceSpec_To_v1beta1_VirtualMachinePreferenceSpec(in *VirtualMachinePreferenceSpec, out *v1beta1.VirtualMachinePreferenceSpec, s conversion.Scope) error { - return autoConvert_v1alpha2_VirtualMachinePreferenceSpec_To_v1beta1_VirtualMachinePreferenceSpec(in, out, s) -} - -func autoConvert_v1beta1_VolumePreferences_To_v1alpha2_VolumePreferences(in *v1beta1.VolumePreferences, out *VolumePreferences, s conversion.Scope) error { - out.PreferredStorageClassName = in.PreferredStorageClassName - return nil -} - -// Convert_v1beta1_VolumePreferences_To_v1alpha2_VolumePreferences is an autogenerated conversion function. -func Convert_v1beta1_VolumePreferences_To_v1alpha2_VolumePreferences(in *v1beta1.VolumePreferences, out *VolumePreferences, s conversion.Scope) error { - return autoConvert_v1beta1_VolumePreferences_To_v1alpha2_VolumePreferences(in, out, s) -} - -func autoConvert_v1alpha2_VolumePreferences_To_v1beta1_VolumePreferences(in *VolumePreferences, out *v1beta1.VolumePreferences, s conversion.Scope) error { - out.PreferredStorageClassName = in.PreferredStorageClassName - return nil -} - -// Convert_v1alpha2_VolumePreferences_To_v1beta1_VolumePreferences is an autogenerated conversion function. -func Convert_v1alpha2_VolumePreferences_To_v1beta1_VolumePreferences(in *VolumePreferences, out *v1beta1.VolumePreferences, s conversion.Scope) error { - return autoConvert_v1alpha2_VolumePreferences_To_v1beta1_VolumePreferences(in, out, s) -} diff --git a/vendor/kubevirt.io/api/instancetype/v1alpha2/deepcopy_generated.go b/vendor/kubevirt.io/api/instancetype/v1alpha2/deepcopy_generated.go deleted file mode 100644 index ea9d8c17f..000000000 --- a/vendor/kubevirt.io/api/instancetype/v1alpha2/deepcopy_generated.go +++ /dev/null @@ -1,648 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -Copyright 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 v1alpha2 - -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 *CPUInstancetype) DeepCopyInto(out *CPUInstancetype) { - *out = *in - if in.NUMA != nil { - in, out := &in.NUMA, &out.NUMA - *out = new(v1.NUMA) - (*in).DeepCopyInto(*out) - } - if in.Realtime != nil { - in, out := &in.Realtime, &out.Realtime - *out = new(v1.Realtime) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CPUInstancetype. -func (in *CPUInstancetype) DeepCopy() *CPUInstancetype { - if in == nil { - return nil - } - out := new(CPUInstancetype) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CPUPreferences) DeepCopyInto(out *CPUPreferences) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CPUPreferences. -func (in *CPUPreferences) DeepCopy() *CPUPreferences { - if in == nil { - return nil - } - out := new(CPUPreferences) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClockPreferences) DeepCopyInto(out *ClockPreferences) { - *out = *in - if in.PreferredClockOffset != nil { - in, out := &in.PreferredClockOffset, &out.PreferredClockOffset - *out = new(v1.ClockOffset) - (*in).DeepCopyInto(*out) - } - if in.PreferredTimer != nil { - in, out := &in.PreferredTimer, &out.PreferredTimer - *out = new(v1.Timer) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClockPreferences. -func (in *ClockPreferences) DeepCopy() *ClockPreferences { - if in == nil { - return nil - } - out := new(ClockPreferences) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DevicePreferences) DeepCopyInto(out *DevicePreferences) { - *out = *in - if in.PreferredAutoattachGraphicsDevice != nil { - in, out := &in.PreferredAutoattachGraphicsDevice, &out.PreferredAutoattachGraphicsDevice - *out = new(bool) - **out = **in - } - if in.PreferredAutoattachMemBalloon != nil { - in, out := &in.PreferredAutoattachMemBalloon, &out.PreferredAutoattachMemBalloon - *out = new(bool) - **out = **in - } - if in.PreferredAutoattachPodInterface != nil { - in, out := &in.PreferredAutoattachPodInterface, &out.PreferredAutoattachPodInterface - *out = new(bool) - **out = **in - } - if in.PreferredAutoattachSerialConsole != nil { - in, out := &in.PreferredAutoattachSerialConsole, &out.PreferredAutoattachSerialConsole - *out = new(bool) - **out = **in - } - if in.PreferredAutoattachInputDevice != nil { - in, out := &in.PreferredAutoattachInputDevice, &out.PreferredAutoattachInputDevice - *out = new(bool) - **out = **in - } - if in.PreferredDisableHotplug != nil { - in, out := &in.PreferredDisableHotplug, &out.PreferredDisableHotplug - *out = new(bool) - **out = **in - } - if in.PreferredVirtualGPUOptions != nil { - in, out := &in.PreferredVirtualGPUOptions, &out.PreferredVirtualGPUOptions - *out = new(v1.VGPUOptions) - (*in).DeepCopyInto(*out) - } - if in.PreferredUseVirtioTransitional != nil { - in, out := &in.PreferredUseVirtioTransitional, &out.PreferredUseVirtioTransitional - *out = new(bool) - **out = **in - } - if in.PreferredDiskDedicatedIoThread != nil { - in, out := &in.PreferredDiskDedicatedIoThread, &out.PreferredDiskDedicatedIoThread - *out = new(bool) - **out = **in - } - if in.PreferredDiskBlockSize != nil { - in, out := &in.PreferredDiskBlockSize, &out.PreferredDiskBlockSize - *out = new(v1.BlockSize) - (*in).DeepCopyInto(*out) - } - if in.PreferredRng != nil { - in, out := &in.PreferredRng, &out.PreferredRng - *out = new(v1.Rng) - **out = **in - } - if in.PreferredBlockMultiQueue != nil { - in, out := &in.PreferredBlockMultiQueue, &out.PreferredBlockMultiQueue - *out = new(bool) - **out = **in - } - if in.PreferredNetworkInterfaceMultiQueue != nil { - in, out := &in.PreferredNetworkInterfaceMultiQueue, &out.PreferredNetworkInterfaceMultiQueue - *out = new(bool) - **out = **in - } - if in.PreferredTPM != nil { - in, out := &in.PreferredTPM, &out.PreferredTPM - *out = new(v1.TPMDevice) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevicePreferences. -func (in *DevicePreferences) DeepCopy() *DevicePreferences { - if in == nil { - return nil - } - out := new(DevicePreferences) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *FeaturePreferences) DeepCopyInto(out *FeaturePreferences) { - *out = *in - if in.PreferredAcpi != nil { - in, out := &in.PreferredAcpi, &out.PreferredAcpi - *out = new(v1.FeatureState) - (*in).DeepCopyInto(*out) - } - if in.PreferredApic != nil { - in, out := &in.PreferredApic, &out.PreferredApic - *out = new(v1.FeatureAPIC) - (*in).DeepCopyInto(*out) - } - if in.PreferredHyperv != nil { - in, out := &in.PreferredHyperv, &out.PreferredHyperv - *out = new(v1.FeatureHyperv) - (*in).DeepCopyInto(*out) - } - if in.PreferredKvm != nil { - in, out := &in.PreferredKvm, &out.PreferredKvm - *out = new(v1.FeatureKVM) - **out = **in - } - if in.PreferredPvspinlock != nil { - in, out := &in.PreferredPvspinlock, &out.PreferredPvspinlock - *out = new(v1.FeatureState) - (*in).DeepCopyInto(*out) - } - if in.PreferredSmm != nil { - in, out := &in.PreferredSmm, &out.PreferredSmm - *out = new(v1.FeatureState) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FeaturePreferences. -func (in *FeaturePreferences) DeepCopy() *FeaturePreferences { - if in == nil { - return nil - } - out := new(FeaturePreferences) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *FirmwarePreferences) DeepCopyInto(out *FirmwarePreferences) { - *out = *in - if in.PreferredUseBios != nil { - in, out := &in.PreferredUseBios, &out.PreferredUseBios - *out = new(bool) - **out = **in - } - if in.PreferredUseBiosSerial != nil { - in, out := &in.PreferredUseBiosSerial, &out.PreferredUseBiosSerial - *out = new(bool) - **out = **in - } - if in.PreferredUseEfi != nil { - in, out := &in.PreferredUseEfi, &out.PreferredUseEfi - *out = new(bool) - **out = **in - } - if in.PreferredUseSecureBoot != nil { - in, out := &in.PreferredUseSecureBoot, &out.PreferredUseSecureBoot - *out = new(bool) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FirmwarePreferences. -func (in *FirmwarePreferences) DeepCopy() *FirmwarePreferences { - if in == nil { - return nil - } - out := new(FirmwarePreferences) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *MachinePreferences) DeepCopyInto(out *MachinePreferences) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachinePreferences. -func (in *MachinePreferences) DeepCopy() *MachinePreferences { - if in == nil { - return nil - } - out := new(MachinePreferences) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *MemoryInstancetype) DeepCopyInto(out *MemoryInstancetype) { - *out = *in - out.Guest = in.Guest.DeepCopy() - if in.Hugepages != nil { - in, out := &in.Hugepages, &out.Hugepages - *out = new(v1.Hugepages) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MemoryInstancetype. -func (in *MemoryInstancetype) DeepCopy() *MemoryInstancetype { - if in == nil { - return nil - } - out := new(MemoryInstancetype) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VirtualMachineClusterInstancetype) DeepCopyInto(out *VirtualMachineClusterInstancetype) { - *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 VirtualMachineClusterInstancetype. -func (in *VirtualMachineClusterInstancetype) DeepCopy() *VirtualMachineClusterInstancetype { - if in == nil { - return nil - } - out := new(VirtualMachineClusterInstancetype) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *VirtualMachineClusterInstancetype) 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 *VirtualMachineClusterInstancetypeList) DeepCopyInto(out *VirtualMachineClusterInstancetypeList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]VirtualMachineClusterInstancetype, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineClusterInstancetypeList. -func (in *VirtualMachineClusterInstancetypeList) DeepCopy() *VirtualMachineClusterInstancetypeList { - if in == nil { - return nil - } - out := new(VirtualMachineClusterInstancetypeList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *VirtualMachineClusterInstancetypeList) 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 *VirtualMachineClusterPreference) DeepCopyInto(out *VirtualMachineClusterPreference) { - *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 VirtualMachineClusterPreference. -func (in *VirtualMachineClusterPreference) DeepCopy() *VirtualMachineClusterPreference { - if in == nil { - return nil - } - out := new(VirtualMachineClusterPreference) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *VirtualMachineClusterPreference) 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 *VirtualMachineClusterPreferenceList) DeepCopyInto(out *VirtualMachineClusterPreferenceList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]VirtualMachineClusterPreference, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineClusterPreferenceList. -func (in *VirtualMachineClusterPreferenceList) DeepCopy() *VirtualMachineClusterPreferenceList { - if in == nil { - return nil - } - out := new(VirtualMachineClusterPreferenceList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *VirtualMachineClusterPreferenceList) 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 *VirtualMachineInstancetype) DeepCopyInto(out *VirtualMachineInstancetype) { - *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 VirtualMachineInstancetype. -func (in *VirtualMachineInstancetype) DeepCopy() *VirtualMachineInstancetype { - if in == nil { - return nil - } - out := new(VirtualMachineInstancetype) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *VirtualMachineInstancetype) 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 *VirtualMachineInstancetypeList) DeepCopyInto(out *VirtualMachineInstancetypeList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]VirtualMachineInstancetype, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineInstancetypeList. -func (in *VirtualMachineInstancetypeList) DeepCopy() *VirtualMachineInstancetypeList { - if in == nil { - return nil - } - out := new(VirtualMachineInstancetypeList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *VirtualMachineInstancetypeList) 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 *VirtualMachineInstancetypeSpec) DeepCopyInto(out *VirtualMachineInstancetypeSpec) { - *out = *in - in.CPU.DeepCopyInto(&out.CPU) - in.Memory.DeepCopyInto(&out.Memory) - if in.GPUs != nil { - in, out := &in.GPUs, &out.GPUs - *out = make([]v1.GPU, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.HostDevices != nil { - in, out := &in.HostDevices, &out.HostDevices - *out = make([]v1.HostDevice, len(*in)) - copy(*out, *in) - } - if in.IOThreadsPolicy != nil { - in, out := &in.IOThreadsPolicy, &out.IOThreadsPolicy - *out = new(v1.IOThreadsPolicy) - **out = **in - } - if in.LaunchSecurity != nil { - in, out := &in.LaunchSecurity, &out.LaunchSecurity - *out = new(v1.LaunchSecurity) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineInstancetypeSpec. -func (in *VirtualMachineInstancetypeSpec) DeepCopy() *VirtualMachineInstancetypeSpec { - if in == nil { - return nil - } - out := new(VirtualMachineInstancetypeSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VirtualMachinePreference) DeepCopyInto(out *VirtualMachinePreference) { - *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 VirtualMachinePreference. -func (in *VirtualMachinePreference) DeepCopy() *VirtualMachinePreference { - if in == nil { - return nil - } - out := new(VirtualMachinePreference) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *VirtualMachinePreference) 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 *VirtualMachinePreferenceList) DeepCopyInto(out *VirtualMachinePreferenceList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]VirtualMachinePreference, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachinePreferenceList. -func (in *VirtualMachinePreferenceList) DeepCopy() *VirtualMachinePreferenceList { - if in == nil { - return nil - } - out := new(VirtualMachinePreferenceList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *VirtualMachinePreferenceList) 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 *VirtualMachinePreferenceSpec) DeepCopyInto(out *VirtualMachinePreferenceSpec) { - *out = *in - if in.Clock != nil { - in, out := &in.Clock, &out.Clock - *out = new(ClockPreferences) - (*in).DeepCopyInto(*out) - } - if in.CPU != nil { - in, out := &in.CPU, &out.CPU - *out = new(CPUPreferences) - **out = **in - } - if in.Devices != nil { - in, out := &in.Devices, &out.Devices - *out = new(DevicePreferences) - (*in).DeepCopyInto(*out) - } - if in.Features != nil { - in, out := &in.Features, &out.Features - *out = new(FeaturePreferences) - (*in).DeepCopyInto(*out) - } - if in.Firmware != nil { - in, out := &in.Firmware, &out.Firmware - *out = new(FirmwarePreferences) - (*in).DeepCopyInto(*out) - } - if in.Machine != nil { - in, out := &in.Machine, &out.Machine - *out = new(MachinePreferences) - **out = **in - } - if in.Volumes != nil { - in, out := &in.Volumes, &out.Volumes - *out = new(VolumePreferences) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachinePreferenceSpec. -func (in *VirtualMachinePreferenceSpec) DeepCopy() *VirtualMachinePreferenceSpec { - if in == nil { - return nil - } - out := new(VirtualMachinePreferenceSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VolumePreferences) DeepCopyInto(out *VolumePreferences) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumePreferences. -func (in *VolumePreferences) DeepCopy() *VolumePreferences { - if in == nil { - return nil - } - out := new(VolumePreferences) - in.DeepCopyInto(out) - return out -} diff --git a/vendor/kubevirt.io/api/instancetype/v1alpha2/types.go b/vendor/kubevirt.io/api/instancetype/v1alpha2/types.go deleted file mode 100644 index 2072bb559..000000000 --- a/vendor/kubevirt.io/api/instancetype/v1alpha2/types.go +++ /dev/null @@ -1,475 +0,0 @@ -/* - * 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 v1alpha2 - -import ( - "k8s.io/apimachinery/pkg/api/resource" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - - v1 "kubevirt.io/api/core/v1" -) - -// VirtualMachineInstancetype resource contains quantitative and resource related VirtualMachine configuration -// that can be used by multiple VirtualMachine resources. -// -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +genclient -type VirtualMachineInstancetype struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - // Required spec describing the instancetype - Spec VirtualMachineInstancetypeSpec `json:"spec"` -} - -// VirtualMachineInstancetypeList is a list of VirtualMachineInstancetype resources. -// -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -type VirtualMachineInstancetypeList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []VirtualMachineInstancetype `json:"items"` -} - -// VirtualMachineClusterInstancetype is a cluster scoped version of VirtualMachineInstancetype resource. -// -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +genclient -// +genclient:nonNamespaced -type VirtualMachineClusterInstancetype struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - // Required spec describing the instancetype - Spec VirtualMachineInstancetypeSpec `json:"spec"` -} - -// VirtualMachineClusterInstancetypeList is a list of VirtualMachineClusterInstancetype resources. -// -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -type VirtualMachineClusterInstancetypeList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []VirtualMachineClusterInstancetype `json:"items"` -} - -// VirtualMachineInstancetypeSpec is a description of the VirtualMachineInstancetype or VirtualMachineClusterInstancetype. -// -// CPU and Memory are required attributes with both requiring that their Guest attribute is defined, ensuring a number of vCPUs and amount of RAM is always provided by each instancetype. -type VirtualMachineInstancetypeSpec struct { - - // Required CPU related attributes of the instancetype. - CPU CPUInstancetype `json:"cpu"` - - // Required Memory related attributes of the instancetype. - Memory MemoryInstancetype `json:"memory"` - - // Optionally defines any GPU devices associated with the instancetype. - // - // +optional - // +listType=atomic - GPUs []v1.GPU `json:"gpus,omitempty"` - - // Optionally defines any HostDevices associated with the instancetype. - // - // +optional - // +listType=atomic - HostDevices []v1.HostDevice `json:"hostDevices,omitempty"` - - // Optionally defines the IOThreadsPolicy to be used by the instancetype. - // - // +optional - IOThreadsPolicy *v1.IOThreadsPolicy `json:"ioThreadsPolicy,omitempty"` - - // Optionally defines the LaunchSecurity to be used by the instancetype. - // - // +optional - LaunchSecurity *v1.LaunchSecurity `json:"launchSecurity,omitempty"` -} - -// CPUInstancetype contains the CPU related configuration of a given VirtualMachineInstancetypeSpec. -// -// Guest is a required attribute and defines the number of vCPUs to be exposed to the guest by the instancetype. -type CPUInstancetype struct { - - // Required number of vCPUs to expose to the guest. - // - // The resulting CPU topology being derived from the optional PreferredCPUTopology attribute of CPUPreferences that itself defaults to PreferSockets. - Guest uint32 `json:"guest"` - - // 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. - // +optional - Model string `json:"model,omitempty"` - - // DedicatedCPUPlacement requests the scheduler to place the VirtualMachineInstance on a node - // with enough dedicated pCPUs and pin the vCPUs to it. - // +optional - DedicatedCPUPlacement bool `json:"dedicatedCPUPlacement,omitempty"` - - // NUMA allows specifying settings for the guest NUMA topology - // +optional - NUMA *v1.NUMA `json:"numa,omitempty"` - - // IsolateEmulatorThread requests one more dedicated pCPU to be allocated for the VMI to place - // the emulator thread on it. - // +optional - IsolateEmulatorThread bool `json:"isolateEmulatorThread,omitempty"` - - // Realtime instructs the virt-launcher to tune the VMI for lower latency, optional for real time workloads - // +optional - Realtime *v1.Realtime `json:"realtime,omitempty"` -} - -// MemoryInstancetype contains the Memory related configuration of a given VirtualMachineInstancetypeSpec. -// -// Guest is a required attribute and defines the amount of RAM to be exposed to the guest by the instancetype. -type MemoryInstancetype struct { - - // Required amount of memory which is visible inside the guest OS. - Guest resource.Quantity `json:"guest"` - - // Optionally enables the use of hugepages for the VirtualMachineInstance instead of regular memory. - // +optional - Hugepages *v1.Hugepages `json:"hugepages,omitempty"` -} - -// VirtualMachinePreference resource contains optional preferences related to the VirtualMachine. -// -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +genclient -type VirtualMachinePreference struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - // Required spec describing the preferences - Spec VirtualMachinePreferenceSpec `json:"spec"` -} - -// VirtualMachinePreferenceList is a list of VirtualMachinePreference resources. -// -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -type VirtualMachinePreferenceList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - // +listType=set - Items []VirtualMachinePreference `json:"items"` -} - -// VirtualMachineClusterPreference is a cluster scoped version of the VirtualMachinePreference resource. -// -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +genclient -// +genclient:nonNamespaced -type VirtualMachineClusterPreference struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - // Required spec describing the preferences - Spec VirtualMachinePreferenceSpec `json:"spec"` -} - -// VirtualMachineClusterPreferenceList is a list of VirtualMachineClusterPreference resources. -// -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -type VirtualMachineClusterPreferenceList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - // +listType=set - Items []VirtualMachineClusterPreference `json:"items"` -} - -// VirtualMachinePreferenceSpec is a description of the VirtualMachinePreference or VirtualMachineClusterPreference. -type VirtualMachinePreferenceSpec struct { - - // Clock optionally defines preferences associated with the Clock attribute of a VirtualMachineInstance DomainSpec - // - //+optional - Clock *ClockPreferences `json:"clock,omitempty"` - - // CPU optionally defines preferences associated with the CPU attribute of a VirtualMachineInstance DomainSpec - // - //+optional - CPU *CPUPreferences `json:"cpu,omitempty"` - - // Devices optionally defines preferences associated with the Devices attribute of a VirtualMachineInstance DomainSpec - // - //+optional - Devices *DevicePreferences `json:"devices,omitempty"` - - // Features optionally defines preferences associated with the Features attribute of a VirtualMachineInstance DomainSpec - // - //+optional - Features *FeaturePreferences `json:"features,omitempty"` - - // Firmware optionally defines preferences associated with the Firmware attribute of a VirtualMachineInstance DomainSpec - // - //+optional - Firmware *FirmwarePreferences `json:"firmware,omitempty"` - - // Machine optionally defines preferences associated with the Machine attribute of a VirtualMachineInstance DomainSpec - // - //+optional - Machine *MachinePreferences `json:"machine,omitempty"` - - // Volumes optionally defines preferences associated with the Volumes attribute of a VirtualMachineInstace DomainSpec - // - //+optional - Volumes *VolumePreferences `json:"volumes,omitempty"` -} - -type VolumePreferences struct { - - // PreffereedStorageClassName optionally defines the preferred storageClass - // - //+optional - PreferredStorageClassName string `json:"preferredStorageClassName,omitempty"` -} - -// PreferredCPUTopology defines a preferred CPU topology to be exposed to the guest -type PreferredCPUTopology string - -const ( - - // Prefer vCPUs to be exposed as cores to the guest - PreferCores PreferredCPUTopology = "preferCores" - - // Prefer vCPUs to be exposed as sockets to the guest, this is the default for the PreferredCPUTopology attribute of CPUPreferences. - PreferSockets PreferredCPUTopology = "preferSockets" - - // Prefer vCPUs to be exposed as threads to the guest - PreferThreads PreferredCPUTopology = "preferThreads" -) - -// CPUPreferences contains various optional CPU preferences. -type CPUPreferences struct { - - // PreferredCPUTopology optionally defines the preferred guest visible CPU topology, defaults to PreferSockets. - // - //+optional - PreferredCPUTopology PreferredCPUTopology `json:"preferredCPUTopology,omitempty"` -} - -// DevicePreferences contains various optional Device preferences. -type DevicePreferences struct { - - // PreferredAutoattachGraphicsDevice optionally defines the preferred value of AutoattachGraphicsDevice - // - // +optional - PreferredAutoattachGraphicsDevice *bool `json:"preferredAutoattachGraphicsDevice,omitempty"` - - // PreferredAutoattachMemBalloon optionally defines the preferred value of AutoattachMemBalloon - // - // +optional - PreferredAutoattachMemBalloon *bool `json:"preferredAutoattachMemBalloon,omitempty"` - - // PreferredAutoattachPodInterface optionally defines the preferred value of AutoattachPodInterface - // - // +optional - PreferredAutoattachPodInterface *bool `json:"preferredAutoattachPodInterface,omitempty"` - - // PreferredAutoattachSerialConsole optionally defines the preferred value of AutoattachSerialConsole - // - // +optional - PreferredAutoattachSerialConsole *bool `json:"preferredAutoattachSerialConsole,omitempty"` - - // PreferredAutoattachInputDevice optionally defines the preferred value of AutoattachInputDevice - // - // +optional - PreferredAutoattachInputDevice *bool `json:"preferredAutoattachInputDevice,omitempty"` - - // PreferredDisableHotplug optionally defines the preferred value of DisableHotplug - // - // +optional - PreferredDisableHotplug *bool `json:"preferredDisableHotplug,omitempty"` - - // PreferredVirtualGPUOptions optionally defines the preferred value of VirtualGPUOptions - // - // +optional - PreferredVirtualGPUOptions *v1.VGPUOptions `json:"preferredVirtualGPUOptions,omitempty"` - - // PreferredSoundModel optionally defines the preferred model for Sound devices. - // - // +optional - PreferredSoundModel string `json:"preferredSoundModel,omitempty"` - - // PreferredUseVirtioTransitional optionally defines the preferred value of UseVirtioTransitional - // - // +optional - PreferredUseVirtioTransitional *bool `json:"preferredUseVirtioTransitional,omitempty"` - - // PreferredInputBus optionally defines the preferred bus for Input devices. - // - // +optional - PreferredInputBus v1.InputBus `json:"preferredInputBus,omitempty"` - - // PreferredInputType optionally defines the preferred type for Input devices. - // - // +optional - PreferredInputType v1.InputType `json:"preferredInputType,omitempty"` - - // PreferredDiskBus optionally defines the preferred bus for Disk Disk devices. - // - // +optional - PreferredDiskBus v1.DiskBus `json:"preferredDiskBus,omitempty"` - - // PreferredLunBus optionally defines the preferred bus for Lun Disk devices. - // - // +optional - PreferredLunBus v1.DiskBus `json:"preferredLunBus,omitempty"` - - // PreferredCdromBus optionally defines the preferred bus for Cdrom Disk devices. - // - // +optional - PreferredCdromBus v1.DiskBus `json:"preferredCdromBus,omitempty"` - - // PreferredDedicatedIoThread optionally enables dedicated IO threads for Disk devices. - // - // +optional - PreferredDiskDedicatedIoThread *bool `json:"preferredDiskDedicatedIoThread,omitempty"` - - // PreferredCache optionally defines the DriverCache to be used by Disk devices. - // - // +optional - PreferredDiskCache v1.DriverCache `json:"preferredDiskCache,omitempty"` - - // PreferredIo optionally defines the QEMU disk IO mode to be used by Disk devices. - // - // +optional - PreferredDiskIO v1.DriverIO `json:"preferredDiskIO,omitempty"` - - // PreferredBlockSize optionally defines the block size of Disk devices. - // - // +optional - PreferredDiskBlockSize *v1.BlockSize `json:"preferredDiskBlockSize,omitempty"` - - // PreferredInterfaceModel optionally defines the preferred model to be used by Interface devices. - // - // +optional - PreferredInterfaceModel string `json:"preferredInterfaceModel,omitempty"` - - // PreferredRng optionally defines the preferred rng device to be used. - // - // +optional - PreferredRng *v1.Rng `json:"preferredRng,omitempty"` - - // PreferredBlockMultiQueue optionally enables the vhost multiqueue feature for virtio disks. - // - // +optional - PreferredBlockMultiQueue *bool `json:"preferredBlockMultiQueue,omitempty"` - - // PreferredNetworkInterfaceMultiQueue optionally enables the vhost multiqueue feature for virtio interfaces. - // - // +optional - PreferredNetworkInterfaceMultiQueue *bool `json:"preferredNetworkInterfaceMultiQueue,omitempty"` - - // PreferredTPM optionally defines the preferred TPM device to be used. - // - // +optional - PreferredTPM *v1.TPMDevice `json:"preferredTPM,omitempty"` -} - -// FeaturePreferences contains various optional defaults for Features. -type FeaturePreferences struct { - - // PreferredAcpi optionally enables the ACPI feature - // - // +optional - PreferredAcpi *v1.FeatureState `json:"preferredAcpi,omitempty"` - - // PreferredApic optionally enables and configures the APIC feature - // - // +optional - PreferredApic *v1.FeatureAPIC `json:"preferredApic,omitempty"` - - // PreferredHyperv optionally enables and configures HyperV features - // - // +optional - PreferredHyperv *v1.FeatureHyperv `json:"preferredHyperv,omitempty"` - - // PreferredKvm optionally enables and configures KVM features - // - // +optional - PreferredKvm *v1.FeatureKVM `json:"preferredKvm,omitempty"` - - // PreferredPvspinlock optionally enables the Pvspinlock feature - // - // +optional - PreferredPvspinlock *v1.FeatureState `json:"preferredPvspinlock,omitempty"` - - // PreferredSmm optionally enables the SMM feature - // - // +optional - PreferredSmm *v1.FeatureState `json:"preferredSmm,omitempty"` -} - -// FirmwarePreferences contains various optional defaults for Firmware. -type FirmwarePreferences struct { - - // PreferredUseBios optionally enables BIOS - // - // +optional - PreferredUseBios *bool `json:"preferredUseBios,omitempty"` - - // PreferredUseBiosSerial optionally transmitts BIOS output over the serial. - // - // Requires PreferredUseBios to be enabled. - // - // +optional - PreferredUseBiosSerial *bool `json:"preferredUseBiosSerial,omitempty"` - - // PreferredUseEfi optionally enables EFI - // - // +optional - PreferredUseEfi *bool `json:"preferredUseEfi,omitempty"` - - // PreferredUseSecureBoot optionally enables SecureBoot and the OVMF roms will be swapped for SecureBoot-enabled ones. - // - // Requires PreferredUseEfi and PreferredSmm to be enabled. - // - // +optional - PreferredUseSecureBoot *bool `json:"preferredUseSecureBoot,omitempty"` -} - -// MachinePreferences contains various optional defaults for Machine. -type MachinePreferences struct { - - // PreferredMachineType optionally defines the preferred machine type to use. - // - // +optional - PreferredMachineType string `json:"preferredMachineType,omitempty"` -} - -// ClockPreferences contains various optional defaults for Clock. -type ClockPreferences struct { - - // ClockOffset allows specifying the UTC offset or the timezone of the guest clock. - // - // +optional - PreferredClockOffset *v1.ClockOffset `json:"preferredClockOffset,omitempty"` - - // Timer specifies whih timers are attached to the vmi. - // - // +optional - PreferredTimer *v1.Timer `json:"preferredTimer,omitempty"` -} diff --git a/vendor/kubevirt.io/api/instancetype/v1alpha2/types_swagger_generated.go b/vendor/kubevirt.io/api/instancetype/v1alpha2/types_swagger_generated.go deleted file mode 100644 index fc9bfa6ec..000000000 --- a/vendor/kubevirt.io/api/instancetype/v1alpha2/types_swagger_generated.go +++ /dev/null @@ -1,181 +0,0 @@ -// Code generated by swagger-doc. DO NOT EDIT. - -package v1alpha2 - -func (VirtualMachineInstancetype) SwaggerDoc() map[string]string { - return map[string]string{ - "": "VirtualMachineInstancetype resource contains quantitative and resource related VirtualMachine configuration\nthat can be used by multiple VirtualMachine resources.\n\n+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object\n+genclient", - "spec": "Required spec describing the instancetype", - } -} - -func (VirtualMachineInstancetypeList) SwaggerDoc() map[string]string { - return map[string]string{ - "": "VirtualMachineInstancetypeList is a list of VirtualMachineInstancetype resources.\n\n+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object", - } -} - -func (VirtualMachineClusterInstancetype) SwaggerDoc() map[string]string { - return map[string]string{ - "": "VirtualMachineClusterInstancetype is a cluster scoped version of VirtualMachineInstancetype resource.\n\n+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object\n+genclient\n+genclient:nonNamespaced", - "spec": "Required spec describing the instancetype", - } -} - -func (VirtualMachineClusterInstancetypeList) SwaggerDoc() map[string]string { - return map[string]string{ - "": "VirtualMachineClusterInstancetypeList is a list of VirtualMachineClusterInstancetype resources.\n\n+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object", - } -} - -func (VirtualMachineInstancetypeSpec) SwaggerDoc() map[string]string { - return map[string]string{ - "": "VirtualMachineInstancetypeSpec is a description of the VirtualMachineInstancetype or VirtualMachineClusterInstancetype.\n\nCPU and Memory are required attributes with both requiring that their Guest attribute is defined, ensuring a number of vCPUs and amount of RAM is always provided by each instancetype.", - "cpu": "Required CPU related attributes of the instancetype.", - "memory": "Required Memory related attributes of the instancetype.", - "gpus": "Optionally defines any GPU devices associated with the instancetype.\n\n+optional\n+listType=atomic", - "hostDevices": "Optionally defines any HostDevices associated with the instancetype.\n\n+optional\n+listType=atomic", - "ioThreadsPolicy": "Optionally defines the IOThreadsPolicy to be used by the instancetype.\n\n+optional", - "launchSecurity": "Optionally defines the LaunchSecurity to be used by the instancetype.\n\n+optional", - } -} - -func (CPUInstancetype) SwaggerDoc() map[string]string { - return map[string]string{ - "": "CPUInstancetype contains the CPU related configuration of a given VirtualMachineInstancetypeSpec.\n\nGuest is a required attribute and defines the number of vCPUs to be exposed to the guest by the instancetype.", - "guest": "Required number of vCPUs to expose to the guest.\n\nThe resulting CPU topology being derived from the optional PreferredCPUTopology attribute of CPUPreferences that itself defaults to PreferSockets.", - "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", - "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 (MemoryInstancetype) SwaggerDoc() map[string]string { - return map[string]string{ - "": "MemoryInstancetype contains the Memory related configuration of a given VirtualMachineInstancetypeSpec.\n\nGuest is a required attribute and defines the amount of RAM to be exposed to the guest by the instancetype.", - "guest": "Required amount of memory which is visible inside the guest OS.", - "hugepages": "Optionally enables the use of hugepages for the VirtualMachineInstance instead of regular memory.\n+optional", - } -} - -func (VirtualMachinePreference) SwaggerDoc() map[string]string { - return map[string]string{ - "": "VirtualMachinePreference resource contains optional preferences related to the VirtualMachine.\n\n+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object\n+genclient", - "spec": "Required spec describing the preferences", - } -} - -func (VirtualMachinePreferenceList) SwaggerDoc() map[string]string { - return map[string]string{ - "": "VirtualMachinePreferenceList is a list of VirtualMachinePreference resources.\n\n+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object", - "items": "+listType=set", - } -} - -func (VirtualMachineClusterPreference) SwaggerDoc() map[string]string { - return map[string]string{ - "": "VirtualMachineClusterPreference is a cluster scoped version of the VirtualMachinePreference resource.\n\n+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object\n+genclient\n+genclient:nonNamespaced", - "spec": "Required spec describing the preferences", - } -} - -func (VirtualMachineClusterPreferenceList) SwaggerDoc() map[string]string { - return map[string]string{ - "": "VirtualMachineClusterPreferenceList is a list of VirtualMachineClusterPreference resources.\n\n+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object", - "items": "+listType=set", - } -} - -func (VirtualMachinePreferenceSpec) SwaggerDoc() map[string]string { - return map[string]string{ - "": "VirtualMachinePreferenceSpec is a description of the VirtualMachinePreference or VirtualMachineClusterPreference.", - "clock": "Clock optionally defines preferences associated with the Clock attribute of a VirtualMachineInstance DomainSpec\n\n+optional", - "cpu": "CPU optionally defines preferences associated with the CPU attribute of a VirtualMachineInstance DomainSpec\n\n+optional", - "devices": "Devices optionally defines preferences associated with the Devices attribute of a VirtualMachineInstance DomainSpec\n\n+optional", - "features": "Features optionally defines preferences associated with the Features attribute of a VirtualMachineInstance DomainSpec\n\n+optional", - "firmware": "Firmware optionally defines preferences associated with the Firmware attribute of a VirtualMachineInstance DomainSpec\n\n+optional", - "machine": "Machine optionally defines preferences associated with the Machine attribute of a VirtualMachineInstance DomainSpec\n\n+optional", - "volumes": "Volumes optionally defines preferences associated with the Volumes attribute of a VirtualMachineInstace DomainSpec\n\n+optional", - } -} - -func (VolumePreferences) SwaggerDoc() map[string]string { - return map[string]string{ - "preferredStorageClassName": "PreffereedStorageClassName optionally defines the preferred storageClass\n\n+optional", - } -} - -func (CPUPreferences) SwaggerDoc() map[string]string { - return map[string]string{ - "": "CPUPreferences contains various optional CPU preferences.", - "preferredCPUTopology": "PreferredCPUTopology optionally defines the preferred guest visible CPU topology, defaults to PreferSockets.\n\n+optional", - } -} - -func (DevicePreferences) SwaggerDoc() map[string]string { - return map[string]string{ - "": "DevicePreferences contains various optional Device preferences.", - "preferredAutoattachGraphicsDevice": "PreferredAutoattachGraphicsDevice optionally defines the preferred value of AutoattachGraphicsDevice\n\n+optional", - "preferredAutoattachMemBalloon": "PreferredAutoattachMemBalloon optionally defines the preferred value of AutoattachMemBalloon\n\n+optional", - "preferredAutoattachPodInterface": "PreferredAutoattachPodInterface optionally defines the preferred value of AutoattachPodInterface\n\n+optional", - "preferredAutoattachSerialConsole": "PreferredAutoattachSerialConsole optionally defines the preferred value of AutoattachSerialConsole\n\n+optional", - "preferredAutoattachInputDevice": "PreferredAutoattachInputDevice optionally defines the preferred value of AutoattachInputDevice\n\n+optional", - "preferredDisableHotplug": "PreferredDisableHotplug optionally defines the preferred value of DisableHotplug\n\n+optional", - "preferredVirtualGPUOptions": "PreferredVirtualGPUOptions optionally defines the preferred value of VirtualGPUOptions\n\n+optional", - "preferredSoundModel": "PreferredSoundModel optionally defines the preferred model for Sound devices.\n\n+optional", - "preferredUseVirtioTransitional": "PreferredUseVirtioTransitional optionally defines the preferred value of UseVirtioTransitional\n\n+optional", - "preferredInputBus": "PreferredInputBus optionally defines the preferred bus for Input devices.\n\n+optional", - "preferredInputType": "PreferredInputType optionally defines the preferred type for Input devices.\n\n+optional", - "preferredDiskBus": "PreferredDiskBus optionally defines the preferred bus for Disk Disk devices.\n\n+optional", - "preferredLunBus": "PreferredLunBus optionally defines the preferred bus for Lun Disk devices.\n\n+optional", - "preferredCdromBus": "PreferredCdromBus optionally defines the preferred bus for Cdrom Disk devices.\n\n+optional", - "preferredDiskDedicatedIoThread": "PreferredDedicatedIoThread optionally enables dedicated IO threads for Disk devices.\n\n+optional", - "preferredDiskCache": "PreferredCache optionally defines the DriverCache to be used by Disk devices.\n\n+optional", - "preferredDiskIO": "PreferredIo optionally defines the QEMU disk IO mode to be used by Disk devices.\n\n+optional", - "preferredDiskBlockSize": "PreferredBlockSize optionally defines the block size of Disk devices.\n\n+optional", - "preferredInterfaceModel": "PreferredInterfaceModel optionally defines the preferred model to be used by Interface devices.\n\n+optional", - "preferredRng": "PreferredRng optionally defines the preferred rng device to be used.\n\n+optional", - "preferredBlockMultiQueue": "PreferredBlockMultiQueue optionally enables the vhost multiqueue feature for virtio disks.\n\n+optional", - "preferredNetworkInterfaceMultiQueue": "PreferredNetworkInterfaceMultiQueue optionally enables the vhost multiqueue feature for virtio interfaces.\n\n+optional", - "preferredTPM": "PreferredTPM optionally defines the preferred TPM device to be used.\n\n+optional", - } -} - -func (FeaturePreferences) SwaggerDoc() map[string]string { - return map[string]string{ - "": "FeaturePreferences contains various optional defaults for Features.", - "preferredAcpi": "PreferredAcpi optionally enables the ACPI feature\n\n+optional", - "preferredApic": "PreferredApic optionally enables and configures the APIC feature\n\n+optional", - "preferredHyperv": "PreferredHyperv optionally enables and configures HyperV features\n\n+optional", - "preferredKvm": "PreferredKvm optionally enables and configures KVM features\n\n+optional", - "preferredPvspinlock": "PreferredPvspinlock optionally enables the Pvspinlock feature\n\n+optional", - "preferredSmm": "PreferredSmm optionally enables the SMM feature\n\n+optional", - } -} - -func (FirmwarePreferences) SwaggerDoc() map[string]string { - return map[string]string{ - "": "FirmwarePreferences contains various optional defaults for Firmware.", - "preferredUseBios": "PreferredUseBios optionally enables BIOS\n\n+optional", - "preferredUseBiosSerial": "PreferredUseBiosSerial optionally transmitts BIOS output over the serial.\n\nRequires PreferredUseBios to be enabled.\n\n+optional", - "preferredUseEfi": "PreferredUseEfi optionally enables EFI\n\n+optional", - "preferredUseSecureBoot": "PreferredUseSecureBoot optionally enables SecureBoot and the OVMF roms will be swapped for SecureBoot-enabled ones.\n\nRequires PreferredUseEfi and PreferredSmm to be enabled.\n\n+optional", - } -} - -func (MachinePreferences) SwaggerDoc() map[string]string { - return map[string]string{ - "": "MachinePreferences contains various optional defaults for Machine.", - "preferredMachineType": "PreferredMachineType optionally defines the preferred machine type to use.\n\n+optional", - } -} - -func (ClockPreferences) SwaggerDoc() map[string]string { - return map[string]string{ - "": "ClockPreferences contains various optional defaults for Clock.", - "preferredClockOffset": "ClockOffset allows specifying the UTC offset or the timezone of the guest clock.\n\n+optional", - "preferredTimer": "Timer specifies whih timers are attached to the vmi.\n\n+optional", - } -} diff --git a/vendor/kubevirt.io/api/instancetype/v1beta1/deepcopy_generated.go b/vendor/kubevirt.io/api/instancetype/v1beta1/deepcopy_generated.go index 8dae5e701..57b096c7f 100644 --- a/vendor/kubevirt.io/api/instancetype/v1beta1/deepcopy_generated.go +++ b/vendor/kubevirt.io/api/instancetype/v1beta1/deepcopy_generated.go @@ -2,7 +2,7 @@ // +build !ignore_autogenerated /* -Copyright The KubeVirt Authors. +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. @@ -15,6 +15,8 @@ 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 The KubeVirt Authors. */ // Code generated by deepcopy-gen. DO NOT EDIT. @@ -223,6 +225,11 @@ func (in *DevicePreferences) DeepCopyInto(out *DevicePreferences) { *out = new(v1.InterfaceMasquerade) **out = **in } + if in.PreferredPanicDeviceModel != nil { + in, out := &in.PreferredPanicDeviceModel, &out.PreferredPanicDeviceModel + *out = new(v1.PanicDeviceModel) + **out = **in + } return } @@ -295,16 +302,21 @@ func (in *FirmwarePreferences) DeepCopyInto(out *FirmwarePreferences) { *out = new(bool) **out = **in } - if in.PreferredUseEfi != nil { - in, out := &in.PreferredUseEfi, &out.PreferredUseEfi + if in.DeprecatedPreferredUseEfi != nil { + in, out := &in.DeprecatedPreferredUseEfi, &out.DeprecatedPreferredUseEfi *out = new(bool) **out = **in } - if in.PreferredUseSecureBoot != nil { - in, out := &in.PreferredUseSecureBoot, &out.PreferredUseSecureBoot + if in.DeprecatedPreferredUseSecureBoot != nil { + in, out := &in.DeprecatedPreferredUseSecureBoot, &out.DeprecatedPreferredUseSecureBoot *out = new(bool) **out = **in } + if in.PreferredEfi != nil { + in, out := &in.PreferredEfi, &out.PreferredEfi + *out = new(v1.EFI) + (*in).DeepCopyInto(*out) + } return } @@ -391,6 +403,11 @@ func (in *PreferenceRequirements) DeepCopyInto(out *PreferenceRequirements) { *out = new(MemoryPreferenceRequirement) (*in).DeepCopyInto(*out) } + if in.Architecture != nil { + in, out := &in.Architecture, &out.Architecture + *out = new(string) + **out = **in + } return } @@ -632,13 +649,20 @@ func (in *VirtualMachineInstancetypeSpec) DeepCopyInto(out *VirtualMachineInstan if in.HostDevices != nil { in, out := &in.HostDevices, &out.HostDevices *out = make([]v1.HostDevice, len(*in)) - copy(*out, *in) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } } if in.IOThreadsPolicy != nil { in, out := &in.IOThreadsPolicy, &out.IOThreadsPolicy *out = new(v1.IOThreadsPolicy) **out = **in } + if in.IOThreads != nil { + in, out := &in.IOThreads, &out.IOThreads + *out = new(v1.DiskIOThreads) + (*in).DeepCopyInto(*out) + } if in.LaunchSecurity != nil { in, out := &in.LaunchSecurity, &out.LaunchSecurity *out = new(v1.LaunchSecurity) @@ -784,6 +808,11 @@ func (in *VirtualMachinePreferenceSpec) DeepCopyInto(out *VirtualMachinePreferen (*out)[key] = val } } + if in.PreferredArchitecture != nil { + in, out := &in.PreferredArchitecture, &out.PreferredArchitecture + *out = new(string) + **out = **in + } return } diff --git a/vendor/kubevirt.io/api/instancetype/v1beta1/types.go b/vendor/kubevirt.io/api/instancetype/v1beta1/types.go index 29fe0cc69..d1793b8d7 100644 --- a/vendor/kubevirt.io/api/instancetype/v1beta1/types.go +++ b/vendor/kubevirt.io/api/instancetype/v1beta1/types.go @@ -112,6 +112,10 @@ type VirtualMachineInstancetypeSpec struct { // +optional IOThreadsPolicy *v1.IOThreadsPolicy `json:"ioThreadsPolicy,omitempty"` + // Optionally specifies the IOThreads options to be used by the instancetype. + // +optional + IOThreads *v1.DiskIOThreads `json:"ioThreads,omitempty"` + // Optionally defines the LaunchSecurity to be used by the instancetype. // // +optional @@ -298,6 +302,11 @@ type VirtualMachinePreferenceSpec struct { // //+optional PreferSpreadSocketToCoreRatio uint32 `json:"preferSpreadSocketToCoreRatio,omitempty"` + + // PreferredArchitecture defines a prefeerred architecture for the VirtualMachine + // + //+optional + PreferredArchitecture *string `json:"preferredArchitecture,omitempty"` } type VolumePreferences struct { @@ -312,23 +321,39 @@ type VolumePreferences struct { type PreferredCPUTopology string const ( - // Prefer vCPUs to be exposed as cores to the guest - PreferCores PreferredCPUTopology = "preferCores" + DeprecatedPreferCores PreferredCPUTopology = "preferCores" // Prefer vCPUs to be exposed as sockets to the guest, this is the default for the PreferredCPUTopology attribute of CPUPreferences. - PreferSockets PreferredCPUTopology = "preferSockets" + DeprecatedPreferSockets PreferredCPUTopology = "preferSockets" // Prefer vCPUs to be exposed as threads to the guest - PreferThreads PreferredCPUTopology = "preferThreads" + DeprecatedPreferThreads PreferredCPUTopology = "preferThreads" // Prefer vCPUs to be spread evenly between cores and sockets with any remaining vCPUs being presented as cores - PreferSpread PreferredCPUTopology = "preferSpread" + DeprecatedPreferSpread PreferredCPUTopology = "preferSpread" // Prefer vCPUs to be spread according to VirtualMachineInstanceTemplateSpec // // If used with VirtualMachineInstanceType it will use sockets as default - PreferAny PreferredCPUTopology = "preferAny" + DeprecatedPreferAny PreferredCPUTopology = "preferAny" + + // Prefer vCPUs to be exposed as cores to the guest + Cores PreferredCPUTopology = "cores" + + // Prefer vCPUs to be exposed as sockets to the guest, this is the default for the PreferredCPUTopology attribute of CPUPreferences. + Sockets PreferredCPUTopology = "sockets" + + // Prefer vCPUs to be exposed as threads to the guest + Threads PreferredCPUTopology = "threads" + + // Prefer vCPUs to be spread evenly between cores and sockets with any remaining vCPUs being presented as cores + Spread PreferredCPUTopology = "spread" + + // Prefer vCPUs to be spread according to VirtualMachineInstanceTemplateSpec + // + // If used with VirtualMachineInstanceType it will use sockets as default + Any PreferredCPUTopology = "any" ) // CPUPreferences contains various optional CPU preferences. @@ -503,6 +528,11 @@ type DevicePreferences struct { // // +optional PreferredInterfaceMasquerade *v1.InterfaceMasquerade `json:"preferredInterfaceMasquerade,omitempty"` + + // PreferredPanicDeviceModel optionally defines the preferred panic device model to use with panic devices. + // + // +optional + PreferredPanicDeviceModel *v1.PanicDeviceModel `json:"preferredPanicDeviceModel,omitempty"` } // FeaturePreferences contains various optional defaults for Features. @@ -557,14 +587,21 @@ type FirmwarePreferences struct { // PreferredUseEfi optionally enables EFI // // +optional - PreferredUseEfi *bool `json:"preferredUseEfi,omitempty"` + // Deprecated: Will be removed with v1beta2 or v1 + DeprecatedPreferredUseEfi *bool `json:"preferredUseEfi,omitempty"` // PreferredUseSecureBoot optionally enables SecureBoot and the OVMF roms will be swapped for SecureBoot-enabled ones. // // Requires PreferredUseEfi and PreferredSmm to be enabled. // // +optional - PreferredUseSecureBoot *bool `json:"preferredUseSecureBoot,omitempty"` + // Deprecated: Will be removed with v1beta2 or v1 + DeprecatedPreferredUseSecureBoot *bool `json:"preferredUseSecureBoot,omitempty"` + + // PreferredEfi optionally enables EFI + // + // +optional + PreferredEfi *v1.EFI `json:"preferredEfi,omitempty"` } // MachinePreferences contains various optional defaults for Machine. @@ -601,6 +638,11 @@ type PreferenceRequirements struct { // //+optional Memory *MemoryPreferenceRequirement `json:"memory,omitempty"` + + // Required Architecture of the VM referencing this preference + // + //+optional + Architecture *string `json:"architecture,omitempty"` } type CPUPreferenceRequirement struct { diff --git a/vendor/kubevirt.io/api/instancetype/v1beta1/types_swagger_generated.go b/vendor/kubevirt.io/api/instancetype/v1beta1/types_swagger_generated.go index f6226c416..c0ec5a91b 100644 --- a/vendor/kubevirt.io/api/instancetype/v1beta1/types_swagger_generated.go +++ b/vendor/kubevirt.io/api/instancetype/v1beta1/types_swagger_generated.go @@ -38,6 +38,7 @@ func (VirtualMachineInstancetypeSpec) SwaggerDoc() map[string]string { "gpus": "Optionally defines any GPU devices associated with the instancetype.\n\n+optional\n+listType=atomic", "hostDevices": "Optionally defines any HostDevices associated with the instancetype.\n\n+optional\n+listType=atomic", "ioThreadsPolicy": "Optionally defines the IOThreadsPolicy to be used by the instancetype.\n\n+optional", + "ioThreads": "Optionally specifies the IOThreads options to be used by the instancetype.\n+optional", "launchSecurity": "Optionally defines the LaunchSecurity to be used by the instancetype.\n\n+optional", "annotations": "Optionally defines the required Annotations to be used by the instance type and applied to the VirtualMachineInstance\n\n+optional", } @@ -109,6 +110,7 @@ func (VirtualMachinePreferenceSpec) SwaggerDoc() map[string]string { "requirements": "Requirements defines the minium amount of instance type defined resources required by a set of preferences\n\n+optional", "annotations": "Optionally defines preferred Annotations to be applied to the VirtualMachineInstance\n\n+optional", "preferSpreadSocketToCoreRatio": "PreferSpreadSocketToCoreRatio defines the ratio to spread vCPUs between cores and sockets, it defaults to 2.\n\n+optional", + "preferredArchitecture": "PreferredArchitecture defines a prefeerred architecture for the VirtualMachine\n\n+optional", } } @@ -161,6 +163,7 @@ func (DevicePreferences) SwaggerDoc() map[string]string { "preferredNetworkInterfaceMultiQueue": "PreferredNetworkInterfaceMultiQueue optionally enables the vhost multiqueue feature for virtio interfaces.\n\n+optional", "preferredTPM": "PreferredTPM optionally defines the preferred TPM device to be used.\n\n+optional", "preferredInterfaceMasquerade": "PreferredInterfaceMasquerade optionally defines the preferred masquerade configuration to use with each network interface.\n\n+optional", + "preferredPanicDeviceModel": "PreferredPanicDeviceModel optionally defines the preferred panic device model to use with panic devices.\n\n+optional", } } @@ -181,8 +184,9 @@ func (FirmwarePreferences) SwaggerDoc() map[string]string { "": "FirmwarePreferences contains various optional defaults for Firmware.", "preferredUseBios": "PreferredUseBios optionally enables BIOS\n\n+optional", "preferredUseBiosSerial": "PreferredUseBiosSerial optionally transmitts BIOS output over the serial.\n\nRequires PreferredUseBios to be enabled.\n\n+optional", - "preferredUseEfi": "PreferredUseEfi optionally enables EFI\n\n+optional", - "preferredUseSecureBoot": "PreferredUseSecureBoot optionally enables SecureBoot and the OVMF roms will be swapped for SecureBoot-enabled ones.\n\nRequires PreferredUseEfi and PreferredSmm to be enabled.\n\n+optional", + "preferredUseEfi": "PreferredUseEfi optionally enables EFI\n\n+optional\nDeprecated: Will be removed with v1beta2 or v1", + "preferredUseSecureBoot": "PreferredUseSecureBoot optionally enables SecureBoot and the OVMF roms will be swapped for SecureBoot-enabled ones.\n\nRequires PreferredUseEfi and PreferredSmm to be enabled.\n\n+optional\nDeprecated: Will be removed with v1beta2 or v1", + "preferredEfi": "PreferredEfi optionally enables EFI\n\n+optional", } } @@ -203,8 +207,9 @@ func (ClockPreferences) SwaggerDoc() map[string]string { func (PreferenceRequirements) SwaggerDoc() map[string]string { return map[string]string{ - "cpu": "Required CPU related attributes of the instancetype.\n\n+optional", - "memory": "Required Memory related attributes of the instancetype.\n\n+optional", + "cpu": "Required CPU related attributes of the instancetype.\n\n+optional", + "memory": "Required Memory related attributes of the instancetype.\n\n+optional", + "architecture": "Required Architecture of the VM referencing this preference\n\n+optional", } } diff --git a/vendor/kubevirt.io/api/migrations/v1alpha1/deepcopy_generated.go b/vendor/kubevirt.io/api/migrations/v1alpha1/deepcopy_generated.go index 55a5fa3ff..6f22fba1e 100644 --- a/vendor/kubevirt.io/api/migrations/v1alpha1/deepcopy_generated.go +++ b/vendor/kubevirt.io/api/migrations/v1alpha1/deepcopy_generated.go @@ -2,7 +2,7 @@ // +build !ignore_autogenerated /* -Copyright The KubeVirt Authors. +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. @@ -15,6 +15,8 @@ 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 The KubeVirt Authors. */ // Code generated by deepcopy-gen. DO NOT EDIT. @@ -136,6 +138,11 @@ func (in *MigrationPolicySpec) DeepCopyInto(out *MigrationPolicySpec) { *out = new(bool) **out = **in } + if in.AllowWorkloadDisruption != nil { + in, out := &in.AllowWorkloadDisruption, &out.AllowWorkloadDisruption + *out = new(bool) + **out = **in + } return } diff --git a/vendor/kubevirt.io/api/migrations/v1alpha1/types.go b/vendor/kubevirt.io/api/migrations/v1alpha1/types.go index f258cf6e6..b10dbb2d3 100644 --- a/vendor/kubevirt.io/api/migrations/v1alpha1/types.go +++ b/vendor/kubevirt.io/api/migrations/v1alpha1/types.go @@ -51,6 +51,8 @@ type MigrationPolicySpec struct { CompletionTimeoutPerGiB *int64 `json:"completionTimeoutPerGiB,omitempty"` //+optional AllowPostCopy *bool `json:"allowPostCopy,omitempty"` + //+optional + AllowWorkloadDisruption *bool `json:"allowWorkloadDisruption,omitempty"` } type LabelSelector map[string]string @@ -99,6 +101,14 @@ func (m *MigrationPolicy) GetMigrationConfByPolicy(clusterMigrationConfiguration changed = true *clusterMigrationConfigurations.AllowPostCopy = *policySpec.AllowPostCopy } + if policySpec.AllowWorkloadDisruption != nil { + changed = true + *clusterMigrationConfigurations.AllowWorkloadDisruption = *policySpec.AllowWorkloadDisruption + } else if policySpec.AllowWorkloadDisruption == nil && policySpec.AllowPostCopy != nil { + // For backward compatibility, AllowWorkloadDisruption will follow the + // value of AllowPostCopy, if not explicitly set + *clusterMigrationConfigurations.AllowWorkloadDisruption = *policySpec.AllowPostCopy + } return changed, nil } diff --git a/vendor/kubevirt.io/api/migrations/v1alpha1/types_swagger_generated.go b/vendor/kubevirt.io/api/migrations/v1alpha1/types_swagger_generated.go index 6d3eac714..a5788ab45 100644 --- a/vendor/kubevirt.io/api/migrations/v1alpha1/types_swagger_generated.go +++ b/vendor/kubevirt.io/api/migrations/v1alpha1/types_swagger_generated.go @@ -15,6 +15,7 @@ func (MigrationPolicySpec) SwaggerDoc() map[string]string { "bandwidthPerMigration": "+optional", "completionTimeoutPerGiB": "+optional", "allowPostCopy": "+optional", + "allowWorkloadDisruption": "+optional", } } diff --git a/vendor/kubevirt.io/api/pool/v1alpha1/deepcopy_generated.go b/vendor/kubevirt.io/api/pool/v1alpha1/deepcopy_generated.go index 86b095e3e..ebdd27bd7 100644 --- a/vendor/kubevirt.io/api/pool/v1alpha1/deepcopy_generated.go +++ b/vendor/kubevirt.io/api/pool/v1alpha1/deepcopy_generated.go @@ -2,7 +2,7 @@ // +build !ignore_autogenerated /* -Copyright The KubeVirt Authors. +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. @@ -15,6 +15,8 @@ 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 The KubeVirt Authors. */ // Code generated by deepcopy-gen. DO NOT EDIT. @@ -22,10 +24,28 @@ limitations under the License. package v1alpha1 import ( + corev1 "k8s.io/api/core/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" + intstr "k8s.io/apimachinery/pkg/util/intstr" ) +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualMachineOpportunisticUpdateStrategy) DeepCopyInto(out *VirtualMachineOpportunisticUpdateStrategy) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineOpportunisticUpdateStrategy. +func (in *VirtualMachineOpportunisticUpdateStrategy) DeepCopy() *VirtualMachineOpportunisticUpdateStrategy { + if in == nil { + return nil + } + out := new(VirtualMachineOpportunisticUpdateStrategy) + in.DeepCopyInto(out) + return out +} + // 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 @@ -54,6 +74,32 @@ func (in *VirtualMachinePool) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualMachinePoolAutohealingStrategy) DeepCopyInto(out *VirtualMachinePoolAutohealingStrategy) { + *out = *in + if in.StartUpFailureThreshold != nil { + in, out := &in.StartUpFailureThreshold, &out.StartUpFailureThreshold + *out = new(uint32) + **out = **in + } + if in.MinFailingToStartDuration != nil { + in, out := &in.MinFailingToStartDuration, &out.MinFailingToStartDuration + *out = new(v1.Duration) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachinePoolAutohealingStrategy. +func (in *VirtualMachinePoolAutohealingStrategy) DeepCopy() *VirtualMachinePoolAutohealingStrategy { + if in == nil { + return nil + } + out := new(VirtualMachinePoolAutohealingStrategy) + in.DeepCopyInto(out) + return out +} + // 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 @@ -105,6 +151,189 @@ func (in *VirtualMachinePoolList) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualMachinePoolNameGeneration) DeepCopyInto(out *VirtualMachinePoolNameGeneration) { + *out = *in + if in.AppendIndexToConfigMapRefs != nil { + in, out := &in.AppendIndexToConfigMapRefs, &out.AppendIndexToConfigMapRefs + *out = new(bool) + **out = **in + } + if in.AppendIndexToSecretRefs != nil { + in, out := &in.AppendIndexToSecretRefs, &out.AppendIndexToSecretRefs + *out = new(bool) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachinePoolNameGeneration. +func (in *VirtualMachinePoolNameGeneration) DeepCopy() *VirtualMachinePoolNameGeneration { + if in == nil { + return nil + } + out := new(VirtualMachinePoolNameGeneration) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualMachinePoolOpportunisticScaleInStrategy) DeepCopyInto(out *VirtualMachinePoolOpportunisticScaleInStrategy) { + *out = *in + if in.StatePreservation != nil { + in, out := &in.StatePreservation, &out.StatePreservation + *out = new(StatePreservation) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachinePoolOpportunisticScaleInStrategy. +func (in *VirtualMachinePoolOpportunisticScaleInStrategy) DeepCopy() *VirtualMachinePoolOpportunisticScaleInStrategy { + if in == nil { + return nil + } + out := new(VirtualMachinePoolOpportunisticScaleInStrategy) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualMachinePoolProactiveScaleInStrategy) DeepCopyInto(out *VirtualMachinePoolProactiveScaleInStrategy) { + *out = *in + if in.SelectionPolicy != nil { + in, out := &in.SelectionPolicy, &out.SelectionPolicy + *out = new(VirtualMachinePoolSelectionPolicy) + (*in).DeepCopyInto(*out) + } + if in.StatePreservation != nil { + in, out := &in.StatePreservation, &out.StatePreservation + *out = new(StatePreservation) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachinePoolProactiveScaleInStrategy. +func (in *VirtualMachinePoolProactiveScaleInStrategy) DeepCopy() *VirtualMachinePoolProactiveScaleInStrategy { + if in == nil { + return nil + } + out := new(VirtualMachinePoolProactiveScaleInStrategy) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualMachinePoolProactiveUpdateStrategy) DeepCopyInto(out *VirtualMachinePoolProactiveUpdateStrategy) { + *out = *in + if in.SelectionPolicy != nil { + in, out := &in.SelectionPolicy, &out.SelectionPolicy + *out = new(VirtualMachinePoolSelectionPolicy) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachinePoolProactiveUpdateStrategy. +func (in *VirtualMachinePoolProactiveUpdateStrategy) DeepCopy() *VirtualMachinePoolProactiveUpdateStrategy { + if in == nil { + return nil + } + out := new(VirtualMachinePoolProactiveUpdateStrategy) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualMachinePoolScaleInStrategy) DeepCopyInto(out *VirtualMachinePoolScaleInStrategy) { + *out = *in + if in.Unmanaged != nil { + in, out := &in.Unmanaged, &out.Unmanaged + *out = new(VirtualMachinePoolUnmanagedStrategy) + **out = **in + } + if in.Opportunistic != nil { + in, out := &in.Opportunistic, &out.Opportunistic + *out = new(VirtualMachinePoolOpportunisticScaleInStrategy) + (*in).DeepCopyInto(*out) + } + if in.Proactive != nil { + in, out := &in.Proactive, &out.Proactive + *out = new(VirtualMachinePoolProactiveScaleInStrategy) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachinePoolScaleInStrategy. +func (in *VirtualMachinePoolScaleInStrategy) DeepCopy() *VirtualMachinePoolScaleInStrategy { + if in == nil { + return nil + } + out := new(VirtualMachinePoolScaleInStrategy) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualMachinePoolSelectionPolicy) DeepCopyInto(out *VirtualMachinePoolSelectionPolicy) { + *out = *in + if in.SortPolicy != nil { + in, out := &in.SortPolicy, &out.SortPolicy + *out = new(VirtualMachinePoolSortPolicy) + **out = **in + } + if in.Selectors != nil { + in, out := &in.Selectors, &out.Selectors + *out = new(VirtualMachinePoolSelectors) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachinePoolSelectionPolicy. +func (in *VirtualMachinePoolSelectionPolicy) DeepCopy() *VirtualMachinePoolSelectionPolicy { + if in == nil { + return nil + } + out := new(VirtualMachinePoolSelectionPolicy) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualMachinePoolSelectors) DeepCopyInto(out *VirtualMachinePoolSelectors) { + *out = *in + if in.LabelSelector != nil { + in, out := &in.LabelSelector, &out.LabelSelector + *out = new(v1.LabelSelector) + (*in).DeepCopyInto(*out) + } + if in.NodeSelectorRequirementMatcher != nil { + in, out := &in.NodeSelectorRequirementMatcher, &out.NodeSelectorRequirementMatcher + *out = new([]corev1.NodeSelectorRequirement) + if **in != nil { + in, out := *in, *out + *out = make([]corev1.NodeSelectorRequirement, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachinePoolSelectors. +func (in *VirtualMachinePoolSelectors) DeepCopy() *VirtualMachinePoolSelectors { + if in == nil { + return nil + } + out := new(VirtualMachinePoolSelectors) + in.DeepCopyInto(out) + return out +} + // 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 @@ -123,6 +352,31 @@ func (in *VirtualMachinePoolSpec) DeepCopyInto(out *VirtualMachinePoolSpec) { *out = new(VirtualMachineTemplateSpec) (*in).DeepCopyInto(*out) } + if in.NameGeneration != nil { + in, out := &in.NameGeneration, &out.NameGeneration + *out = new(VirtualMachinePoolNameGeneration) + (*in).DeepCopyInto(*out) + } + if in.MaxUnavailable != nil { + in, out := &in.MaxUnavailable, &out.MaxUnavailable + *out = new(intstr.IntOrString) + **out = **in + } + if in.ScaleInStrategy != nil { + in, out := &in.ScaleInStrategy, &out.ScaleInStrategy + *out = new(VirtualMachinePoolScaleInStrategy) + (*in).DeepCopyInto(*out) + } + if in.UpdateStrategy != nil { + in, out := &in.UpdateStrategy, &out.UpdateStrategy + *out = new(VirtualMachinePoolUpdateStrategy) + (*in).DeepCopyInto(*out) + } + if in.Autohealing != nil { + in, out := &in.Autohealing, &out.Autohealing + *out = new(VirtualMachinePoolAutohealingStrategy) + (*in).DeepCopyInto(*out) + } return } @@ -159,6 +413,53 @@ func (in *VirtualMachinePoolStatus) DeepCopy() *VirtualMachinePoolStatus { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualMachinePoolUnmanagedStrategy) DeepCopyInto(out *VirtualMachinePoolUnmanagedStrategy) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachinePoolUnmanagedStrategy. +func (in *VirtualMachinePoolUnmanagedStrategy) DeepCopy() *VirtualMachinePoolUnmanagedStrategy { + if in == nil { + return nil + } + out := new(VirtualMachinePoolUnmanagedStrategy) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualMachinePoolUpdateStrategy) DeepCopyInto(out *VirtualMachinePoolUpdateStrategy) { + *out = *in + if in.Unmanaged != nil { + in, out := &in.Unmanaged, &out.Unmanaged + *out = new(VirtualMachinePoolUnmanagedStrategy) + **out = **in + } + if in.Opportunistic != nil { + in, out := &in.Opportunistic, &out.Opportunistic + *out = new(VirtualMachineOpportunisticUpdateStrategy) + **out = **in + } + if in.Proactive != nil { + in, out := &in.Proactive, &out.Proactive + *out = new(VirtualMachinePoolProactiveUpdateStrategy) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachinePoolUpdateStrategy. +func (in *VirtualMachinePoolUpdateStrategy) DeepCopy() *VirtualMachinePoolUpdateStrategy { + if in == nil { + return nil + } + out := new(VirtualMachinePoolUpdateStrategy) + 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 diff --git a/vendor/kubevirt.io/api/pool/v1alpha1/types.go b/vendor/kubevirt.io/api/pool/v1alpha1/types.go index 5ca53ad53..d8ba1d065 100644 --- a/vendor/kubevirt.io/api/pool/v1alpha1/types.go +++ b/vendor/kubevirt.io/api/pool/v1alpha1/types.go @@ -22,12 +22,23 @@ package v1alpha1 import ( k8sv1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + intstr "k8s.io/apimachinery/pkg/util/intstr" virtv1 "kubevirt.io/api/core/v1" ) const ( - VirtualMachinePoolKind = "VirtualMachinePool" + VirtualMachinePoolKind = "VirtualMachinePool" + VirtualMachinePoolControllerFinalizer = "pool.kubevirt.io/finalizer" +) + +const ( + // Sort policies + VirtualMachinePoolSortPolicyAscendingOrder VirtualMachinePoolSortPolicy = "AscendingOrder" + VirtualMachinePoolSortPolicyDescendingOrder VirtualMachinePoolSortPolicy = "DescendingOrder" + VirtualMachinePoolSortPolicyNewest VirtualMachinePoolSortPolicy = "Newest" + VirtualMachinePoolSortPolicyOldest VirtualMachinePoolSortPolicy = "Oldest" + VirtualMachinePoolSortPolicyRandom VirtualMachinePoolSortPolicy = "Random" ) // VirtualMachinePool resource contains a VirtualMachine configuration @@ -96,6 +107,7 @@ type VirtualMachinePoolSpec struct { // Number of desired pods. This is a pointer to distinguish between explicit // zero and not specified. Defaults to 1. // +optional + // +kubebuilder:validation:Minimum=0 Replicas *int32 `json:"replicas,omitempty"` // Label selector for pods. Existing Poolss whose pods are @@ -108,6 +120,47 @@ type VirtualMachinePoolSpec struct { // Indicates that the pool is paused. // +optional Paused bool `json:"paused,omitempty" protobuf:"varint,7,opt,name=paused"` + + // Options for the name generation in a pool. + // +optional + NameGeneration *VirtualMachinePoolNameGeneration `json:"nameGeneration,omitempty"` + + // (Defaults to 100%) Integer or string pointer, that when set represents either a percentage or number of VMs in a pool that can be unavailable (ready condition false) at a time during automated update. + // +optional + MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,omitempty" protobuf:"bytes,3,opt,name=maxUnavailable"` + + // ScaleInStrategy specifies how the VMPool controller manages scaling in VMs within a VMPool + // +optional + ScaleInStrategy *VirtualMachinePoolScaleInStrategy `json:"scaleInStrategy,omitempty"` + + // UpdateStrategy specifies how the VMPool controller manages updating VMs within a VMPool + // +optional + UpdateStrategy *VirtualMachinePoolUpdateStrategy `json:"updateStrategy,omitempty"` + + // Autohealing specifies when a VMpool should replace a failing VM with a reprovisioned instance + // +optional + Autohealing *VirtualMachinePoolAutohealingStrategy `json:"autohealing,omitempty"` +} + +// +k8s:openapi-gen=true +type VirtualMachinePoolAutohealingStrategy struct { + // StartUpFailureThreshold is the number of consecutive VMI start failures (it tracks the value of Status.StartFailure.ConsecutiveFailCount field) before replacing the VM. + // Defaults to 3 + // +optional + // +kubebuilder:validation:Minimum=1 + StartUpFailureThreshold *uint32 `json:"startUpFailureThreshold,omitempty"` + + // MinFailingToStartDuration is the minimum time a VM must be in a failing status (applies to status conditions like CrashLoopBackOff, Unschedulable) before being replaced. + // It measures the duration since the VM's Ready condition transitioned to False. + // Defaults to 5 minutes + // +optional + MinFailingToStartDuration *metav1.Duration `json:"minFailingToStartDuration,omitempty"` +} + +// +k8s:openapi-gen=true +type VirtualMachinePoolNameGeneration struct { + AppendIndexToConfigMapRefs *bool `json:"appendIndexToConfigMapRefs,omitempty"` + AppendIndexToSecretRefs *bool `json:"appendIndexToSecretRefs,omitempty"` } // VirtualMachinePoolList is a list of VirtualMachinePool resources. @@ -119,3 +172,119 @@ type VirtualMachinePoolList struct { metav1.ListMeta `json:"metadata,omitempty"` Items []VirtualMachinePool `json:"items"` } + +// VirtualMachinePoolScaleInStrategy specifies how the VMPool controller manages scaling in VMs within a VMPool +// +k8s:openapi-gen=true +type VirtualMachinePoolScaleInStrategy struct { + // The VM is never touched after creation. Users are responsible for scaling in the pool manually. + Unmanaged *VirtualMachinePoolUnmanagedStrategy `json:"unmanaged,omitempty"` + + // Opportunistic scale-in is a strategy when vms are deleted by some other means than the scale-in action. + // For example, when the VM is deleted by the user or when the VM is deleted by the node that is hosting the VM. + // +optional + Opportunistic *VirtualMachinePoolOpportunisticScaleInStrategy `json:"opportunistic,omitempty"` + + // Proactive scale-in by forcing VMs to shutdown during scale-in (Default) + // +optional + Proactive *VirtualMachinePoolProactiveScaleInStrategy `json:"proactive,omitempty"` +} + +// VirtualMachinePoolOpportunisticScaleInStrategy represents opportunistic scale-in strategy +// +k8s:openapi-gen=true +type VirtualMachinePoolOpportunisticScaleInStrategy struct { + // Specifies if and how to preserve the state of the VMs selected during scale-in. + // Disabled - (Default) all state for VMs selected for scale-in will be deleted. + // Offline - PVCs for VMs selected for scale-in will be preserved and reused on scale-out (decreases provisioning time during scale out). + // Online - PVCs and memory for VMs selected for scale-in will be preserved and reused on scale-out (decreases provisioning and boot time during scale out). + // +optional + // +kubebuilder:validation:Enum=Disabled;Offline;Online + StatePreservation *StatePreservation `json:"statePreservation,omitempty"` +} + +// VirtualMachinePoolProactiveScaleInStrategy represents proactive scale-in strategy +// +k8s:openapi-gen=true +type VirtualMachinePoolProactiveScaleInStrategy struct { + // SelectionPolicy defines the priority in which VM instances are selected for proactive scale-in + // Defaults to "Random" base policy when no SelectionPolicy is configured + // +optional + SelectionPolicy *VirtualMachinePoolSelectionPolicy `json:"selectionPolicy,omitempty"` + + // Specifies if and how to preserve the state of the VMs selected during scale-in. + // Disabled - (Default) all state for VMs selected for scale-in will be deleted. + // Offline - PVCs for VMs selected for scale-in will be preserved and reused on scale-out (decreases provisioning time during scale out). + // Online - PVCs and memory for VMs selected for scale-in will be preserved and reused on scale-out (decreases provisioning and boot time during scale out). + // +optional + // +kubebuilder:validation:Enum=Disabled;Offline;Online + StatePreservation *StatePreservation `json:"statePreservation,omitempty"` +} + +// VirtualMachinePoolSelectionPolicy defines the priority in which VM instances are selected for proactive scale-in or update +// +k8s:openapi-gen=true +type VirtualMachinePoolSelectionPolicy struct { + // SortPolicy is a catch-all policy [AscendingOrder|DescendingOrder|Newest|Oldest|Random] + // +optional + // +kubebuilder:validation:Enum=AscendingOrder;DescendingOrder;Newest;Oldest;Random + SortPolicy *VirtualMachinePoolSortPolicy `json:"sortPolicy,omitempty"` + + // Selectors is a list of selection policies. + // +optional + Selectors *VirtualMachinePoolSelectors `json:"selectors,omitempty"` +} + +// VirtualMachinePoolSelectors specifies filtering criteria for VM selection. +// If both are specified, both must match for a VM to be selected. +// If only one is specified, only that one must match for a VM to be selected. +// +k8s:openapi-gen=true +type VirtualMachinePoolSelectors struct { + // LabelSelector is a list of label selector for VMs. + // +optional + LabelSelector *metav1.LabelSelector `json:"labelSelector,omitempty"` + + // NodeSelectorRequirementMatcher is a list of node selector requirement for VMs. + // +optional + NodeSelectorRequirementMatcher *[]k8sv1.NodeSelectorRequirement `json:"nodeSelectorRequirementMatcher,omitempty"` +} + +// +k8s:openapi-gen=true +type VirtualMachinePoolSortPolicy string + +// VirtualMachinePoolUpdateStrategy specifies how the VMPool controller manages updating VMs within a VMPool, by default it is proactive update. +// +k8s:openapi-gen=true +type VirtualMachinePoolUpdateStrategy struct { + // Unmanaged indicates that no automatic update of VMs within a VMPool is performed. When this is set, the VMPool controller will not update the VMs within the pool. + // +optional + Unmanaged *VirtualMachinePoolUnmanagedStrategy `json:"unmanaged,omitempty"` + + // Opportunistic update only gets applied to the VM, VMI is updated naturally upon the restart. Whereas proactive it applies both the VM and VMI right away. + // +optional + Opportunistic *VirtualMachineOpportunisticUpdateStrategy `json:"opportunistic,omitempty"` + + // Proactive update by forcing the VMs to restart during update + // +optional + Proactive *VirtualMachinePoolProactiveUpdateStrategy `json:"proactive,omitempty"` +} + +// +k8s:openapi-gen=true +type VirtualMachinePoolUnmanagedStrategy struct { +} + +// +k8s:openapi-gen=true +type VirtualMachineOpportunisticUpdateStrategy struct { +} + +// VirtualMachinePoolProactiveUpdateStrategy represents proactive update strategy +// +k8s:openapi-gen=true +type VirtualMachinePoolProactiveUpdateStrategy struct { + // SelectionPolicy defines the priority in which VM instances are selected for proactive update + // Defaults to "Random" base policy when no SelectionPolicy is configured + // +optional + SelectionPolicy *VirtualMachinePoolSelectionPolicy `json:"selectionPolicy,omitempty"` +} + +const ( + StatePreservationDisabled StatePreservation = "Disabled" + StatePreservationOffline StatePreservation = "Offline" + StatePreservationOnline StatePreservation = "Online" +) + +type StatePreservation string diff --git a/vendor/kubevirt.io/api/pool/v1alpha1/types_swagger_generated.go b/vendor/kubevirt.io/api/pool/v1alpha1/types_swagger_generated.go index a8f7668cf..5060f576a 100644 --- a/vendor/kubevirt.io/api/pool/v1alpha1/types_swagger_generated.go +++ b/vendor/kubevirt.io/api/pool/v1alpha1/types_swagger_generated.go @@ -35,10 +35,29 @@ func (VirtualMachinePoolStatus) SwaggerDoc() map[string]string { 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", + "replicas": "Number of desired pods. This is a pointer to distinguish between explicit\nzero and not specified. Defaults to 1.\n+optional\n+kubebuilder:validation:Minimum=0", "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", + "nameGeneration": "Options for the name generation in a pool.\n+optional", + "maxUnavailable": "(Defaults to 100%) Integer or string pointer, that when set represents either a percentage or number of VMs in a pool that can be unavailable (ready condition false) at a time during automated update.\n+optional", + "scaleInStrategy": "ScaleInStrategy specifies how the VMPool controller manages scaling in VMs within a VMPool\n+optional", + "updateStrategy": "UpdateStrategy specifies how the VMPool controller manages updating VMs within a VMPool\n+optional", + "autohealing": "Autohealing specifies when a VMpool should replace a failing VM with a reprovisioned instance\n+optional", + } +} + +func (VirtualMachinePoolAutohealingStrategy) SwaggerDoc() map[string]string { + return map[string]string{ + "": "+k8s:openapi-gen=true", + "startUpFailureThreshold": "StartUpFailureThreshold is the number of consecutive VMI start failures (it tracks the value of Status.StartFailure.ConsecutiveFailCount field) before replacing the VM.\nDefaults to 3\n+optional\n+kubebuilder:validation:Minimum=1", + "minFailingToStartDuration": "MinFailingToStartDuration is the minimum time a VM must be in a failing status (applies to status conditions like CrashLoopBackOff, Unschedulable) before being replaced.\nIt measures the duration since the VM's Ready condition transitioned to False.\nDefaults to 5 minutes\n+optional", + } +} + +func (VirtualMachinePoolNameGeneration) SwaggerDoc() map[string]string { + return map[string]string{ + "": "+k8s:openapi-gen=true", } } @@ -47,3 +66,71 @@ func (VirtualMachinePoolList) SwaggerDoc() 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", } } + +func (VirtualMachinePoolScaleInStrategy) SwaggerDoc() map[string]string { + return map[string]string{ + "": "VirtualMachinePoolScaleInStrategy specifies how the VMPool controller manages scaling in VMs within a VMPool\n+k8s:openapi-gen=true", + "unmanaged": "The VM is never touched after creation. Users are responsible for scaling in the pool manually.", + "opportunistic": "Opportunistic scale-in is a strategy when vms are deleted by some other means than the scale-in action.\nFor example, when the VM is deleted by the user or when the VM is deleted by the node that is hosting the VM.\n+optional", + "proactive": "Proactive scale-in by forcing VMs to shutdown during scale-in (Default)\n+optional", + } +} + +func (VirtualMachinePoolOpportunisticScaleInStrategy) SwaggerDoc() map[string]string { + return map[string]string{ + "": "VirtualMachinePoolOpportunisticScaleInStrategy represents opportunistic scale-in strategy\n+k8s:openapi-gen=true", + "statePreservation": "Specifies if and how to preserve the state of the VMs selected during scale-in.\nDisabled - (Default) all state for VMs selected for scale-in will be deleted.\nOffline - PVCs for VMs selected for scale-in will be preserved and reused on scale-out (decreases provisioning time during scale out).\nOnline - PVCs and memory for VMs selected for scale-in will be preserved and reused on scale-out (decreases provisioning and boot time during scale out).\n+optional\n+kubebuilder:validation:Enum=Disabled;Offline;Online", + } +} + +func (VirtualMachinePoolProactiveScaleInStrategy) SwaggerDoc() map[string]string { + return map[string]string{ + "": "VirtualMachinePoolProactiveScaleInStrategy represents proactive scale-in strategy\n+k8s:openapi-gen=true", + "selectionPolicy": "SelectionPolicy defines the priority in which VM instances are selected for proactive scale-in\nDefaults to \"Random\" base policy when no SelectionPolicy is configured\n+optional", + "statePreservation": "Specifies if and how to preserve the state of the VMs selected during scale-in.\nDisabled - (Default) all state for VMs selected for scale-in will be deleted.\nOffline - PVCs for VMs selected for scale-in will be preserved and reused on scale-out (decreases provisioning time during scale out).\nOnline - PVCs and memory for VMs selected for scale-in will be preserved and reused on scale-out (decreases provisioning and boot time during scale out).\n+optional\n+kubebuilder:validation:Enum=Disabled;Offline;Online", + } +} + +func (VirtualMachinePoolSelectionPolicy) SwaggerDoc() map[string]string { + return map[string]string{ + "": "VirtualMachinePoolSelectionPolicy defines the priority in which VM instances are selected for proactive scale-in or update\n+k8s:openapi-gen=true", + "sortPolicy": "SortPolicy is a catch-all policy [AscendingOrder|DescendingOrder|Newest|Oldest|Random]\n+optional\n+kubebuilder:validation:Enum=AscendingOrder;DescendingOrder;Newest;Oldest;Random", + "selectors": "Selectors is a list of selection policies.\n+optional", + } +} + +func (VirtualMachinePoolSelectors) SwaggerDoc() map[string]string { + return map[string]string{ + "": "VirtualMachinePoolSelectors specifies filtering criteria for VM selection.\nIf both are specified, both must match for a VM to be selected.\nIf only one is specified, only that one must match for a VM to be selected.\n+k8s:openapi-gen=true", + "labelSelector": "LabelSelector is a list of label selector for VMs.\n+optional", + "nodeSelectorRequirementMatcher": "NodeSelectorRequirementMatcher is a list of node selector requirement for VMs.\n+optional", + } +} + +func (VirtualMachinePoolUpdateStrategy) SwaggerDoc() map[string]string { + return map[string]string{ + "": "VirtualMachinePoolUpdateStrategy specifies how the VMPool controller manages updating VMs within a VMPool, by default it is proactive update.\n+k8s:openapi-gen=true", + "unmanaged": "Unmanaged indicates that no automatic update of VMs within a VMPool is performed. When this is set, the VMPool controller will not update the VMs within the pool.\n+optional", + "opportunistic": "Opportunistic update only gets applied to the VM, VMI is updated naturally upon the restart. Whereas proactive it applies both the VM and VMI right away.\n+optional", + "proactive": "Proactive update by forcing the VMs to restart during update\n+optional", + } +} + +func (VirtualMachinePoolUnmanagedStrategy) SwaggerDoc() map[string]string { + return map[string]string{ + "": "+k8s:openapi-gen=true", + } +} + +func (VirtualMachineOpportunisticUpdateStrategy) SwaggerDoc() map[string]string { + return map[string]string{ + "": "+k8s:openapi-gen=true", + } +} + +func (VirtualMachinePoolProactiveUpdateStrategy) SwaggerDoc() map[string]string { + return map[string]string{ + "": "VirtualMachinePoolProactiveUpdateStrategy represents proactive update strategy\n+k8s:openapi-gen=true", + "selectionPolicy": "SelectionPolicy defines the priority in which VM instances are selected for proactive update\nDefaults to \"Random\" base policy when no SelectionPolicy is configured\n+optional", + } +} diff --git a/vendor/kubevirt.io/api/pool/v1beta1/deepcopy_generated.go b/vendor/kubevirt.io/api/pool/v1beta1/deepcopy_generated.go new file mode 100644 index 000000000..6aa8cb471 --- /dev/null +++ b/vendor/kubevirt.io/api/pool/v1beta1/deepcopy_generated.go @@ -0,0 +1,479 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +/* +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 The KubeVirt Authors. +*/ + +// Code generated by deepcopy-gen. DO NOT EDIT. + +package v1beta1 + +import ( + corev1 "k8s.io/api/core/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + intstr "k8s.io/apimachinery/pkg/util/intstr" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualMachineOpportunisticUpdateStrategy) DeepCopyInto(out *VirtualMachineOpportunisticUpdateStrategy) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineOpportunisticUpdateStrategy. +func (in *VirtualMachineOpportunisticUpdateStrategy) DeepCopy() *VirtualMachineOpportunisticUpdateStrategy { + if in == nil { + return nil + } + out := new(VirtualMachineOpportunisticUpdateStrategy) + in.DeepCopyInto(out) + return out +} + +// 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 *VirtualMachinePoolAutohealingStrategy) DeepCopyInto(out *VirtualMachinePoolAutohealingStrategy) { + *out = *in + if in.StartUpFailureThreshold != nil { + in, out := &in.StartUpFailureThreshold, &out.StartUpFailureThreshold + *out = new(uint32) + **out = **in + } + if in.MinFailingToStartDuration != nil { + in, out := &in.MinFailingToStartDuration, &out.MinFailingToStartDuration + *out = new(v1.Duration) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachinePoolAutohealingStrategy. +func (in *VirtualMachinePoolAutohealingStrategy) DeepCopy() *VirtualMachinePoolAutohealingStrategy { + if in == nil { + return nil + } + out := new(VirtualMachinePoolAutohealingStrategy) + in.DeepCopyInto(out) + return out +} + +// 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 *VirtualMachinePoolNameGeneration) DeepCopyInto(out *VirtualMachinePoolNameGeneration) { + *out = *in + if in.AppendIndexToConfigMapRefs != nil { + in, out := &in.AppendIndexToConfigMapRefs, &out.AppendIndexToConfigMapRefs + *out = new(bool) + **out = **in + } + if in.AppendIndexToSecretRefs != nil { + in, out := &in.AppendIndexToSecretRefs, &out.AppendIndexToSecretRefs + *out = new(bool) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachinePoolNameGeneration. +func (in *VirtualMachinePoolNameGeneration) DeepCopy() *VirtualMachinePoolNameGeneration { + if in == nil { + return nil + } + out := new(VirtualMachinePoolNameGeneration) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualMachinePoolOpportunisticScaleInStrategy) DeepCopyInto(out *VirtualMachinePoolOpportunisticScaleInStrategy) { + *out = *in + if in.StatePreservation != nil { + in, out := &in.StatePreservation, &out.StatePreservation + *out = new(StatePreservation) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachinePoolOpportunisticScaleInStrategy. +func (in *VirtualMachinePoolOpportunisticScaleInStrategy) DeepCopy() *VirtualMachinePoolOpportunisticScaleInStrategy { + if in == nil { + return nil + } + out := new(VirtualMachinePoolOpportunisticScaleInStrategy) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualMachinePoolProactiveScaleInStrategy) DeepCopyInto(out *VirtualMachinePoolProactiveScaleInStrategy) { + *out = *in + if in.SelectionPolicy != nil { + in, out := &in.SelectionPolicy, &out.SelectionPolicy + *out = new(VirtualMachinePoolSelectionPolicy) + (*in).DeepCopyInto(*out) + } + if in.StatePreservation != nil { + in, out := &in.StatePreservation, &out.StatePreservation + *out = new(StatePreservation) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachinePoolProactiveScaleInStrategy. +func (in *VirtualMachinePoolProactiveScaleInStrategy) DeepCopy() *VirtualMachinePoolProactiveScaleInStrategy { + if in == nil { + return nil + } + out := new(VirtualMachinePoolProactiveScaleInStrategy) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualMachinePoolProactiveUpdateStrategy) DeepCopyInto(out *VirtualMachinePoolProactiveUpdateStrategy) { + *out = *in + if in.SelectionPolicy != nil { + in, out := &in.SelectionPolicy, &out.SelectionPolicy + *out = new(VirtualMachinePoolSelectionPolicy) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachinePoolProactiveUpdateStrategy. +func (in *VirtualMachinePoolProactiveUpdateStrategy) DeepCopy() *VirtualMachinePoolProactiveUpdateStrategy { + if in == nil { + return nil + } + out := new(VirtualMachinePoolProactiveUpdateStrategy) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualMachinePoolScaleInStrategy) DeepCopyInto(out *VirtualMachinePoolScaleInStrategy) { + *out = *in + if in.Unmanaged != nil { + in, out := &in.Unmanaged, &out.Unmanaged + *out = new(VirtualMachinePoolUnmanagedStrategy) + **out = **in + } + if in.Opportunistic != nil { + in, out := &in.Opportunistic, &out.Opportunistic + *out = new(VirtualMachinePoolOpportunisticScaleInStrategy) + (*in).DeepCopyInto(*out) + } + if in.Proactive != nil { + in, out := &in.Proactive, &out.Proactive + *out = new(VirtualMachinePoolProactiveScaleInStrategy) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachinePoolScaleInStrategy. +func (in *VirtualMachinePoolScaleInStrategy) DeepCopy() *VirtualMachinePoolScaleInStrategy { + if in == nil { + return nil + } + out := new(VirtualMachinePoolScaleInStrategy) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualMachinePoolSelectionPolicy) DeepCopyInto(out *VirtualMachinePoolSelectionPolicy) { + *out = *in + if in.SortPolicy != nil { + in, out := &in.SortPolicy, &out.SortPolicy + *out = new(VirtualMachinePoolSortPolicy) + **out = **in + } + if in.Selectors != nil { + in, out := &in.Selectors, &out.Selectors + *out = new(VirtualMachinePoolSelectors) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachinePoolSelectionPolicy. +func (in *VirtualMachinePoolSelectionPolicy) DeepCopy() *VirtualMachinePoolSelectionPolicy { + if in == nil { + return nil + } + out := new(VirtualMachinePoolSelectionPolicy) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualMachinePoolSelectors) DeepCopyInto(out *VirtualMachinePoolSelectors) { + *out = *in + if in.LabelSelector != nil { + in, out := &in.LabelSelector, &out.LabelSelector + *out = new(v1.LabelSelector) + (*in).DeepCopyInto(*out) + } + if in.NodeSelectorRequirementMatcher != nil { + in, out := &in.NodeSelectorRequirementMatcher, &out.NodeSelectorRequirementMatcher + *out = new([]corev1.NodeSelectorRequirement) + if **in != nil { + in, out := *in, *out + *out = make([]corev1.NodeSelectorRequirement, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachinePoolSelectors. +func (in *VirtualMachinePoolSelectors) DeepCopy() *VirtualMachinePoolSelectors { + if in == nil { + return nil + } + out := new(VirtualMachinePoolSelectors) + in.DeepCopyInto(out) + return out +} + +// 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) + } + if in.NameGeneration != nil { + in, out := &in.NameGeneration, &out.NameGeneration + *out = new(VirtualMachinePoolNameGeneration) + (*in).DeepCopyInto(*out) + } + if in.MaxUnavailable != nil { + in, out := &in.MaxUnavailable, &out.MaxUnavailable + *out = new(intstr.IntOrString) + **out = **in + } + if in.ScaleInStrategy != nil { + in, out := &in.ScaleInStrategy, &out.ScaleInStrategy + *out = new(VirtualMachinePoolScaleInStrategy) + (*in).DeepCopyInto(*out) + } + if in.UpdateStrategy != nil { + in, out := &in.UpdateStrategy, &out.UpdateStrategy + *out = new(VirtualMachinePoolUpdateStrategy) + (*in).DeepCopyInto(*out) + } + if in.Autohealing != nil { + in, out := &in.Autohealing, &out.Autohealing + *out = new(VirtualMachinePoolAutohealingStrategy) + (*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 *VirtualMachinePoolUnmanagedStrategy) DeepCopyInto(out *VirtualMachinePoolUnmanagedStrategy) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachinePoolUnmanagedStrategy. +func (in *VirtualMachinePoolUnmanagedStrategy) DeepCopy() *VirtualMachinePoolUnmanagedStrategy { + if in == nil { + return nil + } + out := new(VirtualMachinePoolUnmanagedStrategy) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VirtualMachinePoolUpdateStrategy) DeepCopyInto(out *VirtualMachinePoolUpdateStrategy) { + *out = *in + if in.Unmanaged != nil { + in, out := &in.Unmanaged, &out.Unmanaged + *out = new(VirtualMachinePoolUnmanagedStrategy) + **out = **in + } + if in.Opportunistic != nil { + in, out := &in.Opportunistic, &out.Opportunistic + *out = new(VirtualMachineOpportunisticUpdateStrategy) + **out = **in + } + if in.Proactive != nil { + in, out := &in.Proactive, &out.Proactive + *out = new(VirtualMachinePoolProactiveUpdateStrategy) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachinePoolUpdateStrategy. +func (in *VirtualMachinePoolUpdateStrategy) DeepCopy() *VirtualMachinePoolUpdateStrategy { + if in == nil { + return nil + } + out := new(VirtualMachinePoolUpdateStrategy) + 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/instancetype/v1alpha1/doc.go b/vendor/kubevirt.io/api/pool/v1beta1/doc.go similarity index 78% rename from vendor/kubevirt.io/api/instancetype/v1alpha1/doc.go rename to vendor/kubevirt.io/api/pool/v1beta1/doc.go index 25c5f2b97..7a1f87218 100644 --- a/vendor/kubevirt.io/api/instancetype/v1alpha1/doc.go +++ b/vendor/kubevirt.io/api/pool/v1beta1/doc.go @@ -18,9 +18,7 @@ */ // +k8s:deepcopy-gen=package -// +groupName=instancetype.kubevirt.io -// +k8s:conversion-gen=kubevirt.io/api/instancetype/v1alpha1 -// +k8s:conversion-gen-external-types=kubevirt.io/api/instancetype/v1beta1 +// +groupName=pool.kubevirt.io // +k8s:openapi-gen=true -package v1alpha1 +package v1beta1 diff --git a/vendor/kubevirt.io/api/instancetype/v1alpha1/register.go b/vendor/kubevirt.io/api/pool/v1beta1/register.go similarity index 76% rename from vendor/kubevirt.io/api/instancetype/v1alpha1/register.go rename to vendor/kubevirt.io/api/pool/v1beta1/register.go index 34ab0b5b2..7235b2156 100644 --- a/vendor/kubevirt.io/api/instancetype/v1alpha1/register.go +++ b/vendor/kubevirt.io/api/pool/v1beta1/register.go @@ -17,18 +17,18 @@ * */ -package v1alpha1 +package v1beta1 import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" - "kubevirt.io/api/instancetype" + "kubevirt.io/api/pool" ) // SchemeGroupVersion is group version used to register these objects -var SchemeGroupVersion = schema.GroupVersion{Group: instancetype.GroupName, Version: "v1alpha1"} +var SchemeGroupVersion = schema.GroupVersion{Group: pool.GroupName, Version: "v1beta1"} // Kind takes an unqualified kind and returns back a Group qualified GroupKind func Kind(kind string) schema.GroupKind { @@ -45,21 +45,13 @@ var ( SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) // AddToScheme is a global function that registers this API group & version to a scheme AddToScheme = SchemeBuilder.AddToScheme - // required by conversion-gen - localSchemeBuilder = &SchemeBuilder ) // Adds the list of known types to Scheme. func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, - &VirtualMachineInstancetype{}, - &VirtualMachineInstancetypeList{}, - &VirtualMachineClusterInstancetype{}, - &VirtualMachineClusterInstancetypeList{}, - &VirtualMachinePreference{}, - &VirtualMachinePreferenceList{}, - &VirtualMachineClusterPreference{}, - &VirtualMachineClusterPreferenceList{}, + &VirtualMachinePool{}, + &VirtualMachinePoolList{}, ) metav1.AddToGroupVersion(scheme, SchemeGroupVersion) return nil diff --git a/vendor/kubevirt.io/api/pool/v1beta1/types.go b/vendor/kubevirt.io/api/pool/v1beta1/types.go new file mode 100644 index 000000000..0f71e4906 --- /dev/null +++ b/vendor/kubevirt.io/api/pool/v1beta1/types.go @@ -0,0 +1,290 @@ +/* + * 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 v1beta1 + +import ( + k8sv1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + intstr "k8s.io/apimachinery/pkg/util/intstr" + + virtv1 "kubevirt.io/api/core/v1" +) + +const ( + VirtualMachinePoolKind = "VirtualMachinePool" + VirtualMachinePoolControllerFinalizer = "pool.kubevirt.io/finalizer" +) + +const ( + // Sort policies + VirtualMachinePoolSortPolicyAscendingOrder VirtualMachinePoolSortPolicy = "AscendingOrder" + VirtualMachinePoolSortPolicyDescendingOrder VirtualMachinePoolSortPolicy = "DescendingOrder" + VirtualMachinePoolSortPolicyNewest VirtualMachinePoolSortPolicy = "Newest" + VirtualMachinePoolSortPolicyOldest VirtualMachinePoolSortPolicy = "Oldest" + VirtualMachinePoolSortPolicyRandom VirtualMachinePoolSortPolicy = "Random" +) + +// 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"` + + ReadyReplicas int32 `json:"readyReplicas,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 + // +kubebuilder:validation:Minimum=0 + 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"` + + // Options for the name generation in a pool. + // +optional + NameGeneration *VirtualMachinePoolNameGeneration `json:"nameGeneration,omitempty"` + + // (Defaults to 100%) Integer or string pointer, that when set represents either a percentage or number of VMs in a pool that can be unavailable (ready condition false) at a time during automated update. + // +optional + MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,omitempty" protobuf:"bytes,3,opt,name=maxUnavailable"` + + // ScaleInStrategy specifies how the VMPool controller manages scaling in VMs within a VMPool + // +optional + ScaleInStrategy *VirtualMachinePoolScaleInStrategy `json:"scaleInStrategy,omitempty"` + + // UpdateStrategy specifies how the VMPool controller manages updating VMs within a VMPool + // +optional + UpdateStrategy *VirtualMachinePoolUpdateStrategy `json:"updateStrategy,omitempty"` + + // Autohealing specifies when a VMpool should replace a failing VM with a reprovisioned instance + // +optional + Autohealing *VirtualMachinePoolAutohealingStrategy `json:"autohealing,omitempty"` +} + +// +k8s:openapi-gen=true +type VirtualMachinePoolAutohealingStrategy struct { + // StartUpFailureThreshold is the number of consecutive VMI start failures (it tracks the value of Status.StartFailure.ConsecutiveFailCount field) before replacing the VM. + // Defaults to 3 + // +optional + // +kubebuilder:validation:Minimum=1 + StartUpFailureThreshold *uint32 `json:"startUpFailureThreshold,omitempty"` + + // MinFailingToStartDuration is the minimum time a VM must be in a failing status (applies to status conditions like CrashLoopBackOff, Unschedulable) before being replaced. + // It measures the duration since the VM's Ready condition transitioned to False. + // Defaults to 5 minutes + // +optional + MinFailingToStartDuration *metav1.Duration `json:"minFailingToStartDuration,omitempty"` +} + +// +k8s:openapi-gen=true +type VirtualMachinePoolNameGeneration struct { + AppendIndexToConfigMapRefs *bool `json:"appendIndexToConfigMapRefs,omitempty"` + AppendIndexToSecretRefs *bool `json:"appendIndexToSecretRefs,omitempty"` +} + +// 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"` +} + +// VirtualMachinePoolScaleInStrategy specifies how the VMPool controller manages scaling in VMs within a VMPool +// +k8s:openapi-gen=true +type VirtualMachinePoolScaleInStrategy struct { + // The VM is never touched after creation. Users are responsible for scaling in the pool manually. + Unmanaged *VirtualMachinePoolUnmanagedStrategy `json:"unmanaged,omitempty"` + + // Opportunistic scale-in is a strategy when vms are deleted by some other means than the scale-in action. + // For example, when the VM is deleted by the user or when the VM is deleted by the node that is hosting the VM. + // +optional + Opportunistic *VirtualMachinePoolOpportunisticScaleInStrategy `json:"opportunistic,omitempty"` + + // Proactive scale-in by forcing VMs to shutdown during scale-in (Default) + // +optional + Proactive *VirtualMachinePoolProactiveScaleInStrategy `json:"proactive,omitempty"` +} + +// VirtualMachinePoolOpportunisticScaleInStrategy represents opportunistic scale-in strategy +// +k8s:openapi-gen=true +type VirtualMachinePoolOpportunisticScaleInStrategy struct { + // Specifies if and how to preserve the state of the VMs selected during scale-in. + // Disabled - (Default) all state for VMs selected for scale-in will be deleted. + // Offline - PVCs for VMs selected for scale-in will be preserved and reused on scale-out (decreases provisioning time during scale out). + // Online - PVCs and memory for VMs selected for scale-in will be preserved and reused on scale-out (decreases provisioning and boot time during scale out). + // +optional + // +kubebuilder:validation:Enum=Disabled;Offline;Online + StatePreservation *StatePreservation `json:"statePreservation,omitempty"` +} + +// VirtualMachinePoolProactiveScaleInStrategy represents proactive scale-in strategy +// +k8s:openapi-gen=true +type VirtualMachinePoolProactiveScaleInStrategy struct { + // SelectionPolicy defines the priority in which VM instances are selected for proactive scale-in + // Defaults to "Random" base policy when no SelectionPolicy is configured + // +optional + SelectionPolicy *VirtualMachinePoolSelectionPolicy `json:"selectionPolicy,omitempty"` + + // Specifies if and how to preserve the state of the VMs selected during scale-in. + // Disabled - (Default) all state for VMs selected for scale-in will be deleted. + // Offline - PVCs for VMs selected for scale-in will be preserved and reused on scale-out (decreases provisioning time during scale out). + // Online - PVCs and memory for VMs selected for scale-in will be preserved and reused on scale-out (decreases provisioning and boot time during scale out). + // +optional + // +kubebuilder:validation:Enum=Disabled;Offline;Online + StatePreservation *StatePreservation `json:"statePreservation,omitempty"` +} + +// VirtualMachinePoolSelectionPolicy defines the priority in which VM instances are selected for proactive scale-in or update +// +k8s:openapi-gen=true +type VirtualMachinePoolSelectionPolicy struct { + // SortPolicy is a catch-all policy [AscendingOrder|DescendingOrder|Newest|Oldest|Random] + // +optional + // +kubebuilder:validation:Enum=AscendingOrder;DescendingOrder;Newest;Oldest;Random + SortPolicy *VirtualMachinePoolSortPolicy `json:"sortPolicy,omitempty"` + + // Selectors is a list of selection policies. + // +optional + Selectors *VirtualMachinePoolSelectors `json:"selectors,omitempty"` +} + +// VirtualMachinePoolSelectors specifies filtering criteria for VM selection. +// If both are specified, both must match for a VM to be selected. +// If only one is specified, only that one must match for a VM to be selected. +// +k8s:openapi-gen=true +type VirtualMachinePoolSelectors struct { + // LabelSelector is a list of label selector for VMs. + // +optional + LabelSelector *metav1.LabelSelector `json:"labelSelector,omitempty"` + + // NodeSelectorRequirementMatcher is a list of node selector requirement for VMs. + // +optional + NodeSelectorRequirementMatcher *[]k8sv1.NodeSelectorRequirement `json:"nodeSelectorRequirementMatcher,omitempty"` +} + +// +k8s:openapi-gen=true +type VirtualMachinePoolSortPolicy string + +// VirtualMachinePoolUpdateStrategy specifies how the VMPool controller manages updating VMs within a VMPool, by default it is proactive update. +// +k8s:openapi-gen=true +type VirtualMachinePoolUpdateStrategy struct { + // Unmanaged indicates that no automatic update of VMs within a VMPool is performed. When this is set, the VMPool controller will not update the VMs within the pool. + // +optional + Unmanaged *VirtualMachinePoolUnmanagedStrategy `json:"unmanaged,omitempty"` + + // Opportunistic update only gets applied to the VM, VMI is updated naturally upon the restart. Whereas proactive it applies both the VM and VMI right away. + // +optional + Opportunistic *VirtualMachineOpportunisticUpdateStrategy `json:"opportunistic,omitempty"` + + // Proactive update by forcing the VMs to restart during update + // +optional + Proactive *VirtualMachinePoolProactiveUpdateStrategy `json:"proactive,omitempty"` +} + +// +k8s:openapi-gen=true +type VirtualMachinePoolUnmanagedStrategy struct { +} + +// +k8s:openapi-gen=true +type VirtualMachineOpportunisticUpdateStrategy struct { +} + +// VirtualMachinePoolProactiveUpdateStrategy represents proactive update strategy +// +k8s:openapi-gen=true +type VirtualMachinePoolProactiveUpdateStrategy struct { + // SelectionPolicy defines the priority in which VM instances are selected for proactive update + // Defaults to "Random" base policy when no SelectionPolicy is configured + // +optional + SelectionPolicy *VirtualMachinePoolSelectionPolicy `json:"selectionPolicy,omitempty"` +} + +const ( + StatePreservationDisabled StatePreservation = "Disabled" + StatePreservationOffline StatePreservation = "Offline" + StatePreservationOnline StatePreservation = "Online" +) + +type StatePreservation string diff --git a/vendor/kubevirt.io/api/pool/v1beta1/types_swagger_generated.go b/vendor/kubevirt.io/api/pool/v1beta1/types_swagger_generated.go new file mode 100644 index 000000000..e2b471951 --- /dev/null +++ b/vendor/kubevirt.io/api/pool/v1beta1/types_swagger_generated.go @@ -0,0 +1,136 @@ +// Code generated by swagger-doc. DO NOT EDIT. + +package v1beta1 + +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\n+kubebuilder:validation:Minimum=0", + "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", + "nameGeneration": "Options for the name generation in a pool.\n+optional", + "maxUnavailable": "(Defaults to 100%) Integer or string pointer, that when set represents either a percentage or number of VMs in a pool that can be unavailable (ready condition false) at a time during automated update.\n+optional", + "scaleInStrategy": "ScaleInStrategy specifies how the VMPool controller manages scaling in VMs within a VMPool\n+optional", + "updateStrategy": "UpdateStrategy specifies how the VMPool controller manages updating VMs within a VMPool\n+optional", + "autohealing": "Autohealing specifies when a VMpool should replace a failing VM with a reprovisioned instance\n+optional", + } +} + +func (VirtualMachinePoolAutohealingStrategy) SwaggerDoc() map[string]string { + return map[string]string{ + "": "+k8s:openapi-gen=true", + "startUpFailureThreshold": "StartUpFailureThreshold is the number of consecutive VMI start failures (it tracks the value of Status.StartFailure.ConsecutiveFailCount field) before replacing the VM.\nDefaults to 3\n+optional\n+kubebuilder:validation:Minimum=1", + "minFailingToStartDuration": "MinFailingToStartDuration is the minimum time a VM must be in a failing status (applies to status conditions like CrashLoopBackOff, Unschedulable) before being replaced.\nIt measures the duration since the VM's Ready condition transitioned to False.\nDefaults to 5 minutes\n+optional", + } +} + +func (VirtualMachinePoolNameGeneration) SwaggerDoc() map[string]string { + return map[string]string{ + "": "+k8s:openapi-gen=true", + } +} + +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", + } +} + +func (VirtualMachinePoolScaleInStrategy) SwaggerDoc() map[string]string { + return map[string]string{ + "": "VirtualMachinePoolScaleInStrategy specifies how the VMPool controller manages scaling in VMs within a VMPool\n+k8s:openapi-gen=true", + "unmanaged": "The VM is never touched after creation. Users are responsible for scaling in the pool manually.", + "opportunistic": "Opportunistic scale-in is a strategy when vms are deleted by some other means than the scale-in action.\nFor example, when the VM is deleted by the user or when the VM is deleted by the node that is hosting the VM.\n+optional", + "proactive": "Proactive scale-in by forcing VMs to shutdown during scale-in (Default)\n+optional", + } +} + +func (VirtualMachinePoolOpportunisticScaleInStrategy) SwaggerDoc() map[string]string { + return map[string]string{ + "": "VirtualMachinePoolOpportunisticScaleInStrategy represents opportunistic scale-in strategy\n+k8s:openapi-gen=true", + "statePreservation": "Specifies if and how to preserve the state of the VMs selected during scale-in.\nDisabled - (Default) all state for VMs selected for scale-in will be deleted.\nOffline - PVCs for VMs selected for scale-in will be preserved and reused on scale-out (decreases provisioning time during scale out).\nOnline - PVCs and memory for VMs selected for scale-in will be preserved and reused on scale-out (decreases provisioning and boot time during scale out).\n+optional\n+kubebuilder:validation:Enum=Disabled;Offline;Online", + } +} + +func (VirtualMachinePoolProactiveScaleInStrategy) SwaggerDoc() map[string]string { + return map[string]string{ + "": "VirtualMachinePoolProactiveScaleInStrategy represents proactive scale-in strategy\n+k8s:openapi-gen=true", + "selectionPolicy": "SelectionPolicy defines the priority in which VM instances are selected for proactive scale-in\nDefaults to \"Random\" base policy when no SelectionPolicy is configured\n+optional", + "statePreservation": "Specifies if and how to preserve the state of the VMs selected during scale-in.\nDisabled - (Default) all state for VMs selected for scale-in will be deleted.\nOffline - PVCs for VMs selected for scale-in will be preserved and reused on scale-out (decreases provisioning time during scale out).\nOnline - PVCs and memory for VMs selected for scale-in will be preserved and reused on scale-out (decreases provisioning and boot time during scale out).\n+optional\n+kubebuilder:validation:Enum=Disabled;Offline;Online", + } +} + +func (VirtualMachinePoolSelectionPolicy) SwaggerDoc() map[string]string { + return map[string]string{ + "": "VirtualMachinePoolSelectionPolicy defines the priority in which VM instances are selected for proactive scale-in or update\n+k8s:openapi-gen=true", + "sortPolicy": "SortPolicy is a catch-all policy [AscendingOrder|DescendingOrder|Newest|Oldest|Random]\n+optional\n+kubebuilder:validation:Enum=AscendingOrder;DescendingOrder;Newest;Oldest;Random", + "selectors": "Selectors is a list of selection policies.\n+optional", + } +} + +func (VirtualMachinePoolSelectors) SwaggerDoc() map[string]string { + return map[string]string{ + "": "VirtualMachinePoolSelectors specifies filtering criteria for VM selection.\nIf both are specified, both must match for a VM to be selected.\nIf only one is specified, only that one must match for a VM to be selected.\n+k8s:openapi-gen=true", + "labelSelector": "LabelSelector is a list of label selector for VMs.\n+optional", + "nodeSelectorRequirementMatcher": "NodeSelectorRequirementMatcher is a list of node selector requirement for VMs.\n+optional", + } +} + +func (VirtualMachinePoolUpdateStrategy) SwaggerDoc() map[string]string { + return map[string]string{ + "": "VirtualMachinePoolUpdateStrategy specifies how the VMPool controller manages updating VMs within a VMPool, by default it is proactive update.\n+k8s:openapi-gen=true", + "unmanaged": "Unmanaged indicates that no automatic update of VMs within a VMPool is performed. When this is set, the VMPool controller will not update the VMs within the pool.\n+optional", + "opportunistic": "Opportunistic update only gets applied to the VM, VMI is updated naturally upon the restart. Whereas proactive it applies both the VM and VMI right away.\n+optional", + "proactive": "Proactive update by forcing the VMs to restart during update\n+optional", + } +} + +func (VirtualMachinePoolUnmanagedStrategy) SwaggerDoc() map[string]string { + return map[string]string{ + "": "+k8s:openapi-gen=true", + } +} + +func (VirtualMachineOpportunisticUpdateStrategy) SwaggerDoc() map[string]string { + return map[string]string{ + "": "+k8s:openapi-gen=true", + } +} + +func (VirtualMachinePoolProactiveUpdateStrategy) SwaggerDoc() map[string]string { + return map[string]string{ + "": "VirtualMachinePoolProactiveUpdateStrategy represents proactive update strategy\n+k8s:openapi-gen=true", + "selectionPolicy": "SelectionPolicy defines the priority in which VM instances are selected for proactive update\nDefaults to \"Random\" base policy when no SelectionPolicy is configured\n+optional", + } +} diff --git a/vendor/kubevirt.io/api/snapshot/v1alpha1/deepcopy_generated.go b/vendor/kubevirt.io/api/snapshot/v1alpha1/deepcopy_generated.go index 638c356c7..67a94da1d 100644 --- a/vendor/kubevirt.io/api/snapshot/v1alpha1/deepcopy_generated.go +++ b/vendor/kubevirt.io/api/snapshot/v1alpha1/deepcopy_generated.go @@ -2,7 +2,7 @@ // +build !ignore_autogenerated /* -Copyright The KubeVirt Authors. +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. @@ -15,6 +15,8 @@ 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 The KubeVirt Authors. */ // Code generated by deepcopy-gen. DO NOT EDIT. @@ -114,6 +116,22 @@ func (in *SnapshotVolumesLists) DeepCopy() *SnapshotVolumesLists { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SourceIndication) DeepCopyInto(out *SourceIndication) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SourceIndication. +func (in *SourceIndication) DeepCopy() *SourceIndication { + if in == nil { + return nil + } + out := new(SourceIndication) + 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 @@ -547,6 +565,11 @@ func (in *VirtualMachineSnapshotStatus) DeepCopyInto(out *VirtualMachineSnapshot *out = make([]Indication, len(*in)) copy(*out, *in) } + if in.SourceIndications != nil { + in, out := &in.SourceIndications, &out.SourceIndications + *out = make([]SourceIndication, len(*in)) + copy(*out, *in) + } if in.SnapshotVolumes != nil { in, out := &in.SnapshotVolumes, &out.SnapshotVolumes *out = new(SnapshotVolumesLists) diff --git a/vendor/kubevirt.io/api/snapshot/v1alpha1/types.go b/vendor/kubevirt.io/api/snapshot/v1alpha1/types.go index 5fbe22757..40919816b 100644 --- a/vendor/kubevirt.io/api/snapshot/v1alpha1/types.go +++ b/vendor/kubevirt.io/api/snapshot/v1alpha1/types.go @@ -80,8 +80,18 @@ const ( VMSnapshotOnlineSnapshotIndication Indication = "Online" VMSnapshotNoGuestAgentIndication Indication = "NoGuestAgent" VMSnapshotGuestAgentIndication Indication = "GuestAgent" + VMSnapshotQuiesceTimeoutIndication Indication = "QuiesceTimeout" + VMSnapshotPausedIndication Indication = "Paused" ) +// SourceIndication provides an indication of the source VM with its description message +type SourceIndication struct { + // Indication is the indication type + Indication Indication `json:"indication"` + // Message provides a description message of the indication + Message string `json:"message"` +} + // VirtualMachineSnapshotPhase is the current phase of the VirtualMachineSnapshot type VirtualMachineSnapshotPhase string @@ -118,10 +128,15 @@ type VirtualMachineSnapshotStatus struct { // +optional Conditions []Condition `json:"conditions,omitempty"` + // Deprecated: Use SourceIndications instead. This field will be removed in a future version. // +optional // +listType=set Indications []Indication `json:"indications,omitempty"` + // +optional + // +listType=atomic + SourceIndications []SourceIndication `json:"sourceIndications,omitempty"` + // +optional SnapshotVolumes *SnapshotVolumesLists `json:"snapshotVolumes,omitempty"` } @@ -316,7 +331,7 @@ type VirtualMachineRestoreSpec struct { // 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"} + // Example for a patch: {"op": "replace", "path": "/spec/template/spec/domain/devices/interfaces/0/macAddress", "value": "00:00:5e:00:53:01"} // // +optional // +listType=atomic diff --git a/vendor/kubevirt.io/api/snapshot/v1alpha1/types_swagger_generated.go b/vendor/kubevirt.io/api/snapshot/v1alpha1/types_swagger_generated.go index aacacd6d0..f542a6791 100644 --- a/vendor/kubevirt.io/api/snapshot/v1alpha1/types_swagger_generated.go +++ b/vendor/kubevirt.io/api/snapshot/v1alpha1/types_swagger_generated.go @@ -17,6 +17,14 @@ func (VirtualMachineSnapshotSpec) SwaggerDoc() map[string]string { } } +func (SourceIndication) SwaggerDoc() map[string]string { + return map[string]string{ + "": "SourceIndication provides an indication of the source VM with its description message", + "indication": "Indication is the indication type", + "message": "Message provides a description message of the indication", + } +} + func (VirtualMachineSnapshotStatus) SwaggerDoc() map[string]string { return map[string]string{ "": "VirtualMachineSnapshotStatus is the status for a VirtualMachineSnapshot resource", @@ -27,7 +35,8 @@ func (VirtualMachineSnapshotStatus) SwaggerDoc() map[string]string { "readyToUse": "+optional", "error": "+optional", "conditions": "+optional", - "indications": "+optional\n+listType=set", + "indications": "Deprecated: Use SourceIndications instead. This field will be removed in a future version.\n+optional\n+listType=set", + "sourceIndications": "+optional\n+listType=atomic", "snapshotVolumes": "+optional", } } @@ -141,7 +150,7 @@ 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", + "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\": \"/spec/template/spec/domain/devices/interfaces/0/macAddress\", \"value\": \"00:00:5e:00:53:01\"}\n\n+optional\n+listType=atomic", } } diff --git a/vendor/kubevirt.io/api/snapshot/v1beta1/deepcopy_generated.go b/vendor/kubevirt.io/api/snapshot/v1beta1/deepcopy_generated.go index efb1af2c8..98309df20 100644 --- a/vendor/kubevirt.io/api/snapshot/v1beta1/deepcopy_generated.go +++ b/vendor/kubevirt.io/api/snapshot/v1beta1/deepcopy_generated.go @@ -2,7 +2,7 @@ // +build !ignore_autogenerated /* -Copyright The KubeVirt Authors. +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. @@ -15,6 +15,8 @@ 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 The KubeVirt Authors. */ // Code generated by deepcopy-gen. DO NOT EDIT. @@ -114,6 +116,22 @@ func (in *SnapshotVolumesLists) DeepCopy() *SnapshotVolumesLists { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SourceIndication) DeepCopyInto(out *SourceIndication) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SourceIndication. +func (in *SourceIndication) DeepCopy() *SourceIndication { + if in == nil { + return nil + } + out := new(SourceIndication) + 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 @@ -223,6 +241,28 @@ func (in *VirtualMachineRestoreList) DeepCopyObject() runtime.Object { func (in *VirtualMachineRestoreSpec) DeepCopyInto(out *VirtualMachineRestoreSpec) { *out = *in in.Target.DeepCopyInto(&out.Target) + if in.TargetReadinessPolicy != nil { + in, out := &in.TargetReadinessPolicy, &out.TargetReadinessPolicy + *out = new(TargetReadinessPolicy) + **out = **in + } + if in.VolumeRestorePolicy != nil { + in, out := &in.VolumeRestorePolicy, &out.VolumeRestorePolicy + *out = new(VolumeRestorePolicy) + **out = **in + } + if in.VolumeOwnershipPolicy != nil { + in, out := &in.VolumeOwnershipPolicy, &out.VolumeOwnershipPolicy + *out = new(VolumeOwnershipPolicy) + **out = **in + } + if in.VolumeRestoreOverrides != nil { + in, out := &in.VolumeRestoreOverrides, &out.VolumeRestoreOverrides + *out = make([]VolumeRestoreOverride, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } if in.Patches != nil { in, out := &in.Patches, &out.Patches *out = make([]string, len(*in)) @@ -547,6 +587,11 @@ func (in *VirtualMachineSnapshotStatus) DeepCopyInto(out *VirtualMachineSnapshot *out = make([]Indication, len(*in)) copy(*out, *in) } + if in.SourceIndications != nil { + in, out := &in.SourceIndications, &out.SourceIndications + *out = make([]SourceIndication, len(*in)) + copy(*out, *in) + } if in.SnapshotVolumes != nil { in, out := &in.SnapshotVolumes, &out.SnapshotVolumes *out = new(SnapshotVolumesLists) @@ -608,6 +653,36 @@ func (in *VolumeRestore) DeepCopy() *VolumeRestore { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VolumeRestoreOverride) DeepCopyInto(out *VolumeRestoreOverride) { + *out = *in + if in.Labels != nil { + in, out := &in.Labels, &out.Labels + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Annotations != nil { + in, out := &in.Annotations, &out.Annotations + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeRestoreOverride. +func (in *VolumeRestoreOverride) DeepCopy() *VolumeRestoreOverride { + if in == nil { + return nil + } + out := new(VolumeRestoreOverride) + 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 diff --git a/vendor/kubevirt.io/api/snapshot/v1beta1/types.go b/vendor/kubevirt.io/api/snapshot/v1beta1/types.go index 685e0728a..07dfdc988 100644 --- a/vendor/kubevirt.io/api/snapshot/v1beta1/types.go +++ b/vendor/kubevirt.io/api/snapshot/v1beta1/types.go @@ -30,6 +30,7 @@ import ( ) const DefaultFailureDeadline = 5 * time.Minute +const DefaultGracePeriod = 5 * time.Minute // VirtualMachineSnapshot defines the operation of snapshotting a VM // +genclient @@ -80,8 +81,18 @@ const ( VMSnapshotOnlineSnapshotIndication Indication = "Online" VMSnapshotNoGuestAgentIndication Indication = "NoGuestAgent" VMSnapshotGuestAgentIndication Indication = "GuestAgent" + VMSnapshotQuiesceTimeoutIndication Indication = "QuiesceTimeout" + VMSnapshotPausedIndication Indication = "Paused" ) +// SourceIndication provides an indication of the source VM with its description message +type SourceIndication struct { + // Indication is the indication type + Indication Indication `json:"indication"` + // Message provides a description message of the indication + Message string `json:"message"` +} + // VirtualMachineSnapshotPhase is the current phase of the VirtualMachineSnapshot type VirtualMachineSnapshotPhase string @@ -119,10 +130,15 @@ type VirtualMachineSnapshotStatus struct { // +listType=atomic Conditions []Condition `json:"conditions,omitempty"` + // Deprecated: Use SourceIndications instead. This field will be removed in a future version. // +optional // +listType=set Indications []Indication `json:"indications,omitempty"` + // +optional + // +listType=atomic + SourceIndications []SourceIndication `json:"sourceIndications,omitempty"` + // +optional SnapshotVolumes *SnapshotVolumesLists `json:"snapshotVolumes,omitempty"` } @@ -309,13 +325,82 @@ type VirtualMachineRestore struct { Status *VirtualMachineRestoreStatus `json:"status,omitempty"` } -// VirtualMachineRestoreSpec is the spec for a VirtualMachineRestoreresource +// TargetReadinessPolicy defines how to handle the restore in case +// the target is not ready +type TargetReadinessPolicy string + +const ( + // VirtualMachineRestoreStopTarget defined TargetReadinessPolicy which stops the target so the + // VirtualMachineRestore can continue immediatly + VirtualMachineRestoreStopTarget TargetReadinessPolicy = "StopTarget" + + // VirtualMachineRestoreWaitGracePeriodAndFail defines TargetReadinessPolicy which lets the + // user `DefaultGracePeriod` time to get the target ready. + // If not ready in that time the restore will fail + VirtualMachineRestoreWaitGracePeriodAndFail TargetReadinessPolicy = "WaitGracePeriod" + + //VirtualMachineRestoreFailImmediate defines TargetReadinessPolicy which if VirtualMachineRestore + // was initiated when target is not ready it fails the restore immediately + VirtualMachineRestoreFailImmediate TargetReadinessPolicy = "FailImmediate" + + // VirtualMachineRestoreWaitEventually defines TargetReadinessPolicy which keeps the + // VirtualMachineRestore around and once the target is ready the restore will + // occur. No timeout for the operation + VirtualMachineRestoreWaitEventually TargetReadinessPolicy = "WaitEventually" +) + +// VolumeRestorePolicy defines how to handle the restore of snapshotted volumes +type VolumeRestorePolicy string + +const ( + // VolumeRestorePolicyRandomizeNames defines a VolumeRestorePolicy which creates + // new PVCs with randomized names for each snapshotted volume. This is the default policy. + VolumeRestorePolicyRandomizeNames VolumeRestorePolicy = "RandomizeNames" + + // VolumeRestorePolicyInPlace defines a VolumeRestorePolicy which overwrites + // existing PVCs for each snapshotted volumes. That means deleting the original PVC if it still + // exists, and restoring the volume with the same name as the original PVC. + VolumeRestorePolicyInPlace VolumeRestorePolicy = "InPlace" + + // VolumeRestorePolicyPrefixTargetName defines a VolumeRestorePolicy which creates + // new PVCs with names prefixed by the target VM name: {targetVMName}-{volumeName}. + // This provides predictable naming while avoiding collisions when restoring to different targets. + VolumeRestorePolicyPrefixTargetName VolumeRestorePolicy = "PrefixTargetName" +) + +// VolumeOwnershipPolicy defines what owns volumes once they're restored +type VolumeOwnershipPolicy string + +const ( + // VolumeOwnershipPolicyVm defines a VolumeOwnershipPolicyVm where restored volumes are owned by the restored VM + VolumeOwnershipPolicyVm VolumeOwnershipPolicy = "Vm" + + // VolumeOwnershipPolicyNone defines a VolumeOwnershipPolicyVm where restored volumes are not owned by any entity + VolumeOwnershipPolicyNone VolumeOwnershipPolicy = "None" +) + +// VirtualMachineRestoreSpec is the spec for a VirtualMachineRestore resource type VirtualMachineRestoreSpec struct { // initially only VirtualMachine type supported Target corev1.TypedLocalObjectReference `json:"target"` VirtualMachineSnapshotName string `json:"virtualMachineSnapshotName"` + // +optional + TargetReadinessPolicy *TargetReadinessPolicy `json:"targetReadinessPolicy,omitempty"` + + // +optional + VolumeRestorePolicy *VolumeRestorePolicy `json:"volumeRestorePolicy,omitempty"` + + // +optional + VolumeOwnershipPolicy *VolumeOwnershipPolicy `json:"volumeOwnershipPolicy,omitempty"` + + // VolumeRestoreOverrides gives the option to change properties of each restored volume + // For example, specifying the name of the restored volume, or adding labels/annotations to it + // +optional + // +listType=atomic + VolumeRestoreOverrides []VolumeRestoreOverride `json:"volumeRestoreOverrides,omitempty"` + // 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. // @@ -326,7 +411,7 @@ type VirtualMachineRestoreSpec struct { Patches []string `json:"patches,omitempty"` } -// VirtualMachineRestoreStatus is the spec for a VirtualMachineRestoreresource +// VirtualMachineRestoreStatus is the status for a VirtualMachineRestore resource type VirtualMachineRestoreStatus struct { // +optional // +listType=atomic @@ -347,7 +432,7 @@ type VirtualMachineRestoreStatus struct { Conditions []Condition `json:"conditions,omitempty"` } -// VolumeRestore contains the data neeed to restore a PVC +// VolumeRestore contains the data needed to restore a PVC type VolumeRestore struct { VolumeName string `json:"volumeName"` @@ -359,6 +444,17 @@ type VolumeRestore struct { DataVolumeName *string `json:"dataVolumeName,omitempty"` } +// VolumeRestoreOverride specifies how a volume should be restored from a VirtualMachineSnapshot +type VolumeRestoreOverride struct { + VolumeName string `json:"volumeName,omitempty"` + // +optional + RestoreName string `json:"restoreName,omitempty"` + // +optional + Labels map[string]string `json:"labels,omitempty"` + // +optional + Annotations map[string]string `json:"annotations,omitempty"` +} + // VirtualMachineRestoreList is a list of VirtualMachineRestore resources // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object type VirtualMachineRestoreList struct { diff --git a/vendor/kubevirt.io/api/snapshot/v1beta1/types_swagger_generated.go b/vendor/kubevirt.io/api/snapshot/v1beta1/types_swagger_generated.go index 0b7f11ffc..a6d9220eb 100644 --- a/vendor/kubevirt.io/api/snapshot/v1beta1/types_swagger_generated.go +++ b/vendor/kubevirt.io/api/snapshot/v1beta1/types_swagger_generated.go @@ -17,6 +17,14 @@ func (VirtualMachineSnapshotSpec) SwaggerDoc() map[string]string { } } +func (SourceIndication) SwaggerDoc() map[string]string { + return map[string]string{ + "": "SourceIndication provides an indication of the source VM with its description message", + "indication": "Indication is the indication type", + "message": "Message provides a description message of the indication", + } +} + func (VirtualMachineSnapshotStatus) SwaggerDoc() map[string]string { return map[string]string{ "": "VirtualMachineSnapshotStatus is the status for a VirtualMachineSnapshot resource", @@ -27,7 +35,8 @@ func (VirtualMachineSnapshotStatus) SwaggerDoc() map[string]string { "readyToUse": "+optional", "error": "+optional", "conditions": "+optional\n+listType=atomic", - "indications": "+optional\n+listType=set", + "indications": "Deprecated: Use SourceIndications instead. This field will be removed in a future version.\n+optional\n+listType=set", + "sourceIndications": "+optional\n+listType=atomic", "snapshotVolumes": "+optional", } } @@ -139,15 +148,19 @@ func (VirtualMachineRestore) SwaggerDoc() map[string]string { 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", + "": "VirtualMachineRestoreSpec is the spec for a VirtualMachineRestore resource", + "target": "initially only VirtualMachine type supported", + "targetReadinessPolicy": "+optional", + "volumeRestorePolicy": "+optional", + "volumeOwnershipPolicy": "+optional", + "volumeRestoreOverrides": "VolumeRestoreOverrides gives the option to change properties of each restored volume\nFor example, specifying the name of the restored volume, or adding labels/annotations to it\n+optional\n+listType=atomic", + "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", + "": "VirtualMachineRestoreStatus is the status for a VirtualMachineRestore resource", "restores": "+optional\n+listType=atomic", "restoreTime": "+optional", "deletedDataVolumes": "+optional\n+listType=set", @@ -158,11 +171,20 @@ func (VirtualMachineRestoreStatus) SwaggerDoc() map[string]string { func (VolumeRestore) SwaggerDoc() map[string]string { return map[string]string{ - "": "VolumeRestore contains the data neeed to restore a PVC", + "": "VolumeRestore contains the data needed to restore a PVC", "dataVolumeName": "+optional", } } +func (VolumeRestoreOverride) SwaggerDoc() map[string]string { + return map[string]string{ + "": "VolumeRestoreOverride specifies how a volume should be restored from a VirtualMachineSnapshot", + "restoreName": "+optional", + "labels": "+optional", + "annotations": "+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/generated/kubevirt/clientset/versioned/typed/clone/v1alpha1/virtualmachineclone.go b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/clone/v1alpha1/virtualmachineclone.go deleted file mode 100644 index d030dfd31..000000000 --- a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/clone/v1alpha1/virtualmachineclone.go +++ /dev/null @@ -1,195 +0,0 @@ -/* -Copyright 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/clone/v1alpha1" - scheme "kubevirt.io/client-go/generated/kubevirt/clientset/versioned/scheme" -) - -// VirtualMachineClonesGetter has a method to return a VirtualMachineCloneInterface. -// A group's client should implement this interface. -type VirtualMachineClonesGetter interface { - VirtualMachineClones(namespace string) VirtualMachineCloneInterface -} - -// VirtualMachineCloneInterface has methods to work with VirtualMachineClone resources. -type VirtualMachineCloneInterface interface { - Create(ctx context.Context, virtualMachineClone *v1alpha1.VirtualMachineClone, opts v1.CreateOptions) (*v1alpha1.VirtualMachineClone, error) - Update(ctx context.Context, virtualMachineClone *v1alpha1.VirtualMachineClone, opts v1.UpdateOptions) (*v1alpha1.VirtualMachineClone, error) - UpdateStatus(ctx context.Context, virtualMachineClone *v1alpha1.VirtualMachineClone, opts v1.UpdateOptions) (*v1alpha1.VirtualMachineClone, 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.VirtualMachineClone, error) - List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.VirtualMachineCloneList, 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.VirtualMachineClone, err error) - VirtualMachineCloneExpansion -} - -// virtualMachineClones implements VirtualMachineCloneInterface -type virtualMachineClones struct { - client rest.Interface - ns string -} - -// newVirtualMachineClones returns a VirtualMachineClones -func newVirtualMachineClones(c *CloneV1alpha1Client, namespace string) *virtualMachineClones { - return &virtualMachineClones{ - client: c.RESTClient(), - ns: namespace, - } -} - -// Get takes name of the virtualMachineClone, and returns the corresponding virtualMachineClone object, and an error if there is any. -func (c *virtualMachineClones) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.VirtualMachineClone, err error) { - result = &v1alpha1.VirtualMachineClone{} - err = c.client.Get(). - Namespace(c.ns). - Resource("virtualmachineclones"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(ctx). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of VirtualMachineClones that match those selectors. -func (c *virtualMachineClones) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.VirtualMachineCloneList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v1alpha1.VirtualMachineCloneList{} - err = c.client.Get(). - Namespace(c.ns). - Resource("virtualmachineclones"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(ctx). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested virtualMachineClones. -func (c *virtualMachineClones) 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("virtualmachineclones"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch(ctx) -} - -// Create takes the representation of a virtualMachineClone and creates it. Returns the server's representation of the virtualMachineClone, and an error, if there is any. -func (c *virtualMachineClones) Create(ctx context.Context, virtualMachineClone *v1alpha1.VirtualMachineClone, opts v1.CreateOptions) (result *v1alpha1.VirtualMachineClone, err error) { - result = &v1alpha1.VirtualMachineClone{} - err = c.client.Post(). - Namespace(c.ns). - Resource("virtualmachineclones"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(virtualMachineClone). - Do(ctx). - Into(result) - return -} - -// Update takes the representation of a virtualMachineClone and updates it. Returns the server's representation of the virtualMachineClone, and an error, if there is any. -func (c *virtualMachineClones) Update(ctx context.Context, virtualMachineClone *v1alpha1.VirtualMachineClone, opts v1.UpdateOptions) (result *v1alpha1.VirtualMachineClone, err error) { - result = &v1alpha1.VirtualMachineClone{} - err = c.client.Put(). - Namespace(c.ns). - Resource("virtualmachineclones"). - Name(virtualMachineClone.Name). - VersionedParams(&opts, scheme.ParameterCodec). - Body(virtualMachineClone). - 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 *virtualMachineClones) UpdateStatus(ctx context.Context, virtualMachineClone *v1alpha1.VirtualMachineClone, opts v1.UpdateOptions) (result *v1alpha1.VirtualMachineClone, err error) { - result = &v1alpha1.VirtualMachineClone{} - err = c.client.Put(). - Namespace(c.ns). - Resource("virtualmachineclones"). - Name(virtualMachineClone.Name). - SubResource("status"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(virtualMachineClone). - Do(ctx). - Into(result) - return -} - -// Delete takes name of the virtualMachineClone and deletes it. Returns an error if one occurs. -func (c *virtualMachineClones) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - return c.client.Delete(). - Namespace(c.ns). - Resource("virtualmachineclones"). - Name(name). - Body(&opts). - Do(ctx). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *virtualMachineClones) 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("virtualmachineclones"). - VersionedParams(&listOpts, scheme.ParameterCodec). - Timeout(timeout). - Body(&opts). - Do(ctx). - Error() -} - -// Patch applies the patch and returns the patched virtualMachineClone. -func (c *virtualMachineClones) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.VirtualMachineClone, err error) { - result = &v1alpha1.VirtualMachineClone{} - err = c.client.Patch(pt). - Namespace(c.ns). - Resource("virtualmachineclones"). - 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/core/v1/kubevirt.go b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/core/v1/kubevirt.go deleted file mode 100644 index 738a21b0a..000000000 --- a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/core/v1/kubevirt.go +++ /dev/null @@ -1,195 +0,0 @@ -/* -Copyright 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" - - 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" - v1 "kubevirt.io/api/core/v1" - scheme "kubevirt.io/client-go/generated/kubevirt/clientset/versioned/scheme" -) - -// KubeVirtsGetter has a method to return a KubeVirtInterface. -// A group's client should implement this interface. -type KubeVirtsGetter interface { - KubeVirts(namespace string) KubeVirtInterface -} - -// KubeVirtInterface has methods to work with KubeVirt resources. -type KubeVirtInterface interface { - Create(ctx context.Context, kubeVirt *v1.KubeVirt, opts metav1.CreateOptions) (*v1.KubeVirt, error) - Update(ctx context.Context, kubeVirt *v1.KubeVirt, opts metav1.UpdateOptions) (*v1.KubeVirt, error) - UpdateStatus(ctx context.Context, kubeVirt *v1.KubeVirt, opts metav1.UpdateOptions) (*v1.KubeVirt, 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.KubeVirt, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.KubeVirtList, 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.KubeVirt, err error) - KubeVirtExpansion -} - -// kubeVirts implements KubeVirtInterface -type kubeVirts struct { - client rest.Interface - ns string -} - -// newKubeVirts returns a KubeVirts -func newKubeVirts(c *KubevirtV1Client, namespace string) *kubeVirts { - return &kubeVirts{ - client: c.RESTClient(), - ns: namespace, - } -} - -// Get takes name of the kubeVirt, and returns the corresponding kubeVirt object, and an error if there is any. -func (c *kubeVirts) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.KubeVirt, err error) { - result = &v1.KubeVirt{} - err = c.client.Get(). - Namespace(c.ns). - Resource("kubevirts"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(ctx). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of KubeVirts that match those selectors. -func (c *kubeVirts) List(ctx context.Context, opts metav1.ListOptions) (result *v1.KubeVirtList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v1.KubeVirtList{} - err = c.client.Get(). - Namespace(c.ns). - Resource("kubevirts"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(ctx). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested kubeVirts. -func (c *kubeVirts) 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("kubevirts"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch(ctx) -} - -// Create takes the representation of a kubeVirt and creates it. Returns the server's representation of the kubeVirt, and an error, if there is any. -func (c *kubeVirts) Create(ctx context.Context, kubeVirt *v1.KubeVirt, opts metav1.CreateOptions) (result *v1.KubeVirt, err error) { - result = &v1.KubeVirt{} - err = c.client.Post(). - Namespace(c.ns). - Resource("kubevirts"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(kubeVirt). - Do(ctx). - Into(result) - return -} - -// Update takes the representation of a kubeVirt and updates it. Returns the server's representation of the kubeVirt, and an error, if there is any. -func (c *kubeVirts) Update(ctx context.Context, kubeVirt *v1.KubeVirt, opts metav1.UpdateOptions) (result *v1.KubeVirt, err error) { - result = &v1.KubeVirt{} - err = c.client.Put(). - Namespace(c.ns). - Resource("kubevirts"). - Name(kubeVirt.Name). - VersionedParams(&opts, scheme.ParameterCodec). - Body(kubeVirt). - 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 *kubeVirts) UpdateStatus(ctx context.Context, kubeVirt *v1.KubeVirt, opts metav1.UpdateOptions) (result *v1.KubeVirt, err error) { - result = &v1.KubeVirt{} - err = c.client.Put(). - Namespace(c.ns). - Resource("kubevirts"). - Name(kubeVirt.Name). - SubResource("status"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(kubeVirt). - Do(ctx). - Into(result) - return -} - -// Delete takes name of the kubeVirt and deletes it. Returns an error if one occurs. -func (c *kubeVirts) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - return c.client.Delete(). - Namespace(c.ns). - Resource("kubevirts"). - Name(name). - Body(&opts). - Do(ctx). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *kubeVirts) 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("kubevirts"). - VersionedParams(&listOpts, scheme.ParameterCodec). - Timeout(timeout). - Body(&opts). - Do(ctx). - Error() -} - -// Patch applies the patch and returns the patched kubeVirt. -func (c *kubeVirts) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.KubeVirt, err error) { - result = &v1.KubeVirt{} - err = c.client.Patch(pt). - Namespace(c.ns). - Resource("kubevirts"). - 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/core/v1/virtualmachine.go b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/core/v1/virtualmachine.go deleted file mode 100644 index 3faf2b859..000000000 --- a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/core/v1/virtualmachine.go +++ /dev/null @@ -1,195 +0,0 @@ -/* -Copyright 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" - - 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" - v1 "kubevirt.io/api/core/v1" - scheme "kubevirt.io/client-go/generated/kubevirt/clientset/versioned/scheme" -) - -// VirtualMachinesGetter has a method to return a VirtualMachineInterface. -// A group's client should implement this interface. -type VirtualMachinesGetter interface { - VirtualMachines(namespace string) VirtualMachineInterface -} - -// VirtualMachineInterface has methods to work with VirtualMachine resources. -type VirtualMachineInterface interface { - Create(ctx context.Context, virtualMachine *v1.VirtualMachine, opts metav1.CreateOptions) (*v1.VirtualMachine, error) - Update(ctx context.Context, virtualMachine *v1.VirtualMachine, opts metav1.UpdateOptions) (*v1.VirtualMachine, error) - UpdateStatus(ctx context.Context, virtualMachine *v1.VirtualMachine, opts metav1.UpdateOptions) (*v1.VirtualMachine, 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.VirtualMachine, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.VirtualMachineList, 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.VirtualMachine, err error) - VirtualMachineExpansion -} - -// virtualMachines implements VirtualMachineInterface -type virtualMachines struct { - client rest.Interface - ns string -} - -// newVirtualMachines returns a VirtualMachines -func newVirtualMachines(c *KubevirtV1Client, namespace string) *virtualMachines { - return &virtualMachines{ - client: c.RESTClient(), - ns: namespace, - } -} - -// Get takes name of the virtualMachine, and returns the corresponding virtualMachine object, and an error if there is any. -func (c *virtualMachines) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.VirtualMachine, err error) { - result = &v1.VirtualMachine{} - err = c.client.Get(). - Namespace(c.ns). - Resource("virtualmachines"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(ctx). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of VirtualMachines that match those selectors. -func (c *virtualMachines) List(ctx context.Context, opts metav1.ListOptions) (result *v1.VirtualMachineList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v1.VirtualMachineList{} - err = c.client.Get(). - Namespace(c.ns). - Resource("virtualmachines"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(ctx). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested virtualMachines. -func (c *virtualMachines) 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("virtualmachines"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch(ctx) -} - -// Create takes the representation of a virtualMachine and creates it. Returns the server's representation of the virtualMachine, and an error, if there is any. -func (c *virtualMachines) Create(ctx context.Context, virtualMachine *v1.VirtualMachine, opts metav1.CreateOptions) (result *v1.VirtualMachine, err error) { - result = &v1.VirtualMachine{} - err = c.client.Post(). - Namespace(c.ns). - Resource("virtualmachines"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(virtualMachine). - Do(ctx). - Into(result) - return -} - -// Update takes the representation of a virtualMachine and updates it. Returns the server's representation of the virtualMachine, and an error, if there is any. -func (c *virtualMachines) Update(ctx context.Context, virtualMachine *v1.VirtualMachine, opts metav1.UpdateOptions) (result *v1.VirtualMachine, err error) { - result = &v1.VirtualMachine{} - err = c.client.Put(). - Namespace(c.ns). - Resource("virtualmachines"). - Name(virtualMachine.Name). - VersionedParams(&opts, scheme.ParameterCodec). - Body(virtualMachine). - 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 *virtualMachines) UpdateStatus(ctx context.Context, virtualMachine *v1.VirtualMachine, opts metav1.UpdateOptions) (result *v1.VirtualMachine, err error) { - result = &v1.VirtualMachine{} - err = c.client.Put(). - Namespace(c.ns). - Resource("virtualmachines"). - Name(virtualMachine.Name). - SubResource("status"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(virtualMachine). - Do(ctx). - Into(result) - return -} - -// Delete takes name of the virtualMachine and deletes it. Returns an error if one occurs. -func (c *virtualMachines) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - return c.client.Delete(). - Namespace(c.ns). - Resource("virtualmachines"). - Name(name). - Body(&opts). - Do(ctx). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *virtualMachines) 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("virtualmachines"). - VersionedParams(&listOpts, scheme.ParameterCodec). - Timeout(timeout). - Body(&opts). - Do(ctx). - Error() -} - -// Patch applies the patch and returns the patched virtualMachine. -func (c *virtualMachines) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.VirtualMachine, err error) { - result = &v1.VirtualMachine{} - err = c.client.Patch(pt). - Namespace(c.ns). - Resource("virtualmachines"). - 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/core/v1/virtualmachineinstance.go b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/core/v1/virtualmachineinstance.go deleted file mode 100644 index 10cbb4600..000000000 --- a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/core/v1/virtualmachineinstance.go +++ /dev/null @@ -1,195 +0,0 @@ -/* -Copyright 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" - - 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" - v1 "kubevirt.io/api/core/v1" - scheme "kubevirt.io/client-go/generated/kubevirt/clientset/versioned/scheme" -) - -// VirtualMachineInstancesGetter has a method to return a VirtualMachineInstanceInterface. -// A group's client should implement this interface. -type VirtualMachineInstancesGetter interface { - VirtualMachineInstances(namespace string) VirtualMachineInstanceInterface -} - -// VirtualMachineInstanceInterface has methods to work with VirtualMachineInstance resources. -type VirtualMachineInstanceInterface interface { - Create(ctx context.Context, virtualMachineInstance *v1.VirtualMachineInstance, opts metav1.CreateOptions) (*v1.VirtualMachineInstance, error) - Update(ctx context.Context, virtualMachineInstance *v1.VirtualMachineInstance, opts metav1.UpdateOptions) (*v1.VirtualMachineInstance, error) - UpdateStatus(ctx context.Context, virtualMachineInstance *v1.VirtualMachineInstance, opts metav1.UpdateOptions) (*v1.VirtualMachineInstance, 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.VirtualMachineInstance, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.VirtualMachineInstanceList, 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.VirtualMachineInstance, err error) - VirtualMachineInstanceExpansion -} - -// virtualMachineInstances implements VirtualMachineInstanceInterface -type virtualMachineInstances struct { - client rest.Interface - ns string -} - -// newVirtualMachineInstances returns a VirtualMachineInstances -func newVirtualMachineInstances(c *KubevirtV1Client, namespace string) *virtualMachineInstances { - return &virtualMachineInstances{ - client: c.RESTClient(), - ns: namespace, - } -} - -// Get takes name of the virtualMachineInstance, and returns the corresponding virtualMachineInstance object, and an error if there is any. -func (c *virtualMachineInstances) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.VirtualMachineInstance, err error) { - result = &v1.VirtualMachineInstance{} - err = c.client.Get(). - Namespace(c.ns). - Resource("virtualmachineinstances"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(ctx). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of VirtualMachineInstances that match those selectors. -func (c *virtualMachineInstances) List(ctx context.Context, opts metav1.ListOptions) (result *v1.VirtualMachineInstanceList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v1.VirtualMachineInstanceList{} - err = c.client.Get(). - Namespace(c.ns). - Resource("virtualmachineinstances"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(ctx). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested virtualMachineInstances. -func (c *virtualMachineInstances) 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("virtualmachineinstances"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch(ctx) -} - -// Create takes the representation of a virtualMachineInstance and creates it. Returns the server's representation of the virtualMachineInstance, and an error, if there is any. -func (c *virtualMachineInstances) Create(ctx context.Context, virtualMachineInstance *v1.VirtualMachineInstance, opts metav1.CreateOptions) (result *v1.VirtualMachineInstance, err error) { - result = &v1.VirtualMachineInstance{} - err = c.client.Post(). - Namespace(c.ns). - Resource("virtualmachineinstances"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(virtualMachineInstance). - Do(ctx). - Into(result) - return -} - -// Update takes the representation of a virtualMachineInstance and updates it. Returns the server's representation of the virtualMachineInstance, and an error, if there is any. -func (c *virtualMachineInstances) Update(ctx context.Context, virtualMachineInstance *v1.VirtualMachineInstance, opts metav1.UpdateOptions) (result *v1.VirtualMachineInstance, err error) { - result = &v1.VirtualMachineInstance{} - err = c.client.Put(). - Namespace(c.ns). - Resource("virtualmachineinstances"). - Name(virtualMachineInstance.Name). - VersionedParams(&opts, scheme.ParameterCodec). - Body(virtualMachineInstance). - 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 *virtualMachineInstances) UpdateStatus(ctx context.Context, virtualMachineInstance *v1.VirtualMachineInstance, opts metav1.UpdateOptions) (result *v1.VirtualMachineInstance, err error) { - result = &v1.VirtualMachineInstance{} - err = c.client.Put(). - Namespace(c.ns). - Resource("virtualmachineinstances"). - Name(virtualMachineInstance.Name). - SubResource("status"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(virtualMachineInstance). - Do(ctx). - Into(result) - return -} - -// Delete takes name of the virtualMachineInstance and deletes it. Returns an error if one occurs. -func (c *virtualMachineInstances) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - return c.client.Delete(). - Namespace(c.ns). - Resource("virtualmachineinstances"). - Name(name). - Body(&opts). - Do(ctx). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *virtualMachineInstances) 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("virtualmachineinstances"). - VersionedParams(&listOpts, scheme.ParameterCodec). - Timeout(timeout). - Body(&opts). - Do(ctx). - Error() -} - -// Patch applies the patch and returns the patched virtualMachineInstance. -func (c *virtualMachineInstances) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.VirtualMachineInstance, err error) { - result = &v1.VirtualMachineInstance{} - err = c.client.Patch(pt). - Namespace(c.ns). - Resource("virtualmachineinstances"). - 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/core/v1/virtualmachineinstancemigration.go b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/core/v1/virtualmachineinstancemigration.go deleted file mode 100644 index 732ded65c..000000000 --- a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/core/v1/virtualmachineinstancemigration.go +++ /dev/null @@ -1,195 +0,0 @@ -/* -Copyright 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" - - 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" - v1 "kubevirt.io/api/core/v1" - scheme "kubevirt.io/client-go/generated/kubevirt/clientset/versioned/scheme" -) - -// VirtualMachineInstanceMigrationsGetter has a method to return a VirtualMachineInstanceMigrationInterface. -// A group's client should implement this interface. -type VirtualMachineInstanceMigrationsGetter interface { - VirtualMachineInstanceMigrations(namespace string) VirtualMachineInstanceMigrationInterface -} - -// VirtualMachineInstanceMigrationInterface has methods to work with VirtualMachineInstanceMigration resources. -type VirtualMachineInstanceMigrationInterface interface { - Create(ctx context.Context, virtualMachineInstanceMigration *v1.VirtualMachineInstanceMigration, opts metav1.CreateOptions) (*v1.VirtualMachineInstanceMigration, error) - Update(ctx context.Context, virtualMachineInstanceMigration *v1.VirtualMachineInstanceMigration, opts metav1.UpdateOptions) (*v1.VirtualMachineInstanceMigration, error) - UpdateStatus(ctx context.Context, virtualMachineInstanceMigration *v1.VirtualMachineInstanceMigration, opts metav1.UpdateOptions) (*v1.VirtualMachineInstanceMigration, 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.VirtualMachineInstanceMigration, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.VirtualMachineInstanceMigrationList, 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.VirtualMachineInstanceMigration, err error) - VirtualMachineInstanceMigrationExpansion -} - -// virtualMachineInstanceMigrations implements VirtualMachineInstanceMigrationInterface -type virtualMachineInstanceMigrations struct { - client rest.Interface - ns string -} - -// newVirtualMachineInstanceMigrations returns a VirtualMachineInstanceMigrations -func newVirtualMachineInstanceMigrations(c *KubevirtV1Client, namespace string) *virtualMachineInstanceMigrations { - return &virtualMachineInstanceMigrations{ - client: c.RESTClient(), - ns: namespace, - } -} - -// Get takes name of the virtualMachineInstanceMigration, and returns the corresponding virtualMachineInstanceMigration object, and an error if there is any. -func (c *virtualMachineInstanceMigrations) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.VirtualMachineInstanceMigration, err error) { - result = &v1.VirtualMachineInstanceMigration{} - err = c.client.Get(). - Namespace(c.ns). - Resource("virtualmachineinstancemigrations"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(ctx). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of VirtualMachineInstanceMigrations that match those selectors. -func (c *virtualMachineInstanceMigrations) List(ctx context.Context, opts metav1.ListOptions) (result *v1.VirtualMachineInstanceMigrationList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v1.VirtualMachineInstanceMigrationList{} - err = c.client.Get(). - Namespace(c.ns). - Resource("virtualmachineinstancemigrations"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(ctx). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested virtualMachineInstanceMigrations. -func (c *virtualMachineInstanceMigrations) 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("virtualmachineinstancemigrations"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch(ctx) -} - -// Create takes the representation of a virtualMachineInstanceMigration and creates it. Returns the server's representation of the virtualMachineInstanceMigration, and an error, if there is any. -func (c *virtualMachineInstanceMigrations) Create(ctx context.Context, virtualMachineInstanceMigration *v1.VirtualMachineInstanceMigration, opts metav1.CreateOptions) (result *v1.VirtualMachineInstanceMigration, err error) { - result = &v1.VirtualMachineInstanceMigration{} - err = c.client.Post(). - Namespace(c.ns). - Resource("virtualmachineinstancemigrations"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(virtualMachineInstanceMigration). - Do(ctx). - Into(result) - return -} - -// Update takes the representation of a virtualMachineInstanceMigration and updates it. Returns the server's representation of the virtualMachineInstanceMigration, and an error, if there is any. -func (c *virtualMachineInstanceMigrations) Update(ctx context.Context, virtualMachineInstanceMigration *v1.VirtualMachineInstanceMigration, opts metav1.UpdateOptions) (result *v1.VirtualMachineInstanceMigration, err error) { - result = &v1.VirtualMachineInstanceMigration{} - err = c.client.Put(). - Namespace(c.ns). - Resource("virtualmachineinstancemigrations"). - Name(virtualMachineInstanceMigration.Name). - VersionedParams(&opts, scheme.ParameterCodec). - Body(virtualMachineInstanceMigration). - 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 *virtualMachineInstanceMigrations) UpdateStatus(ctx context.Context, virtualMachineInstanceMigration *v1.VirtualMachineInstanceMigration, opts metav1.UpdateOptions) (result *v1.VirtualMachineInstanceMigration, err error) { - result = &v1.VirtualMachineInstanceMigration{} - err = c.client.Put(). - Namespace(c.ns). - Resource("virtualmachineinstancemigrations"). - Name(virtualMachineInstanceMigration.Name). - SubResource("status"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(virtualMachineInstanceMigration). - Do(ctx). - Into(result) - return -} - -// Delete takes name of the virtualMachineInstanceMigration and deletes it. Returns an error if one occurs. -func (c *virtualMachineInstanceMigrations) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - return c.client.Delete(). - Namespace(c.ns). - Resource("virtualmachineinstancemigrations"). - Name(name). - Body(&opts). - Do(ctx). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *virtualMachineInstanceMigrations) 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("virtualmachineinstancemigrations"). - VersionedParams(&listOpts, scheme.ParameterCodec). - Timeout(timeout). - Body(&opts). - Do(ctx). - Error() -} - -// Patch applies the patch and returns the patched virtualMachineInstanceMigration. -func (c *virtualMachineInstanceMigrations) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.VirtualMachineInstanceMigration, err error) { - result = &v1.VirtualMachineInstanceMigration{} - err = c.client.Patch(pt). - Namespace(c.ns). - Resource("virtualmachineinstancemigrations"). - 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/core/v1/virtualmachineinstancepreset.go b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/core/v1/virtualmachineinstancepreset.go deleted file mode 100644 index e8076d84b..000000000 --- a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/core/v1/virtualmachineinstancepreset.go +++ /dev/null @@ -1,178 +0,0 @@ -/* -Copyright 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" - - 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" - v1 "kubevirt.io/api/core/v1" - scheme "kubevirt.io/client-go/generated/kubevirt/clientset/versioned/scheme" -) - -// VirtualMachineInstancePresetsGetter has a method to return a VirtualMachineInstancePresetInterface. -// A group's client should implement this interface. -type VirtualMachineInstancePresetsGetter interface { - VirtualMachineInstancePresets(namespace string) VirtualMachineInstancePresetInterface -} - -// VirtualMachineInstancePresetInterface has methods to work with VirtualMachineInstancePreset resources. -type VirtualMachineInstancePresetInterface interface { - Create(ctx context.Context, virtualMachineInstancePreset *v1.VirtualMachineInstancePreset, opts metav1.CreateOptions) (*v1.VirtualMachineInstancePreset, error) - Update(ctx context.Context, virtualMachineInstancePreset *v1.VirtualMachineInstancePreset, opts metav1.UpdateOptions) (*v1.VirtualMachineInstancePreset, 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.VirtualMachineInstancePreset, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.VirtualMachineInstancePresetList, 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.VirtualMachineInstancePreset, err error) - VirtualMachineInstancePresetExpansion -} - -// virtualMachineInstancePresets implements VirtualMachineInstancePresetInterface -type virtualMachineInstancePresets struct { - client rest.Interface - ns string -} - -// newVirtualMachineInstancePresets returns a VirtualMachineInstancePresets -func newVirtualMachineInstancePresets(c *KubevirtV1Client, namespace string) *virtualMachineInstancePresets { - return &virtualMachineInstancePresets{ - client: c.RESTClient(), - ns: namespace, - } -} - -// Get takes name of the virtualMachineInstancePreset, and returns the corresponding virtualMachineInstancePreset object, and an error if there is any. -func (c *virtualMachineInstancePresets) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.VirtualMachineInstancePreset, err error) { - result = &v1.VirtualMachineInstancePreset{} - err = c.client.Get(). - Namespace(c.ns). - Resource("virtualmachineinstancepresets"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(ctx). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of VirtualMachineInstancePresets that match those selectors. -func (c *virtualMachineInstancePresets) List(ctx context.Context, opts metav1.ListOptions) (result *v1.VirtualMachineInstancePresetList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v1.VirtualMachineInstancePresetList{} - err = c.client.Get(). - Namespace(c.ns). - Resource("virtualmachineinstancepresets"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(ctx). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested virtualMachineInstancePresets. -func (c *virtualMachineInstancePresets) 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("virtualmachineinstancepresets"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch(ctx) -} - -// Create takes the representation of a virtualMachineInstancePreset and creates it. Returns the server's representation of the virtualMachineInstancePreset, and an error, if there is any. -func (c *virtualMachineInstancePresets) Create(ctx context.Context, virtualMachineInstancePreset *v1.VirtualMachineInstancePreset, opts metav1.CreateOptions) (result *v1.VirtualMachineInstancePreset, err error) { - result = &v1.VirtualMachineInstancePreset{} - err = c.client.Post(). - Namespace(c.ns). - Resource("virtualmachineinstancepresets"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(virtualMachineInstancePreset). - Do(ctx). - Into(result) - return -} - -// Update takes the representation of a virtualMachineInstancePreset and updates it. Returns the server's representation of the virtualMachineInstancePreset, and an error, if there is any. -func (c *virtualMachineInstancePresets) Update(ctx context.Context, virtualMachineInstancePreset *v1.VirtualMachineInstancePreset, opts metav1.UpdateOptions) (result *v1.VirtualMachineInstancePreset, err error) { - result = &v1.VirtualMachineInstancePreset{} - err = c.client.Put(). - Namespace(c.ns). - Resource("virtualmachineinstancepresets"). - Name(virtualMachineInstancePreset.Name). - VersionedParams(&opts, scheme.ParameterCodec). - Body(virtualMachineInstancePreset). - Do(ctx). - Into(result) - return -} - -// Delete takes name of the virtualMachineInstancePreset and deletes it. Returns an error if one occurs. -func (c *virtualMachineInstancePresets) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - return c.client.Delete(). - Namespace(c.ns). - Resource("virtualmachineinstancepresets"). - Name(name). - Body(&opts). - Do(ctx). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *virtualMachineInstancePresets) 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("virtualmachineinstancepresets"). - VersionedParams(&listOpts, scheme.ParameterCodec). - Timeout(timeout). - Body(&opts). - Do(ctx). - Error() -} - -// Patch applies the patch and returns the patched virtualMachineInstancePreset. -func (c *virtualMachineInstancePresets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.VirtualMachineInstancePreset, err error) { - result = &v1.VirtualMachineInstancePreset{} - err = c.client.Patch(pt). - Namespace(c.ns). - Resource("virtualmachineinstancepresets"). - 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/core/v1/virtualmachineinstancereplicaset.go b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/core/v1/virtualmachineinstancereplicaset.go deleted file mode 100644 index bf2c006b7..000000000 --- a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/core/v1/virtualmachineinstancereplicaset.go +++ /dev/null @@ -1,195 +0,0 @@ -/* -Copyright 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" - - 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" - v1 "kubevirt.io/api/core/v1" - scheme "kubevirt.io/client-go/generated/kubevirt/clientset/versioned/scheme" -) - -// VirtualMachineInstanceReplicaSetsGetter has a method to return a VirtualMachineInstanceReplicaSetInterface. -// A group's client should implement this interface. -type VirtualMachineInstanceReplicaSetsGetter interface { - VirtualMachineInstanceReplicaSets(namespace string) VirtualMachineInstanceReplicaSetInterface -} - -// VirtualMachineInstanceReplicaSetInterface has methods to work with VirtualMachineInstanceReplicaSet resources. -type VirtualMachineInstanceReplicaSetInterface interface { - Create(ctx context.Context, virtualMachineInstanceReplicaSet *v1.VirtualMachineInstanceReplicaSet, opts metav1.CreateOptions) (*v1.VirtualMachineInstanceReplicaSet, error) - Update(ctx context.Context, virtualMachineInstanceReplicaSet *v1.VirtualMachineInstanceReplicaSet, opts metav1.UpdateOptions) (*v1.VirtualMachineInstanceReplicaSet, error) - UpdateStatus(ctx context.Context, virtualMachineInstanceReplicaSet *v1.VirtualMachineInstanceReplicaSet, opts metav1.UpdateOptions) (*v1.VirtualMachineInstanceReplicaSet, 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.VirtualMachineInstanceReplicaSet, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.VirtualMachineInstanceReplicaSetList, 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.VirtualMachineInstanceReplicaSet, err error) - VirtualMachineInstanceReplicaSetExpansion -} - -// virtualMachineInstanceReplicaSets implements VirtualMachineInstanceReplicaSetInterface -type virtualMachineInstanceReplicaSets struct { - client rest.Interface - ns string -} - -// newVirtualMachineInstanceReplicaSets returns a VirtualMachineInstanceReplicaSets -func newVirtualMachineInstanceReplicaSets(c *KubevirtV1Client, namespace string) *virtualMachineInstanceReplicaSets { - return &virtualMachineInstanceReplicaSets{ - client: c.RESTClient(), - ns: namespace, - } -} - -// Get takes name of the virtualMachineInstanceReplicaSet, and returns the corresponding virtualMachineInstanceReplicaSet object, and an error if there is any. -func (c *virtualMachineInstanceReplicaSets) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.VirtualMachineInstanceReplicaSet, err error) { - result = &v1.VirtualMachineInstanceReplicaSet{} - err = c.client.Get(). - Namespace(c.ns). - Resource("virtualmachineinstancereplicasets"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(ctx). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of VirtualMachineInstanceReplicaSets that match those selectors. -func (c *virtualMachineInstanceReplicaSets) List(ctx context.Context, opts metav1.ListOptions) (result *v1.VirtualMachineInstanceReplicaSetList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v1.VirtualMachineInstanceReplicaSetList{} - err = c.client.Get(). - Namespace(c.ns). - Resource("virtualmachineinstancereplicasets"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(ctx). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested virtualMachineInstanceReplicaSets. -func (c *virtualMachineInstanceReplicaSets) 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("virtualmachineinstancereplicasets"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch(ctx) -} - -// Create takes the representation of a virtualMachineInstanceReplicaSet and creates it. Returns the server's representation of the virtualMachineInstanceReplicaSet, and an error, if there is any. -func (c *virtualMachineInstanceReplicaSets) Create(ctx context.Context, virtualMachineInstanceReplicaSet *v1.VirtualMachineInstanceReplicaSet, opts metav1.CreateOptions) (result *v1.VirtualMachineInstanceReplicaSet, err error) { - result = &v1.VirtualMachineInstanceReplicaSet{} - err = c.client.Post(). - Namespace(c.ns). - Resource("virtualmachineinstancereplicasets"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(virtualMachineInstanceReplicaSet). - Do(ctx). - Into(result) - return -} - -// Update takes the representation of a virtualMachineInstanceReplicaSet and updates it. Returns the server's representation of the virtualMachineInstanceReplicaSet, and an error, if there is any. -func (c *virtualMachineInstanceReplicaSets) Update(ctx context.Context, virtualMachineInstanceReplicaSet *v1.VirtualMachineInstanceReplicaSet, opts metav1.UpdateOptions) (result *v1.VirtualMachineInstanceReplicaSet, err error) { - result = &v1.VirtualMachineInstanceReplicaSet{} - err = c.client.Put(). - Namespace(c.ns). - Resource("virtualmachineinstancereplicasets"). - Name(virtualMachineInstanceReplicaSet.Name). - VersionedParams(&opts, scheme.ParameterCodec). - Body(virtualMachineInstanceReplicaSet). - 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 *virtualMachineInstanceReplicaSets) UpdateStatus(ctx context.Context, virtualMachineInstanceReplicaSet *v1.VirtualMachineInstanceReplicaSet, opts metav1.UpdateOptions) (result *v1.VirtualMachineInstanceReplicaSet, err error) { - result = &v1.VirtualMachineInstanceReplicaSet{} - err = c.client.Put(). - Namespace(c.ns). - Resource("virtualmachineinstancereplicasets"). - Name(virtualMachineInstanceReplicaSet.Name). - SubResource("status"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(virtualMachineInstanceReplicaSet). - Do(ctx). - Into(result) - return -} - -// Delete takes name of the virtualMachineInstanceReplicaSet and deletes it. Returns an error if one occurs. -func (c *virtualMachineInstanceReplicaSets) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - return c.client.Delete(). - Namespace(c.ns). - Resource("virtualmachineinstancereplicasets"). - Name(name). - Body(&opts). - Do(ctx). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *virtualMachineInstanceReplicaSets) 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("virtualmachineinstancereplicasets"). - VersionedParams(&listOpts, scheme.ParameterCodec). - Timeout(timeout). - Body(&opts). - Do(ctx). - Error() -} - -// Patch applies the patch and returns the patched virtualMachineInstanceReplicaSet. -func (c *virtualMachineInstanceReplicaSets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.VirtualMachineInstanceReplicaSet, err error) { - result = &v1.VirtualMachineInstanceReplicaSet{} - err = c.client.Patch(pt). - Namespace(c.ns). - Resource("virtualmachineinstancereplicasets"). - 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/export/v1alpha1/virtualmachineexport.go b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/export/v1alpha1/virtualmachineexport.go deleted file mode 100644 index f88a8eea3..000000000 --- a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/export/v1alpha1/virtualmachineexport.go +++ /dev/null @@ -1,195 +0,0 @@ -/* -Copyright 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/export/v1alpha1" - scheme "kubevirt.io/client-go/generated/kubevirt/clientset/versioned/scheme" -) - -// VirtualMachineExportsGetter has a method to return a VirtualMachineExportInterface. -// A group's client should implement this interface. -type VirtualMachineExportsGetter interface { - VirtualMachineExports(namespace string) VirtualMachineExportInterface -} - -// VirtualMachineExportInterface has methods to work with VirtualMachineExport resources. -type VirtualMachineExportInterface interface { - Create(ctx context.Context, virtualMachineExport *v1alpha1.VirtualMachineExport, opts v1.CreateOptions) (*v1alpha1.VirtualMachineExport, error) - Update(ctx context.Context, virtualMachineExport *v1alpha1.VirtualMachineExport, opts v1.UpdateOptions) (*v1alpha1.VirtualMachineExport, error) - UpdateStatus(ctx context.Context, virtualMachineExport *v1alpha1.VirtualMachineExport, opts v1.UpdateOptions) (*v1alpha1.VirtualMachineExport, 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.VirtualMachineExport, error) - List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.VirtualMachineExportList, 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.VirtualMachineExport, err error) - VirtualMachineExportExpansion -} - -// virtualMachineExports implements VirtualMachineExportInterface -type virtualMachineExports struct { - client rest.Interface - ns string -} - -// newVirtualMachineExports returns a VirtualMachineExports -func newVirtualMachineExports(c *ExportV1alpha1Client, namespace string) *virtualMachineExports { - return &virtualMachineExports{ - client: c.RESTClient(), - ns: namespace, - } -} - -// Get takes name of the virtualMachineExport, and returns the corresponding virtualMachineExport object, and an error if there is any. -func (c *virtualMachineExports) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.VirtualMachineExport, err error) { - result = &v1alpha1.VirtualMachineExport{} - err = c.client.Get(). - Namespace(c.ns). - Resource("virtualmachineexports"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(ctx). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of VirtualMachineExports that match those selectors. -func (c *virtualMachineExports) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.VirtualMachineExportList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v1alpha1.VirtualMachineExportList{} - err = c.client.Get(). - Namespace(c.ns). - Resource("virtualmachineexports"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(ctx). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested virtualMachineExports. -func (c *virtualMachineExports) 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("virtualmachineexports"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch(ctx) -} - -// Create takes the representation of a virtualMachineExport and creates it. Returns the server's representation of the virtualMachineExport, and an error, if there is any. -func (c *virtualMachineExports) Create(ctx context.Context, virtualMachineExport *v1alpha1.VirtualMachineExport, opts v1.CreateOptions) (result *v1alpha1.VirtualMachineExport, err error) { - result = &v1alpha1.VirtualMachineExport{} - err = c.client.Post(). - Namespace(c.ns). - Resource("virtualmachineexports"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(virtualMachineExport). - Do(ctx). - Into(result) - return -} - -// Update takes the representation of a virtualMachineExport and updates it. Returns the server's representation of the virtualMachineExport, and an error, if there is any. -func (c *virtualMachineExports) Update(ctx context.Context, virtualMachineExport *v1alpha1.VirtualMachineExport, opts v1.UpdateOptions) (result *v1alpha1.VirtualMachineExport, err error) { - result = &v1alpha1.VirtualMachineExport{} - err = c.client.Put(). - Namespace(c.ns). - Resource("virtualmachineexports"). - Name(virtualMachineExport.Name). - VersionedParams(&opts, scheme.ParameterCodec). - Body(virtualMachineExport). - 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 *virtualMachineExports) UpdateStatus(ctx context.Context, virtualMachineExport *v1alpha1.VirtualMachineExport, opts v1.UpdateOptions) (result *v1alpha1.VirtualMachineExport, err error) { - result = &v1alpha1.VirtualMachineExport{} - err = c.client.Put(). - Namespace(c.ns). - Resource("virtualmachineexports"). - Name(virtualMachineExport.Name). - SubResource("status"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(virtualMachineExport). - Do(ctx). - Into(result) - return -} - -// Delete takes name of the virtualMachineExport and deletes it. Returns an error if one occurs. -func (c *virtualMachineExports) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - return c.client.Delete(). - Namespace(c.ns). - Resource("virtualmachineexports"). - Name(name). - Body(&opts). - Do(ctx). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *virtualMachineExports) 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("virtualmachineexports"). - VersionedParams(&listOpts, scheme.ParameterCodec). - Timeout(timeout). - Body(&opts). - Do(ctx). - Error() -} - -// Patch applies the patch and returns the patched virtualMachineExport. -func (c *virtualMachineExports) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.VirtualMachineExport, err error) { - result = &v1alpha1.VirtualMachineExport{} - err = c.client.Patch(pt). - Namespace(c.ns). - Resource("virtualmachineexports"). - 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/export/v1beta1/virtualmachineexport.go b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/export/v1beta1/virtualmachineexport.go deleted file mode 100644 index bd090d650..000000000 --- a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/export/v1beta1/virtualmachineexport.go +++ /dev/null @@ -1,195 +0,0 @@ -/* -Copyright 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" - v1beta1 "kubevirt.io/api/export/v1beta1" - scheme "kubevirt.io/client-go/generated/kubevirt/clientset/versioned/scheme" -) - -// VirtualMachineExportsGetter has a method to return a VirtualMachineExportInterface. -// A group's client should implement this interface. -type VirtualMachineExportsGetter interface { - VirtualMachineExports(namespace string) VirtualMachineExportInterface -} - -// VirtualMachineExportInterface has methods to work with VirtualMachineExport resources. -type VirtualMachineExportInterface interface { - Create(ctx context.Context, virtualMachineExport *v1beta1.VirtualMachineExport, opts v1.CreateOptions) (*v1beta1.VirtualMachineExport, error) - Update(ctx context.Context, virtualMachineExport *v1beta1.VirtualMachineExport, opts v1.UpdateOptions) (*v1beta1.VirtualMachineExport, error) - UpdateStatus(ctx context.Context, virtualMachineExport *v1beta1.VirtualMachineExport, opts v1.UpdateOptions) (*v1beta1.VirtualMachineExport, 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.VirtualMachineExport, error) - List(ctx context.Context, opts v1.ListOptions) (*v1beta1.VirtualMachineExportList, 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.VirtualMachineExport, err error) - VirtualMachineExportExpansion -} - -// virtualMachineExports implements VirtualMachineExportInterface -type virtualMachineExports struct { - client rest.Interface - ns string -} - -// newVirtualMachineExports returns a VirtualMachineExports -func newVirtualMachineExports(c *ExportV1beta1Client, namespace string) *virtualMachineExports { - return &virtualMachineExports{ - client: c.RESTClient(), - ns: namespace, - } -} - -// Get takes name of the virtualMachineExport, and returns the corresponding virtualMachineExport object, and an error if there is any. -func (c *virtualMachineExports) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.VirtualMachineExport, err error) { - result = &v1beta1.VirtualMachineExport{} - err = c.client.Get(). - Namespace(c.ns). - Resource("virtualmachineexports"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(ctx). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of VirtualMachineExports that match those selectors. -func (c *virtualMachineExports) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.VirtualMachineExportList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v1beta1.VirtualMachineExportList{} - err = c.client.Get(). - Namespace(c.ns). - Resource("virtualmachineexports"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(ctx). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested virtualMachineExports. -func (c *virtualMachineExports) 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("virtualmachineexports"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch(ctx) -} - -// Create takes the representation of a virtualMachineExport and creates it. Returns the server's representation of the virtualMachineExport, and an error, if there is any. -func (c *virtualMachineExports) Create(ctx context.Context, virtualMachineExport *v1beta1.VirtualMachineExport, opts v1.CreateOptions) (result *v1beta1.VirtualMachineExport, err error) { - result = &v1beta1.VirtualMachineExport{} - err = c.client.Post(). - Namespace(c.ns). - Resource("virtualmachineexports"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(virtualMachineExport). - Do(ctx). - Into(result) - return -} - -// Update takes the representation of a virtualMachineExport and updates it. Returns the server's representation of the virtualMachineExport, and an error, if there is any. -func (c *virtualMachineExports) Update(ctx context.Context, virtualMachineExport *v1beta1.VirtualMachineExport, opts v1.UpdateOptions) (result *v1beta1.VirtualMachineExport, err error) { - result = &v1beta1.VirtualMachineExport{} - err = c.client.Put(). - Namespace(c.ns). - Resource("virtualmachineexports"). - Name(virtualMachineExport.Name). - VersionedParams(&opts, scheme.ParameterCodec). - Body(virtualMachineExport). - 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 *virtualMachineExports) UpdateStatus(ctx context.Context, virtualMachineExport *v1beta1.VirtualMachineExport, opts v1.UpdateOptions) (result *v1beta1.VirtualMachineExport, err error) { - result = &v1beta1.VirtualMachineExport{} - err = c.client.Put(). - Namespace(c.ns). - Resource("virtualmachineexports"). - Name(virtualMachineExport.Name). - SubResource("status"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(virtualMachineExport). - Do(ctx). - Into(result) - return -} - -// Delete takes name of the virtualMachineExport and deletes it. Returns an error if one occurs. -func (c *virtualMachineExports) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - return c.client.Delete(). - Namespace(c.ns). - Resource("virtualmachineexports"). - Name(name). - Body(&opts). - Do(ctx). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *virtualMachineExports) 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("virtualmachineexports"). - VersionedParams(&listOpts, scheme.ParameterCodec). - Timeout(timeout). - Body(&opts). - Do(ctx). - Error() -} - -// Patch applies the patch and returns the patched virtualMachineExport. -func (c *virtualMachineExports) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.VirtualMachineExport, err error) { - result = &v1beta1.VirtualMachineExport{} - err = c.client.Patch(pt). - Namespace(c.ns). - Resource("virtualmachineexports"). - 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/instancetype/v1alpha1/generated_expansion.go b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/instancetype/v1alpha1/generated_expansion.go deleted file mode 100644 index 8ff428293..000000000 --- a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/instancetype/v1alpha1/generated_expansion.go +++ /dev/null @@ -1,27 +0,0 @@ -/* -Copyright 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 VirtualMachineClusterInstancetypeExpansion interface{} - -type VirtualMachineClusterPreferenceExpansion interface{} - -type VirtualMachineInstancetypeExpansion interface{} - -type VirtualMachinePreferenceExpansion interface{} diff --git a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/instancetype/v1alpha1/instancetype_client.go b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/instancetype/v1alpha1/instancetype_client.go deleted file mode 100644 index 5b09c62cd..000000000 --- a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/instancetype/v1alpha1/instancetype_client.go +++ /dev/null @@ -1,104 +0,0 @@ -/* -Copyright 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/instancetype/v1alpha1" - "kubevirt.io/client-go/generated/kubevirt/clientset/versioned/scheme" -) - -type InstancetypeV1alpha1Interface interface { - RESTClient() rest.Interface - VirtualMachineClusterInstancetypesGetter - VirtualMachineClusterPreferencesGetter - VirtualMachineInstancetypesGetter - VirtualMachinePreferencesGetter -} - -// InstancetypeV1alpha1Client is used to interact with features provided by the instancetype.kubevirt.io group. -type InstancetypeV1alpha1Client struct { - restClient rest.Interface -} - -func (c *InstancetypeV1alpha1Client) VirtualMachineClusterInstancetypes() VirtualMachineClusterInstancetypeInterface { - return newVirtualMachineClusterInstancetypes(c) -} - -func (c *InstancetypeV1alpha1Client) VirtualMachineClusterPreferences() VirtualMachineClusterPreferenceInterface { - return newVirtualMachineClusterPreferences(c) -} - -func (c *InstancetypeV1alpha1Client) VirtualMachineInstancetypes(namespace string) VirtualMachineInstancetypeInterface { - return newVirtualMachineInstancetypes(c, namespace) -} - -func (c *InstancetypeV1alpha1Client) VirtualMachinePreferences(namespace string) VirtualMachinePreferenceInterface { - return newVirtualMachinePreferences(c, namespace) -} - -// NewForConfig creates a new InstancetypeV1alpha1Client for the given config. -func NewForConfig(c *rest.Config) (*InstancetypeV1alpha1Client, error) { - config := *c - if err := setConfigDefaults(&config); err != nil { - return nil, err - } - client, err := rest.RESTClientFor(&config) - if err != nil { - return nil, err - } - return &InstancetypeV1alpha1Client{client}, nil -} - -// NewForConfigOrDie creates a new InstancetypeV1alpha1Client for the given config and -// panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *InstancetypeV1alpha1Client { - client, err := NewForConfig(c) - if err != nil { - panic(err) - } - return client -} - -// New creates a new InstancetypeV1alpha1Client for the given RESTClient. -func New(c rest.Interface) *InstancetypeV1alpha1Client { - return &InstancetypeV1alpha1Client{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 *InstancetypeV1alpha1Client) RESTClient() rest.Interface { - if c == nil { - return nil - } - return c.restClient -} diff --git a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/instancetype/v1alpha1/virtualmachineclusterinstancetype.go b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/instancetype/v1alpha1/virtualmachineclusterinstancetype.go deleted file mode 100644 index e1129e034..000000000 --- a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/instancetype/v1alpha1/virtualmachineclusterinstancetype.go +++ /dev/null @@ -1,168 +0,0 @@ -/* -Copyright 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/instancetype/v1alpha1" - scheme "kubevirt.io/client-go/generated/kubevirt/clientset/versioned/scheme" -) - -// VirtualMachineClusterInstancetypesGetter has a method to return a VirtualMachineClusterInstancetypeInterface. -// A group's client should implement this interface. -type VirtualMachineClusterInstancetypesGetter interface { - VirtualMachineClusterInstancetypes() VirtualMachineClusterInstancetypeInterface -} - -// VirtualMachineClusterInstancetypeInterface has methods to work with VirtualMachineClusterInstancetype resources. -type VirtualMachineClusterInstancetypeInterface interface { - Create(ctx context.Context, virtualMachineClusterInstancetype *v1alpha1.VirtualMachineClusterInstancetype, opts v1.CreateOptions) (*v1alpha1.VirtualMachineClusterInstancetype, error) - Update(ctx context.Context, virtualMachineClusterInstancetype *v1alpha1.VirtualMachineClusterInstancetype, opts v1.UpdateOptions) (*v1alpha1.VirtualMachineClusterInstancetype, 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.VirtualMachineClusterInstancetype, error) - List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.VirtualMachineClusterInstancetypeList, 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.VirtualMachineClusterInstancetype, err error) - VirtualMachineClusterInstancetypeExpansion -} - -// virtualMachineClusterInstancetypes implements VirtualMachineClusterInstancetypeInterface -type virtualMachineClusterInstancetypes struct { - client rest.Interface -} - -// newVirtualMachineClusterInstancetypes returns a VirtualMachineClusterInstancetypes -func newVirtualMachineClusterInstancetypes(c *InstancetypeV1alpha1Client) *virtualMachineClusterInstancetypes { - return &virtualMachineClusterInstancetypes{ - client: c.RESTClient(), - } -} - -// Get takes name of the virtualMachineClusterInstancetype, and returns the corresponding virtualMachineClusterInstancetype object, and an error if there is any. -func (c *virtualMachineClusterInstancetypes) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.VirtualMachineClusterInstancetype, err error) { - result = &v1alpha1.VirtualMachineClusterInstancetype{} - err = c.client.Get(). - Resource("virtualmachineclusterinstancetypes"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(ctx). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of VirtualMachineClusterInstancetypes that match those selectors. -func (c *virtualMachineClusterInstancetypes) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.VirtualMachineClusterInstancetypeList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v1alpha1.VirtualMachineClusterInstancetypeList{} - err = c.client.Get(). - Resource("virtualmachineclusterinstancetypes"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(ctx). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested virtualMachineClusterInstancetypes. -func (c *virtualMachineClusterInstancetypes) 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("virtualmachineclusterinstancetypes"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch(ctx) -} - -// Create takes the representation of a virtualMachineClusterInstancetype and creates it. Returns the server's representation of the virtualMachineClusterInstancetype, and an error, if there is any. -func (c *virtualMachineClusterInstancetypes) Create(ctx context.Context, virtualMachineClusterInstancetype *v1alpha1.VirtualMachineClusterInstancetype, opts v1.CreateOptions) (result *v1alpha1.VirtualMachineClusterInstancetype, err error) { - result = &v1alpha1.VirtualMachineClusterInstancetype{} - err = c.client.Post(). - Resource("virtualmachineclusterinstancetypes"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(virtualMachineClusterInstancetype). - Do(ctx). - Into(result) - return -} - -// Update takes the representation of a virtualMachineClusterInstancetype and updates it. Returns the server's representation of the virtualMachineClusterInstancetype, and an error, if there is any. -func (c *virtualMachineClusterInstancetypes) Update(ctx context.Context, virtualMachineClusterInstancetype *v1alpha1.VirtualMachineClusterInstancetype, opts v1.UpdateOptions) (result *v1alpha1.VirtualMachineClusterInstancetype, err error) { - result = &v1alpha1.VirtualMachineClusterInstancetype{} - err = c.client.Put(). - Resource("virtualmachineclusterinstancetypes"). - Name(virtualMachineClusterInstancetype.Name). - VersionedParams(&opts, scheme.ParameterCodec). - Body(virtualMachineClusterInstancetype). - Do(ctx). - Into(result) - return -} - -// Delete takes name of the virtualMachineClusterInstancetype and deletes it. Returns an error if one occurs. -func (c *virtualMachineClusterInstancetypes) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - return c.client.Delete(). - Resource("virtualmachineclusterinstancetypes"). - Name(name). - Body(&opts). - Do(ctx). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *virtualMachineClusterInstancetypes) 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("virtualmachineclusterinstancetypes"). - VersionedParams(&listOpts, scheme.ParameterCodec). - Timeout(timeout). - Body(&opts). - Do(ctx). - Error() -} - -// Patch applies the patch and returns the patched virtualMachineClusterInstancetype. -func (c *virtualMachineClusterInstancetypes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.VirtualMachineClusterInstancetype, err error) { - result = &v1alpha1.VirtualMachineClusterInstancetype{} - err = c.client.Patch(pt). - Resource("virtualmachineclusterinstancetypes"). - 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/instancetype/v1alpha1/virtualmachineclusterpreference.go b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/instancetype/v1alpha1/virtualmachineclusterpreference.go deleted file mode 100644 index daaadb8fc..000000000 --- a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/instancetype/v1alpha1/virtualmachineclusterpreference.go +++ /dev/null @@ -1,168 +0,0 @@ -/* -Copyright 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/instancetype/v1alpha1" - scheme "kubevirt.io/client-go/generated/kubevirt/clientset/versioned/scheme" -) - -// VirtualMachineClusterPreferencesGetter has a method to return a VirtualMachineClusterPreferenceInterface. -// A group's client should implement this interface. -type VirtualMachineClusterPreferencesGetter interface { - VirtualMachineClusterPreferences() VirtualMachineClusterPreferenceInterface -} - -// VirtualMachineClusterPreferenceInterface has methods to work with VirtualMachineClusterPreference resources. -type VirtualMachineClusterPreferenceInterface interface { - Create(ctx context.Context, virtualMachineClusterPreference *v1alpha1.VirtualMachineClusterPreference, opts v1.CreateOptions) (*v1alpha1.VirtualMachineClusterPreference, error) - Update(ctx context.Context, virtualMachineClusterPreference *v1alpha1.VirtualMachineClusterPreference, opts v1.UpdateOptions) (*v1alpha1.VirtualMachineClusterPreference, 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.VirtualMachineClusterPreference, error) - List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.VirtualMachineClusterPreferenceList, 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.VirtualMachineClusterPreference, err error) - VirtualMachineClusterPreferenceExpansion -} - -// virtualMachineClusterPreferences implements VirtualMachineClusterPreferenceInterface -type virtualMachineClusterPreferences struct { - client rest.Interface -} - -// newVirtualMachineClusterPreferences returns a VirtualMachineClusterPreferences -func newVirtualMachineClusterPreferences(c *InstancetypeV1alpha1Client) *virtualMachineClusterPreferences { - return &virtualMachineClusterPreferences{ - client: c.RESTClient(), - } -} - -// Get takes name of the virtualMachineClusterPreference, and returns the corresponding virtualMachineClusterPreference object, and an error if there is any. -func (c *virtualMachineClusterPreferences) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.VirtualMachineClusterPreference, err error) { - result = &v1alpha1.VirtualMachineClusterPreference{} - err = c.client.Get(). - Resource("virtualmachineclusterpreferences"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(ctx). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of VirtualMachineClusterPreferences that match those selectors. -func (c *virtualMachineClusterPreferences) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.VirtualMachineClusterPreferenceList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v1alpha1.VirtualMachineClusterPreferenceList{} - err = c.client.Get(). - Resource("virtualmachineclusterpreferences"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(ctx). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested virtualMachineClusterPreferences. -func (c *virtualMachineClusterPreferences) 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("virtualmachineclusterpreferences"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch(ctx) -} - -// Create takes the representation of a virtualMachineClusterPreference and creates it. Returns the server's representation of the virtualMachineClusterPreference, and an error, if there is any. -func (c *virtualMachineClusterPreferences) Create(ctx context.Context, virtualMachineClusterPreference *v1alpha1.VirtualMachineClusterPreference, opts v1.CreateOptions) (result *v1alpha1.VirtualMachineClusterPreference, err error) { - result = &v1alpha1.VirtualMachineClusterPreference{} - err = c.client.Post(). - Resource("virtualmachineclusterpreferences"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(virtualMachineClusterPreference). - Do(ctx). - Into(result) - return -} - -// Update takes the representation of a virtualMachineClusterPreference and updates it. Returns the server's representation of the virtualMachineClusterPreference, and an error, if there is any. -func (c *virtualMachineClusterPreferences) Update(ctx context.Context, virtualMachineClusterPreference *v1alpha1.VirtualMachineClusterPreference, opts v1.UpdateOptions) (result *v1alpha1.VirtualMachineClusterPreference, err error) { - result = &v1alpha1.VirtualMachineClusterPreference{} - err = c.client.Put(). - Resource("virtualmachineclusterpreferences"). - Name(virtualMachineClusterPreference.Name). - VersionedParams(&opts, scheme.ParameterCodec). - Body(virtualMachineClusterPreference). - Do(ctx). - Into(result) - return -} - -// Delete takes name of the virtualMachineClusterPreference and deletes it. Returns an error if one occurs. -func (c *virtualMachineClusterPreferences) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - return c.client.Delete(). - Resource("virtualmachineclusterpreferences"). - Name(name). - Body(&opts). - Do(ctx). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *virtualMachineClusterPreferences) 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("virtualmachineclusterpreferences"). - VersionedParams(&listOpts, scheme.ParameterCodec). - Timeout(timeout). - Body(&opts). - Do(ctx). - Error() -} - -// Patch applies the patch and returns the patched virtualMachineClusterPreference. -func (c *virtualMachineClusterPreferences) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.VirtualMachineClusterPreference, err error) { - result = &v1alpha1.VirtualMachineClusterPreference{} - err = c.client.Patch(pt). - Resource("virtualmachineclusterpreferences"). - 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/instancetype/v1alpha1/virtualmachineinstancetype.go b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/instancetype/v1alpha1/virtualmachineinstancetype.go deleted file mode 100644 index 63c851727..000000000 --- a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/instancetype/v1alpha1/virtualmachineinstancetype.go +++ /dev/null @@ -1,178 +0,0 @@ -/* -Copyright 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/instancetype/v1alpha1" - scheme "kubevirt.io/client-go/generated/kubevirt/clientset/versioned/scheme" -) - -// VirtualMachineInstancetypesGetter has a method to return a VirtualMachineInstancetypeInterface. -// A group's client should implement this interface. -type VirtualMachineInstancetypesGetter interface { - VirtualMachineInstancetypes(namespace string) VirtualMachineInstancetypeInterface -} - -// VirtualMachineInstancetypeInterface has methods to work with VirtualMachineInstancetype resources. -type VirtualMachineInstancetypeInterface interface { - Create(ctx context.Context, virtualMachineInstancetype *v1alpha1.VirtualMachineInstancetype, opts v1.CreateOptions) (*v1alpha1.VirtualMachineInstancetype, error) - Update(ctx context.Context, virtualMachineInstancetype *v1alpha1.VirtualMachineInstancetype, opts v1.UpdateOptions) (*v1alpha1.VirtualMachineInstancetype, 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.VirtualMachineInstancetype, error) - List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.VirtualMachineInstancetypeList, 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.VirtualMachineInstancetype, err error) - VirtualMachineInstancetypeExpansion -} - -// virtualMachineInstancetypes implements VirtualMachineInstancetypeInterface -type virtualMachineInstancetypes struct { - client rest.Interface - ns string -} - -// newVirtualMachineInstancetypes returns a VirtualMachineInstancetypes -func newVirtualMachineInstancetypes(c *InstancetypeV1alpha1Client, namespace string) *virtualMachineInstancetypes { - return &virtualMachineInstancetypes{ - client: c.RESTClient(), - ns: namespace, - } -} - -// Get takes name of the virtualMachineInstancetype, and returns the corresponding virtualMachineInstancetype object, and an error if there is any. -func (c *virtualMachineInstancetypes) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.VirtualMachineInstancetype, err error) { - result = &v1alpha1.VirtualMachineInstancetype{} - err = c.client.Get(). - Namespace(c.ns). - Resource("virtualmachineinstancetypes"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(ctx). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of VirtualMachineInstancetypes that match those selectors. -func (c *virtualMachineInstancetypes) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.VirtualMachineInstancetypeList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v1alpha1.VirtualMachineInstancetypeList{} - err = c.client.Get(). - Namespace(c.ns). - Resource("virtualmachineinstancetypes"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(ctx). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested virtualMachineInstancetypes. -func (c *virtualMachineInstancetypes) 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("virtualmachineinstancetypes"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch(ctx) -} - -// Create takes the representation of a virtualMachineInstancetype and creates it. Returns the server's representation of the virtualMachineInstancetype, and an error, if there is any. -func (c *virtualMachineInstancetypes) Create(ctx context.Context, virtualMachineInstancetype *v1alpha1.VirtualMachineInstancetype, opts v1.CreateOptions) (result *v1alpha1.VirtualMachineInstancetype, err error) { - result = &v1alpha1.VirtualMachineInstancetype{} - err = c.client.Post(). - Namespace(c.ns). - Resource("virtualmachineinstancetypes"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(virtualMachineInstancetype). - Do(ctx). - Into(result) - return -} - -// Update takes the representation of a virtualMachineInstancetype and updates it. Returns the server's representation of the virtualMachineInstancetype, and an error, if there is any. -func (c *virtualMachineInstancetypes) Update(ctx context.Context, virtualMachineInstancetype *v1alpha1.VirtualMachineInstancetype, opts v1.UpdateOptions) (result *v1alpha1.VirtualMachineInstancetype, err error) { - result = &v1alpha1.VirtualMachineInstancetype{} - err = c.client.Put(). - Namespace(c.ns). - Resource("virtualmachineinstancetypes"). - Name(virtualMachineInstancetype.Name). - VersionedParams(&opts, scheme.ParameterCodec). - Body(virtualMachineInstancetype). - Do(ctx). - Into(result) - return -} - -// Delete takes name of the virtualMachineInstancetype and deletes it. Returns an error if one occurs. -func (c *virtualMachineInstancetypes) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - return c.client.Delete(). - Namespace(c.ns). - Resource("virtualmachineinstancetypes"). - Name(name). - Body(&opts). - Do(ctx). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *virtualMachineInstancetypes) 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("virtualmachineinstancetypes"). - VersionedParams(&listOpts, scheme.ParameterCodec). - Timeout(timeout). - Body(&opts). - Do(ctx). - Error() -} - -// Patch applies the patch and returns the patched virtualMachineInstancetype. -func (c *virtualMachineInstancetypes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.VirtualMachineInstancetype, err error) { - result = &v1alpha1.VirtualMachineInstancetype{} - err = c.client.Patch(pt). - Namespace(c.ns). - Resource("virtualmachineinstancetypes"). - 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/instancetype/v1alpha1/virtualmachinepreference.go b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/instancetype/v1alpha1/virtualmachinepreference.go deleted file mode 100644 index d05292152..000000000 --- a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/instancetype/v1alpha1/virtualmachinepreference.go +++ /dev/null @@ -1,178 +0,0 @@ -/* -Copyright 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/instancetype/v1alpha1" - scheme "kubevirt.io/client-go/generated/kubevirt/clientset/versioned/scheme" -) - -// VirtualMachinePreferencesGetter has a method to return a VirtualMachinePreferenceInterface. -// A group's client should implement this interface. -type VirtualMachinePreferencesGetter interface { - VirtualMachinePreferences(namespace string) VirtualMachinePreferenceInterface -} - -// VirtualMachinePreferenceInterface has methods to work with VirtualMachinePreference resources. -type VirtualMachinePreferenceInterface interface { - Create(ctx context.Context, virtualMachinePreference *v1alpha1.VirtualMachinePreference, opts v1.CreateOptions) (*v1alpha1.VirtualMachinePreference, error) - Update(ctx context.Context, virtualMachinePreference *v1alpha1.VirtualMachinePreference, opts v1.UpdateOptions) (*v1alpha1.VirtualMachinePreference, 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.VirtualMachinePreference, error) - List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.VirtualMachinePreferenceList, 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.VirtualMachinePreference, err error) - VirtualMachinePreferenceExpansion -} - -// virtualMachinePreferences implements VirtualMachinePreferenceInterface -type virtualMachinePreferences struct { - client rest.Interface - ns string -} - -// newVirtualMachinePreferences returns a VirtualMachinePreferences -func newVirtualMachinePreferences(c *InstancetypeV1alpha1Client, namespace string) *virtualMachinePreferences { - return &virtualMachinePreferences{ - client: c.RESTClient(), - ns: namespace, - } -} - -// Get takes name of the virtualMachinePreference, and returns the corresponding virtualMachinePreference object, and an error if there is any. -func (c *virtualMachinePreferences) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.VirtualMachinePreference, err error) { - result = &v1alpha1.VirtualMachinePreference{} - err = c.client.Get(). - Namespace(c.ns). - Resource("virtualmachinepreferences"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(ctx). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of VirtualMachinePreferences that match those selectors. -func (c *virtualMachinePreferences) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.VirtualMachinePreferenceList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v1alpha1.VirtualMachinePreferenceList{} - err = c.client.Get(). - Namespace(c.ns). - Resource("virtualmachinepreferences"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(ctx). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested virtualMachinePreferences. -func (c *virtualMachinePreferences) 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("virtualmachinepreferences"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch(ctx) -} - -// Create takes the representation of a virtualMachinePreference and creates it. Returns the server's representation of the virtualMachinePreference, and an error, if there is any. -func (c *virtualMachinePreferences) Create(ctx context.Context, virtualMachinePreference *v1alpha1.VirtualMachinePreference, opts v1.CreateOptions) (result *v1alpha1.VirtualMachinePreference, err error) { - result = &v1alpha1.VirtualMachinePreference{} - err = c.client.Post(). - Namespace(c.ns). - Resource("virtualmachinepreferences"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(virtualMachinePreference). - Do(ctx). - Into(result) - return -} - -// Update takes the representation of a virtualMachinePreference and updates it. Returns the server's representation of the virtualMachinePreference, and an error, if there is any. -func (c *virtualMachinePreferences) Update(ctx context.Context, virtualMachinePreference *v1alpha1.VirtualMachinePreference, opts v1.UpdateOptions) (result *v1alpha1.VirtualMachinePreference, err error) { - result = &v1alpha1.VirtualMachinePreference{} - err = c.client.Put(). - Namespace(c.ns). - Resource("virtualmachinepreferences"). - Name(virtualMachinePreference.Name). - VersionedParams(&opts, scheme.ParameterCodec). - Body(virtualMachinePreference). - Do(ctx). - Into(result) - return -} - -// Delete takes name of the virtualMachinePreference and deletes it. Returns an error if one occurs. -func (c *virtualMachinePreferences) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - return c.client.Delete(). - Namespace(c.ns). - Resource("virtualmachinepreferences"). - Name(name). - Body(&opts). - Do(ctx). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *virtualMachinePreferences) 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("virtualmachinepreferences"). - VersionedParams(&listOpts, scheme.ParameterCodec). - Timeout(timeout). - Body(&opts). - Do(ctx). - Error() -} - -// Patch applies the patch and returns the patched virtualMachinePreference. -func (c *virtualMachinePreferences) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.VirtualMachinePreference, err error) { - result = &v1alpha1.VirtualMachinePreference{} - err = c.client.Patch(pt). - Namespace(c.ns). - Resource("virtualmachinepreferences"). - 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/instancetype/v1alpha2/doc.go b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/instancetype/v1alpha2/doc.go deleted file mode 100644 index b0e7464a3..000000000 --- a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/instancetype/v1alpha2/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright 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 v1alpha2 diff --git a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/instancetype/v1alpha2/generated_expansion.go b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/instancetype/v1alpha2/generated_expansion.go deleted file mode 100644 index c44ab5e9c..000000000 --- a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/instancetype/v1alpha2/generated_expansion.go +++ /dev/null @@ -1,27 +0,0 @@ -/* -Copyright 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 v1alpha2 - -type VirtualMachineClusterInstancetypeExpansion interface{} - -type VirtualMachineClusterPreferenceExpansion interface{} - -type VirtualMachineInstancetypeExpansion interface{} - -type VirtualMachinePreferenceExpansion interface{} diff --git a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/instancetype/v1alpha2/instancetype_client.go b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/instancetype/v1alpha2/instancetype_client.go deleted file mode 100644 index 807e0f482..000000000 --- a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/instancetype/v1alpha2/instancetype_client.go +++ /dev/null @@ -1,104 +0,0 @@ -/* -Copyright 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 v1alpha2 - -import ( - rest "k8s.io/client-go/rest" - v1alpha2 "kubevirt.io/api/instancetype/v1alpha2" - "kubevirt.io/client-go/generated/kubevirt/clientset/versioned/scheme" -) - -type InstancetypeV1alpha2Interface interface { - RESTClient() rest.Interface - VirtualMachineClusterInstancetypesGetter - VirtualMachineClusterPreferencesGetter - VirtualMachineInstancetypesGetter - VirtualMachinePreferencesGetter -} - -// InstancetypeV1alpha2Client is used to interact with features provided by the instancetype.kubevirt.io group. -type InstancetypeV1alpha2Client struct { - restClient rest.Interface -} - -func (c *InstancetypeV1alpha2Client) VirtualMachineClusterInstancetypes() VirtualMachineClusterInstancetypeInterface { - return newVirtualMachineClusterInstancetypes(c) -} - -func (c *InstancetypeV1alpha2Client) VirtualMachineClusterPreferences() VirtualMachineClusterPreferenceInterface { - return newVirtualMachineClusterPreferences(c) -} - -func (c *InstancetypeV1alpha2Client) VirtualMachineInstancetypes(namespace string) VirtualMachineInstancetypeInterface { - return newVirtualMachineInstancetypes(c, namespace) -} - -func (c *InstancetypeV1alpha2Client) VirtualMachinePreferences(namespace string) VirtualMachinePreferenceInterface { - return newVirtualMachinePreferences(c, namespace) -} - -// NewForConfig creates a new InstancetypeV1alpha2Client for the given config. -func NewForConfig(c *rest.Config) (*InstancetypeV1alpha2Client, error) { - config := *c - if err := setConfigDefaults(&config); err != nil { - return nil, err - } - client, err := rest.RESTClientFor(&config) - if err != nil { - return nil, err - } - return &InstancetypeV1alpha2Client{client}, nil -} - -// NewForConfigOrDie creates a new InstancetypeV1alpha2Client for the given config and -// panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *InstancetypeV1alpha2Client { - client, err := NewForConfig(c) - if err != nil { - panic(err) - } - return client -} - -// New creates a new InstancetypeV1alpha2Client for the given RESTClient. -func New(c rest.Interface) *InstancetypeV1alpha2Client { - return &InstancetypeV1alpha2Client{c} -} - -func setConfigDefaults(config *rest.Config) error { - gv := v1alpha2.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 *InstancetypeV1alpha2Client) RESTClient() rest.Interface { - if c == nil { - return nil - } - return c.restClient -} diff --git a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/instancetype/v1alpha2/virtualmachineclusterinstancetype.go b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/instancetype/v1alpha2/virtualmachineclusterinstancetype.go deleted file mode 100644 index 39c619fc1..000000000 --- a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/instancetype/v1alpha2/virtualmachineclusterinstancetype.go +++ /dev/null @@ -1,168 +0,0 @@ -/* -Copyright 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 v1alpha2 - -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" - v1alpha2 "kubevirt.io/api/instancetype/v1alpha2" - scheme "kubevirt.io/client-go/generated/kubevirt/clientset/versioned/scheme" -) - -// VirtualMachineClusterInstancetypesGetter has a method to return a VirtualMachineClusterInstancetypeInterface. -// A group's client should implement this interface. -type VirtualMachineClusterInstancetypesGetter interface { - VirtualMachineClusterInstancetypes() VirtualMachineClusterInstancetypeInterface -} - -// VirtualMachineClusterInstancetypeInterface has methods to work with VirtualMachineClusterInstancetype resources. -type VirtualMachineClusterInstancetypeInterface interface { - Create(ctx context.Context, virtualMachineClusterInstancetype *v1alpha2.VirtualMachineClusterInstancetype, opts v1.CreateOptions) (*v1alpha2.VirtualMachineClusterInstancetype, error) - Update(ctx context.Context, virtualMachineClusterInstancetype *v1alpha2.VirtualMachineClusterInstancetype, opts v1.UpdateOptions) (*v1alpha2.VirtualMachineClusterInstancetype, 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) (*v1alpha2.VirtualMachineClusterInstancetype, error) - List(ctx context.Context, opts v1.ListOptions) (*v1alpha2.VirtualMachineClusterInstancetypeList, 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 *v1alpha2.VirtualMachineClusterInstancetype, err error) - VirtualMachineClusterInstancetypeExpansion -} - -// virtualMachineClusterInstancetypes implements VirtualMachineClusterInstancetypeInterface -type virtualMachineClusterInstancetypes struct { - client rest.Interface -} - -// newVirtualMachineClusterInstancetypes returns a VirtualMachineClusterInstancetypes -func newVirtualMachineClusterInstancetypes(c *InstancetypeV1alpha2Client) *virtualMachineClusterInstancetypes { - return &virtualMachineClusterInstancetypes{ - client: c.RESTClient(), - } -} - -// Get takes name of the virtualMachineClusterInstancetype, and returns the corresponding virtualMachineClusterInstancetype object, and an error if there is any. -func (c *virtualMachineClusterInstancetypes) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha2.VirtualMachineClusterInstancetype, err error) { - result = &v1alpha2.VirtualMachineClusterInstancetype{} - err = c.client.Get(). - Resource("virtualmachineclusterinstancetypes"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(ctx). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of VirtualMachineClusterInstancetypes that match those selectors. -func (c *virtualMachineClusterInstancetypes) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha2.VirtualMachineClusterInstancetypeList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v1alpha2.VirtualMachineClusterInstancetypeList{} - err = c.client.Get(). - Resource("virtualmachineclusterinstancetypes"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(ctx). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested virtualMachineClusterInstancetypes. -func (c *virtualMachineClusterInstancetypes) 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("virtualmachineclusterinstancetypes"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch(ctx) -} - -// Create takes the representation of a virtualMachineClusterInstancetype and creates it. Returns the server's representation of the virtualMachineClusterInstancetype, and an error, if there is any. -func (c *virtualMachineClusterInstancetypes) Create(ctx context.Context, virtualMachineClusterInstancetype *v1alpha2.VirtualMachineClusterInstancetype, opts v1.CreateOptions) (result *v1alpha2.VirtualMachineClusterInstancetype, err error) { - result = &v1alpha2.VirtualMachineClusterInstancetype{} - err = c.client.Post(). - Resource("virtualmachineclusterinstancetypes"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(virtualMachineClusterInstancetype). - Do(ctx). - Into(result) - return -} - -// Update takes the representation of a virtualMachineClusterInstancetype and updates it. Returns the server's representation of the virtualMachineClusterInstancetype, and an error, if there is any. -func (c *virtualMachineClusterInstancetypes) Update(ctx context.Context, virtualMachineClusterInstancetype *v1alpha2.VirtualMachineClusterInstancetype, opts v1.UpdateOptions) (result *v1alpha2.VirtualMachineClusterInstancetype, err error) { - result = &v1alpha2.VirtualMachineClusterInstancetype{} - err = c.client.Put(). - Resource("virtualmachineclusterinstancetypes"). - Name(virtualMachineClusterInstancetype.Name). - VersionedParams(&opts, scheme.ParameterCodec). - Body(virtualMachineClusterInstancetype). - Do(ctx). - Into(result) - return -} - -// Delete takes name of the virtualMachineClusterInstancetype and deletes it. Returns an error if one occurs. -func (c *virtualMachineClusterInstancetypes) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - return c.client.Delete(). - Resource("virtualmachineclusterinstancetypes"). - Name(name). - Body(&opts). - Do(ctx). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *virtualMachineClusterInstancetypes) 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("virtualmachineclusterinstancetypes"). - VersionedParams(&listOpts, scheme.ParameterCodec). - Timeout(timeout). - Body(&opts). - Do(ctx). - Error() -} - -// Patch applies the patch and returns the patched virtualMachineClusterInstancetype. -func (c *virtualMachineClusterInstancetypes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.VirtualMachineClusterInstancetype, err error) { - result = &v1alpha2.VirtualMachineClusterInstancetype{} - err = c.client.Patch(pt). - Resource("virtualmachineclusterinstancetypes"). - 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/instancetype/v1alpha2/virtualmachineclusterpreference.go b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/instancetype/v1alpha2/virtualmachineclusterpreference.go deleted file mode 100644 index 8c5408be6..000000000 --- a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/instancetype/v1alpha2/virtualmachineclusterpreference.go +++ /dev/null @@ -1,168 +0,0 @@ -/* -Copyright 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 v1alpha2 - -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" - v1alpha2 "kubevirt.io/api/instancetype/v1alpha2" - scheme "kubevirt.io/client-go/generated/kubevirt/clientset/versioned/scheme" -) - -// VirtualMachineClusterPreferencesGetter has a method to return a VirtualMachineClusterPreferenceInterface. -// A group's client should implement this interface. -type VirtualMachineClusterPreferencesGetter interface { - VirtualMachineClusterPreferences() VirtualMachineClusterPreferenceInterface -} - -// VirtualMachineClusterPreferenceInterface has methods to work with VirtualMachineClusterPreference resources. -type VirtualMachineClusterPreferenceInterface interface { - Create(ctx context.Context, virtualMachineClusterPreference *v1alpha2.VirtualMachineClusterPreference, opts v1.CreateOptions) (*v1alpha2.VirtualMachineClusterPreference, error) - Update(ctx context.Context, virtualMachineClusterPreference *v1alpha2.VirtualMachineClusterPreference, opts v1.UpdateOptions) (*v1alpha2.VirtualMachineClusterPreference, 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) (*v1alpha2.VirtualMachineClusterPreference, error) - List(ctx context.Context, opts v1.ListOptions) (*v1alpha2.VirtualMachineClusterPreferenceList, 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 *v1alpha2.VirtualMachineClusterPreference, err error) - VirtualMachineClusterPreferenceExpansion -} - -// virtualMachineClusterPreferences implements VirtualMachineClusterPreferenceInterface -type virtualMachineClusterPreferences struct { - client rest.Interface -} - -// newVirtualMachineClusterPreferences returns a VirtualMachineClusterPreferences -func newVirtualMachineClusterPreferences(c *InstancetypeV1alpha2Client) *virtualMachineClusterPreferences { - return &virtualMachineClusterPreferences{ - client: c.RESTClient(), - } -} - -// Get takes name of the virtualMachineClusterPreference, and returns the corresponding virtualMachineClusterPreference object, and an error if there is any. -func (c *virtualMachineClusterPreferences) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha2.VirtualMachineClusterPreference, err error) { - result = &v1alpha2.VirtualMachineClusterPreference{} - err = c.client.Get(). - Resource("virtualmachineclusterpreferences"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(ctx). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of VirtualMachineClusterPreferences that match those selectors. -func (c *virtualMachineClusterPreferences) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha2.VirtualMachineClusterPreferenceList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v1alpha2.VirtualMachineClusterPreferenceList{} - err = c.client.Get(). - Resource("virtualmachineclusterpreferences"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(ctx). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested virtualMachineClusterPreferences. -func (c *virtualMachineClusterPreferences) 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("virtualmachineclusterpreferences"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch(ctx) -} - -// Create takes the representation of a virtualMachineClusterPreference and creates it. Returns the server's representation of the virtualMachineClusterPreference, and an error, if there is any. -func (c *virtualMachineClusterPreferences) Create(ctx context.Context, virtualMachineClusterPreference *v1alpha2.VirtualMachineClusterPreference, opts v1.CreateOptions) (result *v1alpha2.VirtualMachineClusterPreference, err error) { - result = &v1alpha2.VirtualMachineClusterPreference{} - err = c.client.Post(). - Resource("virtualmachineclusterpreferences"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(virtualMachineClusterPreference). - Do(ctx). - Into(result) - return -} - -// Update takes the representation of a virtualMachineClusterPreference and updates it. Returns the server's representation of the virtualMachineClusterPreference, and an error, if there is any. -func (c *virtualMachineClusterPreferences) Update(ctx context.Context, virtualMachineClusterPreference *v1alpha2.VirtualMachineClusterPreference, opts v1.UpdateOptions) (result *v1alpha2.VirtualMachineClusterPreference, err error) { - result = &v1alpha2.VirtualMachineClusterPreference{} - err = c.client.Put(). - Resource("virtualmachineclusterpreferences"). - Name(virtualMachineClusterPreference.Name). - VersionedParams(&opts, scheme.ParameterCodec). - Body(virtualMachineClusterPreference). - Do(ctx). - Into(result) - return -} - -// Delete takes name of the virtualMachineClusterPreference and deletes it. Returns an error if one occurs. -func (c *virtualMachineClusterPreferences) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - return c.client.Delete(). - Resource("virtualmachineclusterpreferences"). - Name(name). - Body(&opts). - Do(ctx). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *virtualMachineClusterPreferences) 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("virtualmachineclusterpreferences"). - VersionedParams(&listOpts, scheme.ParameterCodec). - Timeout(timeout). - Body(&opts). - Do(ctx). - Error() -} - -// Patch applies the patch and returns the patched virtualMachineClusterPreference. -func (c *virtualMachineClusterPreferences) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.VirtualMachineClusterPreference, err error) { - result = &v1alpha2.VirtualMachineClusterPreference{} - err = c.client.Patch(pt). - Resource("virtualmachineclusterpreferences"). - 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/instancetype/v1alpha2/virtualmachineinstancetype.go b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/instancetype/v1alpha2/virtualmachineinstancetype.go deleted file mode 100644 index cca982cc7..000000000 --- a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/instancetype/v1alpha2/virtualmachineinstancetype.go +++ /dev/null @@ -1,178 +0,0 @@ -/* -Copyright 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 v1alpha2 - -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" - v1alpha2 "kubevirt.io/api/instancetype/v1alpha2" - scheme "kubevirt.io/client-go/generated/kubevirt/clientset/versioned/scheme" -) - -// VirtualMachineInstancetypesGetter has a method to return a VirtualMachineInstancetypeInterface. -// A group's client should implement this interface. -type VirtualMachineInstancetypesGetter interface { - VirtualMachineInstancetypes(namespace string) VirtualMachineInstancetypeInterface -} - -// VirtualMachineInstancetypeInterface has methods to work with VirtualMachineInstancetype resources. -type VirtualMachineInstancetypeInterface interface { - Create(ctx context.Context, virtualMachineInstancetype *v1alpha2.VirtualMachineInstancetype, opts v1.CreateOptions) (*v1alpha2.VirtualMachineInstancetype, error) - Update(ctx context.Context, virtualMachineInstancetype *v1alpha2.VirtualMachineInstancetype, opts v1.UpdateOptions) (*v1alpha2.VirtualMachineInstancetype, 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) (*v1alpha2.VirtualMachineInstancetype, error) - List(ctx context.Context, opts v1.ListOptions) (*v1alpha2.VirtualMachineInstancetypeList, 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 *v1alpha2.VirtualMachineInstancetype, err error) - VirtualMachineInstancetypeExpansion -} - -// virtualMachineInstancetypes implements VirtualMachineInstancetypeInterface -type virtualMachineInstancetypes struct { - client rest.Interface - ns string -} - -// newVirtualMachineInstancetypes returns a VirtualMachineInstancetypes -func newVirtualMachineInstancetypes(c *InstancetypeV1alpha2Client, namespace string) *virtualMachineInstancetypes { - return &virtualMachineInstancetypes{ - client: c.RESTClient(), - ns: namespace, - } -} - -// Get takes name of the virtualMachineInstancetype, and returns the corresponding virtualMachineInstancetype object, and an error if there is any. -func (c *virtualMachineInstancetypes) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha2.VirtualMachineInstancetype, err error) { - result = &v1alpha2.VirtualMachineInstancetype{} - err = c.client.Get(). - Namespace(c.ns). - Resource("virtualmachineinstancetypes"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(ctx). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of VirtualMachineInstancetypes that match those selectors. -func (c *virtualMachineInstancetypes) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha2.VirtualMachineInstancetypeList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v1alpha2.VirtualMachineInstancetypeList{} - err = c.client.Get(). - Namespace(c.ns). - Resource("virtualmachineinstancetypes"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(ctx). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested virtualMachineInstancetypes. -func (c *virtualMachineInstancetypes) 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("virtualmachineinstancetypes"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch(ctx) -} - -// Create takes the representation of a virtualMachineInstancetype and creates it. Returns the server's representation of the virtualMachineInstancetype, and an error, if there is any. -func (c *virtualMachineInstancetypes) Create(ctx context.Context, virtualMachineInstancetype *v1alpha2.VirtualMachineInstancetype, opts v1.CreateOptions) (result *v1alpha2.VirtualMachineInstancetype, err error) { - result = &v1alpha2.VirtualMachineInstancetype{} - err = c.client.Post(). - Namespace(c.ns). - Resource("virtualmachineinstancetypes"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(virtualMachineInstancetype). - Do(ctx). - Into(result) - return -} - -// Update takes the representation of a virtualMachineInstancetype and updates it. Returns the server's representation of the virtualMachineInstancetype, and an error, if there is any. -func (c *virtualMachineInstancetypes) Update(ctx context.Context, virtualMachineInstancetype *v1alpha2.VirtualMachineInstancetype, opts v1.UpdateOptions) (result *v1alpha2.VirtualMachineInstancetype, err error) { - result = &v1alpha2.VirtualMachineInstancetype{} - err = c.client.Put(). - Namespace(c.ns). - Resource("virtualmachineinstancetypes"). - Name(virtualMachineInstancetype.Name). - VersionedParams(&opts, scheme.ParameterCodec). - Body(virtualMachineInstancetype). - Do(ctx). - Into(result) - return -} - -// Delete takes name of the virtualMachineInstancetype and deletes it. Returns an error if one occurs. -func (c *virtualMachineInstancetypes) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - return c.client.Delete(). - Namespace(c.ns). - Resource("virtualmachineinstancetypes"). - Name(name). - Body(&opts). - Do(ctx). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *virtualMachineInstancetypes) 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("virtualmachineinstancetypes"). - VersionedParams(&listOpts, scheme.ParameterCodec). - Timeout(timeout). - Body(&opts). - Do(ctx). - Error() -} - -// Patch applies the patch and returns the patched virtualMachineInstancetype. -func (c *virtualMachineInstancetypes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.VirtualMachineInstancetype, err error) { - result = &v1alpha2.VirtualMachineInstancetype{} - err = c.client.Patch(pt). - Namespace(c.ns). - Resource("virtualmachineinstancetypes"). - 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/instancetype/v1alpha2/virtualmachinepreference.go b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/instancetype/v1alpha2/virtualmachinepreference.go deleted file mode 100644 index 9828adf6a..000000000 --- a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/instancetype/v1alpha2/virtualmachinepreference.go +++ /dev/null @@ -1,178 +0,0 @@ -/* -Copyright 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 v1alpha2 - -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" - v1alpha2 "kubevirt.io/api/instancetype/v1alpha2" - scheme "kubevirt.io/client-go/generated/kubevirt/clientset/versioned/scheme" -) - -// VirtualMachinePreferencesGetter has a method to return a VirtualMachinePreferenceInterface. -// A group's client should implement this interface. -type VirtualMachinePreferencesGetter interface { - VirtualMachinePreferences(namespace string) VirtualMachinePreferenceInterface -} - -// VirtualMachinePreferenceInterface has methods to work with VirtualMachinePreference resources. -type VirtualMachinePreferenceInterface interface { - Create(ctx context.Context, virtualMachinePreference *v1alpha2.VirtualMachinePreference, opts v1.CreateOptions) (*v1alpha2.VirtualMachinePreference, error) - Update(ctx context.Context, virtualMachinePreference *v1alpha2.VirtualMachinePreference, opts v1.UpdateOptions) (*v1alpha2.VirtualMachinePreference, 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) (*v1alpha2.VirtualMachinePreference, error) - List(ctx context.Context, opts v1.ListOptions) (*v1alpha2.VirtualMachinePreferenceList, 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 *v1alpha2.VirtualMachinePreference, err error) - VirtualMachinePreferenceExpansion -} - -// virtualMachinePreferences implements VirtualMachinePreferenceInterface -type virtualMachinePreferences struct { - client rest.Interface - ns string -} - -// newVirtualMachinePreferences returns a VirtualMachinePreferences -func newVirtualMachinePreferences(c *InstancetypeV1alpha2Client, namespace string) *virtualMachinePreferences { - return &virtualMachinePreferences{ - client: c.RESTClient(), - ns: namespace, - } -} - -// Get takes name of the virtualMachinePreference, and returns the corresponding virtualMachinePreference object, and an error if there is any. -func (c *virtualMachinePreferences) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha2.VirtualMachinePreference, err error) { - result = &v1alpha2.VirtualMachinePreference{} - err = c.client.Get(). - Namespace(c.ns). - Resource("virtualmachinepreferences"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(ctx). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of VirtualMachinePreferences that match those selectors. -func (c *virtualMachinePreferences) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha2.VirtualMachinePreferenceList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v1alpha2.VirtualMachinePreferenceList{} - err = c.client.Get(). - Namespace(c.ns). - Resource("virtualmachinepreferences"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(ctx). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested virtualMachinePreferences. -func (c *virtualMachinePreferences) 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("virtualmachinepreferences"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch(ctx) -} - -// Create takes the representation of a virtualMachinePreference and creates it. Returns the server's representation of the virtualMachinePreference, and an error, if there is any. -func (c *virtualMachinePreferences) Create(ctx context.Context, virtualMachinePreference *v1alpha2.VirtualMachinePreference, opts v1.CreateOptions) (result *v1alpha2.VirtualMachinePreference, err error) { - result = &v1alpha2.VirtualMachinePreference{} - err = c.client.Post(). - Namespace(c.ns). - Resource("virtualmachinepreferences"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(virtualMachinePreference). - Do(ctx). - Into(result) - return -} - -// Update takes the representation of a virtualMachinePreference and updates it. Returns the server's representation of the virtualMachinePreference, and an error, if there is any. -func (c *virtualMachinePreferences) Update(ctx context.Context, virtualMachinePreference *v1alpha2.VirtualMachinePreference, opts v1.UpdateOptions) (result *v1alpha2.VirtualMachinePreference, err error) { - result = &v1alpha2.VirtualMachinePreference{} - err = c.client.Put(). - Namespace(c.ns). - Resource("virtualmachinepreferences"). - Name(virtualMachinePreference.Name). - VersionedParams(&opts, scheme.ParameterCodec). - Body(virtualMachinePreference). - Do(ctx). - Into(result) - return -} - -// Delete takes name of the virtualMachinePreference and deletes it. Returns an error if one occurs. -func (c *virtualMachinePreferences) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - return c.client.Delete(). - Namespace(c.ns). - Resource("virtualmachinepreferences"). - Name(name). - Body(&opts). - Do(ctx). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *virtualMachinePreferences) 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("virtualmachinepreferences"). - VersionedParams(&listOpts, scheme.ParameterCodec). - Timeout(timeout). - Body(&opts). - Do(ctx). - Error() -} - -// Patch applies the patch and returns the patched virtualMachinePreference. -func (c *virtualMachinePreferences) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.VirtualMachinePreference, err error) { - result = &v1alpha2.VirtualMachinePreference{} - err = c.client.Patch(pt). - Namespace(c.ns). - Resource("virtualmachinepreferences"). - 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/instancetype/v1beta1/virtualmachineclusterinstancetype.go b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/instancetype/v1beta1/virtualmachineclusterinstancetype.go deleted file mode 100644 index 6af5a6aa5..000000000 --- a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/instancetype/v1beta1/virtualmachineclusterinstancetype.go +++ /dev/null @@ -1,168 +0,0 @@ -/* -Copyright 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" - v1beta1 "kubevirt.io/api/instancetype/v1beta1" - scheme "kubevirt.io/client-go/generated/kubevirt/clientset/versioned/scheme" -) - -// VirtualMachineClusterInstancetypesGetter has a method to return a VirtualMachineClusterInstancetypeInterface. -// A group's client should implement this interface. -type VirtualMachineClusterInstancetypesGetter interface { - VirtualMachineClusterInstancetypes() VirtualMachineClusterInstancetypeInterface -} - -// VirtualMachineClusterInstancetypeInterface has methods to work with VirtualMachineClusterInstancetype resources. -type VirtualMachineClusterInstancetypeInterface interface { - Create(ctx context.Context, virtualMachineClusterInstancetype *v1beta1.VirtualMachineClusterInstancetype, opts v1.CreateOptions) (*v1beta1.VirtualMachineClusterInstancetype, error) - Update(ctx context.Context, virtualMachineClusterInstancetype *v1beta1.VirtualMachineClusterInstancetype, opts v1.UpdateOptions) (*v1beta1.VirtualMachineClusterInstancetype, 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.VirtualMachineClusterInstancetype, error) - List(ctx context.Context, opts v1.ListOptions) (*v1beta1.VirtualMachineClusterInstancetypeList, 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.VirtualMachineClusterInstancetype, err error) - VirtualMachineClusterInstancetypeExpansion -} - -// virtualMachineClusterInstancetypes implements VirtualMachineClusterInstancetypeInterface -type virtualMachineClusterInstancetypes struct { - client rest.Interface -} - -// newVirtualMachineClusterInstancetypes returns a VirtualMachineClusterInstancetypes -func newVirtualMachineClusterInstancetypes(c *InstancetypeV1beta1Client) *virtualMachineClusterInstancetypes { - return &virtualMachineClusterInstancetypes{ - client: c.RESTClient(), - } -} - -// Get takes name of the virtualMachineClusterInstancetype, and returns the corresponding virtualMachineClusterInstancetype object, and an error if there is any. -func (c *virtualMachineClusterInstancetypes) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.VirtualMachineClusterInstancetype, err error) { - result = &v1beta1.VirtualMachineClusterInstancetype{} - err = c.client.Get(). - Resource("virtualmachineclusterinstancetypes"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(ctx). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of VirtualMachineClusterInstancetypes that match those selectors. -func (c *virtualMachineClusterInstancetypes) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.VirtualMachineClusterInstancetypeList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v1beta1.VirtualMachineClusterInstancetypeList{} - err = c.client.Get(). - Resource("virtualmachineclusterinstancetypes"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(ctx). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested virtualMachineClusterInstancetypes. -func (c *virtualMachineClusterInstancetypes) 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("virtualmachineclusterinstancetypes"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch(ctx) -} - -// Create takes the representation of a virtualMachineClusterInstancetype and creates it. Returns the server's representation of the virtualMachineClusterInstancetype, and an error, if there is any. -func (c *virtualMachineClusterInstancetypes) Create(ctx context.Context, virtualMachineClusterInstancetype *v1beta1.VirtualMachineClusterInstancetype, opts v1.CreateOptions) (result *v1beta1.VirtualMachineClusterInstancetype, err error) { - result = &v1beta1.VirtualMachineClusterInstancetype{} - err = c.client.Post(). - Resource("virtualmachineclusterinstancetypes"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(virtualMachineClusterInstancetype). - Do(ctx). - Into(result) - return -} - -// Update takes the representation of a virtualMachineClusterInstancetype and updates it. Returns the server's representation of the virtualMachineClusterInstancetype, and an error, if there is any. -func (c *virtualMachineClusterInstancetypes) Update(ctx context.Context, virtualMachineClusterInstancetype *v1beta1.VirtualMachineClusterInstancetype, opts v1.UpdateOptions) (result *v1beta1.VirtualMachineClusterInstancetype, err error) { - result = &v1beta1.VirtualMachineClusterInstancetype{} - err = c.client.Put(). - Resource("virtualmachineclusterinstancetypes"). - Name(virtualMachineClusterInstancetype.Name). - VersionedParams(&opts, scheme.ParameterCodec). - Body(virtualMachineClusterInstancetype). - Do(ctx). - Into(result) - return -} - -// Delete takes name of the virtualMachineClusterInstancetype and deletes it. Returns an error if one occurs. -func (c *virtualMachineClusterInstancetypes) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - return c.client.Delete(). - Resource("virtualmachineclusterinstancetypes"). - Name(name). - Body(&opts). - Do(ctx). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *virtualMachineClusterInstancetypes) 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("virtualmachineclusterinstancetypes"). - VersionedParams(&listOpts, scheme.ParameterCodec). - Timeout(timeout). - Body(&opts). - Do(ctx). - Error() -} - -// Patch applies the patch and returns the patched virtualMachineClusterInstancetype. -func (c *virtualMachineClusterInstancetypes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.VirtualMachineClusterInstancetype, err error) { - result = &v1beta1.VirtualMachineClusterInstancetype{} - err = c.client.Patch(pt). - Resource("virtualmachineclusterinstancetypes"). - 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/instancetype/v1beta1/virtualmachineclusterpreference.go b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/instancetype/v1beta1/virtualmachineclusterpreference.go deleted file mode 100644 index 3d3be893d..000000000 --- a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/instancetype/v1beta1/virtualmachineclusterpreference.go +++ /dev/null @@ -1,168 +0,0 @@ -/* -Copyright 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" - v1beta1 "kubevirt.io/api/instancetype/v1beta1" - scheme "kubevirt.io/client-go/generated/kubevirt/clientset/versioned/scheme" -) - -// VirtualMachineClusterPreferencesGetter has a method to return a VirtualMachineClusterPreferenceInterface. -// A group's client should implement this interface. -type VirtualMachineClusterPreferencesGetter interface { - VirtualMachineClusterPreferences() VirtualMachineClusterPreferenceInterface -} - -// VirtualMachineClusterPreferenceInterface has methods to work with VirtualMachineClusterPreference resources. -type VirtualMachineClusterPreferenceInterface interface { - Create(ctx context.Context, virtualMachineClusterPreference *v1beta1.VirtualMachineClusterPreference, opts v1.CreateOptions) (*v1beta1.VirtualMachineClusterPreference, error) - Update(ctx context.Context, virtualMachineClusterPreference *v1beta1.VirtualMachineClusterPreference, opts v1.UpdateOptions) (*v1beta1.VirtualMachineClusterPreference, 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.VirtualMachineClusterPreference, error) - List(ctx context.Context, opts v1.ListOptions) (*v1beta1.VirtualMachineClusterPreferenceList, 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.VirtualMachineClusterPreference, err error) - VirtualMachineClusterPreferenceExpansion -} - -// virtualMachineClusterPreferences implements VirtualMachineClusterPreferenceInterface -type virtualMachineClusterPreferences struct { - client rest.Interface -} - -// newVirtualMachineClusterPreferences returns a VirtualMachineClusterPreferences -func newVirtualMachineClusterPreferences(c *InstancetypeV1beta1Client) *virtualMachineClusterPreferences { - return &virtualMachineClusterPreferences{ - client: c.RESTClient(), - } -} - -// Get takes name of the virtualMachineClusterPreference, and returns the corresponding virtualMachineClusterPreference object, and an error if there is any. -func (c *virtualMachineClusterPreferences) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.VirtualMachineClusterPreference, err error) { - result = &v1beta1.VirtualMachineClusterPreference{} - err = c.client.Get(). - Resource("virtualmachineclusterpreferences"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(ctx). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of VirtualMachineClusterPreferences that match those selectors. -func (c *virtualMachineClusterPreferences) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.VirtualMachineClusterPreferenceList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v1beta1.VirtualMachineClusterPreferenceList{} - err = c.client.Get(). - Resource("virtualmachineclusterpreferences"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(ctx). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested virtualMachineClusterPreferences. -func (c *virtualMachineClusterPreferences) 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("virtualmachineclusterpreferences"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch(ctx) -} - -// Create takes the representation of a virtualMachineClusterPreference and creates it. Returns the server's representation of the virtualMachineClusterPreference, and an error, if there is any. -func (c *virtualMachineClusterPreferences) Create(ctx context.Context, virtualMachineClusterPreference *v1beta1.VirtualMachineClusterPreference, opts v1.CreateOptions) (result *v1beta1.VirtualMachineClusterPreference, err error) { - result = &v1beta1.VirtualMachineClusterPreference{} - err = c.client.Post(). - Resource("virtualmachineclusterpreferences"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(virtualMachineClusterPreference). - Do(ctx). - Into(result) - return -} - -// Update takes the representation of a virtualMachineClusterPreference and updates it. Returns the server's representation of the virtualMachineClusterPreference, and an error, if there is any. -func (c *virtualMachineClusterPreferences) Update(ctx context.Context, virtualMachineClusterPreference *v1beta1.VirtualMachineClusterPreference, opts v1.UpdateOptions) (result *v1beta1.VirtualMachineClusterPreference, err error) { - result = &v1beta1.VirtualMachineClusterPreference{} - err = c.client.Put(). - Resource("virtualmachineclusterpreferences"). - Name(virtualMachineClusterPreference.Name). - VersionedParams(&opts, scheme.ParameterCodec). - Body(virtualMachineClusterPreference). - Do(ctx). - Into(result) - return -} - -// Delete takes name of the virtualMachineClusterPreference and deletes it. Returns an error if one occurs. -func (c *virtualMachineClusterPreferences) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - return c.client.Delete(). - Resource("virtualmachineclusterpreferences"). - Name(name). - Body(&opts). - Do(ctx). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *virtualMachineClusterPreferences) 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("virtualmachineclusterpreferences"). - VersionedParams(&listOpts, scheme.ParameterCodec). - Timeout(timeout). - Body(&opts). - Do(ctx). - Error() -} - -// Patch applies the patch and returns the patched virtualMachineClusterPreference. -func (c *virtualMachineClusterPreferences) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.VirtualMachineClusterPreference, err error) { - result = &v1beta1.VirtualMachineClusterPreference{} - err = c.client.Patch(pt). - Resource("virtualmachineclusterpreferences"). - 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/instancetype/v1beta1/virtualmachineinstancetype.go b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/instancetype/v1beta1/virtualmachineinstancetype.go deleted file mode 100644 index aef440149..000000000 --- a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/instancetype/v1beta1/virtualmachineinstancetype.go +++ /dev/null @@ -1,178 +0,0 @@ -/* -Copyright 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" - v1beta1 "kubevirt.io/api/instancetype/v1beta1" - scheme "kubevirt.io/client-go/generated/kubevirt/clientset/versioned/scheme" -) - -// VirtualMachineInstancetypesGetter has a method to return a VirtualMachineInstancetypeInterface. -// A group's client should implement this interface. -type VirtualMachineInstancetypesGetter interface { - VirtualMachineInstancetypes(namespace string) VirtualMachineInstancetypeInterface -} - -// VirtualMachineInstancetypeInterface has methods to work with VirtualMachineInstancetype resources. -type VirtualMachineInstancetypeInterface interface { - Create(ctx context.Context, virtualMachineInstancetype *v1beta1.VirtualMachineInstancetype, opts v1.CreateOptions) (*v1beta1.VirtualMachineInstancetype, error) - Update(ctx context.Context, virtualMachineInstancetype *v1beta1.VirtualMachineInstancetype, opts v1.UpdateOptions) (*v1beta1.VirtualMachineInstancetype, 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.VirtualMachineInstancetype, error) - List(ctx context.Context, opts v1.ListOptions) (*v1beta1.VirtualMachineInstancetypeList, 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.VirtualMachineInstancetype, err error) - VirtualMachineInstancetypeExpansion -} - -// virtualMachineInstancetypes implements VirtualMachineInstancetypeInterface -type virtualMachineInstancetypes struct { - client rest.Interface - ns string -} - -// newVirtualMachineInstancetypes returns a VirtualMachineInstancetypes -func newVirtualMachineInstancetypes(c *InstancetypeV1beta1Client, namespace string) *virtualMachineInstancetypes { - return &virtualMachineInstancetypes{ - client: c.RESTClient(), - ns: namespace, - } -} - -// Get takes name of the virtualMachineInstancetype, and returns the corresponding virtualMachineInstancetype object, and an error if there is any. -func (c *virtualMachineInstancetypes) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.VirtualMachineInstancetype, err error) { - result = &v1beta1.VirtualMachineInstancetype{} - err = c.client.Get(). - Namespace(c.ns). - Resource("virtualmachineinstancetypes"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(ctx). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of VirtualMachineInstancetypes that match those selectors. -func (c *virtualMachineInstancetypes) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.VirtualMachineInstancetypeList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v1beta1.VirtualMachineInstancetypeList{} - err = c.client.Get(). - Namespace(c.ns). - Resource("virtualmachineinstancetypes"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(ctx). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested virtualMachineInstancetypes. -func (c *virtualMachineInstancetypes) 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("virtualmachineinstancetypes"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch(ctx) -} - -// Create takes the representation of a virtualMachineInstancetype and creates it. Returns the server's representation of the virtualMachineInstancetype, and an error, if there is any. -func (c *virtualMachineInstancetypes) Create(ctx context.Context, virtualMachineInstancetype *v1beta1.VirtualMachineInstancetype, opts v1.CreateOptions) (result *v1beta1.VirtualMachineInstancetype, err error) { - result = &v1beta1.VirtualMachineInstancetype{} - err = c.client.Post(). - Namespace(c.ns). - Resource("virtualmachineinstancetypes"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(virtualMachineInstancetype). - Do(ctx). - Into(result) - return -} - -// Update takes the representation of a virtualMachineInstancetype and updates it. Returns the server's representation of the virtualMachineInstancetype, and an error, if there is any. -func (c *virtualMachineInstancetypes) Update(ctx context.Context, virtualMachineInstancetype *v1beta1.VirtualMachineInstancetype, opts v1.UpdateOptions) (result *v1beta1.VirtualMachineInstancetype, err error) { - result = &v1beta1.VirtualMachineInstancetype{} - err = c.client.Put(). - Namespace(c.ns). - Resource("virtualmachineinstancetypes"). - Name(virtualMachineInstancetype.Name). - VersionedParams(&opts, scheme.ParameterCodec). - Body(virtualMachineInstancetype). - Do(ctx). - Into(result) - return -} - -// Delete takes name of the virtualMachineInstancetype and deletes it. Returns an error if one occurs. -func (c *virtualMachineInstancetypes) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - return c.client.Delete(). - Namespace(c.ns). - Resource("virtualmachineinstancetypes"). - Name(name). - Body(&opts). - Do(ctx). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *virtualMachineInstancetypes) 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("virtualmachineinstancetypes"). - VersionedParams(&listOpts, scheme.ParameterCodec). - Timeout(timeout). - Body(&opts). - Do(ctx). - Error() -} - -// Patch applies the patch and returns the patched virtualMachineInstancetype. -func (c *virtualMachineInstancetypes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.VirtualMachineInstancetype, err error) { - result = &v1beta1.VirtualMachineInstancetype{} - err = c.client.Patch(pt). - Namespace(c.ns). - Resource("virtualmachineinstancetypes"). - 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/instancetype/v1beta1/virtualmachinepreference.go b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/instancetype/v1beta1/virtualmachinepreference.go deleted file mode 100644 index b3ddbdbbe..000000000 --- a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/instancetype/v1beta1/virtualmachinepreference.go +++ /dev/null @@ -1,178 +0,0 @@ -/* -Copyright 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" - v1beta1 "kubevirt.io/api/instancetype/v1beta1" - scheme "kubevirt.io/client-go/generated/kubevirt/clientset/versioned/scheme" -) - -// VirtualMachinePreferencesGetter has a method to return a VirtualMachinePreferenceInterface. -// A group's client should implement this interface. -type VirtualMachinePreferencesGetter interface { - VirtualMachinePreferences(namespace string) VirtualMachinePreferenceInterface -} - -// VirtualMachinePreferenceInterface has methods to work with VirtualMachinePreference resources. -type VirtualMachinePreferenceInterface interface { - Create(ctx context.Context, virtualMachinePreference *v1beta1.VirtualMachinePreference, opts v1.CreateOptions) (*v1beta1.VirtualMachinePreference, error) - Update(ctx context.Context, virtualMachinePreference *v1beta1.VirtualMachinePreference, opts v1.UpdateOptions) (*v1beta1.VirtualMachinePreference, 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.VirtualMachinePreference, error) - List(ctx context.Context, opts v1.ListOptions) (*v1beta1.VirtualMachinePreferenceList, 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.VirtualMachinePreference, err error) - VirtualMachinePreferenceExpansion -} - -// virtualMachinePreferences implements VirtualMachinePreferenceInterface -type virtualMachinePreferences struct { - client rest.Interface - ns string -} - -// newVirtualMachinePreferences returns a VirtualMachinePreferences -func newVirtualMachinePreferences(c *InstancetypeV1beta1Client, namespace string) *virtualMachinePreferences { - return &virtualMachinePreferences{ - client: c.RESTClient(), - ns: namespace, - } -} - -// Get takes name of the virtualMachinePreference, and returns the corresponding virtualMachinePreference object, and an error if there is any. -func (c *virtualMachinePreferences) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.VirtualMachinePreference, err error) { - result = &v1beta1.VirtualMachinePreference{} - err = c.client.Get(). - Namespace(c.ns). - Resource("virtualmachinepreferences"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(ctx). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of VirtualMachinePreferences that match those selectors. -func (c *virtualMachinePreferences) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.VirtualMachinePreferenceList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v1beta1.VirtualMachinePreferenceList{} - err = c.client.Get(). - Namespace(c.ns). - Resource("virtualmachinepreferences"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(ctx). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested virtualMachinePreferences. -func (c *virtualMachinePreferences) 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("virtualmachinepreferences"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch(ctx) -} - -// Create takes the representation of a virtualMachinePreference and creates it. Returns the server's representation of the virtualMachinePreference, and an error, if there is any. -func (c *virtualMachinePreferences) Create(ctx context.Context, virtualMachinePreference *v1beta1.VirtualMachinePreference, opts v1.CreateOptions) (result *v1beta1.VirtualMachinePreference, err error) { - result = &v1beta1.VirtualMachinePreference{} - err = c.client.Post(). - Namespace(c.ns). - Resource("virtualmachinepreferences"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(virtualMachinePreference). - Do(ctx). - Into(result) - return -} - -// Update takes the representation of a virtualMachinePreference and updates it. Returns the server's representation of the virtualMachinePreference, and an error, if there is any. -func (c *virtualMachinePreferences) Update(ctx context.Context, virtualMachinePreference *v1beta1.VirtualMachinePreference, opts v1.UpdateOptions) (result *v1beta1.VirtualMachinePreference, err error) { - result = &v1beta1.VirtualMachinePreference{} - err = c.client.Put(). - Namespace(c.ns). - Resource("virtualmachinepreferences"). - Name(virtualMachinePreference.Name). - VersionedParams(&opts, scheme.ParameterCodec). - Body(virtualMachinePreference). - Do(ctx). - Into(result) - return -} - -// Delete takes name of the virtualMachinePreference and deletes it. Returns an error if one occurs. -func (c *virtualMachinePreferences) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - return c.client.Delete(). - Namespace(c.ns). - Resource("virtualmachinepreferences"). - Name(name). - Body(&opts). - Do(ctx). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *virtualMachinePreferences) 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("virtualmachinepreferences"). - VersionedParams(&listOpts, scheme.ParameterCodec). - Timeout(timeout). - Body(&opts). - Do(ctx). - Error() -} - -// Patch applies the patch and returns the patched virtualMachinePreference. -func (c *virtualMachinePreferences) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.VirtualMachinePreference, err error) { - result = &v1beta1.VirtualMachinePreference{} - err = c.client.Patch(pt). - Namespace(c.ns). - Resource("virtualmachinepreferences"). - 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/migrationpolicy.go b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/migrations/v1alpha1/migrationpolicy.go deleted file mode 100644 index 20e2230cc..000000000 --- a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/migrations/v1alpha1/migrationpolicy.go +++ /dev/null @@ -1,184 +0,0 @@ -/* -Copyright 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/pool/v1alpha1/doc.go b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/pool/v1alpha1/doc.go deleted file mode 100644 index f95601beb..000000000 --- a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/pool/v1alpha1/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright 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/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 deleted file mode 100644 index 74a15e410..000000000 --- a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/pool/v1alpha1/virtualmachinepool.go +++ /dev/null @@ -1,195 +0,0 @@ -/* -Copyright 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/doc.go b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/snapshot/v1alpha1/doc.go deleted file mode 100644 index f95601beb..000000000 --- a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/snapshot/v1alpha1/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright 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/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 deleted file mode 100644 index 4a8618a9b..000000000 --- a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/snapshot/v1alpha1/virtualmachinerestore.go +++ /dev/null @@ -1,195 +0,0 @@ -/* -Copyright 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 deleted file mode 100644 index 0192c55be..000000000 --- a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/snapshot/v1alpha1/virtualmachinesnapshot.go +++ /dev/null @@ -1,195 +0,0 @@ -/* -Copyright 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 deleted file mode 100644 index 3e3c4f2a0..000000000 --- a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/snapshot/v1alpha1/virtualmachinesnapshotcontent.go +++ /dev/null @@ -1,195 +0,0 @@ -/* -Copyright 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/kubevirt/clientset/versioned/typed/snapshot/v1beta1/virtualmachinerestore.go b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/snapshot/v1beta1/virtualmachinerestore.go deleted file mode 100644 index 53cc64131..000000000 --- a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/snapshot/v1beta1/virtualmachinerestore.go +++ /dev/null @@ -1,195 +0,0 @@ -/* -Copyright 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" - v1beta1 "kubevirt.io/api/snapshot/v1beta1" - 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 *v1beta1.VirtualMachineRestore, opts v1.CreateOptions) (*v1beta1.VirtualMachineRestore, error) - Update(ctx context.Context, virtualMachineRestore *v1beta1.VirtualMachineRestore, opts v1.UpdateOptions) (*v1beta1.VirtualMachineRestore, error) - UpdateStatus(ctx context.Context, virtualMachineRestore *v1beta1.VirtualMachineRestore, opts v1.UpdateOptions) (*v1beta1.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) (*v1beta1.VirtualMachineRestore, error) - List(ctx context.Context, opts v1.ListOptions) (*v1beta1.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 *v1beta1.VirtualMachineRestore, err error) - VirtualMachineRestoreExpansion -} - -// virtualMachineRestores implements VirtualMachineRestoreInterface -type virtualMachineRestores struct { - client rest.Interface - ns string -} - -// newVirtualMachineRestores returns a VirtualMachineRestores -func newVirtualMachineRestores(c *SnapshotV1beta1Client, 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 *v1beta1.VirtualMachineRestore, err error) { - result = &v1beta1.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 *v1beta1.VirtualMachineRestoreList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v1beta1.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 *v1beta1.VirtualMachineRestore, opts v1.CreateOptions) (result *v1beta1.VirtualMachineRestore, err error) { - result = &v1beta1.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 *v1beta1.VirtualMachineRestore, opts v1.UpdateOptions) (result *v1beta1.VirtualMachineRestore, err error) { - result = &v1beta1.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 *v1beta1.VirtualMachineRestore, opts v1.UpdateOptions) (result *v1beta1.VirtualMachineRestore, err error) { - result = &v1beta1.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 *v1beta1.VirtualMachineRestore, err error) { - result = &v1beta1.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/v1beta1/virtualmachinesnapshot.go b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/snapshot/v1beta1/virtualmachinesnapshot.go deleted file mode 100644 index 8276972ec..000000000 --- a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/snapshot/v1beta1/virtualmachinesnapshot.go +++ /dev/null @@ -1,195 +0,0 @@ -/* -Copyright 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" - v1beta1 "kubevirt.io/api/snapshot/v1beta1" - 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 *v1beta1.VirtualMachineSnapshot, opts v1.CreateOptions) (*v1beta1.VirtualMachineSnapshot, error) - Update(ctx context.Context, virtualMachineSnapshot *v1beta1.VirtualMachineSnapshot, opts v1.UpdateOptions) (*v1beta1.VirtualMachineSnapshot, error) - UpdateStatus(ctx context.Context, virtualMachineSnapshot *v1beta1.VirtualMachineSnapshot, opts v1.UpdateOptions) (*v1beta1.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) (*v1beta1.VirtualMachineSnapshot, error) - List(ctx context.Context, opts v1.ListOptions) (*v1beta1.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 *v1beta1.VirtualMachineSnapshot, err error) - VirtualMachineSnapshotExpansion -} - -// virtualMachineSnapshots implements VirtualMachineSnapshotInterface -type virtualMachineSnapshots struct { - client rest.Interface - ns string -} - -// newVirtualMachineSnapshots returns a VirtualMachineSnapshots -func newVirtualMachineSnapshots(c *SnapshotV1beta1Client, 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 *v1beta1.VirtualMachineSnapshot, err error) { - result = &v1beta1.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 *v1beta1.VirtualMachineSnapshotList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v1beta1.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 *v1beta1.VirtualMachineSnapshot, opts v1.CreateOptions) (result *v1beta1.VirtualMachineSnapshot, err error) { - result = &v1beta1.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 *v1beta1.VirtualMachineSnapshot, opts v1.UpdateOptions) (result *v1beta1.VirtualMachineSnapshot, err error) { - result = &v1beta1.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 *v1beta1.VirtualMachineSnapshot, opts v1.UpdateOptions) (result *v1beta1.VirtualMachineSnapshot, err error) { - result = &v1beta1.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 *v1beta1.VirtualMachineSnapshot, err error) { - result = &v1beta1.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/v1beta1/virtualmachinesnapshotcontent.go b/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/snapshot/v1beta1/virtualmachinesnapshotcontent.go deleted file mode 100644 index 402555081..000000000 --- a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/snapshot/v1beta1/virtualmachinesnapshotcontent.go +++ /dev/null @@ -1,195 +0,0 @@ -/* -Copyright 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" - v1beta1 "kubevirt.io/api/snapshot/v1beta1" - 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 *v1beta1.VirtualMachineSnapshotContent, opts v1.CreateOptions) (*v1beta1.VirtualMachineSnapshotContent, error) - Update(ctx context.Context, virtualMachineSnapshotContent *v1beta1.VirtualMachineSnapshotContent, opts v1.UpdateOptions) (*v1beta1.VirtualMachineSnapshotContent, error) - UpdateStatus(ctx context.Context, virtualMachineSnapshotContent *v1beta1.VirtualMachineSnapshotContent, opts v1.UpdateOptions) (*v1beta1.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) (*v1beta1.VirtualMachineSnapshotContent, error) - List(ctx context.Context, opts v1.ListOptions) (*v1beta1.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 *v1beta1.VirtualMachineSnapshotContent, err error) - VirtualMachineSnapshotContentExpansion -} - -// virtualMachineSnapshotContents implements VirtualMachineSnapshotContentInterface -type virtualMachineSnapshotContents struct { - client rest.Interface - ns string -} - -// newVirtualMachineSnapshotContents returns a VirtualMachineSnapshotContents -func newVirtualMachineSnapshotContents(c *SnapshotV1beta1Client, 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 *v1beta1.VirtualMachineSnapshotContent, err error) { - result = &v1beta1.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 *v1beta1.VirtualMachineSnapshotContentList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v1beta1.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 *v1beta1.VirtualMachineSnapshotContent, opts v1.CreateOptions) (result *v1beta1.VirtualMachineSnapshotContent, err error) { - result = &v1beta1.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 *v1beta1.VirtualMachineSnapshotContent, opts v1.UpdateOptions) (result *v1beta1.VirtualMachineSnapshotContent, err error) { - result = &v1beta1.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 *v1beta1.VirtualMachineSnapshotContent, opts v1.UpdateOptions) (result *v1beta1.VirtualMachineSnapshotContent, err error) { - result = &v1beta1.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 *v1beta1.VirtualMachineSnapshotContent, err error) { - result = &v1beta1.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/kubevirt/clientset/versioned/clientset.go b/vendor/kubevirt.io/client-go/kubevirt/clientset.go similarity index 52% rename from vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/clientset.go rename to vendor/kubevirt.io/client-go/kubevirt/clientset.go index 52bd68222..380e4f49f 100644 --- a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/clientset.go +++ b/vendor/kubevirt.io/client-go/kubevirt/clientset.go @@ -1,5 +1,5 @@ /* -Copyright The KubeVirt Authors. +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. @@ -12,61 +12,71 @@ 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 The KubeVirt Authors. */ // Code generated by client-gen. DO NOT EDIT. -package versioned +package kubevirt import ( - "fmt" + fmt "fmt" + http "net/http" discovery "k8s.io/client-go/discovery" rest "k8s.io/client-go/rest" flowcontrol "k8s.io/client-go/util/flowcontrol" - clonev1alpha1 "kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/clone/v1alpha1" - kubevirtv1 "kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/core/v1" - exportv1alpha1 "kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/export/v1alpha1" - exportv1beta1 "kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/export/v1beta1" - instancetypev1alpha1 "kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/instancetype/v1alpha1" - instancetypev1alpha2 "kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/instancetype/v1alpha2" - instancetypev1beta1 "kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/instancetype/v1beta1" - 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" - snapshotv1beta1 "kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/snapshot/v1beta1" + backupv1alpha1 "kubevirt.io/client-go/kubevirt/typed/backup/v1alpha1" + clonev1alpha1 "kubevirt.io/client-go/kubevirt/typed/clone/v1alpha1" + clonev1beta1 "kubevirt.io/client-go/kubevirt/typed/clone/v1beta1" + kubevirtv1 "kubevirt.io/client-go/kubevirt/typed/core/v1" + exportv1alpha1 "kubevirt.io/client-go/kubevirt/typed/export/v1alpha1" + exportv1beta1 "kubevirt.io/client-go/kubevirt/typed/export/v1beta1" + instancetypev1beta1 "kubevirt.io/client-go/kubevirt/typed/instancetype/v1beta1" + migrationsv1alpha1 "kubevirt.io/client-go/kubevirt/typed/migrations/v1alpha1" + poolv1alpha1 "kubevirt.io/client-go/kubevirt/typed/pool/v1alpha1" + poolv1beta1 "kubevirt.io/client-go/kubevirt/typed/pool/v1beta1" + snapshotv1alpha1 "kubevirt.io/client-go/kubevirt/typed/snapshot/v1alpha1" + snapshotv1beta1 "kubevirt.io/client-go/kubevirt/typed/snapshot/v1beta1" ) type Interface interface { Discovery() discovery.DiscoveryInterface + BackupV1alpha1() backupv1alpha1.BackupV1alpha1Interface CloneV1alpha1() clonev1alpha1.CloneV1alpha1Interface + CloneV1beta1() clonev1beta1.CloneV1beta1Interface KubevirtV1() kubevirtv1.KubevirtV1Interface ExportV1alpha1() exportv1alpha1.ExportV1alpha1Interface ExportV1beta1() exportv1beta1.ExportV1beta1Interface - InstancetypeV1alpha1() instancetypev1alpha1.InstancetypeV1alpha1Interface - InstancetypeV1alpha2() instancetypev1alpha2.InstancetypeV1alpha2Interface InstancetypeV1beta1() instancetypev1beta1.InstancetypeV1beta1Interface MigrationsV1alpha1() migrationsv1alpha1.MigrationsV1alpha1Interface PoolV1alpha1() poolv1alpha1.PoolV1alpha1Interface + PoolV1beta1() poolv1beta1.PoolV1beta1Interface SnapshotV1alpha1() snapshotv1alpha1.SnapshotV1alpha1Interface SnapshotV1beta1() snapshotv1beta1.SnapshotV1beta1Interface } -// Clientset contains the clients for groups. Each group has exactly one -// version included in a Clientset. +// Clientset contains the clients for groups. type Clientset struct { *discovery.DiscoveryClient - cloneV1alpha1 *clonev1alpha1.CloneV1alpha1Client - kubevirtV1 *kubevirtv1.KubevirtV1Client - exportV1alpha1 *exportv1alpha1.ExportV1alpha1Client - exportV1beta1 *exportv1beta1.ExportV1beta1Client - instancetypeV1alpha1 *instancetypev1alpha1.InstancetypeV1alpha1Client - instancetypeV1alpha2 *instancetypev1alpha2.InstancetypeV1alpha2Client - instancetypeV1beta1 *instancetypev1beta1.InstancetypeV1beta1Client - migrationsV1alpha1 *migrationsv1alpha1.MigrationsV1alpha1Client - poolV1alpha1 *poolv1alpha1.PoolV1alpha1Client - snapshotV1alpha1 *snapshotv1alpha1.SnapshotV1alpha1Client - snapshotV1beta1 *snapshotv1beta1.SnapshotV1beta1Client + backupV1alpha1 *backupv1alpha1.BackupV1alpha1Client + cloneV1alpha1 *clonev1alpha1.CloneV1alpha1Client + cloneV1beta1 *clonev1beta1.CloneV1beta1Client + kubevirtV1 *kubevirtv1.KubevirtV1Client + exportV1alpha1 *exportv1alpha1.ExportV1alpha1Client + exportV1beta1 *exportv1beta1.ExportV1beta1Client + instancetypeV1beta1 *instancetypev1beta1.InstancetypeV1beta1Client + migrationsV1alpha1 *migrationsv1alpha1.MigrationsV1alpha1Client + poolV1alpha1 *poolv1alpha1.PoolV1alpha1Client + poolV1beta1 *poolv1beta1.PoolV1beta1Client + snapshotV1alpha1 *snapshotv1alpha1.SnapshotV1alpha1Client + snapshotV1beta1 *snapshotv1beta1.SnapshotV1beta1Client +} + +// BackupV1alpha1 retrieves the BackupV1alpha1Client +func (c *Clientset) BackupV1alpha1() backupv1alpha1.BackupV1alpha1Interface { + return c.backupV1alpha1 } // CloneV1alpha1 retrieves the CloneV1alpha1Client @@ -74,6 +84,11 @@ func (c *Clientset) CloneV1alpha1() clonev1alpha1.CloneV1alpha1Interface { return c.cloneV1alpha1 } +// CloneV1beta1 retrieves the CloneV1beta1Client +func (c *Clientset) CloneV1beta1() clonev1beta1.CloneV1beta1Interface { + return c.cloneV1beta1 +} + // KubevirtV1 retrieves the KubevirtV1Client func (c *Clientset) KubevirtV1() kubevirtv1.KubevirtV1Interface { return c.kubevirtV1 @@ -89,16 +104,6 @@ func (c *Clientset) ExportV1beta1() exportv1beta1.ExportV1beta1Interface { return c.exportV1beta1 } -// InstancetypeV1alpha1 retrieves the InstancetypeV1alpha1Client -func (c *Clientset) InstancetypeV1alpha1() instancetypev1alpha1.InstancetypeV1alpha1Interface { - return c.instancetypeV1alpha1 -} - -// InstancetypeV1alpha2 retrieves the InstancetypeV1alpha2Client -func (c *Clientset) InstancetypeV1alpha2() instancetypev1alpha2.InstancetypeV1alpha2Interface { - return c.instancetypeV1alpha2 -} - // InstancetypeV1beta1 retrieves the InstancetypeV1beta1Client func (c *Clientset) InstancetypeV1beta1() instancetypev1beta1.InstancetypeV1beta1Interface { return c.instancetypeV1beta1 @@ -114,6 +119,11 @@ func (c *Clientset) PoolV1alpha1() poolv1alpha1.PoolV1alpha1Interface { return c.poolV1alpha1 } +// PoolV1beta1 retrieves the PoolV1beta1Client +func (c *Clientset) PoolV1beta1() poolv1beta1.PoolV1beta1Interface { + return c.poolV1beta1 +} + // SnapshotV1alpha1 retrieves the SnapshotV1alpha1Client func (c *Clientset) SnapshotV1alpha1() snapshotv1alpha1.SnapshotV1alpha1Interface { return c.snapshotV1alpha1 @@ -135,62 +145,89 @@ func (c *Clientset) Discovery() discovery.DiscoveryInterface { // 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. +// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), +// where httpClient was generated with rest.HTTPClientFor(c). func NewForConfig(c *rest.Config) (*Clientset, error) { configShallowCopy := *c + + if configShallowCopy.UserAgent == "" { + configShallowCopy.UserAgent = rest.DefaultKubernetesUserAgent() + } + + // share the transport between all clients + httpClient, err := rest.HTTPClientFor(&configShallowCopy) + if err != nil { + return nil, err + } + + return NewForConfigAndClient(&configShallowCopy, httpClient) +} + +// NewForConfigAndClient creates a new Clientset for the given config and http client. +// Note the http client provided takes precedence over the configured transport values. +// If config's RateLimiter is not set and QPS and Burst are acceptable, +// NewForConfigAndClient will generate a rate-limiter in configShallowCopy. +func NewForConfigAndClient(c *rest.Config, httpClient *http.Client) (*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.cloneV1alpha1, err = clonev1alpha1.NewForConfig(&configShallowCopy) + cs.backupV1alpha1, err = backupv1alpha1.NewForConfigAndClient(&configShallowCopy, httpClient) if err != nil { return nil, err } - cs.kubevirtV1, err = kubevirtv1.NewForConfig(&configShallowCopy) + cs.cloneV1alpha1, err = clonev1alpha1.NewForConfigAndClient(&configShallowCopy, httpClient) if err != nil { return nil, err } - cs.exportV1alpha1, err = exportv1alpha1.NewForConfig(&configShallowCopy) + cs.cloneV1beta1, err = clonev1beta1.NewForConfigAndClient(&configShallowCopy, httpClient) if err != nil { return nil, err } - cs.exportV1beta1, err = exportv1beta1.NewForConfig(&configShallowCopy) + cs.kubevirtV1, err = kubevirtv1.NewForConfigAndClient(&configShallowCopy, httpClient) if err != nil { return nil, err } - cs.instancetypeV1alpha1, err = instancetypev1alpha1.NewForConfig(&configShallowCopy) + cs.exportV1alpha1, err = exportv1alpha1.NewForConfigAndClient(&configShallowCopy, httpClient) if err != nil { return nil, err } - cs.instancetypeV1alpha2, err = instancetypev1alpha2.NewForConfig(&configShallowCopy) + cs.exportV1beta1, err = exportv1beta1.NewForConfigAndClient(&configShallowCopy, httpClient) if err != nil { return nil, err } - cs.instancetypeV1beta1, err = instancetypev1beta1.NewForConfig(&configShallowCopy) + cs.instancetypeV1beta1, err = instancetypev1beta1.NewForConfigAndClient(&configShallowCopy, httpClient) if err != nil { return nil, err } - cs.migrationsV1alpha1, err = migrationsv1alpha1.NewForConfig(&configShallowCopy) + cs.migrationsV1alpha1, err = migrationsv1alpha1.NewForConfigAndClient(&configShallowCopy, httpClient) if err != nil { return nil, err } - cs.poolV1alpha1, err = poolv1alpha1.NewForConfig(&configShallowCopy) + cs.poolV1alpha1, err = poolv1alpha1.NewForConfigAndClient(&configShallowCopy, httpClient) if err != nil { return nil, err } - cs.snapshotV1alpha1, err = snapshotv1alpha1.NewForConfig(&configShallowCopy) + cs.poolV1beta1, err = poolv1beta1.NewForConfigAndClient(&configShallowCopy, httpClient) if err != nil { return nil, err } - cs.snapshotV1beta1, err = snapshotv1beta1.NewForConfig(&configShallowCopy) + cs.snapshotV1alpha1, err = snapshotv1alpha1.NewForConfigAndClient(&configShallowCopy, httpClient) + if err != nil { + return nil, err + } + cs.snapshotV1beta1, err = snapshotv1beta1.NewForConfigAndClient(&configShallowCopy, httpClient) if err != nil { return nil, err } - cs.DiscoveryClient, err = discovery.NewDiscoveryClientForConfig(&configShallowCopy) + cs.DiscoveryClient, err = discovery.NewDiscoveryClientForConfigAndClient(&configShallowCopy, httpClient) if err != nil { return nil, err } @@ -200,35 +237,26 @@ func NewForConfig(c *rest.Config) (*Clientset, error) { // 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.cloneV1alpha1 = clonev1alpha1.NewForConfigOrDie(c) - cs.kubevirtV1 = kubevirtv1.NewForConfigOrDie(c) - cs.exportV1alpha1 = exportv1alpha1.NewForConfigOrDie(c) - cs.exportV1beta1 = exportv1beta1.NewForConfigOrDie(c) - cs.instancetypeV1alpha1 = instancetypev1alpha1.NewForConfigOrDie(c) - cs.instancetypeV1alpha2 = instancetypev1alpha2.NewForConfigOrDie(c) - cs.instancetypeV1beta1 = instancetypev1beta1.NewForConfigOrDie(c) - cs.migrationsV1alpha1 = migrationsv1alpha1.NewForConfigOrDie(c) - cs.poolV1alpha1 = poolv1alpha1.NewForConfigOrDie(c) - cs.snapshotV1alpha1 = snapshotv1alpha1.NewForConfigOrDie(c) - cs.snapshotV1beta1 = snapshotv1beta1.NewForConfigOrDie(c) - - cs.DiscoveryClient = discovery.NewDiscoveryClientForConfigOrDie(c) - return &cs + cs, err := NewForConfig(c) + if err != nil { + panic(err) + } + return cs } // New creates a new Clientset for the given RESTClient. func New(c rest.Interface) *Clientset { var cs Clientset + cs.backupV1alpha1 = backupv1alpha1.New(c) cs.cloneV1alpha1 = clonev1alpha1.New(c) + cs.cloneV1beta1 = clonev1beta1.New(c) cs.kubevirtV1 = kubevirtv1.New(c) cs.exportV1alpha1 = exportv1alpha1.New(c) cs.exportV1beta1 = exportv1beta1.New(c) - cs.instancetypeV1alpha1 = instancetypev1alpha1.New(c) - cs.instancetypeV1alpha2 = instancetypev1alpha2.New(c) cs.instancetypeV1beta1 = instancetypev1beta1.New(c) cs.migrationsV1alpha1 = migrationsv1alpha1.New(c) cs.poolV1alpha1 = poolv1alpha1.New(c) + cs.poolV1beta1 = poolv1beta1.New(c) cs.snapshotV1alpha1 = snapshotv1alpha1.New(c) cs.snapshotV1beta1 = snapshotv1beta1.New(c) diff --git a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/doc.go b/vendor/kubevirt.io/client-go/kubevirt/doc.go similarity index 97% rename from vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/doc.go rename to vendor/kubevirt.io/client-go/kubevirt/doc.go index fccdcc3dd..4b1ad421f 100644 --- a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/doc.go +++ b/vendor/kubevirt.io/client-go/kubevirt/doc.go @@ -17,4 +17,4 @@ limitations under the License. // Code generated by client-gen. DO NOT EDIT. // This package has the automatically generated clientset. -package versioned +package kubevirt diff --git a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/scheme/doc.go b/vendor/kubevirt.io/client-go/kubevirt/scheme/doc.go similarity index 94% rename from vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/scheme/doc.go rename to vendor/kubevirt.io/client-go/kubevirt/scheme/doc.go index 62b5c05c9..441ac9fd4 100644 --- a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/scheme/doc.go +++ b/vendor/kubevirt.io/client-go/kubevirt/scheme/doc.go @@ -1,5 +1,5 @@ /* -Copyright The KubeVirt Authors. +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. @@ -12,6 +12,8 @@ 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 The KubeVirt Authors. */ // Code generated by client-gen. DO NOT EDIT. diff --git a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/scheme/register.go b/vendor/kubevirt.io/client-go/kubevirt/scheme/register.go similarity index 90% rename from vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/scheme/register.go rename to vendor/kubevirt.io/client-go/kubevirt/scheme/register.go index 8dc194f54..dfd673612 100644 --- a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/scheme/register.go +++ b/vendor/kubevirt.io/client-go/kubevirt/scheme/register.go @@ -1,5 +1,5 @@ /* -Copyright The KubeVirt Authors. +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. @@ -12,6 +12,8 @@ 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 The KubeVirt Authors. */ // Code generated by client-gen. DO NOT EDIT. @@ -24,15 +26,16 @@ import ( schema "k8s.io/apimachinery/pkg/runtime/schema" serializer "k8s.io/apimachinery/pkg/runtime/serializer" utilruntime "k8s.io/apimachinery/pkg/util/runtime" + backupv1alpha1 "kubevirt.io/api/backup/v1alpha1" clonev1alpha1 "kubevirt.io/api/clone/v1alpha1" + clonev1beta1 "kubevirt.io/api/clone/v1beta1" kubevirtv1 "kubevirt.io/api/core/v1" exportv1alpha1 "kubevirt.io/api/export/v1alpha1" exportv1beta1 "kubevirt.io/api/export/v1beta1" - instancetypev1alpha1 "kubevirt.io/api/instancetype/v1alpha1" - instancetypev1alpha2 "kubevirt.io/api/instancetype/v1alpha2" instancetypev1beta1 "kubevirt.io/api/instancetype/v1beta1" migrationsv1alpha1 "kubevirt.io/api/migrations/v1alpha1" poolv1alpha1 "kubevirt.io/api/pool/v1alpha1" + poolv1beta1 "kubevirt.io/api/pool/v1beta1" snapshotv1alpha1 "kubevirt.io/api/snapshot/v1alpha1" snapshotv1beta1 "kubevirt.io/api/snapshot/v1beta1" ) @@ -41,15 +44,16 @@ var Scheme = runtime.NewScheme() var Codecs = serializer.NewCodecFactory(Scheme) var ParameterCodec = runtime.NewParameterCodec(Scheme) var localSchemeBuilder = runtime.SchemeBuilder{ + backupv1alpha1.AddToScheme, clonev1alpha1.AddToScheme, + clonev1beta1.AddToScheme, kubevirtv1.AddToScheme, exportv1alpha1.AddToScheme, exportv1beta1.AddToScheme, - instancetypev1alpha1.AddToScheme, - instancetypev1alpha2.AddToScheme, instancetypev1beta1.AddToScheme, migrationsv1alpha1.AddToScheme, poolv1alpha1.AddToScheme, + poolv1beta1.AddToScheme, snapshotv1alpha1.AddToScheme, snapshotv1beta1.AddToScheme, } diff --git a/vendor/kubevirt.io/client-go/kubevirt/typed/backup/v1alpha1/backup_client.go b/vendor/kubevirt.io/client-go/kubevirt/typed/backup/v1alpha1/backup_client.go new file mode 100644 index 000000000..38cbcc7d1 --- /dev/null +++ b/vendor/kubevirt.io/client-go/kubevirt/typed/backup/v1alpha1/backup_client.go @@ -0,0 +1,114 @@ +/* +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 The KubeVirt Authors. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + http "net/http" + + rest "k8s.io/client-go/rest" + backupv1alpha1 "kubevirt.io/api/backup/v1alpha1" + scheme "kubevirt.io/client-go/kubevirt/scheme" +) + +type BackupV1alpha1Interface interface { + RESTClient() rest.Interface + VirtualMachineBackupsGetter + VirtualMachineBackupTrackersGetter +} + +// BackupV1alpha1Client is used to interact with features provided by the backup.kubevirt.io group. +type BackupV1alpha1Client struct { + restClient rest.Interface +} + +func (c *BackupV1alpha1Client) VirtualMachineBackups(namespace string) VirtualMachineBackupInterface { + return newVirtualMachineBackups(c, namespace) +} + +func (c *BackupV1alpha1Client) VirtualMachineBackupTrackers(namespace string) VirtualMachineBackupTrackerInterface { + return newVirtualMachineBackupTrackers(c, namespace) +} + +// NewForConfig creates a new BackupV1alpha1Client for the given config. +// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), +// where httpClient was generated with rest.HTTPClientFor(c). +func NewForConfig(c *rest.Config) (*BackupV1alpha1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + httpClient, err := rest.HTTPClientFor(&config) + if err != nil { + return nil, err + } + return NewForConfigAndClient(&config, httpClient) +} + +// NewForConfigAndClient creates a new BackupV1alpha1Client for the given config and http client. +// Note the http client provided takes precedence over the configured transport values. +func NewForConfigAndClient(c *rest.Config, h *http.Client) (*BackupV1alpha1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + client, err := rest.RESTClientForConfigAndClient(&config, h) + if err != nil { + return nil, err + } + return &BackupV1alpha1Client{client}, nil +} + +// NewForConfigOrDie creates a new BackupV1alpha1Client for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *BackupV1alpha1Client { + client, err := NewForConfig(c) + if err != nil { + panic(err) + } + return client +} + +// New creates a new BackupV1alpha1Client for the given RESTClient. +func New(c rest.Interface) *BackupV1alpha1Client { + return &BackupV1alpha1Client{c} +} + +func setConfigDefaults(config *rest.Config) error { + gv := backupv1alpha1.SchemeGroupVersion + config.GroupVersion = &gv + config.APIPath = "/apis" + config.NegotiatedSerializer = rest.CodecFactoryForGeneratedClient(scheme.Scheme, 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 *BackupV1alpha1Client) RESTClient() rest.Interface { + if c == nil { + return nil + } + return c.restClient +} diff --git a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/instancetype/v1alpha1/doc.go b/vendor/kubevirt.io/client-go/kubevirt/typed/backup/v1alpha1/doc.go similarity index 94% rename from vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/instancetype/v1alpha1/doc.go rename to vendor/kubevirt.io/client-go/kubevirt/typed/backup/v1alpha1/doc.go index f95601beb..d72972cf6 100644 --- a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/instancetype/v1alpha1/doc.go +++ b/vendor/kubevirt.io/client-go/kubevirt/typed/backup/v1alpha1/doc.go @@ -1,5 +1,5 @@ /* -Copyright The KubeVirt Authors. +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. @@ -12,6 +12,8 @@ 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 The KubeVirt Authors. */ // Code generated by client-gen. DO NOT EDIT. diff --git a/vendor/kubevirt.io/client-go/kubevirt/typed/backup/v1alpha1/generated_expansion.go b/vendor/kubevirt.io/client-go/kubevirt/typed/backup/v1alpha1/generated_expansion.go new file mode 100644 index 000000000..e8d8b1d4d --- /dev/null +++ b/vendor/kubevirt.io/client-go/kubevirt/typed/backup/v1alpha1/generated_expansion.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 The KubeVirt Authors. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +type VirtualMachineBackupExpansion interface{} + +type VirtualMachineBackupTrackerExpansion interface{} diff --git a/vendor/kubevirt.io/client-go/kubevirt/typed/backup/v1alpha1/virtualmachinebackup.go b/vendor/kubevirt.io/client-go/kubevirt/typed/backup/v1alpha1/virtualmachinebackup.go new file mode 100644 index 000000000..8ea3fdd63 --- /dev/null +++ b/vendor/kubevirt.io/client-go/kubevirt/typed/backup/v1alpha1/virtualmachinebackup.go @@ -0,0 +1,72 @@ +/* +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 The KubeVirt Authors. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + context "context" + + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + gentype "k8s.io/client-go/gentype" + backupv1alpha1 "kubevirt.io/api/backup/v1alpha1" + scheme "kubevirt.io/client-go/kubevirt/scheme" +) + +// VirtualMachineBackupsGetter has a method to return a VirtualMachineBackupInterface. +// A group's client should implement this interface. +type VirtualMachineBackupsGetter interface { + VirtualMachineBackups(namespace string) VirtualMachineBackupInterface +} + +// VirtualMachineBackupInterface has methods to work with VirtualMachineBackup resources. +type VirtualMachineBackupInterface interface { + Create(ctx context.Context, virtualMachineBackup *backupv1alpha1.VirtualMachineBackup, opts v1.CreateOptions) (*backupv1alpha1.VirtualMachineBackup, error) + Update(ctx context.Context, virtualMachineBackup *backupv1alpha1.VirtualMachineBackup, opts v1.UpdateOptions) (*backupv1alpha1.VirtualMachineBackup, error) + // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). + UpdateStatus(ctx context.Context, virtualMachineBackup *backupv1alpha1.VirtualMachineBackup, opts v1.UpdateOptions) (*backupv1alpha1.VirtualMachineBackup, 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) (*backupv1alpha1.VirtualMachineBackup, error) + List(ctx context.Context, opts v1.ListOptions) (*backupv1alpha1.VirtualMachineBackupList, 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 *backupv1alpha1.VirtualMachineBackup, err error) + VirtualMachineBackupExpansion +} + +// virtualMachineBackups implements VirtualMachineBackupInterface +type virtualMachineBackups struct { + *gentype.ClientWithList[*backupv1alpha1.VirtualMachineBackup, *backupv1alpha1.VirtualMachineBackupList] +} + +// newVirtualMachineBackups returns a VirtualMachineBackups +func newVirtualMachineBackups(c *BackupV1alpha1Client, namespace string) *virtualMachineBackups { + return &virtualMachineBackups{ + gentype.NewClientWithList[*backupv1alpha1.VirtualMachineBackup, *backupv1alpha1.VirtualMachineBackupList]( + "virtualmachinebackups", + c.RESTClient(), + scheme.ParameterCodec, + namespace, + func() *backupv1alpha1.VirtualMachineBackup { return &backupv1alpha1.VirtualMachineBackup{} }, + func() *backupv1alpha1.VirtualMachineBackupList { return &backupv1alpha1.VirtualMachineBackupList{} }, + ), + } +} diff --git a/vendor/kubevirt.io/client-go/kubevirt/typed/backup/v1alpha1/virtualmachinebackuptracker.go b/vendor/kubevirt.io/client-go/kubevirt/typed/backup/v1alpha1/virtualmachinebackuptracker.go new file mode 100644 index 000000000..7d74ecbaf --- /dev/null +++ b/vendor/kubevirt.io/client-go/kubevirt/typed/backup/v1alpha1/virtualmachinebackuptracker.go @@ -0,0 +1,76 @@ +/* +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 The KubeVirt Authors. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + context "context" + + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + gentype "k8s.io/client-go/gentype" + backupv1alpha1 "kubevirt.io/api/backup/v1alpha1" + scheme "kubevirt.io/client-go/kubevirt/scheme" +) + +// VirtualMachineBackupTrackersGetter has a method to return a VirtualMachineBackupTrackerInterface. +// A group's client should implement this interface. +type VirtualMachineBackupTrackersGetter interface { + VirtualMachineBackupTrackers(namespace string) VirtualMachineBackupTrackerInterface +} + +// VirtualMachineBackupTrackerInterface has methods to work with VirtualMachineBackupTracker resources. +type VirtualMachineBackupTrackerInterface interface { + Create(ctx context.Context, virtualMachineBackupTracker *backupv1alpha1.VirtualMachineBackupTracker, opts v1.CreateOptions) (*backupv1alpha1.VirtualMachineBackupTracker, error) + Update(ctx context.Context, virtualMachineBackupTracker *backupv1alpha1.VirtualMachineBackupTracker, opts v1.UpdateOptions) (*backupv1alpha1.VirtualMachineBackupTracker, error) + // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). + UpdateStatus(ctx context.Context, virtualMachineBackupTracker *backupv1alpha1.VirtualMachineBackupTracker, opts v1.UpdateOptions) (*backupv1alpha1.VirtualMachineBackupTracker, 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) (*backupv1alpha1.VirtualMachineBackupTracker, error) + List(ctx context.Context, opts v1.ListOptions) (*backupv1alpha1.VirtualMachineBackupTrackerList, 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 *backupv1alpha1.VirtualMachineBackupTracker, err error) + VirtualMachineBackupTrackerExpansion +} + +// virtualMachineBackupTrackers implements VirtualMachineBackupTrackerInterface +type virtualMachineBackupTrackers struct { + *gentype.ClientWithList[*backupv1alpha1.VirtualMachineBackupTracker, *backupv1alpha1.VirtualMachineBackupTrackerList] +} + +// newVirtualMachineBackupTrackers returns a VirtualMachineBackupTrackers +func newVirtualMachineBackupTrackers(c *BackupV1alpha1Client, namespace string) *virtualMachineBackupTrackers { + return &virtualMachineBackupTrackers{ + gentype.NewClientWithList[*backupv1alpha1.VirtualMachineBackupTracker, *backupv1alpha1.VirtualMachineBackupTrackerList]( + "virtualmachinebackuptrackers", + c.RESTClient(), + scheme.ParameterCodec, + namespace, + func() *backupv1alpha1.VirtualMachineBackupTracker { + return &backupv1alpha1.VirtualMachineBackupTracker{} + }, + func() *backupv1alpha1.VirtualMachineBackupTrackerList { + return &backupv1alpha1.VirtualMachineBackupTrackerList{} + }, + ), + } +} diff --git a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/clone/v1alpha1/clone_client.go b/vendor/kubevirt.io/client-go/kubevirt/typed/clone/v1alpha1/clone_client.go similarity index 68% rename from vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/clone/v1alpha1/clone_client.go rename to vendor/kubevirt.io/client-go/kubevirt/typed/clone/v1alpha1/clone_client.go index 47fd9b347..d46c3c5a6 100644 --- a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/clone/v1alpha1/clone_client.go +++ b/vendor/kubevirt.io/client-go/kubevirt/typed/clone/v1alpha1/clone_client.go @@ -1,5 +1,5 @@ /* -Copyright The KubeVirt Authors. +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. @@ -12,6 +12,8 @@ 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 The KubeVirt Authors. */ // Code generated by client-gen. DO NOT EDIT. @@ -19,9 +21,11 @@ limitations under the License. package v1alpha1 import ( + http "net/http" + rest "k8s.io/client-go/rest" - v1alpha1 "kubevirt.io/api/clone/v1alpha1" - "kubevirt.io/client-go/generated/kubevirt/clientset/versioned/scheme" + clonev1alpha1 "kubevirt.io/api/clone/v1alpha1" + scheme "kubevirt.io/client-go/kubevirt/scheme" ) type CloneV1alpha1Interface interface { @@ -39,12 +43,28 @@ func (c *CloneV1alpha1Client) VirtualMachineClones(namespace string) VirtualMach } // NewForConfig creates a new CloneV1alpha1Client for the given config. +// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), +// where httpClient was generated with rest.HTTPClientFor(c). func NewForConfig(c *rest.Config) (*CloneV1alpha1Client, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err } - client, err := rest.RESTClientFor(&config) + httpClient, err := rest.HTTPClientFor(&config) + if err != nil { + return nil, err + } + return NewForConfigAndClient(&config, httpClient) +} + +// NewForConfigAndClient creates a new CloneV1alpha1Client for the given config and http client. +// Note the http client provided takes precedence over the configured transport values. +func NewForConfigAndClient(c *rest.Config, h *http.Client) (*CloneV1alpha1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + client, err := rest.RESTClientForConfigAndClient(&config, h) if err != nil { return nil, err } @@ -67,10 +87,10 @@ func New(c rest.Interface) *CloneV1alpha1Client { } func setConfigDefaults(config *rest.Config) error { - gv := v1alpha1.SchemeGroupVersion + gv := clonev1alpha1.SchemeGroupVersion config.GroupVersion = &gv config.APIPath = "/apis" - config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() + config.NegotiatedSerializer = rest.CodecFactoryForGeneratedClient(scheme.Scheme, scheme.Codecs).WithoutConversion() if config.UserAgent == "" { config.UserAgent = rest.DefaultKubernetesUserAgent() diff --git a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/export/v1alpha1/doc.go b/vendor/kubevirt.io/client-go/kubevirt/typed/clone/v1alpha1/doc.go similarity index 94% rename from vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/export/v1alpha1/doc.go rename to vendor/kubevirt.io/client-go/kubevirt/typed/clone/v1alpha1/doc.go index f95601beb..d72972cf6 100644 --- a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/export/v1alpha1/doc.go +++ b/vendor/kubevirt.io/client-go/kubevirt/typed/clone/v1alpha1/doc.go @@ -1,5 +1,5 @@ /* -Copyright The KubeVirt Authors. +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. @@ -12,6 +12,8 @@ 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 The KubeVirt Authors. */ // Code generated by client-gen. DO NOT EDIT. diff --git a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/clone/v1alpha1/generated_expansion.go b/vendor/kubevirt.io/client-go/kubevirt/typed/clone/v1alpha1/generated_expansion.go similarity index 94% rename from vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/clone/v1alpha1/generated_expansion.go rename to vendor/kubevirt.io/client-go/kubevirt/typed/clone/v1alpha1/generated_expansion.go index d064d96da..9652e2471 100644 --- a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/clone/v1alpha1/generated_expansion.go +++ b/vendor/kubevirt.io/client-go/kubevirt/typed/clone/v1alpha1/generated_expansion.go @@ -1,5 +1,5 @@ /* -Copyright The KubeVirt Authors. +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. @@ -12,6 +12,8 @@ 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 The KubeVirt Authors. */ // Code generated by client-gen. DO NOT EDIT. diff --git a/vendor/kubevirt.io/client-go/kubevirt/typed/clone/v1alpha1/virtualmachineclone.go b/vendor/kubevirt.io/client-go/kubevirt/typed/clone/v1alpha1/virtualmachineclone.go new file mode 100644 index 000000000..5564db024 --- /dev/null +++ b/vendor/kubevirt.io/client-go/kubevirt/typed/clone/v1alpha1/virtualmachineclone.go @@ -0,0 +1,72 @@ +/* +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 The KubeVirt Authors. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + context "context" + + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + gentype "k8s.io/client-go/gentype" + clonev1alpha1 "kubevirt.io/api/clone/v1alpha1" + scheme "kubevirt.io/client-go/kubevirt/scheme" +) + +// VirtualMachineClonesGetter has a method to return a VirtualMachineCloneInterface. +// A group's client should implement this interface. +type VirtualMachineClonesGetter interface { + VirtualMachineClones(namespace string) VirtualMachineCloneInterface +} + +// VirtualMachineCloneInterface has methods to work with VirtualMachineClone resources. +type VirtualMachineCloneInterface interface { + Create(ctx context.Context, virtualMachineClone *clonev1alpha1.VirtualMachineClone, opts v1.CreateOptions) (*clonev1alpha1.VirtualMachineClone, error) + Update(ctx context.Context, virtualMachineClone *clonev1alpha1.VirtualMachineClone, opts v1.UpdateOptions) (*clonev1alpha1.VirtualMachineClone, error) + // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). + UpdateStatus(ctx context.Context, virtualMachineClone *clonev1alpha1.VirtualMachineClone, opts v1.UpdateOptions) (*clonev1alpha1.VirtualMachineClone, 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) (*clonev1alpha1.VirtualMachineClone, error) + List(ctx context.Context, opts v1.ListOptions) (*clonev1alpha1.VirtualMachineCloneList, 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 *clonev1alpha1.VirtualMachineClone, err error) + VirtualMachineCloneExpansion +} + +// virtualMachineClones implements VirtualMachineCloneInterface +type virtualMachineClones struct { + *gentype.ClientWithList[*clonev1alpha1.VirtualMachineClone, *clonev1alpha1.VirtualMachineCloneList] +} + +// newVirtualMachineClones returns a VirtualMachineClones +func newVirtualMachineClones(c *CloneV1alpha1Client, namespace string) *virtualMachineClones { + return &virtualMachineClones{ + gentype.NewClientWithList[*clonev1alpha1.VirtualMachineClone, *clonev1alpha1.VirtualMachineCloneList]( + "virtualmachineclones", + c.RESTClient(), + scheme.ParameterCodec, + namespace, + func() *clonev1alpha1.VirtualMachineClone { return &clonev1alpha1.VirtualMachineClone{} }, + func() *clonev1alpha1.VirtualMachineCloneList { return &clonev1alpha1.VirtualMachineCloneList{} }, + ), + } +} diff --git a/vendor/kubevirt.io/client-go/kubevirt/typed/clone/v1beta1/clone_client.go b/vendor/kubevirt.io/client-go/kubevirt/typed/clone/v1beta1/clone_client.go new file mode 100644 index 000000000..e3a01f59b --- /dev/null +++ b/vendor/kubevirt.io/client-go/kubevirt/typed/clone/v1beta1/clone_client.go @@ -0,0 +1,109 @@ +/* +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 The KubeVirt Authors. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1beta1 + +import ( + http "net/http" + + rest "k8s.io/client-go/rest" + clonev1beta1 "kubevirt.io/api/clone/v1beta1" + scheme "kubevirt.io/client-go/kubevirt/scheme" +) + +type CloneV1beta1Interface interface { + RESTClient() rest.Interface + VirtualMachineClonesGetter +} + +// CloneV1beta1Client is used to interact with features provided by the clone.kubevirt.io group. +type CloneV1beta1Client struct { + restClient rest.Interface +} + +func (c *CloneV1beta1Client) VirtualMachineClones(namespace string) VirtualMachineCloneInterface { + return newVirtualMachineClones(c, namespace) +} + +// NewForConfig creates a new CloneV1beta1Client for the given config. +// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), +// where httpClient was generated with rest.HTTPClientFor(c). +func NewForConfig(c *rest.Config) (*CloneV1beta1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + httpClient, err := rest.HTTPClientFor(&config) + if err != nil { + return nil, err + } + return NewForConfigAndClient(&config, httpClient) +} + +// NewForConfigAndClient creates a new CloneV1beta1Client for the given config and http client. +// Note the http client provided takes precedence over the configured transport values. +func NewForConfigAndClient(c *rest.Config, h *http.Client) (*CloneV1beta1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + client, err := rest.RESTClientForConfigAndClient(&config, h) + if err != nil { + return nil, err + } + return &CloneV1beta1Client{client}, nil +} + +// NewForConfigOrDie creates a new CloneV1beta1Client for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *CloneV1beta1Client { + client, err := NewForConfig(c) + if err != nil { + panic(err) + } + return client +} + +// New creates a new CloneV1beta1Client for the given RESTClient. +func New(c rest.Interface) *CloneV1beta1Client { + return &CloneV1beta1Client{c} +} + +func setConfigDefaults(config *rest.Config) error { + gv := clonev1beta1.SchemeGroupVersion + config.GroupVersion = &gv + config.APIPath = "/apis" + config.NegotiatedSerializer = rest.CodecFactoryForGeneratedClient(scheme.Scheme, 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 *CloneV1beta1Client) RESTClient() rest.Interface { + if c == nil { + return nil + } + return c.restClient +} diff --git a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/instancetype/v1beta1/doc.go b/vendor/kubevirt.io/client-go/kubevirt/typed/clone/v1beta1/doc.go similarity index 94% rename from vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/instancetype/v1beta1/doc.go rename to vendor/kubevirt.io/client-go/kubevirt/typed/clone/v1beta1/doc.go index dc66844fc..ba4fa91b1 100644 --- a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/instancetype/v1beta1/doc.go +++ b/vendor/kubevirt.io/client-go/kubevirt/typed/clone/v1beta1/doc.go @@ -1,5 +1,5 @@ /* -Copyright The KubeVirt Authors. +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. @@ -12,6 +12,8 @@ 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 The KubeVirt Authors. */ // Code generated by client-gen. DO NOT EDIT. diff --git a/vendor/kubevirt.io/client-go/kubevirt/typed/clone/v1beta1/generated_expansion.go b/vendor/kubevirt.io/client-go/kubevirt/typed/clone/v1beta1/generated_expansion.go new file mode 100644 index 000000000..132f07bbd --- /dev/null +++ b/vendor/kubevirt.io/client-go/kubevirt/typed/clone/v1beta1/generated_expansion.go @@ -0,0 +1,23 @@ +/* +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 The KubeVirt Authors. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1beta1 + +type VirtualMachineCloneExpansion interface{} diff --git a/vendor/kubevirt.io/client-go/kubevirt/typed/clone/v1beta1/virtualmachineclone.go b/vendor/kubevirt.io/client-go/kubevirt/typed/clone/v1beta1/virtualmachineclone.go new file mode 100644 index 000000000..a08e66c36 --- /dev/null +++ b/vendor/kubevirt.io/client-go/kubevirt/typed/clone/v1beta1/virtualmachineclone.go @@ -0,0 +1,72 @@ +/* +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 The KubeVirt Authors. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1beta1 + +import ( + context "context" + + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + gentype "k8s.io/client-go/gentype" + clonev1beta1 "kubevirt.io/api/clone/v1beta1" + scheme "kubevirt.io/client-go/kubevirt/scheme" +) + +// VirtualMachineClonesGetter has a method to return a VirtualMachineCloneInterface. +// A group's client should implement this interface. +type VirtualMachineClonesGetter interface { + VirtualMachineClones(namespace string) VirtualMachineCloneInterface +} + +// VirtualMachineCloneInterface has methods to work with VirtualMachineClone resources. +type VirtualMachineCloneInterface interface { + Create(ctx context.Context, virtualMachineClone *clonev1beta1.VirtualMachineClone, opts v1.CreateOptions) (*clonev1beta1.VirtualMachineClone, error) + Update(ctx context.Context, virtualMachineClone *clonev1beta1.VirtualMachineClone, opts v1.UpdateOptions) (*clonev1beta1.VirtualMachineClone, error) + // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). + UpdateStatus(ctx context.Context, virtualMachineClone *clonev1beta1.VirtualMachineClone, opts v1.UpdateOptions) (*clonev1beta1.VirtualMachineClone, 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) (*clonev1beta1.VirtualMachineClone, error) + List(ctx context.Context, opts v1.ListOptions) (*clonev1beta1.VirtualMachineCloneList, 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 *clonev1beta1.VirtualMachineClone, err error) + VirtualMachineCloneExpansion +} + +// virtualMachineClones implements VirtualMachineCloneInterface +type virtualMachineClones struct { + *gentype.ClientWithList[*clonev1beta1.VirtualMachineClone, *clonev1beta1.VirtualMachineCloneList] +} + +// newVirtualMachineClones returns a VirtualMachineClones +func newVirtualMachineClones(c *CloneV1beta1Client, namespace string) *virtualMachineClones { + return &virtualMachineClones{ + gentype.NewClientWithList[*clonev1beta1.VirtualMachineClone, *clonev1beta1.VirtualMachineCloneList]( + "virtualmachineclones", + c.RESTClient(), + scheme.ParameterCodec, + namespace, + func() *clonev1beta1.VirtualMachineClone { return &clonev1beta1.VirtualMachineClone{} }, + func() *clonev1beta1.VirtualMachineCloneList { return &clonev1beta1.VirtualMachineCloneList{} }, + ), + } +} diff --git a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/core/v1/async.go b/vendor/kubevirt.io/client-go/kubevirt/typed/core/v1/async.go similarity index 86% rename from vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/core/v1/async.go rename to vendor/kubevirt.io/client-go/kubevirt/typed/core/v1/async.go index 7898f5118..c09e8e908 100644 --- a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/core/v1/async.go +++ b/vendor/kubevirt.io/client-go/kubevirt/typed/core/v1/async.go @@ -8,6 +8,7 @@ import ( "net/http" "net/url" "path" + "strings" "github.com/gorilla/websocket" @@ -128,7 +129,7 @@ func (aws *AsyncWSRoundTripper) WebsocketCallback(ws *websocket.Conn, resp *http if err != nil { if resp != nil && resp.StatusCode != http.StatusOK { - return enrichError(err, resp) + return EnrichError(err, resp) } return fmt.Errorf("Can't connect to websocket: %s\n", err.Error()) } @@ -148,8 +149,12 @@ func roundTripperFromConfig(config *rest.Config, callback RoundTripCallback) (ht } // Configure the websocket dialer + proxy := http.ProxyFromEnvironment + if config.Proxy != nil { + proxy = config.Proxy + } dialer := &websocket.Dialer{ - Proxy: http.ProxyFromEnvironment, + Proxy: proxy, TLSClientConfig: tlsConfig, WriteBufferSize: WebsocketMessageBufferSize, ReadBufferSize: WebsocketMessageBufferSize, @@ -198,34 +203,32 @@ func RequestFromConfig(config *rest.Config, resource, name, namespace, subresour return req, nil } -// 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 { +// EnrichError checks the response body for a k8s Status object and extracts the error from 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 := &metav1.Status{} - if resp.Header.Get("Content-Type") != "application/json" { - return httpErr - } - // decode, but if the result is Status return that as an error instead. + httpErr = fmt.Errorf("Can't connect to websocket (%d): %w", resp.StatusCode, httpErr) + body, err := io.ReadAll(resp.Body) - if err != nil { - return err - } - if len(body) == 0 { + if err != nil || 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 != metav1.StatusSuccess { + + contentType := resp.Header.Get("Content-Type") + switch { + case strings.Contains(contentType, "application/json"): + status := &metav1.Status{} + if err = json.Unmarshal(body, status); err != nil { + return err + } + if status.Kind == "Status" && status.Status != metav1.StatusSuccess { return errors.FromObject(status) } + case strings.Contains(contentType, "text/plain"): + return fmt.Errorf("%w: application info: %s", httpErr, string(body)) } + return httpErr } diff --git a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/core/v1/core_client.go b/vendor/kubevirt.io/client-go/kubevirt/typed/core/v1/core_client.go similarity index 76% rename from vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/core/v1/core_client.go rename to vendor/kubevirt.io/client-go/kubevirt/typed/core/v1/core_client.go index 3b07f90d7..1513e9962 100644 --- a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/core/v1/core_client.go +++ b/vendor/kubevirt.io/client-go/kubevirt/typed/core/v1/core_client.go @@ -1,5 +1,5 @@ /* -Copyright The KubeVirt Authors. +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. @@ -12,6 +12,8 @@ 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 The KubeVirt Authors. */ // Code generated by client-gen. DO NOT EDIT. @@ -19,9 +21,11 @@ limitations under the License. package v1 import ( + http "net/http" + rest "k8s.io/client-go/rest" - v1 "kubevirt.io/api/core/v1" - "kubevirt.io/client-go/generated/kubevirt/clientset/versioned/scheme" + corev1 "kubevirt.io/api/core/v1" + scheme "kubevirt.io/client-go/kubevirt/scheme" ) type KubevirtV1Interface interface { @@ -64,12 +68,28 @@ func (c *KubevirtV1Client) VirtualMachineInstanceReplicaSets(namespace string) V } // NewForConfig creates a new KubevirtV1Client for the given config. +// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), +// where httpClient was generated with rest.HTTPClientFor(c). func NewForConfig(c *rest.Config) (*KubevirtV1Client, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err } - client, err := rest.RESTClientFor(&config) + httpClient, err := rest.HTTPClientFor(&config) + if err != nil { + return nil, err + } + return NewForConfigAndClient(&config, httpClient) +} + +// NewForConfigAndClient creates a new KubevirtV1Client for the given config and http client. +// Note the http client provided takes precedence over the configured transport values. +func NewForConfigAndClient(c *rest.Config, h *http.Client) (*KubevirtV1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + client, err := rest.RESTClientForConfigAndClient(&config, h) if err != nil { return nil, err } @@ -92,10 +112,10 @@ func New(c rest.Interface) *KubevirtV1Client { } func setConfigDefaults(config *rest.Config) error { - gv := v1.SchemeGroupVersion + gv := corev1.SchemeGroupVersion config.GroupVersion = &gv config.APIPath = "/apis" - config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() + config.NegotiatedSerializer = rest.CodecFactoryForGeneratedClient(scheme.Scheme, scheme.Codecs).WithoutConversion() if config.UserAgent == "" { config.UserAgent = rest.DefaultKubernetesUserAgent() diff --git a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/core/v1/doc.go b/vendor/kubevirt.io/client-go/kubevirt/typed/core/v1/doc.go similarity index 94% rename from vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/core/v1/doc.go rename to vendor/kubevirt.io/client-go/kubevirt/typed/core/v1/doc.go index 521bf4e0f..f36c70d68 100644 --- a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/core/v1/doc.go +++ b/vendor/kubevirt.io/client-go/kubevirt/typed/core/v1/doc.go @@ -1,5 +1,5 @@ /* -Copyright The KubeVirt Authors. +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. @@ -12,6 +12,8 @@ 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 The KubeVirt Authors. */ // Code generated by client-gen. DO NOT EDIT. diff --git a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/core/v1/generated_expansion.go b/vendor/kubevirt.io/client-go/kubevirt/typed/core/v1/generated_expansion.go similarity index 94% rename from vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/core/v1/generated_expansion.go rename to vendor/kubevirt.io/client-go/kubevirt/typed/core/v1/generated_expansion.go index dba6c4370..0c5bbd782 100644 --- a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/core/v1/generated_expansion.go +++ b/vendor/kubevirt.io/client-go/kubevirt/typed/core/v1/generated_expansion.go @@ -1,5 +1,5 @@ /* -Copyright The KubeVirt Authors. +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. @@ -12,6 +12,8 @@ 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 The KubeVirt Authors. */ // Code generated by client-gen. DO NOT EDIT. diff --git a/vendor/kubevirt.io/client-go/kubevirt/typed/core/v1/kubevirt.go b/vendor/kubevirt.io/client-go/kubevirt/typed/core/v1/kubevirt.go new file mode 100644 index 000000000..e5491dece --- /dev/null +++ b/vendor/kubevirt.io/client-go/kubevirt/typed/core/v1/kubevirt.go @@ -0,0 +1,72 @@ +/* +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 The KubeVirt Authors. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + context "context" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + gentype "k8s.io/client-go/gentype" + corev1 "kubevirt.io/api/core/v1" + scheme "kubevirt.io/client-go/kubevirt/scheme" +) + +// KubeVirtsGetter has a method to return a KubeVirtInterface. +// A group's client should implement this interface. +type KubeVirtsGetter interface { + KubeVirts(namespace string) KubeVirtInterface +} + +// KubeVirtInterface has methods to work with KubeVirt resources. +type KubeVirtInterface interface { + Create(ctx context.Context, kubeVirt *corev1.KubeVirt, opts metav1.CreateOptions) (*corev1.KubeVirt, error) + Update(ctx context.Context, kubeVirt *corev1.KubeVirt, opts metav1.UpdateOptions) (*corev1.KubeVirt, error) + // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). + UpdateStatus(ctx context.Context, kubeVirt *corev1.KubeVirt, opts metav1.UpdateOptions) (*corev1.KubeVirt, 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) (*corev1.KubeVirt, error) + List(ctx context.Context, opts metav1.ListOptions) (*corev1.KubeVirtList, 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 *corev1.KubeVirt, err error) + KubeVirtExpansion +} + +// kubeVirts implements KubeVirtInterface +type kubeVirts struct { + *gentype.ClientWithList[*corev1.KubeVirt, *corev1.KubeVirtList] +} + +// newKubeVirts returns a KubeVirts +func newKubeVirts(c *KubevirtV1Client, namespace string) *kubeVirts { + return &kubeVirts{ + gentype.NewClientWithList[*corev1.KubeVirt, *corev1.KubeVirtList]( + "kubevirts", + c.RESTClient(), + scheme.ParameterCodec, + namespace, + func() *corev1.KubeVirt { return &corev1.KubeVirt{} }, + func() *corev1.KubeVirtList { return &corev1.KubeVirtList{} }, + ), + } +} diff --git a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/core/v1/kubevirt_expansion.go b/vendor/kubevirt.io/client-go/kubevirt/typed/core/v1/kubevirt_expansion.go similarity index 100% rename from vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/core/v1/kubevirt_expansion.go rename to vendor/kubevirt.io/client-go/kubevirt/typed/core/v1/kubevirt_expansion.go diff --git a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/core/v1/streamer.go b/vendor/kubevirt.io/client-go/kubevirt/typed/core/v1/streamer.go similarity index 100% rename from vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/core/v1/streamer.go rename to vendor/kubevirt.io/client-go/kubevirt/typed/core/v1/streamer.go diff --git a/vendor/kubevirt.io/client-go/kubevirt/typed/core/v1/virtualmachine.go b/vendor/kubevirt.io/client-go/kubevirt/typed/core/v1/virtualmachine.go new file mode 100644 index 000000000..d053788a2 --- /dev/null +++ b/vendor/kubevirt.io/client-go/kubevirt/typed/core/v1/virtualmachine.go @@ -0,0 +1,72 @@ +/* +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 The KubeVirt Authors. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + context "context" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + gentype "k8s.io/client-go/gentype" + corev1 "kubevirt.io/api/core/v1" + scheme "kubevirt.io/client-go/kubevirt/scheme" +) + +// VirtualMachinesGetter has a method to return a VirtualMachineInterface. +// A group's client should implement this interface. +type VirtualMachinesGetter interface { + VirtualMachines(namespace string) VirtualMachineInterface +} + +// VirtualMachineInterface has methods to work with VirtualMachine resources. +type VirtualMachineInterface interface { + Create(ctx context.Context, virtualMachine *corev1.VirtualMachine, opts metav1.CreateOptions) (*corev1.VirtualMachine, error) + Update(ctx context.Context, virtualMachine *corev1.VirtualMachine, opts metav1.UpdateOptions) (*corev1.VirtualMachine, error) + // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). + UpdateStatus(ctx context.Context, virtualMachine *corev1.VirtualMachine, opts metav1.UpdateOptions) (*corev1.VirtualMachine, 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) (*corev1.VirtualMachine, error) + List(ctx context.Context, opts metav1.ListOptions) (*corev1.VirtualMachineList, 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 *corev1.VirtualMachine, err error) + VirtualMachineExpansion +} + +// virtualMachines implements VirtualMachineInterface +type virtualMachines struct { + *gentype.ClientWithList[*corev1.VirtualMachine, *corev1.VirtualMachineList] +} + +// newVirtualMachines returns a VirtualMachines +func newVirtualMachines(c *KubevirtV1Client, namespace string) *virtualMachines { + return &virtualMachines{ + gentype.NewClientWithList[*corev1.VirtualMachine, *corev1.VirtualMachineList]( + "virtualmachines", + c.RESTClient(), + scheme.ParameterCodec, + namespace, + func() *corev1.VirtualMachine { return &corev1.VirtualMachine{} }, + func() *corev1.VirtualMachineList { return &corev1.VirtualMachineList{} }, + ), + } +} diff --git a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/core/v1/virtualmachine_expansion.go b/vendor/kubevirt.io/client-go/kubevirt/typed/core/v1/virtualmachine_expansion.go similarity index 80% rename from vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/core/v1/virtualmachine_expansion.go rename to vendor/kubevirt.io/client-go/kubevirt/typed/core/v1/virtualmachine_expansion.go index 4dcd84cb7..826630e72 100644 --- a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/core/v1/virtualmachine_expansion.go +++ b/vendor/kubevirt.io/client-go/kubevirt/typed/core/v1/virtualmachine_expansion.go @@ -38,23 +38,23 @@ type VirtualMachineExpansion interface { GetWithExpandedSpec(ctx context.Context, name string) (*v1.VirtualMachine, error) PatchStatus(ctx context.Context, name string, pt types.PatchType, data []byte, patchOptions metav1.PatchOptions) (*v1.VirtualMachine, error) Restart(ctx context.Context, name string, restartOptions *v1.RestartOptions) error - ForceRestart(ctx context.Context, name string, restartOptions *v1.RestartOptions) error Start(ctx context.Context, name string, startOptions *v1.StartOptions) error Stop(ctx context.Context, name string, stopOptions *v1.StopOptions) error - ForceStop(ctx context.Context, name string, stopOptions *v1.StopOptions) error Migrate(ctx context.Context, name string, migrateOptions *v1.MigrateOptions) error AddVolume(ctx context.Context, name string, addVolumeOptions *v1.AddVolumeOptions) error RemoveVolume(ctx context.Context, name string, removeVolumeOptions *v1.RemoveVolumeOptions) error PortForward(name string, port int, protocol string) (StreamInterface, error) MemoryDump(ctx context.Context, name string, memoryDumpRequest *v1.VirtualMachineMemoryDumpRequest) error RemoveMemoryDump(ctx context.Context, name string) error + ObjectGraph(ctx context.Context, name string, objectGraphOptions *v1.ObjectGraphOptions) (v1.ObjectGraphNode, error) + EvacuateCancel(ctx context.Context, name string, evacuateCancelOptions *v1.EvacuateCancelOptions) error } func (c *virtualMachines) GetWithExpandedSpec(ctx context.Context, name string) (*v1.VirtualMachine, error) { newVm := &v1.VirtualMachine{} - err := c.client.Get(). + err := c.GetClient().Get(). AbsPath(fmt.Sprintf(vmSubresourceURLFmt, v1.ApiStorageVersion)). - Namespace(c.ns). + Namespace(c.GetNamespace()). Resource("virtualmachines"). Name(name). SubResource("expand-spec"). @@ -73,25 +73,9 @@ func (c *virtualMachines) Restart(ctx context.Context, name string, restartOptio if err != nil { return fmt.Errorf(cannotMarshalJSONErrFmt, err) } - return c.client.Put(). + return c.GetClient().Put(). AbsPath(fmt.Sprintf(vmSubresourceURLFmt, v1.ApiStorageVersion)). - Namespace(c.ns). - Resource("virtualmachines"). - Name(name). - SubResource("restart"). - Body(body). - Do(ctx). - Error() -} - -func (c *virtualMachines) ForceRestart(ctx context.Context, name string, restartOptions *v1.RestartOptions) error { - body, err := json.Marshal(restartOptions) - if err != nil { - return fmt.Errorf(cannotMarshalJSONErrFmt, err) - } - return c.client.Put(). - AbsPath(fmt.Sprintf(vmSubresourceURLFmt, v1.ApiStorageVersion)). - Namespace(c.ns). + Namespace(c.GetNamespace()). Resource("virtualmachines"). Name(name). SubResource("restart"). @@ -105,9 +89,9 @@ func (c *virtualMachines) Start(ctx context.Context, name string, startOptions * if err != nil { return err } - return c.client.Put(). + return c.GetClient().Put(). AbsPath(fmt.Sprintf(vmSubresourceURLFmt, v1.ApiStorageVersion)). - Namespace(c.ns). + Namespace(c.GetNamespace()). Resource("virtualmachines"). Name(name). SubResource("start"). @@ -121,9 +105,9 @@ func (c *virtualMachines) Stop(ctx context.Context, name string, stopOptions *v1 if err != nil { return err } - return c.client.Put(). + return c.GetClient().Put(). AbsPath(fmt.Sprintf(vmSubresourceURLFmt, v1.ApiStorageVersion)). - Namespace(c.ns). + Namespace(c.GetNamespace()). Resource("virtualmachines"). Name(name). SubResource("stop"). @@ -132,30 +116,14 @@ func (c *virtualMachines) Stop(ctx context.Context, name string, stopOptions *v1 Error() } -func (c *virtualMachines) ForceStop(ctx context.Context, name string, stopOptions *v1.StopOptions) error { - body, err := json.Marshal(stopOptions) - if err != nil { - return fmt.Errorf(cannotMarshalJSONErrFmt, err) - } - return c.client.Put(). - AbsPath(fmt.Sprintf(vmSubresourceURLFmt, v1.ApiStorageVersion)). - Namespace(c.ns). - Resource("virtualmachines"). - Name(name). - SubResource("stop"). - Body(body). - Do(ctx). - Error() -} - func (c *virtualMachines) Migrate(ctx context.Context, name string, migrateOptions *v1.MigrateOptions) error { optsJson, err := json.Marshal(migrateOptions) if err != nil { return err } - return c.client.Put(). + return c.GetClient().Put(). AbsPath(fmt.Sprintf(vmSubresourceURLFmt, v1.ApiStorageVersion)). - Namespace(c.ns). + Namespace(c.GetNamespace()). Resource("virtualmachines"). Name(name). SubResource("migrate"). @@ -170,9 +138,9 @@ func (c *virtualMachines) AddVolume(ctx context.Context, name string, addVolumeO return err } - return c.client.Put(). + return c.GetClient().Put(). AbsPath(fmt.Sprintf(vmSubresourceURLFmt, v1.ApiStorageVersion)). - Namespace(c.ns). + Namespace(c.GetNamespace()). Resource("virtualmachines"). Name(name). SubResource("addvolume"). @@ -187,9 +155,9 @@ func (c *virtualMachines) RemoveVolume(ctx context.Context, name string, removeV return err } - return c.client.Put(). + return c.GetClient().Put(). AbsPath(fmt.Sprintf(vmSubresourceURLFmt, v1.ApiStorageVersion)). - Namespace(c.ns). + Namespace(c.GetNamespace()). Resource("virtualmachines"). Name(name). SubResource("removevolume"). @@ -210,9 +178,9 @@ func (c *virtualMachines) MemoryDump(ctx context.Context, name string, memoryDum return err } - return c.client.Put(). + return c.GetClient().Put(). AbsPath(fmt.Sprintf(vmSubresourceURLFmt, v1.ApiStorageVersion)). - Namespace(c.ns). + Namespace(c.GetNamespace()). Resource("virtualmachines"). Name(name). SubResource("memorydump"). @@ -222,12 +190,50 @@ func (c *virtualMachines) MemoryDump(ctx context.Context, name string, memoryDum } func (c *virtualMachines) RemoveMemoryDump(ctx context.Context, name string) error { - return c.client.Put(). + return c.GetClient().Put(). AbsPath(fmt.Sprintf(vmSubresourceURLFmt, v1.ApiStorageVersion)). - Namespace(c.ns). + Namespace(c.GetNamespace()). Resource("virtualmachines"). Name(name). SubResource("removememorydump"). Do(ctx). Error() } + +func (c *virtualMachines) ObjectGraph(ctx context.Context, name string, objectGraphOptions *v1.ObjectGraphOptions) (v1.ObjectGraphNode, error) { + objectGraph := v1.ObjectGraphNode{} + + body, err := json.Marshal(objectGraphOptions) + if err != nil { + return objectGraph, err + } + + err = c.GetClient().Get(). + AbsPath(fmt.Sprintf(vmSubresourceURLFmt, v1.ApiStorageVersion)). + Namespace(c.GetNamespace()). + Resource("virtualmachines"). + Name(name). + SubResource("objectgraph"). + Body(body). + Do(ctx). + Into(&objectGraph) + + return objectGraph, err +} + +func (c *virtualMachines) EvacuateCancel(ctx context.Context, name string, evacuateCancelOptions *v1.EvacuateCancelOptions) error { + body, err := json.Marshal(evacuateCancelOptions) + if err != nil { + return err + } + + return c.GetClient().Put(). + AbsPath(fmt.Sprintf(vmSubresourceURLFmt, v1.ApiStorageVersion)). + Namespace(c.GetNamespace()). + Resource("virtualmachines"). + Name(name). + SubResource("evacuate", "cancel"). + Body(body). + Do(ctx). + Error() +} diff --git a/vendor/kubevirt.io/client-go/kubevirt/typed/core/v1/virtualmachineinstance.go b/vendor/kubevirt.io/client-go/kubevirt/typed/core/v1/virtualmachineinstance.go new file mode 100644 index 000000000..2afd272c6 --- /dev/null +++ b/vendor/kubevirt.io/client-go/kubevirt/typed/core/v1/virtualmachineinstance.go @@ -0,0 +1,70 @@ +/* +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 The KubeVirt Authors. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + context "context" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + gentype "k8s.io/client-go/gentype" + corev1 "kubevirt.io/api/core/v1" + scheme "kubevirt.io/client-go/kubevirt/scheme" +) + +// VirtualMachineInstancesGetter has a method to return a VirtualMachineInstanceInterface. +// A group's client should implement this interface. +type VirtualMachineInstancesGetter interface { + VirtualMachineInstances(namespace string) VirtualMachineInstanceInterface +} + +// VirtualMachineInstanceInterface has methods to work with VirtualMachineInstance resources. +type VirtualMachineInstanceInterface interface { + Create(ctx context.Context, virtualMachineInstance *corev1.VirtualMachineInstance, opts metav1.CreateOptions) (*corev1.VirtualMachineInstance, error) + Update(ctx context.Context, virtualMachineInstance *corev1.VirtualMachineInstance, opts metav1.UpdateOptions) (*corev1.VirtualMachineInstance, 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) (*corev1.VirtualMachineInstance, error) + List(ctx context.Context, opts metav1.ListOptions) (*corev1.VirtualMachineInstanceList, 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 *corev1.VirtualMachineInstance, err error) + VirtualMachineInstanceExpansion +} + +// virtualMachineInstances implements VirtualMachineInstanceInterface +type virtualMachineInstances struct { + *gentype.ClientWithList[*corev1.VirtualMachineInstance, *corev1.VirtualMachineInstanceList] +} + +// newVirtualMachineInstances returns a VirtualMachineInstances +func newVirtualMachineInstances(c *KubevirtV1Client, namespace string) *virtualMachineInstances { + return &virtualMachineInstances{ + gentype.NewClientWithList[*corev1.VirtualMachineInstance, *corev1.VirtualMachineInstanceList]( + "virtualmachineinstances", + c.RESTClient(), + scheme.ParameterCodec, + namespace, + func() *corev1.VirtualMachineInstance { return &corev1.VirtualMachineInstance{} }, + func() *corev1.VirtualMachineInstanceList { return &corev1.VirtualMachineInstanceList{} }, + ), + } +} diff --git a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/core/v1/virtualmachineinstance_expansion.go b/vendor/kubevirt.io/client-go/kubevirt/typed/core/v1/virtualmachineinstance_expansion.go similarity index 72% rename from vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/core/v1/virtualmachineinstance_expansion.go rename to vendor/kubevirt.io/client-go/kubevirt/typed/core/v1/virtualmachineinstance_expansion.go index 2852d0bdb..3c4023ab2 100644 --- a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/core/v1/virtualmachineinstance_expansion.go +++ b/vendor/kubevirt.io/client-go/kubevirt/typed/core/v1/virtualmachineinstance_expansion.go @@ -27,6 +27,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + backupv1 "kubevirt.io/api/backup/v1alpha1" v1 "kubevirt.io/api/core/v1" "kubevirt.io/client-go/log" ) @@ -40,17 +41,21 @@ type SerialConsoleOptions struct { type VirtualMachineInstanceExpansion interface { SerialConsole(name string, options *SerialConsoleOptions) (StreamInterface, error) USBRedir(vmiName string) (StreamInterface, error) - VNC(name string) (StreamInterface, error) + VNC(name string, preserveSession bool) (StreamInterface, error) Screenshot(ctx context.Context, name string, options *v1.ScreenshotOptions) ([]byte, error) PortForward(name string, port int, protocol string) (StreamInterface, error) + Backup(ctx context.Context, name string, backupOptions *backupv1.BackupOptions) error + RedefineCheckpoint(ctx context.Context, name string, checkpoint *backupv1.BackupCheckpoint) error Pause(ctx context.Context, name string, pauseOptions *v1.PauseOptions) error Unpause(ctx context.Context, name string, unpauseOptions *v1.UnpauseOptions) error Freeze(ctx context.Context, name string, unfreezeTimeout time.Duration) error Unfreeze(ctx context.Context, name string) error + Reset(ctx context.Context, name string) error SoftReboot(ctx context.Context, name string) error GuestOsInfo(ctx context.Context, name string) (v1.VirtualMachineInstanceGuestAgentInfo, error) UserList(ctx context.Context, name string) (v1.VirtualMachineInstanceGuestOSUserList, error) FilesystemList(ctx context.Context, name string) (v1.VirtualMachineInstanceFileSystemList, error) + ObjectGraph(ctx context.Context, name string, objectGraphOptions *v1.ObjectGraphOptions) (v1.ObjectGraphNode, error) AddVolume(ctx context.Context, name string, addVolumeOptions *v1.AddVolumeOptions) error RemoveVolume(ctx context.Context, name string, removeVolumeOptions *v1.RemoveVolumeOptions) error VSOCK(name string, options *v1.VSOCKOptions) (StreamInterface, error) @@ -58,6 +63,7 @@ type VirtualMachineInstanceExpansion interface { SEVQueryLaunchMeasurement(ctx context.Context, name string) (v1.SEVMeasurementInfo, error) SEVSetupSession(ctx context.Context, name string, sevSessionOptions *v1.SEVSessionOptions) error SEVInjectLaunchSecret(ctx context.Context, name string, sevSecretOptions *v1.SEVSecretOptions) error + EvacuateCancel(ctx context.Context, name string, evacuateCancelOptions *v1.EvacuateCancelOptions) error } func (c *virtualMachineInstances) SerialConsole(name string, options *SerialConsoleOptions) (StreamInterface, error) { @@ -72,7 +78,7 @@ func (c *virtualMachineInstances) USBRedir(vmiName string) (StreamInterface, err return nil, fmt.Errorf("USBRedir is not implemented yet in generated client") } -func (c *virtualMachineInstances) VNC(name string) (StreamInterface, error) { +func (c *virtualMachineInstances) VNC(name string, preserveSession bool) (StreamInterface, error) { // TODO not implemented yet // requires clientConfig return nil, fmt.Errorf("VNC is not implemented yet in generated client") @@ -83,9 +89,9 @@ func (c *virtualMachineInstances) Screenshot(ctx context.Context, name string, o if options.MoveCursor == true { moveCursor = "true" } - res := c.client.Get(). + res := c.GetClient().Get(). AbsPath(fmt.Sprintf(vmiSubresourceURL, v1.ApiStorageVersion)). - Namespace(c.ns). + Namespace(c.GetNamespace()). Resource("virtualmachineinstances"). Name(name). SubResource("vnc", "screenshot"). @@ -106,15 +112,51 @@ func (c *virtualMachineInstances) PortForward(name string, port int, protocol st return nil, fmt.Errorf("PortForward is not implemented yet in generated client") } +func (c *virtualMachineInstances) Backup(ctx context.Context, name string, backupOptions *backupv1.BackupOptions) error { + log.Log.Infof("Backup VMI %s", name) + body, err := json.Marshal(backupOptions) + if err != nil { + return err + } + + return c.GetClient().Put(). + AbsPath(fmt.Sprintf(vmiSubresourceURL, v1.ApiStorageVersion)). + Namespace(c.GetNamespace()). + Resource("virtualmachineinstances"). + Name(name). + SubResource("backup"). + Body(body). + Do(ctx). + Error() +} + +func (c *virtualMachineInstances) RedefineCheckpoint(ctx context.Context, name string, checkpoint *backupv1.BackupCheckpoint) error { + log.Log.Infof("RedefineCheckpoint VMI %s with checkpoint %s", name, checkpoint.Name) + body, err := json.Marshal(checkpoint) + if err != nil { + return err + } + + return c.GetClient().Put(). + AbsPath(fmt.Sprintf(vmiSubresourceURL, v1.ApiStorageVersion)). + Namespace(c.GetNamespace()). + Resource("virtualmachineinstances"). + Name(name). + SubResource("redefine-checkpoint"). + Body(body). + Do(ctx). + Error() +} + func (c *virtualMachineInstances) Pause(ctx context.Context, name string, pauseOptions *v1.PauseOptions) error { body, err := json.Marshal(pauseOptions) if err != nil { return err } - return c.client.Put(). + return c.GetClient().Put(). AbsPath(fmt.Sprintf(vmiSubresourceURL, v1.ApiStorageVersion)). - Namespace(c.ns). + Namespace(c.GetNamespace()). Resource("virtualmachineinstances"). Name(name). SubResource("pause"). @@ -129,9 +171,9 @@ func (c *virtualMachineInstances) Unpause(ctx context.Context, name string, unpa return err } - return c.client.Put(). + return c.GetClient().Put(). AbsPath(fmt.Sprintf(vmiSubresourceURL, v1.ApiStorageVersion)). - Namespace(c.ns). + Namespace(c.GetNamespace()). Resource("virtualmachineinstances"). Name(name). SubResource("unpause"). @@ -153,9 +195,9 @@ func (c *virtualMachineInstances) Freeze(ctx context.Context, name string, unfre return err } - return c.client.Put(). + return c.GetClient().Put(). AbsPath(fmt.Sprintf(vmiSubresourceURL, v1.ApiStorageVersion)). - Namespace(c.ns). + Namespace(c.GetNamespace()). Resource("virtualmachineinstances"). Name(name). SubResource("freeze"). @@ -166,9 +208,9 @@ func (c *virtualMachineInstances) Freeze(ctx context.Context, name string, unfre func (c *virtualMachineInstances) Unfreeze(ctx context.Context, name string) error { log.Log.Infof("Unfreeze VMI %s", name) - return c.client.Put(). + return c.GetClient().Put(). AbsPath(fmt.Sprintf(vmiSubresourceURL, v1.ApiStorageVersion)). - Namespace(c.ns). + Namespace(c.GetNamespace()). Resource("virtualmachineinstances"). Name(name). SubResource("unfreeze"). @@ -176,11 +218,23 @@ func (c *virtualMachineInstances) Unfreeze(ctx context.Context, name string) err Error() } +func (c *virtualMachineInstances) Reset(ctx context.Context, name string) error { + log.Log.Infof("Reset VMI") + return c.GetClient().Put(). + AbsPath(fmt.Sprintf(vmiSubresourceURL, v1.ApiStorageVersion)). + Namespace(c.GetNamespace()). + Resource("virtualmachineinstances"). + Name(name). + SubResource("reset"). + Do(ctx). + Error() +} + func (c *virtualMachineInstances) SoftReboot(ctx context.Context, name string) error { log.Log.Infof("SoftReboot VMI") - return c.client.Put(). + return c.GetClient().Put(). AbsPath(fmt.Sprintf(vmiSubresourceURL, v1.ApiStorageVersion)). - Namespace(c.ns). + Namespace(c.GetNamespace()). Resource("virtualmachineinstances"). Name(name). SubResource("softreboot"). @@ -191,7 +245,7 @@ func (c *virtualMachineInstances) SoftReboot(ctx context.Context, name string) e func (c *virtualMachineInstances) GuestOsInfo(ctx context.Context, name string) (v1.VirtualMachineInstanceGuestAgentInfo, error) { guestInfo := v1.VirtualMachineInstanceGuestAgentInfo{} // WORKAROUND: - // When doing c.client.Get().RequestURI(uri).Do(ctx).Into(guestInfo) + // When doing c.GetClient().Get().RequestURI(uri).Do(ctx).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 @@ -206,17 +260,17 @@ func (c *virtualMachineInstances) GuestOsInfo(ctx context.Context, name string) // 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 // Will be replaced by: - // err := c.client.Get(). + // err := c.GetClient().Get(). // AbsPath(fmt.Sprintf(vmiSubresourceURL, v1.ApiStorageVersion)). - // Namespace(c.ns). + // Namespace(c.GetNamespace()). // Resource("virtualmachineinstances"). // Name(name). // SubResource("guestosinfo"). // Do(ctx). // Into(&guestInfo) - res := c.client.Get(). + res := c.GetClient().Get(). AbsPath(fmt.Sprintf(vmiSubresourceURL, v1.ApiStorageVersion)). - Namespace(c.ns). + Namespace(c.GetNamespace()). Resource("virtualmachineinstances"). Name(name). SubResource("guestosinfo"). @@ -237,9 +291,9 @@ func (c *virtualMachineInstances) GuestOsInfo(ctx context.Context, name string) func (c *virtualMachineInstances) UserList(ctx context.Context, name string) (v1.VirtualMachineInstanceGuestOSUserList, error) { userList := v1.VirtualMachineInstanceGuestOSUserList{} - err := c.client.Get(). + err := c.GetClient().Get(). AbsPath(fmt.Sprintf(vmiSubresourceURL, v1.ApiStorageVersion)). - Namespace(c.ns). + Namespace(c.GetNamespace()). Resource("virtualmachineinstances"). Name(name). SubResource("userlist"). @@ -250,9 +304,9 @@ func (c *virtualMachineInstances) UserList(ctx context.Context, name string) (v1 func (c *virtualMachineInstances) FilesystemList(ctx context.Context, name string) (v1.VirtualMachineInstanceFileSystemList, error) { fsList := v1.VirtualMachineInstanceFileSystemList{} - err := c.client.Get(). + err := c.GetClient().Get(). AbsPath(fmt.Sprintf(vmiSubresourceURL, v1.ApiStorageVersion)). - Namespace(c.ns). + Namespace(c.GetNamespace()). Resource("virtualmachineinstances"). Name(name). SubResource("filesystemlist"). @@ -262,15 +316,36 @@ func (c *virtualMachineInstances) FilesystemList(ctx context.Context, name strin return fsList, err } +func (c *virtualMachineInstances) ObjectGraph(ctx context.Context, name string, objectGraphOptions *v1.ObjectGraphOptions) (v1.ObjectGraphNode, error) { + objectGraph := v1.ObjectGraphNode{} + + body, err := json.Marshal(objectGraphOptions) + if err != nil { + return objectGraph, err + } + + err = c.GetClient().Get(). + AbsPath(fmt.Sprintf(vmiSubresourceURL, v1.ApiStorageVersion)). + Namespace(c.GetNamespace()). + Resource("virtualmachineinstances"). + Name(name). + SubResource("objectgraph"). + Body(body). + Do(ctx). + Into(&objectGraph) + + return objectGraph, err +} + func (c *virtualMachineInstances) AddVolume(ctx context.Context, name string, addVolumeOptions *v1.AddVolumeOptions) error { body, err := json.Marshal(addVolumeOptions) if err != nil { return err } - return c.client.Put(). + return c.GetClient().Put(). AbsPath(fmt.Sprintf(vmiSubresourceURL, v1.ApiStorageVersion)). - Namespace(c.ns). + Namespace(c.GetNamespace()). Resource("virtualmachineinstances"). Name(name). SubResource("addvolume"). @@ -285,9 +360,9 @@ func (c *virtualMachineInstances) RemoveVolume(ctx context.Context, name string, return err } - return c.client.Put(). + return c.GetClient().Put(). AbsPath(fmt.Sprintf(vmiSubresourceURL, v1.ApiStorageVersion)). - Namespace(c.ns). + Namespace(c.GetNamespace()). Resource("virtualmachineinstances"). Name(name). SubResource("removevolume"). @@ -304,13 +379,13 @@ func (c *virtualMachineInstances) VSOCK(name string, options *v1.VSOCKOptions) ( func (c *virtualMachineInstances) SEVFetchCertChain(ctx context.Context, name string) (v1.SEVPlatformInfo, error) { sevPlatformInfo := v1.SEVPlatformInfo{} - err := c.client.Get(). + err := c.GetClient().Get(). AbsPath(fmt.Sprintf(vmiSubresourceURL, v1.ApiStorageVersion)). - Namespace(c.ns). + Namespace(c.GetNamespace()). Resource("virtualmachineinstances"). Name(name). SubResource("sev", "fetchcertchain"). - Do(context.Background()). + Do(ctx). Into(&sevPlatformInfo) return sevPlatformInfo, err @@ -318,13 +393,13 @@ func (c *virtualMachineInstances) SEVFetchCertChain(ctx context.Context, name st func (c *virtualMachineInstances) SEVQueryLaunchMeasurement(ctx context.Context, name string) (v1.SEVMeasurementInfo, error) { sevMeasurementInfo := v1.SEVMeasurementInfo{} - err := c.client.Get(). + err := c.GetClient().Get(). AbsPath(fmt.Sprintf(vmiSubresourceURL, v1.ApiStorageVersion)). - Namespace(c.ns). + Namespace(c.GetNamespace()). Resource("virtualmachineinstances"). Name(name). SubResource("sev", "querylaunchmeasurement"). - Do(context.Background()). + Do(ctx). Into(&sevMeasurementInfo) return sevMeasurementInfo, err @@ -336,14 +411,14 @@ func (c *virtualMachineInstances) SEVSetupSession(ctx context.Context, name stri return fmt.Errorf("cannot Marshal to json: %s", err) } - return c.client.Put(). + return c.GetClient().Put(). AbsPath(fmt.Sprintf(vmiSubresourceURL, v1.ApiStorageVersion)). - Namespace(c.ns). + Namespace(c.GetNamespace()). Resource("virtualmachineinstances"). Name(name). SubResource("sev", "setupsession"). Body(body). - Do(context.Background()). + Do(ctx). Error() } @@ -352,13 +427,30 @@ func (c *virtualMachineInstances) SEVInjectLaunchSecret(ctx context.Context, nam if err != nil { return fmt.Errorf("cannot Marshal to json: %s", err) } - return c.client.Put(). + return c.GetClient().Put(). AbsPath(fmt.Sprintf(vmiSubresourceURL, v1.ApiStorageVersion)). - Namespace(c.ns). + Namespace(c.GetNamespace()). Resource("virtualmachineinstances"). Name(name). SubResource("sev", "injectlaunchsecret"). Body(body). - Do(context.Background()). + Do(ctx). + Error() +} + +func (c *virtualMachineInstances) EvacuateCancel(ctx context.Context, name string, evacuateCancelOptions *v1.EvacuateCancelOptions) error { + body, err := json.Marshal(evacuateCancelOptions) + if err != nil { + return err + } + + return c.GetClient().Put(). + AbsPath(fmt.Sprintf(vmiSubresourceURL, v1.ApiStorageVersion)). + Namespace(c.GetNamespace()). + Resource("virtualmachineinstances"). + Name(name). + SubResource("evacuate", "cancel"). + Body(body). + Do(ctx). Error() } diff --git a/vendor/kubevirt.io/client-go/kubevirt/typed/core/v1/virtualmachineinstancemigration.go b/vendor/kubevirt.io/client-go/kubevirt/typed/core/v1/virtualmachineinstancemigration.go new file mode 100644 index 000000000..40a53a9c0 --- /dev/null +++ b/vendor/kubevirt.io/client-go/kubevirt/typed/core/v1/virtualmachineinstancemigration.go @@ -0,0 +1,74 @@ +/* +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 The KubeVirt Authors. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + context "context" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + gentype "k8s.io/client-go/gentype" + corev1 "kubevirt.io/api/core/v1" + scheme "kubevirt.io/client-go/kubevirt/scheme" +) + +// VirtualMachineInstanceMigrationsGetter has a method to return a VirtualMachineInstanceMigrationInterface. +// A group's client should implement this interface. +type VirtualMachineInstanceMigrationsGetter interface { + VirtualMachineInstanceMigrations(namespace string) VirtualMachineInstanceMigrationInterface +} + +// VirtualMachineInstanceMigrationInterface has methods to work with VirtualMachineInstanceMigration resources. +type VirtualMachineInstanceMigrationInterface interface { + Create(ctx context.Context, virtualMachineInstanceMigration *corev1.VirtualMachineInstanceMigration, opts metav1.CreateOptions) (*corev1.VirtualMachineInstanceMigration, error) + Update(ctx context.Context, virtualMachineInstanceMigration *corev1.VirtualMachineInstanceMigration, opts metav1.UpdateOptions) (*corev1.VirtualMachineInstanceMigration, error) + // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). + UpdateStatus(ctx context.Context, virtualMachineInstanceMigration *corev1.VirtualMachineInstanceMigration, opts metav1.UpdateOptions) (*corev1.VirtualMachineInstanceMigration, 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) (*corev1.VirtualMachineInstanceMigration, error) + List(ctx context.Context, opts metav1.ListOptions) (*corev1.VirtualMachineInstanceMigrationList, 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 *corev1.VirtualMachineInstanceMigration, err error) + VirtualMachineInstanceMigrationExpansion +} + +// virtualMachineInstanceMigrations implements VirtualMachineInstanceMigrationInterface +type virtualMachineInstanceMigrations struct { + *gentype.ClientWithList[*corev1.VirtualMachineInstanceMigration, *corev1.VirtualMachineInstanceMigrationList] +} + +// newVirtualMachineInstanceMigrations returns a VirtualMachineInstanceMigrations +func newVirtualMachineInstanceMigrations(c *KubevirtV1Client, namespace string) *virtualMachineInstanceMigrations { + return &virtualMachineInstanceMigrations{ + gentype.NewClientWithList[*corev1.VirtualMachineInstanceMigration, *corev1.VirtualMachineInstanceMigrationList]( + "virtualmachineinstancemigrations", + c.RESTClient(), + scheme.ParameterCodec, + namespace, + func() *corev1.VirtualMachineInstanceMigration { return &corev1.VirtualMachineInstanceMigration{} }, + func() *corev1.VirtualMachineInstanceMigrationList { + return &corev1.VirtualMachineInstanceMigrationList{} + }, + ), + } +} diff --git a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/core/v1/virtualmachineinstancemigration_expansion.go b/vendor/kubevirt.io/client-go/kubevirt/typed/core/v1/virtualmachineinstancemigration_expansion.go similarity index 100% rename from vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/core/v1/virtualmachineinstancemigration_expansion.go rename to vendor/kubevirt.io/client-go/kubevirt/typed/core/v1/virtualmachineinstancemigration_expansion.go diff --git a/vendor/kubevirt.io/client-go/kubevirt/typed/core/v1/virtualmachineinstancepreset.go b/vendor/kubevirt.io/client-go/kubevirt/typed/core/v1/virtualmachineinstancepreset.go new file mode 100644 index 000000000..524e07a70 --- /dev/null +++ b/vendor/kubevirt.io/client-go/kubevirt/typed/core/v1/virtualmachineinstancepreset.go @@ -0,0 +1,70 @@ +/* +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 The KubeVirt Authors. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + context "context" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + gentype "k8s.io/client-go/gentype" + corev1 "kubevirt.io/api/core/v1" + scheme "kubevirt.io/client-go/kubevirt/scheme" +) + +// VirtualMachineInstancePresetsGetter has a method to return a VirtualMachineInstancePresetInterface. +// A group's client should implement this interface. +type VirtualMachineInstancePresetsGetter interface { + VirtualMachineInstancePresets(namespace string) VirtualMachineInstancePresetInterface +} + +// VirtualMachineInstancePresetInterface has methods to work with VirtualMachineInstancePreset resources. +type VirtualMachineInstancePresetInterface interface { + Create(ctx context.Context, virtualMachineInstancePreset *corev1.VirtualMachineInstancePreset, opts metav1.CreateOptions) (*corev1.VirtualMachineInstancePreset, error) + Update(ctx context.Context, virtualMachineInstancePreset *corev1.VirtualMachineInstancePreset, opts metav1.UpdateOptions) (*corev1.VirtualMachineInstancePreset, 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) (*corev1.VirtualMachineInstancePreset, error) + List(ctx context.Context, opts metav1.ListOptions) (*corev1.VirtualMachineInstancePresetList, 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 *corev1.VirtualMachineInstancePreset, err error) + VirtualMachineInstancePresetExpansion +} + +// virtualMachineInstancePresets implements VirtualMachineInstancePresetInterface +type virtualMachineInstancePresets struct { + *gentype.ClientWithList[*corev1.VirtualMachineInstancePreset, *corev1.VirtualMachineInstancePresetList] +} + +// newVirtualMachineInstancePresets returns a VirtualMachineInstancePresets +func newVirtualMachineInstancePresets(c *KubevirtV1Client, namespace string) *virtualMachineInstancePresets { + return &virtualMachineInstancePresets{ + gentype.NewClientWithList[*corev1.VirtualMachineInstancePreset, *corev1.VirtualMachineInstancePresetList]( + "virtualmachineinstancepresets", + c.RESTClient(), + scheme.ParameterCodec, + namespace, + func() *corev1.VirtualMachineInstancePreset { return &corev1.VirtualMachineInstancePreset{} }, + func() *corev1.VirtualMachineInstancePresetList { return &corev1.VirtualMachineInstancePresetList{} }, + ), + } +} diff --git a/vendor/kubevirt.io/client-go/kubevirt/typed/core/v1/virtualmachineinstancereplicaset.go b/vendor/kubevirt.io/client-go/kubevirt/typed/core/v1/virtualmachineinstancereplicaset.go new file mode 100644 index 000000000..d7db34c2a --- /dev/null +++ b/vendor/kubevirt.io/client-go/kubevirt/typed/core/v1/virtualmachineinstancereplicaset.go @@ -0,0 +1,74 @@ +/* +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 The KubeVirt Authors. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + context "context" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + gentype "k8s.io/client-go/gentype" + corev1 "kubevirt.io/api/core/v1" + scheme "kubevirt.io/client-go/kubevirt/scheme" +) + +// VirtualMachineInstanceReplicaSetsGetter has a method to return a VirtualMachineInstanceReplicaSetInterface. +// A group's client should implement this interface. +type VirtualMachineInstanceReplicaSetsGetter interface { + VirtualMachineInstanceReplicaSets(namespace string) VirtualMachineInstanceReplicaSetInterface +} + +// VirtualMachineInstanceReplicaSetInterface has methods to work with VirtualMachineInstanceReplicaSet resources. +type VirtualMachineInstanceReplicaSetInterface interface { + Create(ctx context.Context, virtualMachineInstanceReplicaSet *corev1.VirtualMachineInstanceReplicaSet, opts metav1.CreateOptions) (*corev1.VirtualMachineInstanceReplicaSet, error) + Update(ctx context.Context, virtualMachineInstanceReplicaSet *corev1.VirtualMachineInstanceReplicaSet, opts metav1.UpdateOptions) (*corev1.VirtualMachineInstanceReplicaSet, error) + // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). + UpdateStatus(ctx context.Context, virtualMachineInstanceReplicaSet *corev1.VirtualMachineInstanceReplicaSet, opts metav1.UpdateOptions) (*corev1.VirtualMachineInstanceReplicaSet, 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) (*corev1.VirtualMachineInstanceReplicaSet, error) + List(ctx context.Context, opts metav1.ListOptions) (*corev1.VirtualMachineInstanceReplicaSetList, 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 *corev1.VirtualMachineInstanceReplicaSet, err error) + VirtualMachineInstanceReplicaSetExpansion +} + +// virtualMachineInstanceReplicaSets implements VirtualMachineInstanceReplicaSetInterface +type virtualMachineInstanceReplicaSets struct { + *gentype.ClientWithList[*corev1.VirtualMachineInstanceReplicaSet, *corev1.VirtualMachineInstanceReplicaSetList] +} + +// newVirtualMachineInstanceReplicaSets returns a VirtualMachineInstanceReplicaSets +func newVirtualMachineInstanceReplicaSets(c *KubevirtV1Client, namespace string) *virtualMachineInstanceReplicaSets { + return &virtualMachineInstanceReplicaSets{ + gentype.NewClientWithList[*corev1.VirtualMachineInstanceReplicaSet, *corev1.VirtualMachineInstanceReplicaSetList]( + "virtualmachineinstancereplicasets", + c.RESTClient(), + scheme.ParameterCodec, + namespace, + func() *corev1.VirtualMachineInstanceReplicaSet { return &corev1.VirtualMachineInstanceReplicaSet{} }, + func() *corev1.VirtualMachineInstanceReplicaSetList { + return &corev1.VirtualMachineInstanceReplicaSetList{} + }, + ), + } +} diff --git a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/core/v1/virtualmachineinstancereplicaset_expansion.go b/vendor/kubevirt.io/client-go/kubevirt/typed/core/v1/virtualmachineinstancereplicaset_expansion.go similarity index 94% rename from vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/core/v1/virtualmachineinstancereplicaset_expansion.go rename to vendor/kubevirt.io/client-go/kubevirt/typed/core/v1/virtualmachineinstancereplicaset_expansion.go index 79a9a9812..018e0e56e 100644 --- a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/core/v1/virtualmachineinstancereplicaset_expansion.go +++ b/vendor/kubevirt.io/client-go/kubevirt/typed/core/v1/virtualmachineinstancereplicaset_expansion.go @@ -36,8 +36,8 @@ type VirtualMachineInstanceReplicaSetExpansion interface { func (c *virtualMachineInstanceReplicaSets) GetScale(ctx context.Context, replicaSetName string, options metav1.GetOptions) (*autov1.Scale, error) { result := &autov1.Scale{} - err := c.client.Get(). - Namespace(c.ns). + err := c.GetClient().Get(). + Namespace(c.GetNamespace()). Resource("virtualmachineinstancereplicasets"). Name(replicaSetName). SubResource("scale"). @@ -48,8 +48,8 @@ func (c *virtualMachineInstanceReplicaSets) GetScale(ctx context.Context, replic func (c *virtualMachineInstanceReplicaSets) UpdateScale(ctx context.Context, replicaSetName string, scale *autov1.Scale) (*autov1.Scale, error) { result := &autov1.Scale{} - err := c.client.Put(). - Namespace(c.ns). + err := c.GetClient().Put(). + Namespace(c.GetNamespace()). Resource("virtualmachineinstancereplicasets"). Name(replicaSetName). SubResource("scale"). diff --git a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/core/v1/websocket.go b/vendor/kubevirt.io/client-go/kubevirt/typed/core/v1/websocket.go similarity index 100% rename from vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/core/v1/websocket.go rename to vendor/kubevirt.io/client-go/kubevirt/typed/core/v1/websocket.go diff --git a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/clone/v1alpha1/doc.go b/vendor/kubevirt.io/client-go/kubevirt/typed/export/v1alpha1/doc.go similarity index 94% rename from vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/clone/v1alpha1/doc.go rename to vendor/kubevirt.io/client-go/kubevirt/typed/export/v1alpha1/doc.go index f95601beb..d72972cf6 100644 --- a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/clone/v1alpha1/doc.go +++ b/vendor/kubevirt.io/client-go/kubevirt/typed/export/v1alpha1/doc.go @@ -1,5 +1,5 @@ /* -Copyright The KubeVirt Authors. +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. @@ -12,6 +12,8 @@ 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 The KubeVirt Authors. */ // Code generated by client-gen. DO NOT EDIT. diff --git a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/export/v1alpha1/export_client.go b/vendor/kubevirt.io/client-go/kubevirt/typed/export/v1alpha1/export_client.go similarity index 69% rename from vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/export/v1alpha1/export_client.go rename to vendor/kubevirt.io/client-go/kubevirt/typed/export/v1alpha1/export_client.go index 635a3f56f..fdf544fff 100644 --- a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/export/v1alpha1/export_client.go +++ b/vendor/kubevirt.io/client-go/kubevirt/typed/export/v1alpha1/export_client.go @@ -1,5 +1,5 @@ /* -Copyright The KubeVirt Authors. +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. @@ -12,6 +12,8 @@ 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 The KubeVirt Authors. */ // Code generated by client-gen. DO NOT EDIT. @@ -19,9 +21,11 @@ limitations under the License. package v1alpha1 import ( + http "net/http" + rest "k8s.io/client-go/rest" - v1alpha1 "kubevirt.io/api/export/v1alpha1" - "kubevirt.io/client-go/generated/kubevirt/clientset/versioned/scheme" + exportv1alpha1 "kubevirt.io/api/export/v1alpha1" + scheme "kubevirt.io/client-go/kubevirt/scheme" ) type ExportV1alpha1Interface interface { @@ -39,12 +43,28 @@ func (c *ExportV1alpha1Client) VirtualMachineExports(namespace string) VirtualMa } // NewForConfig creates a new ExportV1alpha1Client for the given config. +// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), +// where httpClient was generated with rest.HTTPClientFor(c). func NewForConfig(c *rest.Config) (*ExportV1alpha1Client, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err } - client, err := rest.RESTClientFor(&config) + httpClient, err := rest.HTTPClientFor(&config) + if err != nil { + return nil, err + } + return NewForConfigAndClient(&config, httpClient) +} + +// NewForConfigAndClient creates a new ExportV1alpha1Client for the given config and http client. +// Note the http client provided takes precedence over the configured transport values. +func NewForConfigAndClient(c *rest.Config, h *http.Client) (*ExportV1alpha1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + client, err := rest.RESTClientForConfigAndClient(&config, h) if err != nil { return nil, err } @@ -67,10 +87,10 @@ func New(c rest.Interface) *ExportV1alpha1Client { } func setConfigDefaults(config *rest.Config) error { - gv := v1alpha1.SchemeGroupVersion + gv := exportv1alpha1.SchemeGroupVersion config.GroupVersion = &gv config.APIPath = "/apis" - config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() + config.NegotiatedSerializer = rest.CodecFactoryForGeneratedClient(scheme.Scheme, scheme.Codecs).WithoutConversion() if config.UserAgent == "" { config.UserAgent = rest.DefaultKubernetesUserAgent() diff --git a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/export/v1alpha1/generated_expansion.go b/vendor/kubevirt.io/client-go/kubevirt/typed/export/v1alpha1/generated_expansion.go similarity index 94% rename from vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/export/v1alpha1/generated_expansion.go rename to vendor/kubevirt.io/client-go/kubevirt/typed/export/v1alpha1/generated_expansion.go index 5fe192f0f..c242d1d9e 100644 --- a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/export/v1alpha1/generated_expansion.go +++ b/vendor/kubevirt.io/client-go/kubevirt/typed/export/v1alpha1/generated_expansion.go @@ -1,5 +1,5 @@ /* -Copyright The KubeVirt Authors. +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. @@ -12,6 +12,8 @@ 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 The KubeVirt Authors. */ // Code generated by client-gen. DO NOT EDIT. diff --git a/vendor/kubevirt.io/client-go/kubevirt/typed/export/v1alpha1/virtualmachineexport.go b/vendor/kubevirt.io/client-go/kubevirt/typed/export/v1alpha1/virtualmachineexport.go new file mode 100644 index 000000000..6d746aeb9 --- /dev/null +++ b/vendor/kubevirt.io/client-go/kubevirt/typed/export/v1alpha1/virtualmachineexport.go @@ -0,0 +1,72 @@ +/* +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 The KubeVirt Authors. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + context "context" + + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + gentype "k8s.io/client-go/gentype" + exportv1alpha1 "kubevirt.io/api/export/v1alpha1" + scheme "kubevirt.io/client-go/kubevirt/scheme" +) + +// VirtualMachineExportsGetter has a method to return a VirtualMachineExportInterface. +// A group's client should implement this interface. +type VirtualMachineExportsGetter interface { + VirtualMachineExports(namespace string) VirtualMachineExportInterface +} + +// VirtualMachineExportInterface has methods to work with VirtualMachineExport resources. +type VirtualMachineExportInterface interface { + Create(ctx context.Context, virtualMachineExport *exportv1alpha1.VirtualMachineExport, opts v1.CreateOptions) (*exportv1alpha1.VirtualMachineExport, error) + Update(ctx context.Context, virtualMachineExport *exportv1alpha1.VirtualMachineExport, opts v1.UpdateOptions) (*exportv1alpha1.VirtualMachineExport, error) + // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). + UpdateStatus(ctx context.Context, virtualMachineExport *exportv1alpha1.VirtualMachineExport, opts v1.UpdateOptions) (*exportv1alpha1.VirtualMachineExport, 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) (*exportv1alpha1.VirtualMachineExport, error) + List(ctx context.Context, opts v1.ListOptions) (*exportv1alpha1.VirtualMachineExportList, 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 *exportv1alpha1.VirtualMachineExport, err error) + VirtualMachineExportExpansion +} + +// virtualMachineExports implements VirtualMachineExportInterface +type virtualMachineExports struct { + *gentype.ClientWithList[*exportv1alpha1.VirtualMachineExport, *exportv1alpha1.VirtualMachineExportList] +} + +// newVirtualMachineExports returns a VirtualMachineExports +func newVirtualMachineExports(c *ExportV1alpha1Client, namespace string) *virtualMachineExports { + return &virtualMachineExports{ + gentype.NewClientWithList[*exportv1alpha1.VirtualMachineExport, *exportv1alpha1.VirtualMachineExportList]( + "virtualmachineexports", + c.RESTClient(), + scheme.ParameterCodec, + namespace, + func() *exportv1alpha1.VirtualMachineExport { return &exportv1alpha1.VirtualMachineExport{} }, + func() *exportv1alpha1.VirtualMachineExportList { return &exportv1alpha1.VirtualMachineExportList{} }, + ), + } +} diff --git a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/snapshot/v1beta1/doc.go b/vendor/kubevirt.io/client-go/kubevirt/typed/export/v1beta1/doc.go similarity index 94% rename from vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/snapshot/v1beta1/doc.go rename to vendor/kubevirt.io/client-go/kubevirt/typed/export/v1beta1/doc.go index dc66844fc..ba4fa91b1 100644 --- a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/snapshot/v1beta1/doc.go +++ b/vendor/kubevirt.io/client-go/kubevirt/typed/export/v1beta1/doc.go @@ -1,5 +1,5 @@ /* -Copyright The KubeVirt Authors. +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. @@ -12,6 +12,8 @@ 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 The KubeVirt Authors. */ // Code generated by client-gen. DO NOT EDIT. diff --git a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/export/v1beta1/export_client.go b/vendor/kubevirt.io/client-go/kubevirt/typed/export/v1beta1/export_client.go similarity index 69% rename from vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/export/v1beta1/export_client.go rename to vendor/kubevirt.io/client-go/kubevirt/typed/export/v1beta1/export_client.go index 80d2c2ca5..d908ee878 100644 --- a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/export/v1beta1/export_client.go +++ b/vendor/kubevirt.io/client-go/kubevirt/typed/export/v1beta1/export_client.go @@ -1,5 +1,5 @@ /* -Copyright The KubeVirt Authors. +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. @@ -12,6 +12,8 @@ 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 The KubeVirt Authors. */ // Code generated by client-gen. DO NOT EDIT. @@ -19,9 +21,11 @@ limitations under the License. package v1beta1 import ( + http "net/http" + rest "k8s.io/client-go/rest" - v1beta1 "kubevirt.io/api/export/v1beta1" - "kubevirt.io/client-go/generated/kubevirt/clientset/versioned/scheme" + exportv1beta1 "kubevirt.io/api/export/v1beta1" + scheme "kubevirt.io/client-go/kubevirt/scheme" ) type ExportV1beta1Interface interface { @@ -39,12 +43,28 @@ func (c *ExportV1beta1Client) VirtualMachineExports(namespace string) VirtualMac } // NewForConfig creates a new ExportV1beta1Client for the given config. +// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), +// where httpClient was generated with rest.HTTPClientFor(c). func NewForConfig(c *rest.Config) (*ExportV1beta1Client, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err } - client, err := rest.RESTClientFor(&config) + httpClient, err := rest.HTTPClientFor(&config) + if err != nil { + return nil, err + } + return NewForConfigAndClient(&config, httpClient) +} + +// NewForConfigAndClient creates a new ExportV1beta1Client for the given config and http client. +// Note the http client provided takes precedence over the configured transport values. +func NewForConfigAndClient(c *rest.Config, h *http.Client) (*ExportV1beta1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + client, err := rest.RESTClientForConfigAndClient(&config, h) if err != nil { return nil, err } @@ -67,10 +87,10 @@ func New(c rest.Interface) *ExportV1beta1Client { } func setConfigDefaults(config *rest.Config) error { - gv := v1beta1.SchemeGroupVersion + gv := exportv1beta1.SchemeGroupVersion config.GroupVersion = &gv config.APIPath = "/apis" - config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() + config.NegotiatedSerializer = rest.CodecFactoryForGeneratedClient(scheme.Scheme, scheme.Codecs).WithoutConversion() if config.UserAgent == "" { config.UserAgent = rest.DefaultKubernetesUserAgent() diff --git a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/export/v1beta1/generated_expansion.go b/vendor/kubevirt.io/client-go/kubevirt/typed/export/v1beta1/generated_expansion.go similarity index 94% rename from vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/export/v1beta1/generated_expansion.go rename to vendor/kubevirt.io/client-go/kubevirt/typed/export/v1beta1/generated_expansion.go index 40af39b84..3a67ab2de 100644 --- a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/export/v1beta1/generated_expansion.go +++ b/vendor/kubevirt.io/client-go/kubevirt/typed/export/v1beta1/generated_expansion.go @@ -1,5 +1,5 @@ /* -Copyright The KubeVirt Authors. +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. @@ -12,6 +12,8 @@ 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 The KubeVirt Authors. */ // Code generated by client-gen. DO NOT EDIT. diff --git a/vendor/kubevirt.io/client-go/kubevirt/typed/export/v1beta1/virtualmachineexport.go b/vendor/kubevirt.io/client-go/kubevirt/typed/export/v1beta1/virtualmachineexport.go new file mode 100644 index 000000000..f25f1d4a1 --- /dev/null +++ b/vendor/kubevirt.io/client-go/kubevirt/typed/export/v1beta1/virtualmachineexport.go @@ -0,0 +1,72 @@ +/* +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 The KubeVirt Authors. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1beta1 + +import ( + context "context" + + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + gentype "k8s.io/client-go/gentype" + exportv1beta1 "kubevirt.io/api/export/v1beta1" + scheme "kubevirt.io/client-go/kubevirt/scheme" +) + +// VirtualMachineExportsGetter has a method to return a VirtualMachineExportInterface. +// A group's client should implement this interface. +type VirtualMachineExportsGetter interface { + VirtualMachineExports(namespace string) VirtualMachineExportInterface +} + +// VirtualMachineExportInterface has methods to work with VirtualMachineExport resources. +type VirtualMachineExportInterface interface { + Create(ctx context.Context, virtualMachineExport *exportv1beta1.VirtualMachineExport, opts v1.CreateOptions) (*exportv1beta1.VirtualMachineExport, error) + Update(ctx context.Context, virtualMachineExport *exportv1beta1.VirtualMachineExport, opts v1.UpdateOptions) (*exportv1beta1.VirtualMachineExport, error) + // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). + UpdateStatus(ctx context.Context, virtualMachineExport *exportv1beta1.VirtualMachineExport, opts v1.UpdateOptions) (*exportv1beta1.VirtualMachineExport, 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) (*exportv1beta1.VirtualMachineExport, error) + List(ctx context.Context, opts v1.ListOptions) (*exportv1beta1.VirtualMachineExportList, 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 *exportv1beta1.VirtualMachineExport, err error) + VirtualMachineExportExpansion +} + +// virtualMachineExports implements VirtualMachineExportInterface +type virtualMachineExports struct { + *gentype.ClientWithList[*exportv1beta1.VirtualMachineExport, *exportv1beta1.VirtualMachineExportList] +} + +// newVirtualMachineExports returns a VirtualMachineExports +func newVirtualMachineExports(c *ExportV1beta1Client, namespace string) *virtualMachineExports { + return &virtualMachineExports{ + gentype.NewClientWithList[*exportv1beta1.VirtualMachineExport, *exportv1beta1.VirtualMachineExportList]( + "virtualmachineexports", + c.RESTClient(), + scheme.ParameterCodec, + namespace, + func() *exportv1beta1.VirtualMachineExport { return &exportv1beta1.VirtualMachineExport{} }, + func() *exportv1beta1.VirtualMachineExportList { return &exportv1beta1.VirtualMachineExportList{} }, + ), + } +} diff --git a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/export/v1beta1/doc.go b/vendor/kubevirt.io/client-go/kubevirt/typed/instancetype/v1beta1/doc.go similarity index 94% rename from vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/export/v1beta1/doc.go rename to vendor/kubevirt.io/client-go/kubevirt/typed/instancetype/v1beta1/doc.go index dc66844fc..ba4fa91b1 100644 --- a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/export/v1beta1/doc.go +++ b/vendor/kubevirt.io/client-go/kubevirt/typed/instancetype/v1beta1/doc.go @@ -1,5 +1,5 @@ /* -Copyright The KubeVirt Authors. +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. @@ -12,6 +12,8 @@ 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 The KubeVirt Authors. */ // Code generated by client-gen. DO NOT EDIT. diff --git a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/instancetype/v1beta1/generated_expansion.go b/vendor/kubevirt.io/client-go/kubevirt/typed/instancetype/v1beta1/generated_expansion.go similarity index 95% rename from vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/instancetype/v1beta1/generated_expansion.go rename to vendor/kubevirt.io/client-go/kubevirt/typed/instancetype/v1beta1/generated_expansion.go index deb399416..614b35473 100644 --- a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/instancetype/v1beta1/generated_expansion.go +++ b/vendor/kubevirt.io/client-go/kubevirt/typed/instancetype/v1beta1/generated_expansion.go @@ -1,5 +1,5 @@ /* -Copyright The KubeVirt Authors. +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. @@ -12,6 +12,8 @@ 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 The KubeVirt Authors. */ // Code generated by client-gen. DO NOT EDIT. diff --git a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/instancetype/v1beta1/instancetype_client.go b/vendor/kubevirt.io/client-go/kubevirt/typed/instancetype/v1beta1/instancetype_client.go similarity index 74% rename from vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/instancetype/v1beta1/instancetype_client.go rename to vendor/kubevirt.io/client-go/kubevirt/typed/instancetype/v1beta1/instancetype_client.go index 9cf69926d..c27eb536f 100644 --- a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/instancetype/v1beta1/instancetype_client.go +++ b/vendor/kubevirt.io/client-go/kubevirt/typed/instancetype/v1beta1/instancetype_client.go @@ -1,5 +1,5 @@ /* -Copyright The KubeVirt Authors. +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. @@ -12,6 +12,8 @@ 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 The KubeVirt Authors. */ // Code generated by client-gen. DO NOT EDIT. @@ -19,9 +21,11 @@ limitations under the License. package v1beta1 import ( + http "net/http" + rest "k8s.io/client-go/rest" - v1beta1 "kubevirt.io/api/instancetype/v1beta1" - "kubevirt.io/client-go/generated/kubevirt/clientset/versioned/scheme" + instancetypev1beta1 "kubevirt.io/api/instancetype/v1beta1" + scheme "kubevirt.io/client-go/kubevirt/scheme" ) type InstancetypeV1beta1Interface interface { @@ -54,12 +58,28 @@ func (c *InstancetypeV1beta1Client) VirtualMachinePreferences(namespace string) } // NewForConfig creates a new InstancetypeV1beta1Client for the given config. +// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), +// where httpClient was generated with rest.HTTPClientFor(c). func NewForConfig(c *rest.Config) (*InstancetypeV1beta1Client, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err } - client, err := rest.RESTClientFor(&config) + httpClient, err := rest.HTTPClientFor(&config) + if err != nil { + return nil, err + } + return NewForConfigAndClient(&config, httpClient) +} + +// NewForConfigAndClient creates a new InstancetypeV1beta1Client for the given config and http client. +// Note the http client provided takes precedence over the configured transport values. +func NewForConfigAndClient(c *rest.Config, h *http.Client) (*InstancetypeV1beta1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + client, err := rest.RESTClientForConfigAndClient(&config, h) if err != nil { return nil, err } @@ -82,10 +102,10 @@ func New(c rest.Interface) *InstancetypeV1beta1Client { } func setConfigDefaults(config *rest.Config) error { - gv := v1beta1.SchemeGroupVersion + gv := instancetypev1beta1.SchemeGroupVersion config.GroupVersion = &gv config.APIPath = "/apis" - config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() + config.NegotiatedSerializer = rest.CodecFactoryForGeneratedClient(scheme.Scheme, scheme.Codecs).WithoutConversion() if config.UserAgent == "" { config.UserAgent = rest.DefaultKubernetesUserAgent() diff --git a/vendor/kubevirt.io/client-go/kubevirt/typed/instancetype/v1beta1/virtualmachineclusterinstancetype.go b/vendor/kubevirt.io/client-go/kubevirt/typed/instancetype/v1beta1/virtualmachineclusterinstancetype.go new file mode 100644 index 000000000..6688a2c3d --- /dev/null +++ b/vendor/kubevirt.io/client-go/kubevirt/typed/instancetype/v1beta1/virtualmachineclusterinstancetype.go @@ -0,0 +1,74 @@ +/* +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 The KubeVirt Authors. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1beta1 + +import ( + context "context" + + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + gentype "k8s.io/client-go/gentype" + instancetypev1beta1 "kubevirt.io/api/instancetype/v1beta1" + scheme "kubevirt.io/client-go/kubevirt/scheme" +) + +// VirtualMachineClusterInstancetypesGetter has a method to return a VirtualMachineClusterInstancetypeInterface. +// A group's client should implement this interface. +type VirtualMachineClusterInstancetypesGetter interface { + VirtualMachineClusterInstancetypes() VirtualMachineClusterInstancetypeInterface +} + +// VirtualMachineClusterInstancetypeInterface has methods to work with VirtualMachineClusterInstancetype resources. +type VirtualMachineClusterInstancetypeInterface interface { + Create(ctx context.Context, virtualMachineClusterInstancetype *instancetypev1beta1.VirtualMachineClusterInstancetype, opts v1.CreateOptions) (*instancetypev1beta1.VirtualMachineClusterInstancetype, error) + Update(ctx context.Context, virtualMachineClusterInstancetype *instancetypev1beta1.VirtualMachineClusterInstancetype, opts v1.UpdateOptions) (*instancetypev1beta1.VirtualMachineClusterInstancetype, 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) (*instancetypev1beta1.VirtualMachineClusterInstancetype, error) + List(ctx context.Context, opts v1.ListOptions) (*instancetypev1beta1.VirtualMachineClusterInstancetypeList, 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 *instancetypev1beta1.VirtualMachineClusterInstancetype, err error) + VirtualMachineClusterInstancetypeExpansion +} + +// virtualMachineClusterInstancetypes implements VirtualMachineClusterInstancetypeInterface +type virtualMachineClusterInstancetypes struct { + *gentype.ClientWithList[*instancetypev1beta1.VirtualMachineClusterInstancetype, *instancetypev1beta1.VirtualMachineClusterInstancetypeList] +} + +// newVirtualMachineClusterInstancetypes returns a VirtualMachineClusterInstancetypes +func newVirtualMachineClusterInstancetypes(c *InstancetypeV1beta1Client) *virtualMachineClusterInstancetypes { + return &virtualMachineClusterInstancetypes{ + gentype.NewClientWithList[*instancetypev1beta1.VirtualMachineClusterInstancetype, *instancetypev1beta1.VirtualMachineClusterInstancetypeList]( + "virtualmachineclusterinstancetypes", + c.RESTClient(), + scheme.ParameterCodec, + "", + func() *instancetypev1beta1.VirtualMachineClusterInstancetype { + return &instancetypev1beta1.VirtualMachineClusterInstancetype{} + }, + func() *instancetypev1beta1.VirtualMachineClusterInstancetypeList { + return &instancetypev1beta1.VirtualMachineClusterInstancetypeList{} + }, + ), + } +} diff --git a/vendor/kubevirt.io/client-go/kubevirt/typed/instancetype/v1beta1/virtualmachineclusterpreference.go b/vendor/kubevirt.io/client-go/kubevirt/typed/instancetype/v1beta1/virtualmachineclusterpreference.go new file mode 100644 index 000000000..20eb9dd46 --- /dev/null +++ b/vendor/kubevirt.io/client-go/kubevirt/typed/instancetype/v1beta1/virtualmachineclusterpreference.go @@ -0,0 +1,74 @@ +/* +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 The KubeVirt Authors. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1beta1 + +import ( + context "context" + + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + gentype "k8s.io/client-go/gentype" + instancetypev1beta1 "kubevirt.io/api/instancetype/v1beta1" + scheme "kubevirt.io/client-go/kubevirt/scheme" +) + +// VirtualMachineClusterPreferencesGetter has a method to return a VirtualMachineClusterPreferenceInterface. +// A group's client should implement this interface. +type VirtualMachineClusterPreferencesGetter interface { + VirtualMachineClusterPreferences() VirtualMachineClusterPreferenceInterface +} + +// VirtualMachineClusterPreferenceInterface has methods to work with VirtualMachineClusterPreference resources. +type VirtualMachineClusterPreferenceInterface interface { + Create(ctx context.Context, virtualMachineClusterPreference *instancetypev1beta1.VirtualMachineClusterPreference, opts v1.CreateOptions) (*instancetypev1beta1.VirtualMachineClusterPreference, error) + Update(ctx context.Context, virtualMachineClusterPreference *instancetypev1beta1.VirtualMachineClusterPreference, opts v1.UpdateOptions) (*instancetypev1beta1.VirtualMachineClusterPreference, 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) (*instancetypev1beta1.VirtualMachineClusterPreference, error) + List(ctx context.Context, opts v1.ListOptions) (*instancetypev1beta1.VirtualMachineClusterPreferenceList, 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 *instancetypev1beta1.VirtualMachineClusterPreference, err error) + VirtualMachineClusterPreferenceExpansion +} + +// virtualMachineClusterPreferences implements VirtualMachineClusterPreferenceInterface +type virtualMachineClusterPreferences struct { + *gentype.ClientWithList[*instancetypev1beta1.VirtualMachineClusterPreference, *instancetypev1beta1.VirtualMachineClusterPreferenceList] +} + +// newVirtualMachineClusterPreferences returns a VirtualMachineClusterPreferences +func newVirtualMachineClusterPreferences(c *InstancetypeV1beta1Client) *virtualMachineClusterPreferences { + return &virtualMachineClusterPreferences{ + gentype.NewClientWithList[*instancetypev1beta1.VirtualMachineClusterPreference, *instancetypev1beta1.VirtualMachineClusterPreferenceList]( + "virtualmachineclusterpreferences", + c.RESTClient(), + scheme.ParameterCodec, + "", + func() *instancetypev1beta1.VirtualMachineClusterPreference { + return &instancetypev1beta1.VirtualMachineClusterPreference{} + }, + func() *instancetypev1beta1.VirtualMachineClusterPreferenceList { + return &instancetypev1beta1.VirtualMachineClusterPreferenceList{} + }, + ), + } +} diff --git a/vendor/kubevirt.io/client-go/kubevirt/typed/instancetype/v1beta1/virtualmachineinstancetype.go b/vendor/kubevirt.io/client-go/kubevirt/typed/instancetype/v1beta1/virtualmachineinstancetype.go new file mode 100644 index 000000000..e7b4fded4 --- /dev/null +++ b/vendor/kubevirt.io/client-go/kubevirt/typed/instancetype/v1beta1/virtualmachineinstancetype.go @@ -0,0 +1,74 @@ +/* +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 The KubeVirt Authors. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1beta1 + +import ( + context "context" + + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + gentype "k8s.io/client-go/gentype" + instancetypev1beta1 "kubevirt.io/api/instancetype/v1beta1" + scheme "kubevirt.io/client-go/kubevirt/scheme" +) + +// VirtualMachineInstancetypesGetter has a method to return a VirtualMachineInstancetypeInterface. +// A group's client should implement this interface. +type VirtualMachineInstancetypesGetter interface { + VirtualMachineInstancetypes(namespace string) VirtualMachineInstancetypeInterface +} + +// VirtualMachineInstancetypeInterface has methods to work with VirtualMachineInstancetype resources. +type VirtualMachineInstancetypeInterface interface { + Create(ctx context.Context, virtualMachineInstancetype *instancetypev1beta1.VirtualMachineInstancetype, opts v1.CreateOptions) (*instancetypev1beta1.VirtualMachineInstancetype, error) + Update(ctx context.Context, virtualMachineInstancetype *instancetypev1beta1.VirtualMachineInstancetype, opts v1.UpdateOptions) (*instancetypev1beta1.VirtualMachineInstancetype, 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) (*instancetypev1beta1.VirtualMachineInstancetype, error) + List(ctx context.Context, opts v1.ListOptions) (*instancetypev1beta1.VirtualMachineInstancetypeList, 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 *instancetypev1beta1.VirtualMachineInstancetype, err error) + VirtualMachineInstancetypeExpansion +} + +// virtualMachineInstancetypes implements VirtualMachineInstancetypeInterface +type virtualMachineInstancetypes struct { + *gentype.ClientWithList[*instancetypev1beta1.VirtualMachineInstancetype, *instancetypev1beta1.VirtualMachineInstancetypeList] +} + +// newVirtualMachineInstancetypes returns a VirtualMachineInstancetypes +func newVirtualMachineInstancetypes(c *InstancetypeV1beta1Client, namespace string) *virtualMachineInstancetypes { + return &virtualMachineInstancetypes{ + gentype.NewClientWithList[*instancetypev1beta1.VirtualMachineInstancetype, *instancetypev1beta1.VirtualMachineInstancetypeList]( + "virtualmachineinstancetypes", + c.RESTClient(), + scheme.ParameterCodec, + namespace, + func() *instancetypev1beta1.VirtualMachineInstancetype { + return &instancetypev1beta1.VirtualMachineInstancetype{} + }, + func() *instancetypev1beta1.VirtualMachineInstancetypeList { + return &instancetypev1beta1.VirtualMachineInstancetypeList{} + }, + ), + } +} diff --git a/vendor/kubevirt.io/client-go/kubevirt/typed/instancetype/v1beta1/virtualmachinepreference.go b/vendor/kubevirt.io/client-go/kubevirt/typed/instancetype/v1beta1/virtualmachinepreference.go new file mode 100644 index 000000000..33a5254d2 --- /dev/null +++ b/vendor/kubevirt.io/client-go/kubevirt/typed/instancetype/v1beta1/virtualmachinepreference.go @@ -0,0 +1,74 @@ +/* +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 The KubeVirt Authors. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1beta1 + +import ( + context "context" + + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + gentype "k8s.io/client-go/gentype" + instancetypev1beta1 "kubevirt.io/api/instancetype/v1beta1" + scheme "kubevirt.io/client-go/kubevirt/scheme" +) + +// VirtualMachinePreferencesGetter has a method to return a VirtualMachinePreferenceInterface. +// A group's client should implement this interface. +type VirtualMachinePreferencesGetter interface { + VirtualMachinePreferences(namespace string) VirtualMachinePreferenceInterface +} + +// VirtualMachinePreferenceInterface has methods to work with VirtualMachinePreference resources. +type VirtualMachinePreferenceInterface interface { + Create(ctx context.Context, virtualMachinePreference *instancetypev1beta1.VirtualMachinePreference, opts v1.CreateOptions) (*instancetypev1beta1.VirtualMachinePreference, error) + Update(ctx context.Context, virtualMachinePreference *instancetypev1beta1.VirtualMachinePreference, opts v1.UpdateOptions) (*instancetypev1beta1.VirtualMachinePreference, 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) (*instancetypev1beta1.VirtualMachinePreference, error) + List(ctx context.Context, opts v1.ListOptions) (*instancetypev1beta1.VirtualMachinePreferenceList, 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 *instancetypev1beta1.VirtualMachinePreference, err error) + VirtualMachinePreferenceExpansion +} + +// virtualMachinePreferences implements VirtualMachinePreferenceInterface +type virtualMachinePreferences struct { + *gentype.ClientWithList[*instancetypev1beta1.VirtualMachinePreference, *instancetypev1beta1.VirtualMachinePreferenceList] +} + +// newVirtualMachinePreferences returns a VirtualMachinePreferences +func newVirtualMachinePreferences(c *InstancetypeV1beta1Client, namespace string) *virtualMachinePreferences { + return &virtualMachinePreferences{ + gentype.NewClientWithList[*instancetypev1beta1.VirtualMachinePreference, *instancetypev1beta1.VirtualMachinePreferenceList]( + "virtualmachinepreferences", + c.RESTClient(), + scheme.ParameterCodec, + namespace, + func() *instancetypev1beta1.VirtualMachinePreference { + return &instancetypev1beta1.VirtualMachinePreference{} + }, + func() *instancetypev1beta1.VirtualMachinePreferenceList { + return &instancetypev1beta1.VirtualMachinePreferenceList{} + }, + ), + } +} diff --git a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/migrations/v1alpha1/doc.go b/vendor/kubevirt.io/client-go/kubevirt/typed/migrations/v1alpha1/doc.go similarity index 94% rename from vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/migrations/v1alpha1/doc.go rename to vendor/kubevirt.io/client-go/kubevirt/typed/migrations/v1alpha1/doc.go index f95601beb..d72972cf6 100644 --- a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/migrations/v1alpha1/doc.go +++ b/vendor/kubevirt.io/client-go/kubevirt/typed/migrations/v1alpha1/doc.go @@ -1,5 +1,5 @@ /* -Copyright The KubeVirt Authors. +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. @@ -12,6 +12,8 @@ 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 The KubeVirt Authors. */ // Code generated by client-gen. DO NOT EDIT. diff --git a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/migrations/v1alpha1/generated_expansion.go b/vendor/kubevirt.io/client-go/kubevirt/typed/migrations/v1alpha1/generated_expansion.go similarity index 93% rename from vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/migrations/v1alpha1/generated_expansion.go rename to vendor/kubevirt.io/client-go/kubevirt/typed/migrations/v1alpha1/generated_expansion.go index 7585ab3ac..aec50c964 100644 --- a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/migrations/v1alpha1/generated_expansion.go +++ b/vendor/kubevirt.io/client-go/kubevirt/typed/migrations/v1alpha1/generated_expansion.go @@ -1,5 +1,5 @@ /* -Copyright The KubeVirt Authors. +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. @@ -12,6 +12,8 @@ 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 The KubeVirt Authors. */ // Code generated by client-gen. DO NOT EDIT. diff --git a/vendor/kubevirt.io/client-go/kubevirt/typed/migrations/v1alpha1/migrationpolicy.go b/vendor/kubevirt.io/client-go/kubevirt/typed/migrations/v1alpha1/migrationpolicy.go new file mode 100644 index 000000000..a36ab5a10 --- /dev/null +++ b/vendor/kubevirt.io/client-go/kubevirt/typed/migrations/v1alpha1/migrationpolicy.go @@ -0,0 +1,72 @@ +/* +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 The KubeVirt Authors. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + context "context" + + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + gentype "k8s.io/client-go/gentype" + migrationsv1alpha1 "kubevirt.io/api/migrations/v1alpha1" + scheme "kubevirt.io/client-go/kubevirt/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 *migrationsv1alpha1.MigrationPolicy, opts v1.CreateOptions) (*migrationsv1alpha1.MigrationPolicy, error) + Update(ctx context.Context, migrationPolicy *migrationsv1alpha1.MigrationPolicy, opts v1.UpdateOptions) (*migrationsv1alpha1.MigrationPolicy, error) + // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). + UpdateStatus(ctx context.Context, migrationPolicy *migrationsv1alpha1.MigrationPolicy, opts v1.UpdateOptions) (*migrationsv1alpha1.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) (*migrationsv1alpha1.MigrationPolicy, error) + List(ctx context.Context, opts v1.ListOptions) (*migrationsv1alpha1.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 *migrationsv1alpha1.MigrationPolicy, err error) + MigrationPolicyExpansion +} + +// migrationPolicies implements MigrationPolicyInterface +type migrationPolicies struct { + *gentype.ClientWithList[*migrationsv1alpha1.MigrationPolicy, *migrationsv1alpha1.MigrationPolicyList] +} + +// newMigrationPolicies returns a MigrationPolicies +func newMigrationPolicies(c *MigrationsV1alpha1Client) *migrationPolicies { + return &migrationPolicies{ + gentype.NewClientWithList[*migrationsv1alpha1.MigrationPolicy, *migrationsv1alpha1.MigrationPolicyList]( + "migrationpolicies", + c.RESTClient(), + scheme.ParameterCodec, + "", + func() *migrationsv1alpha1.MigrationPolicy { return &migrationsv1alpha1.MigrationPolicy{} }, + func() *migrationsv1alpha1.MigrationPolicyList { return &migrationsv1alpha1.MigrationPolicyList{} }, + ), + } +} diff --git a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/migrations/v1alpha1/migrations_client.go b/vendor/kubevirt.io/client-go/kubevirt/typed/migrations/v1alpha1/migrations_client.go similarity index 68% rename from vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/migrations/v1alpha1/migrations_client.go rename to vendor/kubevirt.io/client-go/kubevirt/typed/migrations/v1alpha1/migrations_client.go index 935ea8880..af9a3aed0 100644 --- a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/migrations/v1alpha1/migrations_client.go +++ b/vendor/kubevirt.io/client-go/kubevirt/typed/migrations/v1alpha1/migrations_client.go @@ -1,5 +1,5 @@ /* -Copyright The KubeVirt Authors. +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. @@ -12,6 +12,8 @@ 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 The KubeVirt Authors. */ // Code generated by client-gen. DO NOT EDIT. @@ -19,9 +21,11 @@ limitations under the License. package v1alpha1 import ( + http "net/http" + rest "k8s.io/client-go/rest" - v1alpha1 "kubevirt.io/api/migrations/v1alpha1" - "kubevirt.io/client-go/generated/kubevirt/clientset/versioned/scheme" + migrationsv1alpha1 "kubevirt.io/api/migrations/v1alpha1" + scheme "kubevirt.io/client-go/kubevirt/scheme" ) type MigrationsV1alpha1Interface interface { @@ -39,12 +43,28 @@ func (c *MigrationsV1alpha1Client) MigrationPolicies() MigrationPolicyInterface } // NewForConfig creates a new MigrationsV1alpha1Client for the given config. +// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), +// where httpClient was generated with rest.HTTPClientFor(c). func NewForConfig(c *rest.Config) (*MigrationsV1alpha1Client, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err } - client, err := rest.RESTClientFor(&config) + httpClient, err := rest.HTTPClientFor(&config) + if err != nil { + return nil, err + } + return NewForConfigAndClient(&config, httpClient) +} + +// NewForConfigAndClient creates a new MigrationsV1alpha1Client for the given config and http client. +// Note the http client provided takes precedence over the configured transport values. +func NewForConfigAndClient(c *rest.Config, h *http.Client) (*MigrationsV1alpha1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + client, err := rest.RESTClientForConfigAndClient(&config, h) if err != nil { return nil, err } @@ -67,10 +87,10 @@ func New(c rest.Interface) *MigrationsV1alpha1Client { } func setConfigDefaults(config *rest.Config) error { - gv := v1alpha1.SchemeGroupVersion + gv := migrationsv1alpha1.SchemeGroupVersion config.GroupVersion = &gv config.APIPath = "/apis" - config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() + config.NegotiatedSerializer = rest.CodecFactoryForGeneratedClient(scheme.Scheme, scheme.Codecs).WithoutConversion() if config.UserAgent == "" { config.UserAgent = rest.DefaultKubernetesUserAgent() diff --git a/vendor/kubevirt.io/client-go/kubevirt/typed/pool/v1alpha1/doc.go b/vendor/kubevirt.io/client-go/kubevirt/typed/pool/v1alpha1/doc.go new file mode 100644 index 000000000..d72972cf6 --- /dev/null +++ b/vendor/kubevirt.io/client-go/kubevirt/typed/pool/v1alpha1/doc.go @@ -0,0 +1,22 @@ +/* +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 The KubeVirt Authors. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +// This package has the automatically generated typed clients. +package v1alpha1 diff --git a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/pool/v1alpha1/generated_expansion.go b/vendor/kubevirt.io/client-go/kubevirt/typed/pool/v1alpha1/generated_expansion.go similarity index 94% rename from vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/pool/v1alpha1/generated_expansion.go rename to vendor/kubevirt.io/client-go/kubevirt/typed/pool/v1alpha1/generated_expansion.go index 6e353eb02..5455cd0dd 100644 --- a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/pool/v1alpha1/generated_expansion.go +++ b/vendor/kubevirt.io/client-go/kubevirt/typed/pool/v1alpha1/generated_expansion.go @@ -1,5 +1,5 @@ /* -Copyright The KubeVirt Authors. +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. @@ -12,6 +12,8 @@ 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 The KubeVirt Authors. */ // Code generated by client-gen. DO NOT EDIT. diff --git a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/pool/v1alpha1/pool_client.go b/vendor/kubevirt.io/client-go/kubevirt/typed/pool/v1alpha1/pool_client.go similarity index 68% rename from vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/pool/v1alpha1/pool_client.go rename to vendor/kubevirt.io/client-go/kubevirt/typed/pool/v1alpha1/pool_client.go index 12c16dcbd..8bdf84ec9 100644 --- a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/pool/v1alpha1/pool_client.go +++ b/vendor/kubevirt.io/client-go/kubevirt/typed/pool/v1alpha1/pool_client.go @@ -1,5 +1,5 @@ /* -Copyright The KubeVirt Authors. +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. @@ -12,6 +12,8 @@ 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 The KubeVirt Authors. */ // Code generated by client-gen. DO NOT EDIT. @@ -19,9 +21,11 @@ limitations under the License. package v1alpha1 import ( + http "net/http" + rest "k8s.io/client-go/rest" - v1alpha1 "kubevirt.io/api/pool/v1alpha1" - "kubevirt.io/client-go/generated/kubevirt/clientset/versioned/scheme" + poolv1alpha1 "kubevirt.io/api/pool/v1alpha1" + scheme "kubevirt.io/client-go/kubevirt/scheme" ) type PoolV1alpha1Interface interface { @@ -39,12 +43,28 @@ func (c *PoolV1alpha1Client) VirtualMachinePools(namespace string) VirtualMachin } // NewForConfig creates a new PoolV1alpha1Client for the given config. +// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), +// where httpClient was generated with rest.HTTPClientFor(c). func NewForConfig(c *rest.Config) (*PoolV1alpha1Client, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err } - client, err := rest.RESTClientFor(&config) + httpClient, err := rest.HTTPClientFor(&config) + if err != nil { + return nil, err + } + return NewForConfigAndClient(&config, httpClient) +} + +// NewForConfigAndClient creates a new PoolV1alpha1Client for the given config and http client. +// Note the http client provided takes precedence over the configured transport values. +func NewForConfigAndClient(c *rest.Config, h *http.Client) (*PoolV1alpha1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + client, err := rest.RESTClientForConfigAndClient(&config, h) if err != nil { return nil, err } @@ -67,10 +87,10 @@ func New(c rest.Interface) *PoolV1alpha1Client { } func setConfigDefaults(config *rest.Config) error { - gv := v1alpha1.SchemeGroupVersion + gv := poolv1alpha1.SchemeGroupVersion config.GroupVersion = &gv config.APIPath = "/apis" - config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() + config.NegotiatedSerializer = rest.CodecFactoryForGeneratedClient(scheme.Scheme, scheme.Codecs).WithoutConversion() if config.UserAgent == "" { config.UserAgent = rest.DefaultKubernetesUserAgent() diff --git a/vendor/kubevirt.io/client-go/kubevirt/typed/pool/v1alpha1/virtualmachinepool.go b/vendor/kubevirt.io/client-go/kubevirt/typed/pool/v1alpha1/virtualmachinepool.go new file mode 100644 index 000000000..578d3f445 --- /dev/null +++ b/vendor/kubevirt.io/client-go/kubevirt/typed/pool/v1alpha1/virtualmachinepool.go @@ -0,0 +1,72 @@ +/* +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 The KubeVirt Authors. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + context "context" + + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + gentype "k8s.io/client-go/gentype" + poolv1alpha1 "kubevirt.io/api/pool/v1alpha1" + scheme "kubevirt.io/client-go/kubevirt/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 *poolv1alpha1.VirtualMachinePool, opts v1.CreateOptions) (*poolv1alpha1.VirtualMachinePool, error) + Update(ctx context.Context, virtualMachinePool *poolv1alpha1.VirtualMachinePool, opts v1.UpdateOptions) (*poolv1alpha1.VirtualMachinePool, error) + // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). + UpdateStatus(ctx context.Context, virtualMachinePool *poolv1alpha1.VirtualMachinePool, opts v1.UpdateOptions) (*poolv1alpha1.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) (*poolv1alpha1.VirtualMachinePool, error) + List(ctx context.Context, opts v1.ListOptions) (*poolv1alpha1.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 *poolv1alpha1.VirtualMachinePool, err error) + VirtualMachinePoolExpansion +} + +// virtualMachinePools implements VirtualMachinePoolInterface +type virtualMachinePools struct { + *gentype.ClientWithList[*poolv1alpha1.VirtualMachinePool, *poolv1alpha1.VirtualMachinePoolList] +} + +// newVirtualMachinePools returns a VirtualMachinePools +func newVirtualMachinePools(c *PoolV1alpha1Client, namespace string) *virtualMachinePools { + return &virtualMachinePools{ + gentype.NewClientWithList[*poolv1alpha1.VirtualMachinePool, *poolv1alpha1.VirtualMachinePoolList]( + "virtualmachinepools", + c.RESTClient(), + scheme.ParameterCodec, + namespace, + func() *poolv1alpha1.VirtualMachinePool { return &poolv1alpha1.VirtualMachinePool{} }, + func() *poolv1alpha1.VirtualMachinePoolList { return &poolv1alpha1.VirtualMachinePoolList{} }, + ), + } +} diff --git a/vendor/kubevirt.io/client-go/kubevirt/typed/pool/v1beta1/doc.go b/vendor/kubevirt.io/client-go/kubevirt/typed/pool/v1beta1/doc.go new file mode 100644 index 000000000..ba4fa91b1 --- /dev/null +++ b/vendor/kubevirt.io/client-go/kubevirt/typed/pool/v1beta1/doc.go @@ -0,0 +1,22 @@ +/* +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 The KubeVirt Authors. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +// This package has the automatically generated typed clients. +package v1beta1 diff --git a/vendor/kubevirt.io/client-go/kubevirt/typed/pool/v1beta1/generated_expansion.go b/vendor/kubevirt.io/client-go/kubevirt/typed/pool/v1beta1/generated_expansion.go new file mode 100644 index 000000000..0d629afda --- /dev/null +++ b/vendor/kubevirt.io/client-go/kubevirt/typed/pool/v1beta1/generated_expansion.go @@ -0,0 +1,23 @@ +/* +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 The KubeVirt Authors. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1beta1 + +type VirtualMachinePoolExpansion interface{} diff --git a/vendor/kubevirt.io/client-go/kubevirt/typed/pool/v1beta1/pool_client.go b/vendor/kubevirt.io/client-go/kubevirt/typed/pool/v1beta1/pool_client.go new file mode 100644 index 000000000..66244a04a --- /dev/null +++ b/vendor/kubevirt.io/client-go/kubevirt/typed/pool/v1beta1/pool_client.go @@ -0,0 +1,109 @@ +/* +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 The KubeVirt Authors. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1beta1 + +import ( + http "net/http" + + rest "k8s.io/client-go/rest" + poolv1beta1 "kubevirt.io/api/pool/v1beta1" + scheme "kubevirt.io/client-go/kubevirt/scheme" +) + +type PoolV1beta1Interface interface { + RESTClient() rest.Interface + VirtualMachinePoolsGetter +} + +// PoolV1beta1Client is used to interact with features provided by the pool.kubevirt.io group. +type PoolV1beta1Client struct { + restClient rest.Interface +} + +func (c *PoolV1beta1Client) VirtualMachinePools(namespace string) VirtualMachinePoolInterface { + return newVirtualMachinePools(c, namespace) +} + +// NewForConfig creates a new PoolV1beta1Client for the given config. +// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), +// where httpClient was generated with rest.HTTPClientFor(c). +func NewForConfig(c *rest.Config) (*PoolV1beta1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + httpClient, err := rest.HTTPClientFor(&config) + if err != nil { + return nil, err + } + return NewForConfigAndClient(&config, httpClient) +} + +// NewForConfigAndClient creates a new PoolV1beta1Client for the given config and http client. +// Note the http client provided takes precedence over the configured transport values. +func NewForConfigAndClient(c *rest.Config, h *http.Client) (*PoolV1beta1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + client, err := rest.RESTClientForConfigAndClient(&config, h) + if err != nil { + return nil, err + } + return &PoolV1beta1Client{client}, nil +} + +// NewForConfigOrDie creates a new PoolV1beta1Client for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *PoolV1beta1Client { + client, err := NewForConfig(c) + if err != nil { + panic(err) + } + return client +} + +// New creates a new PoolV1beta1Client for the given RESTClient. +func New(c rest.Interface) *PoolV1beta1Client { + return &PoolV1beta1Client{c} +} + +func setConfigDefaults(config *rest.Config) error { + gv := poolv1beta1.SchemeGroupVersion + config.GroupVersion = &gv + config.APIPath = "/apis" + config.NegotiatedSerializer = rest.CodecFactoryForGeneratedClient(scheme.Scheme, 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 *PoolV1beta1Client) RESTClient() rest.Interface { + if c == nil { + return nil + } + return c.restClient +} diff --git a/vendor/kubevirt.io/client-go/kubevirt/typed/pool/v1beta1/virtualmachinepool.go b/vendor/kubevirt.io/client-go/kubevirt/typed/pool/v1beta1/virtualmachinepool.go new file mode 100644 index 000000000..c5f28525c --- /dev/null +++ b/vendor/kubevirt.io/client-go/kubevirt/typed/pool/v1beta1/virtualmachinepool.go @@ -0,0 +1,72 @@ +/* +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 The KubeVirt Authors. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1beta1 + +import ( + context "context" + + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + gentype "k8s.io/client-go/gentype" + poolv1beta1 "kubevirt.io/api/pool/v1beta1" + scheme "kubevirt.io/client-go/kubevirt/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 *poolv1beta1.VirtualMachinePool, opts v1.CreateOptions) (*poolv1beta1.VirtualMachinePool, error) + Update(ctx context.Context, virtualMachinePool *poolv1beta1.VirtualMachinePool, opts v1.UpdateOptions) (*poolv1beta1.VirtualMachinePool, error) + // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). + UpdateStatus(ctx context.Context, virtualMachinePool *poolv1beta1.VirtualMachinePool, opts v1.UpdateOptions) (*poolv1beta1.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) (*poolv1beta1.VirtualMachinePool, error) + List(ctx context.Context, opts v1.ListOptions) (*poolv1beta1.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 *poolv1beta1.VirtualMachinePool, err error) + VirtualMachinePoolExpansion +} + +// virtualMachinePools implements VirtualMachinePoolInterface +type virtualMachinePools struct { + *gentype.ClientWithList[*poolv1beta1.VirtualMachinePool, *poolv1beta1.VirtualMachinePoolList] +} + +// newVirtualMachinePools returns a VirtualMachinePools +func newVirtualMachinePools(c *PoolV1beta1Client, namespace string) *virtualMachinePools { + return &virtualMachinePools{ + gentype.NewClientWithList[*poolv1beta1.VirtualMachinePool, *poolv1beta1.VirtualMachinePoolList]( + "virtualmachinepools", + c.RESTClient(), + scheme.ParameterCodec, + namespace, + func() *poolv1beta1.VirtualMachinePool { return &poolv1beta1.VirtualMachinePool{} }, + func() *poolv1beta1.VirtualMachinePoolList { return &poolv1beta1.VirtualMachinePoolList{} }, + ), + } +} diff --git a/vendor/kubevirt.io/client-go/kubevirt/typed/snapshot/v1alpha1/doc.go b/vendor/kubevirt.io/client-go/kubevirt/typed/snapshot/v1alpha1/doc.go new file mode 100644 index 000000000..d72972cf6 --- /dev/null +++ b/vendor/kubevirt.io/client-go/kubevirt/typed/snapshot/v1alpha1/doc.go @@ -0,0 +1,22 @@ +/* +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 The KubeVirt Authors. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +// This package has the automatically generated typed clients. +package v1alpha1 diff --git a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/snapshot/v1alpha1/generated_expansion.go b/vendor/kubevirt.io/client-go/kubevirt/typed/snapshot/v1alpha1/generated_expansion.go similarity index 94% rename from vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/snapshot/v1alpha1/generated_expansion.go rename to vendor/kubevirt.io/client-go/kubevirt/typed/snapshot/v1alpha1/generated_expansion.go index b0a135d7e..24f3dc7d6 100644 --- a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/snapshot/v1alpha1/generated_expansion.go +++ b/vendor/kubevirt.io/client-go/kubevirt/typed/snapshot/v1alpha1/generated_expansion.go @@ -1,5 +1,5 @@ /* -Copyright The KubeVirt Authors. +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. @@ -12,6 +12,8 @@ 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 The KubeVirt Authors. */ // Code generated by client-gen. DO NOT EDIT. diff --git a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/snapshot/v1alpha1/snapshot_client.go b/vendor/kubevirt.io/client-go/kubevirt/typed/snapshot/v1alpha1/snapshot_client.go similarity index 72% rename from vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/snapshot/v1alpha1/snapshot_client.go rename to vendor/kubevirt.io/client-go/kubevirt/typed/snapshot/v1alpha1/snapshot_client.go index 5e6a4e73e..d731ab94a 100644 --- a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/snapshot/v1alpha1/snapshot_client.go +++ b/vendor/kubevirt.io/client-go/kubevirt/typed/snapshot/v1alpha1/snapshot_client.go @@ -1,5 +1,5 @@ /* -Copyright The KubeVirt Authors. +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. @@ -12,6 +12,8 @@ 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 The KubeVirt Authors. */ // Code generated by client-gen. DO NOT EDIT. @@ -19,9 +21,11 @@ limitations under the License. package v1alpha1 import ( + http "net/http" + rest "k8s.io/client-go/rest" - v1alpha1 "kubevirt.io/api/snapshot/v1alpha1" - "kubevirt.io/client-go/generated/kubevirt/clientset/versioned/scheme" + snapshotv1alpha1 "kubevirt.io/api/snapshot/v1alpha1" + scheme "kubevirt.io/client-go/kubevirt/scheme" ) type SnapshotV1alpha1Interface interface { @@ -49,12 +53,28 @@ func (c *SnapshotV1alpha1Client) VirtualMachineSnapshotContents(namespace string } // NewForConfig creates a new SnapshotV1alpha1Client for the given config. +// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), +// where httpClient was generated with rest.HTTPClientFor(c). func NewForConfig(c *rest.Config) (*SnapshotV1alpha1Client, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err } - client, err := rest.RESTClientFor(&config) + httpClient, err := rest.HTTPClientFor(&config) + if err != nil { + return nil, err + } + return NewForConfigAndClient(&config, httpClient) +} + +// NewForConfigAndClient creates a new SnapshotV1alpha1Client for the given config and http client. +// Note the http client provided takes precedence over the configured transport values. +func NewForConfigAndClient(c *rest.Config, h *http.Client) (*SnapshotV1alpha1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + client, err := rest.RESTClientForConfigAndClient(&config, h) if err != nil { return nil, err } @@ -77,10 +97,10 @@ func New(c rest.Interface) *SnapshotV1alpha1Client { } func setConfigDefaults(config *rest.Config) error { - gv := v1alpha1.SchemeGroupVersion + gv := snapshotv1alpha1.SchemeGroupVersion config.GroupVersion = &gv config.APIPath = "/apis" - config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() + config.NegotiatedSerializer = rest.CodecFactoryForGeneratedClient(scheme.Scheme, scheme.Codecs).WithoutConversion() if config.UserAgent == "" { config.UserAgent = rest.DefaultKubernetesUserAgent() diff --git a/vendor/kubevirt.io/client-go/kubevirt/typed/snapshot/v1alpha1/virtualmachinerestore.go b/vendor/kubevirt.io/client-go/kubevirt/typed/snapshot/v1alpha1/virtualmachinerestore.go new file mode 100644 index 000000000..6d5f733ac --- /dev/null +++ b/vendor/kubevirt.io/client-go/kubevirt/typed/snapshot/v1alpha1/virtualmachinerestore.go @@ -0,0 +1,74 @@ +/* +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 The KubeVirt Authors. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + context "context" + + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + gentype "k8s.io/client-go/gentype" + snapshotv1alpha1 "kubevirt.io/api/snapshot/v1alpha1" + scheme "kubevirt.io/client-go/kubevirt/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 *snapshotv1alpha1.VirtualMachineRestore, opts v1.CreateOptions) (*snapshotv1alpha1.VirtualMachineRestore, error) + Update(ctx context.Context, virtualMachineRestore *snapshotv1alpha1.VirtualMachineRestore, opts v1.UpdateOptions) (*snapshotv1alpha1.VirtualMachineRestore, error) + // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). + UpdateStatus(ctx context.Context, virtualMachineRestore *snapshotv1alpha1.VirtualMachineRestore, opts v1.UpdateOptions) (*snapshotv1alpha1.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) (*snapshotv1alpha1.VirtualMachineRestore, error) + List(ctx context.Context, opts v1.ListOptions) (*snapshotv1alpha1.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 *snapshotv1alpha1.VirtualMachineRestore, err error) + VirtualMachineRestoreExpansion +} + +// virtualMachineRestores implements VirtualMachineRestoreInterface +type virtualMachineRestores struct { + *gentype.ClientWithList[*snapshotv1alpha1.VirtualMachineRestore, *snapshotv1alpha1.VirtualMachineRestoreList] +} + +// newVirtualMachineRestores returns a VirtualMachineRestores +func newVirtualMachineRestores(c *SnapshotV1alpha1Client, namespace string) *virtualMachineRestores { + return &virtualMachineRestores{ + gentype.NewClientWithList[*snapshotv1alpha1.VirtualMachineRestore, *snapshotv1alpha1.VirtualMachineRestoreList]( + "virtualmachinerestores", + c.RESTClient(), + scheme.ParameterCodec, + namespace, + func() *snapshotv1alpha1.VirtualMachineRestore { return &snapshotv1alpha1.VirtualMachineRestore{} }, + func() *snapshotv1alpha1.VirtualMachineRestoreList { + return &snapshotv1alpha1.VirtualMachineRestoreList{} + }, + ), + } +} diff --git a/vendor/kubevirt.io/client-go/kubevirt/typed/snapshot/v1alpha1/virtualmachinesnapshot.go b/vendor/kubevirt.io/client-go/kubevirt/typed/snapshot/v1alpha1/virtualmachinesnapshot.go new file mode 100644 index 000000000..202db206e --- /dev/null +++ b/vendor/kubevirt.io/client-go/kubevirt/typed/snapshot/v1alpha1/virtualmachinesnapshot.go @@ -0,0 +1,74 @@ +/* +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 The KubeVirt Authors. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + context "context" + + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + gentype "k8s.io/client-go/gentype" + snapshotv1alpha1 "kubevirt.io/api/snapshot/v1alpha1" + scheme "kubevirt.io/client-go/kubevirt/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 *snapshotv1alpha1.VirtualMachineSnapshot, opts v1.CreateOptions) (*snapshotv1alpha1.VirtualMachineSnapshot, error) + Update(ctx context.Context, virtualMachineSnapshot *snapshotv1alpha1.VirtualMachineSnapshot, opts v1.UpdateOptions) (*snapshotv1alpha1.VirtualMachineSnapshot, error) + // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). + UpdateStatus(ctx context.Context, virtualMachineSnapshot *snapshotv1alpha1.VirtualMachineSnapshot, opts v1.UpdateOptions) (*snapshotv1alpha1.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) (*snapshotv1alpha1.VirtualMachineSnapshot, error) + List(ctx context.Context, opts v1.ListOptions) (*snapshotv1alpha1.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 *snapshotv1alpha1.VirtualMachineSnapshot, err error) + VirtualMachineSnapshotExpansion +} + +// virtualMachineSnapshots implements VirtualMachineSnapshotInterface +type virtualMachineSnapshots struct { + *gentype.ClientWithList[*snapshotv1alpha1.VirtualMachineSnapshot, *snapshotv1alpha1.VirtualMachineSnapshotList] +} + +// newVirtualMachineSnapshots returns a VirtualMachineSnapshots +func newVirtualMachineSnapshots(c *SnapshotV1alpha1Client, namespace string) *virtualMachineSnapshots { + return &virtualMachineSnapshots{ + gentype.NewClientWithList[*snapshotv1alpha1.VirtualMachineSnapshot, *snapshotv1alpha1.VirtualMachineSnapshotList]( + "virtualmachinesnapshots", + c.RESTClient(), + scheme.ParameterCodec, + namespace, + func() *snapshotv1alpha1.VirtualMachineSnapshot { return &snapshotv1alpha1.VirtualMachineSnapshot{} }, + func() *snapshotv1alpha1.VirtualMachineSnapshotList { + return &snapshotv1alpha1.VirtualMachineSnapshotList{} + }, + ), + } +} diff --git a/vendor/kubevirt.io/client-go/kubevirt/typed/snapshot/v1alpha1/virtualmachinesnapshotcontent.go b/vendor/kubevirt.io/client-go/kubevirt/typed/snapshot/v1alpha1/virtualmachinesnapshotcontent.go new file mode 100644 index 000000000..4c711753b --- /dev/null +++ b/vendor/kubevirt.io/client-go/kubevirt/typed/snapshot/v1alpha1/virtualmachinesnapshotcontent.go @@ -0,0 +1,76 @@ +/* +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 The KubeVirt Authors. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + context "context" + + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + gentype "k8s.io/client-go/gentype" + snapshotv1alpha1 "kubevirt.io/api/snapshot/v1alpha1" + scheme "kubevirt.io/client-go/kubevirt/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 *snapshotv1alpha1.VirtualMachineSnapshotContent, opts v1.CreateOptions) (*snapshotv1alpha1.VirtualMachineSnapshotContent, error) + Update(ctx context.Context, virtualMachineSnapshotContent *snapshotv1alpha1.VirtualMachineSnapshotContent, opts v1.UpdateOptions) (*snapshotv1alpha1.VirtualMachineSnapshotContent, error) + // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). + UpdateStatus(ctx context.Context, virtualMachineSnapshotContent *snapshotv1alpha1.VirtualMachineSnapshotContent, opts v1.UpdateOptions) (*snapshotv1alpha1.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) (*snapshotv1alpha1.VirtualMachineSnapshotContent, error) + List(ctx context.Context, opts v1.ListOptions) (*snapshotv1alpha1.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 *snapshotv1alpha1.VirtualMachineSnapshotContent, err error) + VirtualMachineSnapshotContentExpansion +} + +// virtualMachineSnapshotContents implements VirtualMachineSnapshotContentInterface +type virtualMachineSnapshotContents struct { + *gentype.ClientWithList[*snapshotv1alpha1.VirtualMachineSnapshotContent, *snapshotv1alpha1.VirtualMachineSnapshotContentList] +} + +// newVirtualMachineSnapshotContents returns a VirtualMachineSnapshotContents +func newVirtualMachineSnapshotContents(c *SnapshotV1alpha1Client, namespace string) *virtualMachineSnapshotContents { + return &virtualMachineSnapshotContents{ + gentype.NewClientWithList[*snapshotv1alpha1.VirtualMachineSnapshotContent, *snapshotv1alpha1.VirtualMachineSnapshotContentList]( + "virtualmachinesnapshotcontents", + c.RESTClient(), + scheme.ParameterCodec, + namespace, + func() *snapshotv1alpha1.VirtualMachineSnapshotContent { + return &snapshotv1alpha1.VirtualMachineSnapshotContent{} + }, + func() *snapshotv1alpha1.VirtualMachineSnapshotContentList { + return &snapshotv1alpha1.VirtualMachineSnapshotContentList{} + }, + ), + } +} diff --git a/vendor/kubevirt.io/client-go/kubevirt/typed/snapshot/v1beta1/doc.go b/vendor/kubevirt.io/client-go/kubevirt/typed/snapshot/v1beta1/doc.go new file mode 100644 index 000000000..ba4fa91b1 --- /dev/null +++ b/vendor/kubevirt.io/client-go/kubevirt/typed/snapshot/v1beta1/doc.go @@ -0,0 +1,22 @@ +/* +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 The KubeVirt Authors. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +// This package has the automatically generated typed clients. +package v1beta1 diff --git a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/snapshot/v1beta1/generated_expansion.go b/vendor/kubevirt.io/client-go/kubevirt/typed/snapshot/v1beta1/generated_expansion.go similarity index 94% rename from vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/snapshot/v1beta1/generated_expansion.go rename to vendor/kubevirt.io/client-go/kubevirt/typed/snapshot/v1beta1/generated_expansion.go index 377968152..68511fca8 100644 --- a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/snapshot/v1beta1/generated_expansion.go +++ b/vendor/kubevirt.io/client-go/kubevirt/typed/snapshot/v1beta1/generated_expansion.go @@ -1,5 +1,5 @@ /* -Copyright The KubeVirt Authors. +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. @@ -12,6 +12,8 @@ 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 The KubeVirt Authors. */ // Code generated by client-gen. DO NOT EDIT. diff --git a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/snapshot/v1beta1/snapshot_client.go b/vendor/kubevirt.io/client-go/kubevirt/typed/snapshot/v1beta1/snapshot_client.go similarity index 72% rename from vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/snapshot/v1beta1/snapshot_client.go rename to vendor/kubevirt.io/client-go/kubevirt/typed/snapshot/v1beta1/snapshot_client.go index 026da7b88..19670b40c 100644 --- a/vendor/kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/snapshot/v1beta1/snapshot_client.go +++ b/vendor/kubevirt.io/client-go/kubevirt/typed/snapshot/v1beta1/snapshot_client.go @@ -1,5 +1,5 @@ /* -Copyright The KubeVirt Authors. +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. @@ -12,6 +12,8 @@ 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 The KubeVirt Authors. */ // Code generated by client-gen. DO NOT EDIT. @@ -19,9 +21,11 @@ limitations under the License. package v1beta1 import ( + http "net/http" + rest "k8s.io/client-go/rest" - v1beta1 "kubevirt.io/api/snapshot/v1beta1" - "kubevirt.io/client-go/generated/kubevirt/clientset/versioned/scheme" + snapshotv1beta1 "kubevirt.io/api/snapshot/v1beta1" + scheme "kubevirt.io/client-go/kubevirt/scheme" ) type SnapshotV1beta1Interface interface { @@ -49,12 +53,28 @@ func (c *SnapshotV1beta1Client) VirtualMachineSnapshotContents(namespace string) } // NewForConfig creates a new SnapshotV1beta1Client for the given config. +// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), +// where httpClient was generated with rest.HTTPClientFor(c). func NewForConfig(c *rest.Config) (*SnapshotV1beta1Client, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err } - client, err := rest.RESTClientFor(&config) + httpClient, err := rest.HTTPClientFor(&config) + if err != nil { + return nil, err + } + return NewForConfigAndClient(&config, httpClient) +} + +// NewForConfigAndClient creates a new SnapshotV1beta1Client for the given config and http client. +// Note the http client provided takes precedence over the configured transport values. +func NewForConfigAndClient(c *rest.Config, h *http.Client) (*SnapshotV1beta1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + client, err := rest.RESTClientForConfigAndClient(&config, h) if err != nil { return nil, err } @@ -77,10 +97,10 @@ func New(c rest.Interface) *SnapshotV1beta1Client { } func setConfigDefaults(config *rest.Config) error { - gv := v1beta1.SchemeGroupVersion + gv := snapshotv1beta1.SchemeGroupVersion config.GroupVersion = &gv config.APIPath = "/apis" - config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() + config.NegotiatedSerializer = rest.CodecFactoryForGeneratedClient(scheme.Scheme, scheme.Codecs).WithoutConversion() if config.UserAgent == "" { config.UserAgent = rest.DefaultKubernetesUserAgent() diff --git a/vendor/kubevirt.io/client-go/kubevirt/typed/snapshot/v1beta1/virtualmachinerestore.go b/vendor/kubevirt.io/client-go/kubevirt/typed/snapshot/v1beta1/virtualmachinerestore.go new file mode 100644 index 000000000..aaf8a89e6 --- /dev/null +++ b/vendor/kubevirt.io/client-go/kubevirt/typed/snapshot/v1beta1/virtualmachinerestore.go @@ -0,0 +1,72 @@ +/* +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 The KubeVirt Authors. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1beta1 + +import ( + context "context" + + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + gentype "k8s.io/client-go/gentype" + snapshotv1beta1 "kubevirt.io/api/snapshot/v1beta1" + scheme "kubevirt.io/client-go/kubevirt/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 *snapshotv1beta1.VirtualMachineRestore, opts v1.CreateOptions) (*snapshotv1beta1.VirtualMachineRestore, error) + Update(ctx context.Context, virtualMachineRestore *snapshotv1beta1.VirtualMachineRestore, opts v1.UpdateOptions) (*snapshotv1beta1.VirtualMachineRestore, error) + // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). + UpdateStatus(ctx context.Context, virtualMachineRestore *snapshotv1beta1.VirtualMachineRestore, opts v1.UpdateOptions) (*snapshotv1beta1.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) (*snapshotv1beta1.VirtualMachineRestore, error) + List(ctx context.Context, opts v1.ListOptions) (*snapshotv1beta1.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 *snapshotv1beta1.VirtualMachineRestore, err error) + VirtualMachineRestoreExpansion +} + +// virtualMachineRestores implements VirtualMachineRestoreInterface +type virtualMachineRestores struct { + *gentype.ClientWithList[*snapshotv1beta1.VirtualMachineRestore, *snapshotv1beta1.VirtualMachineRestoreList] +} + +// newVirtualMachineRestores returns a VirtualMachineRestores +func newVirtualMachineRestores(c *SnapshotV1beta1Client, namespace string) *virtualMachineRestores { + return &virtualMachineRestores{ + gentype.NewClientWithList[*snapshotv1beta1.VirtualMachineRestore, *snapshotv1beta1.VirtualMachineRestoreList]( + "virtualmachinerestores", + c.RESTClient(), + scheme.ParameterCodec, + namespace, + func() *snapshotv1beta1.VirtualMachineRestore { return &snapshotv1beta1.VirtualMachineRestore{} }, + func() *snapshotv1beta1.VirtualMachineRestoreList { return &snapshotv1beta1.VirtualMachineRestoreList{} }, + ), + } +} diff --git a/vendor/kubevirt.io/client-go/kubevirt/typed/snapshot/v1beta1/virtualmachinesnapshot.go b/vendor/kubevirt.io/client-go/kubevirt/typed/snapshot/v1beta1/virtualmachinesnapshot.go new file mode 100644 index 000000000..053866da4 --- /dev/null +++ b/vendor/kubevirt.io/client-go/kubevirt/typed/snapshot/v1beta1/virtualmachinesnapshot.go @@ -0,0 +1,74 @@ +/* +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 The KubeVirt Authors. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1beta1 + +import ( + context "context" + + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + gentype "k8s.io/client-go/gentype" + snapshotv1beta1 "kubevirt.io/api/snapshot/v1beta1" + scheme "kubevirt.io/client-go/kubevirt/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 *snapshotv1beta1.VirtualMachineSnapshot, opts v1.CreateOptions) (*snapshotv1beta1.VirtualMachineSnapshot, error) + Update(ctx context.Context, virtualMachineSnapshot *snapshotv1beta1.VirtualMachineSnapshot, opts v1.UpdateOptions) (*snapshotv1beta1.VirtualMachineSnapshot, error) + // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). + UpdateStatus(ctx context.Context, virtualMachineSnapshot *snapshotv1beta1.VirtualMachineSnapshot, opts v1.UpdateOptions) (*snapshotv1beta1.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) (*snapshotv1beta1.VirtualMachineSnapshot, error) + List(ctx context.Context, opts v1.ListOptions) (*snapshotv1beta1.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 *snapshotv1beta1.VirtualMachineSnapshot, err error) + VirtualMachineSnapshotExpansion +} + +// virtualMachineSnapshots implements VirtualMachineSnapshotInterface +type virtualMachineSnapshots struct { + *gentype.ClientWithList[*snapshotv1beta1.VirtualMachineSnapshot, *snapshotv1beta1.VirtualMachineSnapshotList] +} + +// newVirtualMachineSnapshots returns a VirtualMachineSnapshots +func newVirtualMachineSnapshots(c *SnapshotV1beta1Client, namespace string) *virtualMachineSnapshots { + return &virtualMachineSnapshots{ + gentype.NewClientWithList[*snapshotv1beta1.VirtualMachineSnapshot, *snapshotv1beta1.VirtualMachineSnapshotList]( + "virtualmachinesnapshots", + c.RESTClient(), + scheme.ParameterCodec, + namespace, + func() *snapshotv1beta1.VirtualMachineSnapshot { return &snapshotv1beta1.VirtualMachineSnapshot{} }, + func() *snapshotv1beta1.VirtualMachineSnapshotList { + return &snapshotv1beta1.VirtualMachineSnapshotList{} + }, + ), + } +} diff --git a/vendor/kubevirt.io/client-go/kubevirt/typed/snapshot/v1beta1/virtualmachinesnapshotcontent.go b/vendor/kubevirt.io/client-go/kubevirt/typed/snapshot/v1beta1/virtualmachinesnapshotcontent.go new file mode 100644 index 000000000..1870ed721 --- /dev/null +++ b/vendor/kubevirt.io/client-go/kubevirt/typed/snapshot/v1beta1/virtualmachinesnapshotcontent.go @@ -0,0 +1,76 @@ +/* +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 The KubeVirt Authors. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1beta1 + +import ( + context "context" + + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + gentype "k8s.io/client-go/gentype" + snapshotv1beta1 "kubevirt.io/api/snapshot/v1beta1" + scheme "kubevirt.io/client-go/kubevirt/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 *snapshotv1beta1.VirtualMachineSnapshotContent, opts v1.CreateOptions) (*snapshotv1beta1.VirtualMachineSnapshotContent, error) + Update(ctx context.Context, virtualMachineSnapshotContent *snapshotv1beta1.VirtualMachineSnapshotContent, opts v1.UpdateOptions) (*snapshotv1beta1.VirtualMachineSnapshotContent, error) + // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). + UpdateStatus(ctx context.Context, virtualMachineSnapshotContent *snapshotv1beta1.VirtualMachineSnapshotContent, opts v1.UpdateOptions) (*snapshotv1beta1.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) (*snapshotv1beta1.VirtualMachineSnapshotContent, error) + List(ctx context.Context, opts v1.ListOptions) (*snapshotv1beta1.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 *snapshotv1beta1.VirtualMachineSnapshotContent, err error) + VirtualMachineSnapshotContentExpansion +} + +// virtualMachineSnapshotContents implements VirtualMachineSnapshotContentInterface +type virtualMachineSnapshotContents struct { + *gentype.ClientWithList[*snapshotv1beta1.VirtualMachineSnapshotContent, *snapshotv1beta1.VirtualMachineSnapshotContentList] +} + +// newVirtualMachineSnapshotContents returns a VirtualMachineSnapshotContents +func newVirtualMachineSnapshotContents(c *SnapshotV1beta1Client, namespace string) *virtualMachineSnapshotContents { + return &virtualMachineSnapshotContents{ + gentype.NewClientWithList[*snapshotv1beta1.VirtualMachineSnapshotContent, *snapshotv1beta1.VirtualMachineSnapshotContentList]( + "virtualmachinesnapshotcontents", + c.RESTClient(), + scheme.ParameterCodec, + namespace, + func() *snapshotv1beta1.VirtualMachineSnapshotContent { + return &snapshotv1beta1.VirtualMachineSnapshotContent{} + }, + func() *snapshotv1beta1.VirtualMachineSnapshotContentList { + return &snapshotv1beta1.VirtualMachineSnapshotContentList{} + }, + ), + } +} diff --git a/vendor/kubevirt.io/client-go/log/log.go b/vendor/kubevirt.io/client-go/log/log.go index 26f188802..83d6cf05b 100644 --- a/vendor/kubevirt.io/client-go/log/log.go +++ b/vendor/kubevirt.io/client-go/log/log.go @@ -24,6 +24,7 @@ import ( goflag "flag" "fmt" "io" + "log" "os" "path/filepath" "runtime" @@ -32,9 +33,7 @@ import ( "sync" "time" - klog "github.com/go-kit/kit/log" - "github.com/golang/glog" - flag "github.com/spf13/pflag" + klog "github.com/go-kit/log" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" k8sruntime "k8s.io/apimachinery/pkg/runtime" ) @@ -83,30 +82,24 @@ type FilteredLogger struct { var Log = DefaultLogger() +func init() { + // "the practical default level is V(2)" + // see https://github.com/kubernetes/community/blob/master/contributors/devel/logging.md + goflag.IntVar(&defaultVerbosity, "v", 2, "log level for V logs") +} + 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 - } + log.SetOutput(klog.NewStdlibAdapter(Log)) } // Wrap a go-kit logger in a FilteredLogger. Not cached func MakeLogger(logger klog.Logger) *FilteredLogger { defaultLogLevel := INFO - defaultVerbosity = getDefaultVerbosity() // This verbosity will be used for info logs without setting a custom verbosity level defaultCurrentVerbosity := 2 @@ -229,7 +222,7 @@ func (l FilteredVerbosityLogger) Infof(msg string, args ...interface{}) { } func (l FilteredVerbosityLogger) Object(obj LoggableObject) *FilteredVerbosityLogger { - l.filteredLogger.Object(obj) + l.filteredLogger = *l.filteredLogger.Object(obj) return &l } diff --git a/vendor/kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1/authorize_utils.go b/vendor/kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1/authorize_utils.go index 474866c13..c1daa6221 100644 --- a/vendor/kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1/authorize_utils.go +++ b/vendor/kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1/authorize_utils.go @@ -45,11 +45,12 @@ func newCloneSourceHandler(dataVolume *DataVolume, dsGet dsGetFunc) (CloneSource if err != nil { return CloneSourceHandler{}, err } - if dataSource.Spec.Source.PVC != nil { - pvcSource = dataSource.Spec.Source.PVC - } else if dataSource.Spec.Source.Snapshot != nil { - snapshotSource = dataSource.Spec.Source.Snapshot - } + pvcSource = dataSource.Spec.Source.PVC + snapshotSource = dataSource.Spec.Source.Snapshot + if dataSource.Spec.Source.DataSource != nil { + pvcSource = dataSource.Status.Source.PVC + snapshotSource = dataSource.Status.Source.Snapshot + } } switch { diff --git a/vendor/kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1/register.go b/vendor/kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1/register.go index 8aa80f3c5..8d9be9da9 100644 --- a/vendor/kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1/register.go +++ b/vendor/kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1/register.go @@ -8,8 +8,11 @@ import ( "kubevirt.io/containerized-data-importer-api/pkg/apis/core" ) -// SchemeGroupVersion is group version used to register these objects -var SchemeGroupVersion = schema.GroupVersion{Group: core.GroupName, Version: "v1beta1"} +// SchemeGroupVersion and GroupVersion is group version used to register these objects +var ( + SchemeGroupVersion = schema.GroupVersion{Group: core.GroupName, Version: "v1beta1"} + GroupVersion = schema.GroupVersion{Group: core.GroupName, Version: "v1beta1"} +) // CDIGroupVersionKind group version kind var CDIGroupVersionKind = schema.GroupVersionKind{Group: SchemeGroupVersion.Group, Version: SchemeGroupVersion.Version, Kind: "CDI"} diff --git a/vendor/kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1/types.go b/vendor/kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1/types.go index 86dc46c25..3a473dd86 100644 --- a/vendor/kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1/types.go +++ b/vendor/kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1/types.go @@ -17,7 +17,6 @@ limitations under the License. package v1beta1 import ( - ocpconfigv1 "github.com/openshift/api/config/v1" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" sdkapi "kubevirt.io/controller-lifecycle-operator-sdk/api" @@ -80,7 +79,7 @@ type StorageSpec struct { // Resources represents the minimum resources the volume should have. // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources // +optional - Resources corev1.ResourceRequirements `json:"resources,omitempty"` + Resources corev1.VolumeResourceRequirements `json:"resources,omitempty"` // VolumeName is the binding reference to the PersistentVolume backing this claim. // +optional VolumeName string `json:"volumeName,omitempty"` @@ -106,6 +105,9 @@ type StorageSpec struct { DataSourceRef *corev1.TypedObjectReference `json:"dataSourceRef,omitempty"` } +// PersistentVolumeFromStorageProfile means the volume mode will be auto selected by CDI according to a matching StorageProfile +const PersistentVolumeFromStorageProfile corev1.PersistentVolumeMode = "FromStorageProfile" + // DataVolumeCheckpoint defines a stage in a warm migration. type DataVolumeCheckpoint struct { // Previous is the identifier of the snapshot from the previous checkpoint. @@ -154,6 +156,16 @@ type DataVolumeSourceSnapshot struct { Name string `json:"name"` } +// DataSourceRefSourceDataSource serves as a reference to another DataSource +// Can be resolved into a DataVolumeSourcePVC or a DataVolumeSourceSnapshot +// The maximum depth of a reference chain may not exceed 1. +type DataSourceRefSourceDataSource struct { + // The namespace of the source DataSource + Namespace string `json:"namespace"` + // The name of the source DataSource + Name string `json:"name"` +} + // DataVolumeBlankImage provides the parameters to create a new raw blank image for the PVC type DataVolumeBlankImage struct{} @@ -197,6 +209,15 @@ type DataVolumeSourceRegistry struct { //CertConfigMap provides a reference to the Registry certs // +optional CertConfigMap *string `json:"certConfigMap,omitempty"` + //Platform describes the minimum runtime requirements of the image + // +optional + Platform *PlatformOptions `json:"platform,omitempty"` +} + +type PlatformOptions struct { + //Architecture specifies the image target CPU architecture + // +optional + Architecture string `json:"architecture,omitempty"` } const ( @@ -244,6 +265,8 @@ type DataVolumeSourceImageIO struct { SecretRef string `json:"secretRef,omitempty"` //CertConfigMap provides a reference to the CA cert CertConfigMap string `json:"certConfigMap,omitempty"` + // InsecureSkipVerify is a flag to skip certificate verification + InsecureSkipVerify *bool `json:"insecureSkipVerify,omitempty"` } // DataVolumeSourceVDDK provides the parameters to create a Data Volume from a Vmware source @@ -260,6 +283,8 @@ type DataVolumeSourceVDDK struct { SecretRef string `json:"secretRef,omitempty"` // InitImageURL is an optional URL to an image containing an extracted VDDK library, overrides v2v-vmware config map InitImageURL string `json:"initImageURL,omitempty"` + // ExtraArgs is a reference to a ConfigMap containing extra arguments to pass directly to the VDDK library + ExtraArgs string `json:"extraArgs,omitempty"` } // DataVolumeSourceRef defines an indirect reference to the source of data for the DataVolume @@ -379,6 +404,11 @@ const ( // Paused represents a DataVolumePhase of Paused Paused DataVolumePhase = "Paused" + // PrepClaimInProgress represents a data volume with a current phase of PrepClaimInProgress + PrepClaimInProgress DataVolumePhase = "PrepClaimInProgress" + // RebindInProgress represents a data volume with a current phase of RebindInProgress + RebindInProgress DataVolumePhase = "RebindInProgress" + // DataVolumeReady is the condition that indicates if the data volume is ready to be consumed. DataVolumeReady DataVolumeConditionType = "Ready" // DataVolumeBound is the condition that indicates if the underlying PVC is bound or not. @@ -400,6 +430,7 @@ const DataVolumeCloneSourceSubresource = "source" // +kubebuilder:object:root=true // +kubebuilder:storageversion // +kubebuilder:resource:scope=Cluster +// +kubebuilder:subresource:status type StorageProfile struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` @@ -413,7 +444,12 @@ type StorageProfileSpec struct { // CloneStrategy defines the preferred method for performing a CDI clone CloneStrategy *CDICloneStrategy `json:"cloneStrategy,omitempty"` // ClaimPropertySets is a provided set of properties applicable to PVC + // +kubebuilder:validation:MaxItems=8 ClaimPropertySets []ClaimPropertySet `json:"claimPropertySets,omitempty"` + // DataImportCronSourceFormat defines the format of the DataImportCron-created disk image sources + DataImportCronSourceFormat *DataImportCronSourceFormat `json:"dataImportCronSourceFormat,omitempty"` + // SnapshotClass is optional specific VolumeSnapshotClass for CloneStrategySnapshot. If not set, a VolumeSnapshotClass is chosen according to the provisioner. + SnapshotClass *string `json:"snapshotClass,omitempty"` } // StorageProfileStatus provides the most recently observed status of the StorageProfile @@ -425,19 +461,25 @@ type StorageProfileStatus struct { // CloneStrategy defines the preferred method for performing a CDI clone CloneStrategy *CDICloneStrategy `json:"cloneStrategy,omitempty"` // ClaimPropertySets computed from the spec and detected in the system + // +kubebuilder:validation:MaxItems=8 ClaimPropertySets []ClaimPropertySet `json:"claimPropertySets,omitempty"` + // DataImportCronSourceFormat defines the format of the DataImportCron-created disk image sources + DataImportCronSourceFormat *DataImportCronSourceFormat `json:"dataImportCronSourceFormat,omitempty"` + // SnapshotClass is optional specific VolumeSnapshotClass for CloneStrategySnapshot. If not set, a VolumeSnapshotClass is chosen according to the provisioner. + SnapshotClass *string `json:"snapshotClass,omitempty"` } // ClaimPropertySet is a set of properties applicable to PVC type ClaimPropertySet struct { // AccessModes contains the desired access modes the volume should have. // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1 - // +optional - AccessModes []corev1.PersistentVolumeAccessMode `json:"accessModes,omitempty" protobuf:"bytes,1,rep,name=accessModes,casttype=PersistentVolumeAccessMode"` + // +kubebuilder:validation:MaxItems=4 + // +kubebuilder:validation:XValidation:rule="self.all(am, am in ['ReadWriteOnce', 'ReadOnlyMany', 'ReadWriteMany', 'ReadWriteOncePod'])", message="Illegal AccessMode" + AccessModes []corev1.PersistentVolumeAccessMode `json:"accessModes"` // VolumeMode defines what type of volume is required by the claim. // Value of Filesystem is implied when not included in claim spec. - // +optional - VolumeMode *corev1.PersistentVolumeMode `json:"volumeMode,omitempty" protobuf:"bytes,6,opt,name=volumeMode,casttype=PersistentVolumeMode"` + // +kubebuilder:validation:Enum="Block";"Filesystem" + VolumeMode *corev1.PersistentVolumeMode `json:"volumeMode"` } // StorageProfileList provides the needed parameters to request a list of StorageProfile from the system @@ -476,6 +518,8 @@ type DataSourceSource struct { PVC *DataVolumeSourcePVC `json:"pvc,omitempty"` // +optional Snapshot *DataVolumeSourceSnapshot `json:"snapshot,omitempty"` + // +optional + DataSource *DataSourceRefSourceDataSource `json:"dataSource,omitempty"` } // DataSourceStatus provides the most recently observed status of the DataSource @@ -524,6 +568,7 @@ type DataSourceList struct { // +kubebuilder:object:root=true // +kubebuilder:storageversion // +kubebuilder:resource:shortName=dic;dics,categories=all +// +kubebuilder:printcolumn:name="Format",type="string",JSONPath=".status.sourceFormat",description="The format in which created sources are saved" type DataImportCron struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` @@ -551,6 +596,10 @@ type DataImportCronSpec struct { // RetentionPolicy specifies whether the created DataVolumes and DataSources are retained when their DataImportCron is deleted. Default is RatainAll. // +optional RetentionPolicy *DataImportCronRetentionPolicy `json:"retentionPolicy,omitempty"` + // ServiceAccountName is the name of the ServiceAccount for creating DataVolumes. + // +optional + // +kubebuilder:validation:MinLength=1 + ServiceAccountName *string `json:"serviceAccountName,omitempty"` } // DataImportCronGarbageCollect represents the DataImportCron garbage collection mode @@ -582,8 +631,10 @@ type DataImportCronStatus struct { // LastExecutionTimestamp is the time of the last polling LastExecutionTimestamp *metav1.Time `json:"lastExecutionTimestamp,omitempty"` // LastImportTimestamp is the time of the last import - LastImportTimestamp *metav1.Time `json:"lastImportTimestamp,omitempty"` - Conditions []DataImportCronCondition `json:"conditions,omitempty" optional:"true"` + LastImportTimestamp *metav1.Time `json:"lastImportTimestamp,omitempty"` + // SourceFormat defines the format of the DataImportCron-created disk image sources + SourceFormat *DataImportCronSourceFormat `json:"sourceFormat,omitempty"` + Conditions []DataImportCronCondition `json:"conditions,omitempty" optional:"true"` } // ImportStatus of a currently in progress import @@ -644,6 +695,12 @@ type VolumeImportSourceSpec struct { Preallocation *bool `json:"preallocation,omitempty"` // ContentType represents the type of the imported data (Kubevirt or archive) ContentType DataVolumeContentType `json:"contentType,omitempty"` + // TargetClaim the name of the specific claim to be populated with a multistage import. + TargetClaim *string `json:"targetClaim,omitempty"` + // Checkpoints is a list of DataVolumeCheckpoints, representing stages in a multistage import. + Checkpoints []DataVolumeCheckpoint `json:"checkpoints,omitempty"` + // FinalCheckpoint indicates whether the current DataVolumeCheckpoint is the final checkpoint. + FinalCheckpoint *bool `json:"finalCheckpoint,omitempty"` } // ImportSourceType contains each one of the source types allowed in a VolumeImportSource @@ -704,7 +761,7 @@ type VolumeUploadSourceList struct { metav1.ListMeta `json:"metadata"` // Items provides a list of DataSources - Items []VolumeImportSource `json:"items"` + Items []VolumeUploadSource `json:"items"` } const ( @@ -792,6 +849,10 @@ type CDICertConfig struct { // Server configuration // Certs are rotated and discarded Server *CertConfig `json:"server,omitempty"` + + // Client configuration + // Certs are rotated and discarded + Client *CertConfig `json:"client,omitempty"` } // CDISpec defines our specification for the CDI installation @@ -802,10 +863,11 @@ type CDISpec struct { // +kubebuilder:validation:Enum=RemoveWorkloads;BlockUninstallIfWorkloadsExist // CDIUninstallStrategy defines the state to leave CDI on uninstall UninstallStrategy *CDIUninstallStrategy `json:"uninstallStrategy,omitempty"` - // Rules on which nodes CDI infrastructure pods will be scheduled - Infra sdkapi.NodePlacement `json:"infra,omitempty"` + // Selectors and tolerations that should apply to cdi infrastructure components + Infra ComponentConfig `json:"infra,omitempty"` // Restrict on which nodes CDI workload pods will be scheduled - Workloads sdkapi.NodePlacement `json:"workload,omitempty"` + Workloads sdkapi.NodePlacement `json:"workload,omitempty"` + CustomizeComponents CustomizeComponents `json:"customizeComponents,omitempty"` // Clone strategy override: should we use a host-assisted copy even if snapshots are available? // +kubebuilder:validation:Enum="copy";"snapshot";"csi-clone" CloneStrategyOverride *CDICloneStrategy `json:"cloneStrategyOverride,omitempty"` @@ -817,6 +879,18 @@ type CDISpec struct { PriorityClass *CDIPriorityClass `json:"priorityClass,omitempty"` } +// ComponentConfig defines the scheduling and replicas configuration for CDI components +type ComponentConfig struct { + // NodePlacement describes scheduling configuration for specific CDI components + sdkapi.NodePlacement `json:",inline"` + // DeploymentReplicas set Replicas for cdi-deployment + DeploymentReplicas *int32 `json:"deploymentReplicas,omitempty"` + // ApiserverReplicas set Replicas for cdi-apiserver + APIServerReplicas *int32 `json:"apiServerReplicas,omitempty"` + // UploadproxyReplicas set Replicas for cdi-uploadproxy + UploadProxyReplicas *int32 `json:"uploadProxyReplicas,omitempty"` +} + // CDIPriorityClass defines the priority class of the CDI control plane. type CDIPriorityClass string @@ -834,6 +908,58 @@ const ( CloneStrategyCsiClone CDICloneStrategy = "csi-clone" ) +// CustomizeComponents defines patches for components deployed by the CDI operator. +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"` + UploadProxy map[string]string `json:"uploadProxy,omitempty"` +} + +// CustomizeComponentsPatch defines a patch for some resource. +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"` +} + +// PatchType defines the patch type. +type PatchType string + +const ( + // JSONPatchType is a constant that represents the type of JSON patch. + JSONPatchType PatchType = "json" + // MergePatchType is a constant that represents the type of JSON Merge patch. + MergePatchType PatchType = "merge" + // StrategicMergePatchType is a constant that represents the type of Strategic Merge patch. + StrategicMergePatchType PatchType = "strategic" +) + +// DataImportCronSourceFormat defines the format of the DataImportCron-created disk image sources +type DataImportCronSourceFormat string + +const ( + // DataImportCronSourceFormatSnapshot implies using a VolumeSnapshot as the resulting DataImportCron disk image source + DataImportCronSourceFormatSnapshot DataImportCronSourceFormat = "snapshot" + + // DataImportCronSourceFormatPvc implies using a PVC as the resulting DataImportCron disk image source + DataImportCronSourceFormatPvc DataImportCronSourceFormat = "pvc" +) + // CDIUninstallStrategy defines the state to leave CDI on uninstall type CDIUninstallStrategy string @@ -907,25 +1033,31 @@ type CDIConfigSpec struct { PodResourceRequirements *corev1.ResourceRequirements `json:"podResourceRequirements,omitempty"` // FeatureGates are a list of specific enabled feature gates FeatureGates []string `json:"featureGates,omitempty"` - // 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) + // FilesystemOverhead describes the space reserved for overhead when using Filesystem volumes. A value is between 0 and 1, if not defined it is 0.06 (6% overhead) FilesystemOverhead *FilesystemOverhead `json:"filesystemOverhead,omitempty"` // Preallocation controls whether storage for DataVolumes should be allocated in advance. Preallocation *bool `json:"preallocation,omitempty"` // InsecureRegistries is a list of TLS disabled registries InsecureRegistries []string `json:"insecureRegistries,omitempty"` - // DataVolumeTTLSeconds is the time in seconds after DataVolume completion it can be garbage collected. The default is 0 sec. To disable GC use -1. + // DataVolumeTTLSeconds is the time in seconds after DataVolume completion it can be garbage collected. Disabled by default. + // Deprecated: Removed in v1.62. // +optional DataVolumeTTLSeconds *int32 `json:"dataVolumeTTLSeconds,omitempty"` // TLSSecurityProfile is used by operators to apply cluster-wide TLS security settings to operands. - TLSSecurityProfile *ocpconfigv1.TLSSecurityProfile `json:"tlsSecurityProfile,omitempty"` + TLSSecurityProfile *TLSSecurityProfile `json:"tlsSecurityProfile,omitempty"` // The imagePullSecrets used to pull the container images ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty"` + // LogVerbosity overrides the default verbosity level used to initialize loggers + // +optional + LogVerbosity *int32 `json:"logVerbosity,omitempty"` } // CDIConfigStatus provides the most recently observed status of the CDI Config resource type CDIConfigStatus struct { // The calculated upload proxy URL UploadProxyURL *string `json:"uploadProxyURL,omitempty"` + // UploadProxyCA is the certificate authority of the upload proxy + UploadProxyCA *string `json:"uploadProxyCA,omitempty"` // ImportProxy contains importer pod proxy configuration. // +optional ImportProxy *ImportProxy `json:"importProxy,omitempty"` diff --git a/vendor/kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1/types_swagger_generated.go b/vendor/kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1/types_swagger_generated.go index aaa83e1c2..04c75cd7d 100644 --- a/vendor/kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1/types_swagger_generated.go +++ b/vendor/kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1/types_swagger_generated.go @@ -68,6 +68,14 @@ func (DataVolumeSourceSnapshot) SwaggerDoc() map[string]string { } } +func (DataSourceRefSourceDataSource) SwaggerDoc() map[string]string { + return map[string]string{ + "": "DataSourceRefSourceDataSource serves as a reference to another DataSource\nCan be resolved into a DataVolumeSourcePVC or a DataVolumeSourceSnapshot\nThe maximum depth of a reference chain may not exceed 1.", + "namespace": "The namespace of the source DataSource", + "name": "The name of the source DataSource", + } +} + func (DataVolumeBlankImage) SwaggerDoc() map[string]string { return map[string]string{ "": "DataVolumeBlankImage provides the parameters to create a new raw blank image for the PVC", @@ -105,6 +113,13 @@ func (DataVolumeSourceRegistry) SwaggerDoc() map[string]string { "pullMethod": "PullMethod can be either \"pod\" (default import), or \"node\" (node docker cache based import)\n+optional", "secretRef": "SecretRef provides the secret reference needed to access the Registry source\n+optional", "certConfigMap": "CertConfigMap provides a reference to the Registry certs\n+optional", + "platform": "Platform describes the minimum runtime requirements of the image\n+optional", + } +} + +func (PlatformOptions) SwaggerDoc() map[string]string { + return map[string]string{ + "architecture": "Architecture specifies the image target CPU architecture\n+optional", } } @@ -121,11 +136,12 @@ func (DataVolumeSourceHTTP) SwaggerDoc() map[string]string { func (DataVolumeSourceImageIO) SwaggerDoc() map[string]string { return map[string]string{ - "": "DataVolumeSourceImageIO provides the parameters to create a Data Volume from an imageio source", - "url": "URL is the URL of the ovirt-engine", - "diskId": "DiskID provides id of a disk to be imported", - "secretRef": "SecretRef provides the secret reference needed to access the ovirt-engine", - "certConfigMap": "CertConfigMap provides a reference to the CA cert", + "": "DataVolumeSourceImageIO provides the parameters to create a Data Volume from an imageio source", + "url": "URL is the URL of the ovirt-engine", + "diskId": "DiskID provides id of a disk to be imported", + "secretRef": "SecretRef provides the secret reference needed to access the ovirt-engine", + "certConfigMap": "CertConfigMap provides a reference to the CA cert", + "insecureSkipVerify": "InsecureSkipVerify is a flag to skip certificate verification", } } @@ -138,6 +154,7 @@ func (DataVolumeSourceVDDK) SwaggerDoc() map[string]string { "thumbprint": "Thumbprint is the certificate thumbprint of the vCenter or ESXi host", "secretRef": "SecretRef provides a reference to a secret containing the username and password needed to access the vCenter or ESXi host", "initImageURL": "InitImageURL is an optional URL to an image containing an extracted VDDK library, overrides v2v-vmware config map", + "extraArgs": "ExtraArgs is a reference to a ConfigMap containing extra arguments to pass directly to the VDDK library", } } @@ -174,33 +191,37 @@ func (DataVolumeCondition) SwaggerDoc() map[string]string { func (StorageProfile) SwaggerDoc() map[string]string { return map[string]string{ - "": "StorageProfile provides a CDI specific recommendation for storage parameters\n+genclient\n+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object\n+kubebuilder:object:root=true\n+kubebuilder:storageversion\n+kubebuilder:resource:scope=Cluster", + "": "StorageProfile provides a CDI specific recommendation for storage parameters\n+genclient\n+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object\n+kubebuilder:object:root=true\n+kubebuilder:storageversion\n+kubebuilder:resource:scope=Cluster\n+kubebuilder:subresource:status", } } func (StorageProfileSpec) SwaggerDoc() map[string]string { return map[string]string{ - "": "StorageProfileSpec defines specification for StorageProfile", - "cloneStrategy": "CloneStrategy defines the preferred method for performing a CDI clone", - "claimPropertySets": "ClaimPropertySets is a provided set of properties applicable to PVC", + "": "StorageProfileSpec defines specification for StorageProfile", + "cloneStrategy": "CloneStrategy defines the preferred method for performing a CDI clone", + "claimPropertySets": "ClaimPropertySets is a provided set of properties applicable to PVC\n+kubebuilder:validation:MaxItems=8", + "dataImportCronSourceFormat": "DataImportCronSourceFormat defines the format of the DataImportCron-created disk image sources", + "snapshotClass": "SnapshotClass is optional specific VolumeSnapshotClass for CloneStrategySnapshot. If not set, a VolumeSnapshotClass is chosen according to the provisioner.", } } func (StorageProfileStatus) SwaggerDoc() map[string]string { return map[string]string{ - "": "StorageProfileStatus provides the most recently observed status of the StorageProfile", - "storageClass": "The StorageClass name for which capabilities are defined", - "provisioner": "The Storage class provisioner plugin name", - "cloneStrategy": "CloneStrategy defines the preferred method for performing a CDI clone", - "claimPropertySets": "ClaimPropertySets computed from the spec and detected in the system", + "": "StorageProfileStatus provides the most recently observed status of the StorageProfile", + "storageClass": "The StorageClass name for which capabilities are defined", + "provisioner": "The Storage class provisioner plugin name", + "cloneStrategy": "CloneStrategy defines the preferred method for performing a CDI clone", + "claimPropertySets": "ClaimPropertySets computed from the spec and detected in the system\n+kubebuilder:validation:MaxItems=8", + "dataImportCronSourceFormat": "DataImportCronSourceFormat defines the format of the DataImportCron-created disk image sources", + "snapshotClass": "SnapshotClass is optional specific VolumeSnapshotClass for CloneStrategySnapshot. If not set, a VolumeSnapshotClass is chosen according to the provisioner.", } } func (ClaimPropertySet) SwaggerDoc() map[string]string { return map[string]string{ "": "ClaimPropertySet is a set of properties applicable to 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+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", + "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+kubebuilder:validation:MaxItems=4\n+kubebuilder:validation:XValidation:rule=\"self.all(am, am in ['ReadWriteOnce', 'ReadOnlyMany', 'ReadWriteMany', 'ReadWriteOncePod'])\", message=\"Illegal AccessMode\"", + "volumeMode": "VolumeMode defines what type of volume is required by the claim.\nValue of Filesystem is implied when not included in claim spec.\n+kubebuilder:validation:Enum=\"Block\";\"Filesystem\"", } } @@ -226,9 +247,10 @@ func (DataSourceSpec) SwaggerDoc() map[string]string { func (DataSourceSource) SwaggerDoc() map[string]string { return map[string]string{ - "": "DataSourceSource represents the source for our DataSource", - "pvc": "+optional", - "snapshot": "+optional", + "": "DataSourceSource represents the source for our DataSource", + "pvc": "+optional", + "snapshot": "+optional", + "dataSource": "+optional", } } @@ -260,19 +282,20 @@ func (DataSourceList) SwaggerDoc() map[string]string { func (DataImportCron) SwaggerDoc() map[string]string { return map[string]string{ - "": "DataImportCron defines a cron job for recurring polling/importing disk images as PVCs into a golden image namespace\n+genclient\n+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object\n+kubebuilder:object:root=true\n+kubebuilder:storageversion\n+kubebuilder:resource:shortName=dic;dics,categories=all", + "": "DataImportCron defines a cron job for recurring polling/importing disk images as PVCs into a golden image namespace\n+genclient\n+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object\n+kubebuilder:object:root=true\n+kubebuilder:storageversion\n+kubebuilder:resource:shortName=dic;dics,categories=all\n+kubebuilder:printcolumn:name=\"Format\",type=\"string\",JSONPath=\".status.sourceFormat\",description=\"The format in which created sources are saved\"", } } func (DataImportCronSpec) SwaggerDoc() map[string]string { return map[string]string{ - "": "DataImportCronSpec defines specification for DataImportCron", - "template": "Template specifies template for the DVs to be created", - "schedule": "Schedule specifies in cron format when and how often to look for new imports", - "garbageCollect": "GarbageCollect specifies whether old PVCs should be cleaned up after a new PVC is imported.\nOptions are currently \"Outdated\" and \"Never\", defaults to \"Outdated\".\n+optional", - "importsToKeep": "Number of import PVCs to keep when garbage collecting. Default is 3.\n+optional", - "managedDataSource": "ManagedDataSource specifies the name of the corresponding DataSource this cron will manage.\nDataSource has to be in the same namespace.", - "retentionPolicy": "RetentionPolicy specifies whether the created DataVolumes and DataSources are retained when their DataImportCron is deleted. Default is RatainAll.\n+optional", + "": "DataImportCronSpec defines specification for DataImportCron", + "template": "Template specifies template for the DVs to be created", + "schedule": "Schedule specifies in cron format when and how often to look for new imports", + "garbageCollect": "GarbageCollect specifies whether old PVCs should be cleaned up after a new PVC is imported.\nOptions are currently \"Outdated\" and \"Never\", defaults to \"Outdated\".\n+optional", + "importsToKeep": "Number of import PVCs to keep when garbage collecting. Default is 3.\n+optional", + "managedDataSource": "ManagedDataSource specifies the name of the corresponding DataSource this cron will manage.\nDataSource has to be in the same namespace.", + "retentionPolicy": "RetentionPolicy specifies whether the created DataVolumes and DataSources are retained when their DataImportCron is deleted. Default is RatainAll.\n+optional", + "serviceAccountName": "ServiceAccountName is the name of the ServiceAccount for creating DataVolumes.\n+optional\n+kubebuilder:validation:MinLength=1", } } @@ -283,6 +306,7 @@ func (DataImportCronStatus) SwaggerDoc() map[string]string { "lastImportedPVC": "LastImportedPVC is the last imported PVC", "lastExecutionTimestamp": "LastExecutionTimestamp is the time of the last polling", "lastImportTimestamp": "LastImportTimestamp is the time of the last import", + "sourceFormat": "SourceFormat defines the format of the DataImportCron-created disk image sources", } } @@ -316,10 +340,13 @@ func (VolumeImportSource) SwaggerDoc() map[string]string { func (VolumeImportSourceSpec) SwaggerDoc() map[string]string { return map[string]string{ - "": "VolumeImportSourceSpec defines the Spec field for VolumeImportSource", - "source": "Source is the src of the data to be imported in the target PVC", - "preallocation": "Preallocation controls whether storage for the target PVC should be allocated in advance.", - "contentType": "ContentType represents the type of the imported data (Kubevirt or archive)", + "": "VolumeImportSourceSpec defines the Spec field for VolumeImportSource", + "source": "Source is the src of the data to be imported in the target PVC", + "preallocation": "Preallocation controls whether storage for the target PVC should be allocated in advance.", + "contentType": "ContentType represents the type of the imported data (Kubevirt or archive)", + "targetClaim": "TargetClaim the name of the specific claim to be populated with a multistage import.", + "checkpoints": "Checkpoints is a list of DataVolumeCheckpoints, representing stages in a multistage import.", + "finalCheckpoint": "FinalCheckpoint indicates whether the current DataVolumeCheckpoint is the final checkpoint.", } } @@ -412,6 +439,7 @@ func (CDICertConfig) SwaggerDoc() map[string]string { "": "CDICertConfig has the CertConfigs for CDI", "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", + "client": "Client configuration\nCerts are rotated and discarded", } } @@ -420,7 +448,7 @@ func (CDISpec) SwaggerDoc() map[string]string { "": "CDISpec defines our specification for the CDI installation", "imagePullPolicy": "+kubebuilder:validation:Enum=Always;IfNotPresent;Never\nPullPolicy describes a policy for if/when to pull a container image", "uninstallStrategy": "+kubebuilder:validation:Enum=RemoveWorkloads;BlockUninstallIfWorkloadsExist\nCDIUninstallStrategy defines the state to leave CDI on uninstall", - "infra": "Rules on which nodes CDI infrastructure pods will be scheduled", + "infra": "Selectors and tolerations that should apply to cdi infrastructure components", "workload": "Restrict on which nodes CDI workload pods will be scheduled", "cloneStrategyOverride": "Clone strategy override: should we use a host-assisted copy even if snapshots are available?\n+kubebuilder:validation:Enum=\"copy\";\"snapshot\";\"csi-clone\"", "config": "CDIConfig at CDI level", @@ -429,6 +457,37 @@ func (CDISpec) SwaggerDoc() map[string]string { } } +func (ComponentConfig) SwaggerDoc() map[string]string { + return map[string]string{ + "": "ComponentConfig defines the scheduling and replicas configuration for CDI components", + "deploymentReplicas": "DeploymentReplicas set Replicas for cdi-deployment", + "apiServerReplicas": "ApiserverReplicas set Replicas for cdi-apiserver", + "uploadProxyReplicas": "UploadproxyReplicas set Replicas for cdi-uploadproxy", + } +} + +func (CustomizeComponents) SwaggerDoc() map[string]string { + return map[string]string{ + "": "CustomizeComponents defines patches for components deployed by the CDI operator.", + "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{ + "": "CustomizeComponentsPatch defines a patch for some resource.", + "resourceName": "+kubebuilder:validation:MinLength=1", + "resourceType": "+kubebuilder:validation:MinLength=1", + } +} + func (CDIStatus) SwaggerDoc() map[string]string { return map[string]string{ "": "CDIStatus defines the status of the installation", @@ -464,12 +523,13 @@ func (CDIConfigSpec) SwaggerDoc() map[string]string { "scratchSpaceStorageClass": "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", "podResourceRequirements": "ResourceRequirements describes the compute resource requirements.", "featureGates": "FeatureGates are a list of specific enabled feature gates", - "filesystemOverhead": "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)", + "filesystemOverhead": "FilesystemOverhead describes the space reserved for overhead when using Filesystem volumes. A value is between 0 and 1, if not defined it is 0.06 (6% overhead)", "preallocation": "Preallocation controls whether storage for DataVolumes should be allocated in advance.", "insecureRegistries": "InsecureRegistries is a list of TLS disabled registries", - "dataVolumeTTLSeconds": "DataVolumeTTLSeconds is the time in seconds after DataVolume completion it can be garbage collected. The default is 0 sec. To disable GC use -1.\n+optional", + "dataVolumeTTLSeconds": "DataVolumeTTLSeconds is the time in seconds after DataVolume completion it can be garbage collected. Disabled by default.\nDeprecated: Removed in v1.62.\n+optional", "tlsSecurityProfile": "TLSSecurityProfile is used by operators to apply cluster-wide TLS security settings to operands.", "imagePullSecrets": "The imagePullSecrets used to pull the container images", + "logVerbosity": "LogVerbosity overrides the default verbosity level used to initialize loggers\n+optional", } } @@ -477,6 +537,7 @@ func (CDIConfigStatus) SwaggerDoc() map[string]string { return map[string]string{ "": "CDIConfigStatus provides the most recently observed status of the CDI Config resource", "uploadProxyURL": "The calculated upload proxy URL", + "uploadProxyCA": "UploadProxyCA is the certificate authority of the upload proxy", "importProxy": "ImportProxy contains importer pod proxy configuration.\n+optional", "scratchSpaceStorageClass": "The calculated storage class to be used for scratch space", "defaultPodResourceRequirements": "ResourceRequirements describes the compute resource requirements.", diff --git a/vendor/github.com/openshift/api/config/v1/types_tlssecurityprofile.go b/vendor/kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1/types_tlssecurityprofile.go similarity index 90% rename from vendor/github.com/openshift/api/config/v1/types_tlssecurityprofile.go rename to vendor/kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1/types_tlssecurityprofile.go index 9dbacb996..046ca82cb 100644 --- a/vendor/github.com/openshift/api/config/v1/types_tlssecurityprofile.go +++ b/vendor/kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1/types_tlssecurityprofile.go @@ -1,4 +1,6 @@ -package v1 +package v1beta1 + +// following copied from github.com/openshift/api/config/v1 // TLSSecurityProfile defines the schema for a TLS security profile. This object // is used by operators to apply TLS security settings to operands. @@ -56,7 +58,7 @@ type TLSSecurityProfile struct { // - AES128-SHA // - AES256-SHA // - DES-CBC3-SHA - // minTLSVersion: TLSv1.0 + // minTLSVersion: VersionTLS10 // // +optional // +nullable @@ -79,7 +81,7 @@ type TLSSecurityProfile struct { // - ECDHE-RSA-CHACHA20-POLY1305 // - DHE-RSA-AES128-GCM-SHA256 // - DHE-RSA-AES256-GCM-SHA384 - // minTLSVersion: TLSv1.2 + // minTLSVersion: VersionTLS12 // // +optional // +nullable @@ -94,7 +96,7 @@ type TLSSecurityProfile struct { // - TLS_AES_128_GCM_SHA256 // - TLS_AES_256_GCM_SHA384 // - TLS_CHACHA20_POLY1305_SHA256 - // minTLSVersion: TLSv1.3 + // minTLSVersion: VersionTLS13 // // NOTE: Currently unsupported. // @@ -110,7 +112,7 @@ type TLSSecurityProfile struct { // - ECDHE-RSA-CHACHA20-POLY1305 // - ECDHE-RSA-AES128-GCM-SHA256 // - ECDHE-ECDSA-AES128-GCM-SHA256 - // minTLSVersion: TLSv1.1 + // minTLSVersion: VersionTLS11 // // +optional // +nullable @@ -140,16 +142,16 @@ type CustomTLSProfile struct { type TLSProfileType string const ( - // Old is a TLS security profile based on: + // TLSProfileOldType is a TLS security profile based on: // https://wiki.mozilla.org/Security/Server_Side_TLS#Old_backward_compatibility TLSProfileOldType TLSProfileType = "Old" - // Intermediate is a TLS security profile based on: + // TLSProfileIntermediateType is a TLS security profile based on: // https://wiki.mozilla.org/Security/Server_Side_TLS#Intermediate_compatibility_.28default.29 TLSProfileIntermediateType TLSProfileType = "Intermediate" - // Modern is a TLS security profile based on: + // TLSProfileModernType is a TLS security profile based on: // https://wiki.mozilla.org/Security/Server_Side_TLS#Modern_compatibility TLSProfileModernType TLSProfileType = "Modern" - // Custom is a TLS security profile that allows for user-defined parameters. + // TLSProfileCustomType is a TLS security profile that allows for user-defined parameters. TLSProfileCustomType TLSProfileType = "Custom" ) @@ -167,7 +169,7 @@ type TLSProfileSpec struct { // that is negotiated during the TLS handshake. For example, to use TLS // versions 1.1, 1.2 and 1.3 (yaml): // - // minTLSVersion: TLSv1.1 + // minTLSVersion: VersionTLS11 // // NOTE: currently the highest minTLSVersion allowed is VersionTLS12 // @@ -177,7 +179,7 @@ type TLSProfileSpec struct { // TLSProtocolVersion is a way to specify the protocol version used for TLS connections. // Protocol versions are based on the following most common TLS configurations: // -// https://ssl-config.mozilla.org/ +// https://ssl-config.mozilla.org/ // // Note that SSLv3.0 is not a supported protocol version due to well known // vulnerabilities such as POODLE: https://en.wikipedia.org/wiki/POODLE @@ -185,13 +187,13 @@ type TLSProfileSpec struct { type TLSProtocolVersion string const ( - // VersionTLSv10 is version 1.0 of the TLS security protocol. + // VersionTLS10 is version 1.0 of the TLS security protocol. VersionTLS10 TLSProtocolVersion = "VersionTLS10" - // VersionTLSv11 is version 1.1 of the TLS security protocol. + // VersionTLS11 is version 1.1 of the TLS security protocol. VersionTLS11 TLSProtocolVersion = "VersionTLS11" - // VersionTLSv12 is version 1.2 of the TLS security protocol. + // VersionTLS12 is version 1.2 of the TLS security protocol. VersionTLS12 TLSProtocolVersion = "VersionTLS12" - // VersionTLSv13 is version 1.3 of the TLS security protocol. + // VersionTLS13 is version 1.3 of the TLS security protocol. VersionTLS13 TLSProtocolVersion = "VersionTLS13" ) @@ -199,7 +201,7 @@ const ( // // NOTE: The caller needs to make sure to check that these constants are valid for their binary. Not all // entries map to values for all binaries. In the case of ties, the kube-apiserver wins. Do not fail, -// just be sure to whitelist only and everything will be ok. +// just be sure to allowlist only and everything will be ok. var TLSProfiles = map[TLSProfileType]*TLSProfileSpec{ TLSProfileOldType: { Ciphers: []string{ diff --git a/vendor/kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1/types_transfer.go b/vendor/kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1/types_transfer.go index d87e5ffb2..fb02cacb6 100644 --- a/vendor/kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1/types_transfer.go +++ b/vendor/kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1/types_transfer.go @@ -25,6 +25,8 @@ import ( // see https://github.com/kubernetes/code-generator/issues/59 // +genclient:nonNamespaced +// Deprecated for removal in v1. +// // ObjectTransfer is the cluster scoped object transfer resource // +genclient // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object diff --git a/vendor/kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1/zz_generated.deepcopy.go b/vendor/kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1/zz_generated.deepcopy.go index a8ea39f6f..571347ca1 100644 --- a/vendor/kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1/zz_generated.deepcopy.go +++ b/vendor/kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1/zz_generated.deepcopy.go @@ -22,7 +22,6 @@ limitations under the License. package v1beta1 import ( - configv1 "github.com/openshift/api/config/v1" v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" @@ -69,6 +68,11 @@ func (in *CDICertConfig) DeepCopyInto(out *CDICertConfig) { *out = new(CertConfig) (*in).DeepCopyInto(*out) } + if in.Client != nil { + in, out := &in.Client, &out.Client + *out = new(CertConfig) + (*in).DeepCopyInto(*out) + } return } @@ -193,7 +197,7 @@ func (in *CDIConfigSpec) DeepCopyInto(out *CDIConfigSpec) { } if in.TLSSecurityProfile != nil { in, out := &in.TLSSecurityProfile, &out.TLSSecurityProfile - *out = new(configv1.TLSSecurityProfile) + *out = new(TLSSecurityProfile) (*in).DeepCopyInto(*out) } if in.ImagePullSecrets != nil { @@ -201,6 +205,11 @@ func (in *CDIConfigSpec) DeepCopyInto(out *CDIConfigSpec) { *out = make([]v1.LocalObjectReference, len(*in)) copy(*out, *in) } + if in.LogVerbosity != nil { + in, out := &in.LogVerbosity, &out.LogVerbosity + *out = new(int32) + **out = **in + } return } @@ -222,6 +231,11 @@ func (in *CDIConfigStatus) DeepCopyInto(out *CDIConfigStatus) { *out = new(string) **out = **in } + if in.UploadProxyCA != nil { + in, out := &in.UploadProxyCA, &out.UploadProxyCA + *out = new(string) + **out = **in + } if in.ImportProxy != nil { in, out := &in.ImportProxy, &out.ImportProxy *out = new(ImportProxy) @@ -298,6 +312,7 @@ func (in *CDISpec) DeepCopyInto(out *CDISpec) { } in.Infra.DeepCopyInto(&out.Infra) in.Workloads.DeepCopyInto(&out.Workloads) + in.CustomizeComponents.DeepCopyInto(&out.CustomizeComponents) if in.CloneStrategyOverride != nil { in, out := &in.CloneStrategyOverride, &out.CloneStrategyOverride *out = new(CDICloneStrategy) @@ -400,6 +415,38 @@ func (in *ClaimPropertySet) DeepCopy() *ClaimPropertySet { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ComponentConfig) DeepCopyInto(out *ComponentConfig) { + *out = *in + in.NodePlacement.DeepCopyInto(&out.NodePlacement) + if in.DeploymentReplicas != nil { + in, out := &in.DeploymentReplicas, &out.DeploymentReplicas + *out = new(int32) + **out = **in + } + if in.APIServerReplicas != nil { + in, out := &in.APIServerReplicas, &out.APIServerReplicas + *out = new(int32) + **out = **in + } + if in.UploadProxyReplicas != nil { + in, out := &in.UploadProxyReplicas, &out.UploadProxyReplicas + *out = new(int32) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentConfig. +func (in *ComponentConfig) DeepCopy() *ComponentConfig { + if in == nil { + return nil + } + out := new(ComponentConfig) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ConditionState) DeepCopyInto(out *ConditionState) { *out = *in @@ -418,6 +465,65 @@ func (in *ConditionState) DeepCopy() *ConditionState { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CustomTLSProfile) DeepCopyInto(out *CustomTLSProfile) { + *out = *in + in.TLSProfileSpec.DeepCopyInto(&out.TLSProfileSpec) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomTLSProfile. +func (in *CustomTLSProfile) DeepCopy() *CustomTLSProfile { + if in == nil { + return nil + } + out := new(CustomTLSProfile) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CustomizeComponents) DeepCopyInto(out *CustomizeComponents) { + *out = *in + if in.Patches != nil { + in, out := &in.Patches, &out.Patches + *out = make([]CustomizeComponentsPatch, len(*in)) + copy(*out, *in) + } + if in.Flags != nil { + in, out := &in.Flags, &out.Flags + *out = new(Flags) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomizeComponents. +func (in *CustomizeComponents) DeepCopy() *CustomizeComponents { + if in == nil { + return nil + } + out := new(CustomizeComponents) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CustomizeComponentsPatch) DeepCopyInto(out *CustomizeComponentsPatch) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomizeComponentsPatch. +func (in *CustomizeComponentsPatch) DeepCopy() *CustomizeComponentsPatch { + if in == nil { + return nil + } + out := new(CustomizeComponentsPatch) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *DataImportCron) DeepCopyInto(out *DataImportCron) { *out = *in @@ -515,6 +621,11 @@ func (in *DataImportCronSpec) DeepCopyInto(out *DataImportCronSpec) { *out = new(DataImportCronRetentionPolicy) **out = **in } + if in.ServiceAccountName != nil { + in, out := &in.ServiceAccountName, &out.ServiceAccountName + *out = new(string) + **out = **in + } return } @@ -549,6 +660,11 @@ func (in *DataImportCronStatus) DeepCopyInto(out *DataImportCronStatus) { in, out := &in.LastImportTimestamp, &out.LastImportTimestamp *out = (*in).DeepCopy() } + if in.SourceFormat != nil { + in, out := &in.SourceFormat, &out.SourceFormat + *out = new(DataImportCronSourceFormat) + **out = **in + } if in.Conditions != nil { in, out := &in.Conditions, &out.Conditions *out = make([]DataImportCronCondition, len(*in)) @@ -647,6 +763,22 @@ func (in *DataSourceList) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DataSourceRefSourceDataSource) DeepCopyInto(out *DataSourceRefSourceDataSource) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DataSourceRefSourceDataSource. +func (in *DataSourceRefSourceDataSource) DeepCopy() *DataSourceRefSourceDataSource { + if in == nil { + return nil + } + out := new(DataSourceRefSourceDataSource) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *DataSourceSource) DeepCopyInto(out *DataSourceSource) { *out = *in @@ -660,6 +792,11 @@ func (in *DataSourceSource) DeepCopyInto(out *DataSourceSource) { *out = new(DataVolumeSourceSnapshot) **out = **in } + if in.DataSource != nil { + in, out := &in.DataSource, &out.DataSource + *out = new(DataSourceRefSourceDataSource) + **out = **in + } return } @@ -866,7 +1003,7 @@ func (in *DataVolumeSource) DeepCopyInto(out *DataVolumeSource) { if in.Imageio != nil { in, out := &in.Imageio, &out.Imageio *out = new(DataVolumeSourceImageIO) - **out = **in + (*in).DeepCopyInto(*out) } if in.VDDK != nil { in, out := &in.VDDK, &out.VDDK @@ -936,6 +1073,11 @@ func (in *DataVolumeSourceHTTP) DeepCopy() *DataVolumeSourceHTTP { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *DataVolumeSourceImageIO) DeepCopyInto(out *DataVolumeSourceImageIO) { *out = *in + if in.InsecureSkipVerify != nil { + in, out := &in.InsecureSkipVerify, &out.InsecureSkipVerify + *out = new(bool) + **out = **in + } return } @@ -1014,6 +1156,11 @@ func (in *DataVolumeSourceRegistry) DeepCopyInto(out *DataVolumeSourceRegistry) *out = new(string) **out = **in } + if in.Platform != nil { + in, out := &in.Platform, &out.Platform + *out = new(PlatformOptions) + **out = **in + } return } @@ -1183,6 +1330,43 @@ func (in *FilesystemOverhead) DeepCopy() *FilesystemOverhead { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Flags) DeepCopyInto(out *Flags) { + *out = *in + if in.API != nil { + in, out := &in.API, &out.API + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Controller != nil { + in, out := &in.Controller, &out.Controller + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.UploadProxy != nil { + in, out := &in.UploadProxy, &out.UploadProxy + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Flags. +func (in *Flags) DeepCopy() *Flags { + if in == nil { + return nil + } + out := new(Flags) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ImportProxy) DeepCopyInto(out *ImportProxy) { *out = *in @@ -1250,7 +1434,7 @@ func (in *ImportSourceType) DeepCopyInto(out *ImportSourceType) { if in.Imageio != nil { in, out := &in.Imageio, &out.Imageio *out = new(DataVolumeSourceImageIO) - **out = **in + (*in).DeepCopyInto(*out) } if in.VDDK != nil { in, out := &in.VDDK, &out.VDDK @@ -1286,6 +1470,38 @@ func (in *ImportStatus) DeepCopy() *ImportStatus { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *IntermediateTLSProfile) DeepCopyInto(out *IntermediateTLSProfile) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IntermediateTLSProfile. +func (in *IntermediateTLSProfile) DeepCopy() *IntermediateTLSProfile { + if in == nil { + return nil + } + out := new(IntermediateTLSProfile) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ModernTLSProfile) DeepCopyInto(out *ModernTLSProfile) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ModernTLSProfile. +func (in *ModernTLSProfile) DeepCopy() *ModernTLSProfile { + if in == nil { + return nil + } + out := new(ModernTLSProfile) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ObjectTransfer) DeepCopyInto(out *ObjectTransfer) { *out = *in @@ -1418,6 +1634,38 @@ func (in *ObjectTransferStatus) DeepCopy() *ObjectTransferStatus { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OldTLSProfile) DeepCopyInto(out *OldTLSProfile) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OldTLSProfile. +func (in *OldTLSProfile) DeepCopy() *OldTLSProfile { + if in == nil { + return nil + } + out := new(OldTLSProfile) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PlatformOptions) DeepCopyInto(out *PlatformOptions) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PlatformOptions. +func (in *PlatformOptions) DeepCopy() *PlatformOptions { + if in == nil { + return nil + } + out := new(PlatformOptions) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *StorageProfile) DeepCopyInto(out *StorageProfile) { *out = *in @@ -1494,6 +1742,16 @@ func (in *StorageProfileSpec) DeepCopyInto(out *StorageProfileSpec) { (*in)[i].DeepCopyInto(&(*out)[i]) } } + if in.DataImportCronSourceFormat != nil { + in, out := &in.DataImportCronSourceFormat, &out.DataImportCronSourceFormat + *out = new(DataImportCronSourceFormat) + **out = **in + } + if in.SnapshotClass != nil { + in, out := &in.SnapshotClass, &out.SnapshotClass + *out = new(string) + **out = **in + } return } @@ -1532,6 +1790,16 @@ func (in *StorageProfileStatus) DeepCopyInto(out *StorageProfileStatus) { (*in)[i].DeepCopyInto(&(*out)[i]) } } + if in.DataImportCronSourceFormat != nil { + in, out := &in.DataImportCronSourceFormat, &out.DataImportCronSourceFormat + *out = new(DataImportCronSourceFormat) + **out = **in + } + if in.SnapshotClass != nil { + in, out := &in.SnapshotClass, &out.SnapshotClass + *out = new(string) + **out = **in + } return } @@ -1592,6 +1860,63 @@ func (in *StorageSpec) DeepCopy() *StorageSpec { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TLSProfileSpec) DeepCopyInto(out *TLSProfileSpec) { + *out = *in + if in.Ciphers != nil { + in, out := &in.Ciphers, &out.Ciphers + *out = make([]string, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TLSProfileSpec. +func (in *TLSProfileSpec) DeepCopy() *TLSProfileSpec { + if in == nil { + return nil + } + out := new(TLSProfileSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TLSSecurityProfile) DeepCopyInto(out *TLSSecurityProfile) { + *out = *in + if in.Old != nil { + in, out := &in.Old, &out.Old + *out = new(OldTLSProfile) + **out = **in + } + if in.Intermediate != nil { + in, out := &in.Intermediate, &out.Intermediate + *out = new(IntermediateTLSProfile) + **out = **in + } + if in.Modern != nil { + in, out := &in.Modern, &out.Modern + *out = new(ModernTLSProfile) + **out = **in + } + if in.Custom != nil { + in, out := &in.Custom, &out.Custom + *out = new(CustomTLSProfile) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TLSSecurityProfile. +func (in *TLSSecurityProfile) DeepCopy() *TLSSecurityProfile { + if in == nil { + return nil + } + out := new(TLSSecurityProfile) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *TransferSource) DeepCopyInto(out *TransferSource) { *out = *in @@ -1802,6 +2127,21 @@ func (in *VolumeImportSourceSpec) DeepCopyInto(out *VolumeImportSourceSpec) { *out = new(bool) **out = **in } + if in.TargetClaim != nil { + in, out := &in.TargetClaim, &out.TargetClaim + *out = new(string) + **out = **in + } + if in.Checkpoints != nil { + in, out := &in.Checkpoints, &out.Checkpoints + *out = make([]DataVolumeCheckpoint, len(*in)) + copy(*out, *in) + } + if in.FinalCheckpoint != nil { + in, out := &in.FinalCheckpoint, &out.FinalCheckpoint + *out = new(bool) + **out = **in + } return } @@ -1866,7 +2206,7 @@ func (in *VolumeUploadSourceList) DeepCopyInto(out *VolumeUploadSourceList) { in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items - *out = make([]VolumeImportSource, len(*in)) + *out = make([]VolumeUploadSource, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } diff --git a/vendor/modules.txt b/vendor/modules.txt index 389e1a6b5..8c59085db 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -56,9 +56,6 @@ github.com/fsnotify/fsnotify/internal # github.com/fxamacker/cbor/v2 v2.9.0 ## explicit; go 1.20 github.com/fxamacker/cbor/v2 -# github.com/go-kit/kit v0.13.0 -## explicit; go 1.17 -github.com/go-kit/kit/log # github.com/go-kit/log v0.2.1 ## explicit; go 1.17 github.com/go-kit/log @@ -131,11 +128,6 @@ github.com/gogo/protobuf/sortkeys # github.com/golang-jwt/jwt/v5 v5.3.0 ## explicit; go 1.21 github.com/golang-jwt/jwt/v5 -# github.com/golang/glog v1.2.5 -## explicit; go 1.19 -github.com/golang/glog -github.com/golang/glog/internal/logsink -github.com/golang/glog/internal/stackdump # github.com/golang/protobuf v1.5.4 ## explicit; go 1.17 github.com/golang/protobuf/proto @@ -231,9 +223,6 @@ github.com/munnerz/goautoneg # github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f ## explicit github.com/mwitkow/go-conntrack -# github.com/openshift/api v0.0.0-20230503133300-8bbcb7ca7183 -## explicit; go 1.20 -github.com/openshift/api/config/v1 # github.com/openshift/custom-resource-status v1.1.2 ## explicit; go 1.12 github.com/openshift/custom-resource-status/conditions/v1 @@ -698,8 +687,8 @@ k8s.io/api/storage/v1 k8s.io/api/storage/v1alpha1 k8s.io/api/storage/v1beta1 k8s.io/api/storagemigration/v1beta1 -# k8s.io/apiextensions-apiserver v0.30.0 -## explicit; go 1.22.0 +# k8s.io/apiextensions-apiserver v0.34.3 +## explicit; go 1.24.0 k8s.io/apiextensions-apiserver/pkg/apis/apiextensions k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1 # k8s.io/apimachinery v0.36.1 @@ -1380,7 +1369,7 @@ k8s.io/kms/apis/v1beta1 k8s.io/kms/apis/v2 k8s.io/kms/pkg/service k8s.io/kms/pkg/util -# k8s.io/kube-openapi v0.30.0 => k8s.io/kube-openapi v0.0.0-20260512234627-ef417d054102 +# k8s.io/kube-openapi v0.31.0 => k8s.io/kube-openapi v0.0.0-20260512234627-ef417d054102 ## explicit; go 1.24.0 k8s.io/kube-openapi/cmd/openapi-gen k8s.io/kube-openapi/cmd/openapi-gen/args @@ -1443,48 +1432,51 @@ k8s.io/utils/pointer k8s.io/utils/ptr k8s.io/utils/third_party/forked/golang/btree k8s.io/utils/trace -# kubevirt.io/api v1.3.0 -## explicit; go 1.22.0 +# kubevirt.io/api v1.8.2 +## explicit; go 1.24.0 +kubevirt.io/api/backup +kubevirt.io/api/backup/v1alpha1 kubevirt.io/api/clone kubevirt.io/api/clone/v1alpha1 +kubevirt.io/api/clone/v1beta1 kubevirt.io/api/core kubevirt.io/api/core/v1 kubevirt.io/api/export kubevirt.io/api/export/v1alpha1 kubevirt.io/api/export/v1beta1 kubevirt.io/api/instancetype -kubevirt.io/api/instancetype/v1alpha1 -kubevirt.io/api/instancetype/v1alpha2 kubevirt.io/api/instancetype/v1beta1 kubevirt.io/api/migrations kubevirt.io/api/migrations/v1alpha1 kubevirt.io/api/pool kubevirt.io/api/pool/v1alpha1 +kubevirt.io/api/pool/v1beta1 kubevirt.io/api/snapshot kubevirt.io/api/snapshot/v1alpha1 kubevirt.io/api/snapshot/v1beta1 -# kubevirt.io/client-go v1.3.0 -## explicit; go 1.22.0 -kubevirt.io/client-go/generated/kubevirt/clientset/versioned -kubevirt.io/client-go/generated/kubevirt/clientset/versioned/scheme -kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/clone/v1alpha1 -kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/core/v1 -kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/export/v1alpha1 -kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/export/v1beta1 -kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/instancetype/v1alpha1 -kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/instancetype/v1alpha2 -kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/instancetype/v1beta1 -kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/migrations/v1alpha1 -kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/pool/v1alpha1 -kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/snapshot/v1alpha1 -kubevirt.io/client-go/generated/kubevirt/clientset/versioned/typed/snapshot/v1beta1 +# kubevirt.io/client-go v1.8.2 +## explicit; go 1.24.0 +kubevirt.io/client-go/kubevirt +kubevirt.io/client-go/kubevirt/scheme +kubevirt.io/client-go/kubevirt/typed/backup/v1alpha1 +kubevirt.io/client-go/kubevirt/typed/clone/v1alpha1 +kubevirt.io/client-go/kubevirt/typed/clone/v1beta1 +kubevirt.io/client-go/kubevirt/typed/core/v1 +kubevirt.io/client-go/kubevirt/typed/export/v1alpha1 +kubevirt.io/client-go/kubevirt/typed/export/v1beta1 +kubevirt.io/client-go/kubevirt/typed/instancetype/v1beta1 +kubevirt.io/client-go/kubevirt/typed/migrations/v1alpha1 +kubevirt.io/client-go/kubevirt/typed/pool/v1alpha1 +kubevirt.io/client-go/kubevirt/typed/pool/v1beta1 +kubevirt.io/client-go/kubevirt/typed/snapshot/v1alpha1 +kubevirt.io/client-go/kubevirt/typed/snapshot/v1beta1 kubevirt.io/client-go/log kubevirt.io/client-go/subresources -# kubevirt.io/containerized-data-importer-api v1.57.0-alpha1 -## explicit; go 1.19 +# kubevirt.io/containerized-data-importer-api v1.64.0 +## explicit; go 1.23.0 kubevirt.io/containerized-data-importer-api/pkg/apis/core kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1 -# kubevirt.io/controller-lifecycle-operator-sdk/api v0.0.0-20220329064328-f3cc58c6ed90 +# kubevirt.io/controller-lifecycle-operator-sdk/api v0.2.4 ## explicit; go 1.17 kubevirt.io/controller-lifecycle-operator-sdk/api # sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.34.0