mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 10:33:35 +00:00
build: move e2e dependencies into e2e/go.mod
Several packages are only used while running the e2e suite. These packages are less important to update, as the they can not influence the final executable that is part of the Ceph-CSI container-image. By moving these dependencies out of the main Ceph-CSI go.mod, it is easier to identify if a reported CVE affects Ceph-CSI, or only the testing (like most of the Kubernetes CVEs). Signed-off-by: Niels de Vos <ndevos@ibm.com>
This commit is contained in:
committed by
mergify[bot]
parent
15da101b1b
commit
bec6090996
202
e2e/vendor/k8s.io/kube-scheduler/LICENSE
generated
vendored
Normal file
202
e2e/vendor/k8s.io/kube-scheduler/LICENSE
generated
vendored
Normal file
@ -0,0 +1,202 @@
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
21
e2e/vendor/k8s.io/kube-scheduler/config/v1/doc.go
generated
vendored
Normal file
21
e2e/vendor/k8s.io/kube-scheduler/config/v1/doc.go
generated
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
/*
|
||||
Copyright 2022 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.
|
||||
*/
|
||||
|
||||
// +k8s:deepcopy-gen=package
|
||||
// +k8s:openapi-gen=true
|
||||
// +groupName=kubescheduler.config.k8s.io
|
||||
|
||||
package v1 // import "k8s.io/kube-scheduler/config/v1"
|
50
e2e/vendor/k8s.io/kube-scheduler/config/v1/register.go
generated
vendored
Normal file
50
e2e/vendor/k8s.io/kube-scheduler/config/v1/register.go
generated
vendored
Normal file
@ -0,0 +1,50 @@
|
||||
/*
|
||||
Copyright 2022 The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||
)
|
||||
|
||||
// GroupName is the group name used in this package
|
||||
const GroupName = "kubescheduler.config.k8s.io"
|
||||
|
||||
// SchemeGroupVersion is group version used to register these objects
|
||||
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"}
|
||||
|
||||
var (
|
||||
// SchemeBuilder is the scheme builder with scheme init functions to run for this API package
|
||||
SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
|
||||
// AddToScheme is a global function that registers this API group & version to a scheme
|
||||
AddToScheme = SchemeBuilder.AddToScheme
|
||||
)
|
||||
|
||||
// addKnownTypes registers known types to the given scheme
|
||||
func addKnownTypes(scheme *runtime.Scheme) error {
|
||||
scheme.AddKnownTypes(SchemeGroupVersion,
|
||||
&KubeSchedulerConfiguration{},
|
||||
&DefaultPreemptionArgs{},
|
||||
&InterPodAffinityArgs{},
|
||||
&NodeResourcesBalancedAllocationArgs{},
|
||||
&NodeResourcesFitArgs{},
|
||||
&PodTopologySpreadArgs{},
|
||||
&VolumeBindingArgs{},
|
||||
&NodeAffinityArgs{},
|
||||
)
|
||||
return nil
|
||||
}
|
397
e2e/vendor/k8s.io/kube-scheduler/config/v1/types.go
generated
vendored
Normal file
397
e2e/vendor/k8s.io/kube-scheduler/config/v1/types.go
generated
vendored
Normal file
@ -0,0 +1,397 @@
|
||||
/*
|
||||
Copyright 2022 The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
componentbaseconfigv1alpha1 "k8s.io/component-base/config/v1alpha1"
|
||||
"sigs.k8s.io/yaml"
|
||||
)
|
||||
|
||||
const (
|
||||
// SchedulerDefaultLockObjectNamespace defines default scheduler lock object namespace ("kube-system")
|
||||
SchedulerDefaultLockObjectNamespace string = metav1.NamespaceSystem
|
||||
|
||||
// SchedulerDefaultLockObjectName defines default scheduler lock object name ("kube-scheduler")
|
||||
SchedulerDefaultLockObjectName = "kube-scheduler"
|
||||
|
||||
// SchedulerDefaultProviderName defines the default provider names
|
||||
SchedulerDefaultProviderName = "DefaultProvider"
|
||||
)
|
||||
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// KubeSchedulerConfiguration configures a scheduler
|
||||
type KubeSchedulerConfiguration struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
|
||||
// Parallelism defines the amount of parallelism in algorithms for scheduling a Pods. Must be greater than 0. Defaults to 16
|
||||
Parallelism *int32 `json:"parallelism,omitempty"`
|
||||
|
||||
// LeaderElection defines the configuration of leader election client.
|
||||
LeaderElection componentbaseconfigv1alpha1.LeaderElectionConfiguration `json:"leaderElection"`
|
||||
|
||||
// ClientConnection specifies the kubeconfig file and client connection
|
||||
// settings for the proxy server to use when communicating with the apiserver.
|
||||
ClientConnection componentbaseconfigv1alpha1.ClientConnectionConfiguration `json:"clientConnection"`
|
||||
|
||||
// DebuggingConfiguration holds configuration for Debugging related features
|
||||
// TODO: We might wanna make this a substruct like Debugging componentbaseconfigv1alpha1.DebuggingConfiguration
|
||||
componentbaseconfigv1alpha1.DebuggingConfiguration `json:",inline"`
|
||||
|
||||
// PercentageOfNodesToScore is the percentage of all nodes that once found feasible
|
||||
// for running a pod, the scheduler stops its search for more feasible nodes in
|
||||
// the cluster. This helps improve scheduler's performance. Scheduler always tries to find
|
||||
// at least "minFeasibleNodesToFind" feasible nodes no matter what the value of this flag is.
|
||||
// Example: if the cluster size is 500 nodes and the value of this flag is 30,
|
||||
// then scheduler stops finding further feasible nodes once it finds 150 feasible ones.
|
||||
// When the value is 0, default percentage (5%--50% based on the size of the cluster) of the
|
||||
// nodes will be scored. It is overridden by profile level PercentageOfNodesToScore.
|
||||
PercentageOfNodesToScore *int32 `json:"percentageOfNodesToScore,omitempty"`
|
||||
|
||||
// PodInitialBackoffSeconds is the initial backoff for unschedulable pods.
|
||||
// If specified, it must be greater than 0. If this value is null, the default value (1s)
|
||||
// will be used.
|
||||
PodInitialBackoffSeconds *int64 `json:"podInitialBackoffSeconds,omitempty"`
|
||||
|
||||
// PodMaxBackoffSeconds is the max backoff for unschedulable pods.
|
||||
// If specified, it must be greater than podInitialBackoffSeconds. If this value is null,
|
||||
// the default value (10s) will be used.
|
||||
PodMaxBackoffSeconds *int64 `json:"podMaxBackoffSeconds,omitempty"`
|
||||
|
||||
// Profiles are scheduling profiles that kube-scheduler supports. Pods can
|
||||
// choose to be scheduled under a particular profile by setting its associated
|
||||
// scheduler name. Pods that don't specify any scheduler name are scheduled
|
||||
// with the "default-scheduler" profile, if present here.
|
||||
// +listType=map
|
||||
// +listMapKey=schedulerName
|
||||
Profiles []KubeSchedulerProfile `json:"profiles,omitempty"`
|
||||
|
||||
// Extenders are the list of scheduler extenders, each holding the values of how to communicate
|
||||
// with the extender. These extenders are shared by all scheduler profiles.
|
||||
// +listType=set
|
||||
Extenders []Extender `json:"extenders,omitempty"`
|
||||
|
||||
// DelayCacheUntilActive specifies when to start caching. If this is true and leader election is enabled,
|
||||
// the scheduler will wait to fill informer caches until it is the leader. Doing so will have slower
|
||||
// failover with the benefit of lower memory overhead while waiting to become leader.
|
||||
// Defaults to false.
|
||||
DelayCacheUntilActive bool `json:"delayCacheUntilActive,omitempty"`
|
||||
}
|
||||
|
||||
// DecodeNestedObjects decodes plugin args for known types.
|
||||
func (c *KubeSchedulerConfiguration) DecodeNestedObjects(d runtime.Decoder) error {
|
||||
var strictDecodingErrs []error
|
||||
for i := range c.Profiles {
|
||||
prof := &c.Profiles[i]
|
||||
for j := range prof.PluginConfig {
|
||||
err := prof.PluginConfig[j].decodeNestedObjects(d)
|
||||
if err != nil {
|
||||
decodingErr := fmt.Errorf("decoding .profiles[%d].pluginConfig[%d]: %w", i, j, err)
|
||||
if runtime.IsStrictDecodingError(err) {
|
||||
strictDecodingErrs = append(strictDecodingErrs, decodingErr)
|
||||
} else {
|
||||
return decodingErr
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if len(strictDecodingErrs) > 0 {
|
||||
return runtime.NewStrictDecodingError(strictDecodingErrs)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// EncodeNestedObjects encodes plugin args.
|
||||
func (c *KubeSchedulerConfiguration) EncodeNestedObjects(e runtime.Encoder) error {
|
||||
for i := range c.Profiles {
|
||||
prof := &c.Profiles[i]
|
||||
for j := range prof.PluginConfig {
|
||||
err := prof.PluginConfig[j].encodeNestedObjects(e)
|
||||
if err != nil {
|
||||
return fmt.Errorf("encoding .profiles[%d].pluginConfig[%d]: %w", i, j, err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// KubeSchedulerProfile is a scheduling profile.
|
||||
type KubeSchedulerProfile struct {
|
||||
// SchedulerName is the name of the scheduler associated to this profile.
|
||||
// If SchedulerName matches with the pod's "spec.schedulerName", then the pod
|
||||
// is scheduled with this profile.
|
||||
SchedulerName *string `json:"schedulerName,omitempty"`
|
||||
|
||||
// PercentageOfNodesToScore is the percentage of all nodes that once found feasible
|
||||
// for running a pod, the scheduler stops its search for more feasible nodes in
|
||||
// the cluster. This helps improve scheduler's performance. Scheduler always tries to find
|
||||
// at least "minFeasibleNodesToFind" feasible nodes no matter what the value of this flag is.
|
||||
// Example: if the cluster size is 500 nodes and the value of this flag is 30,
|
||||
// then scheduler stops finding further feasible nodes once it finds 150 feasible ones.
|
||||
// When the value is 0, default percentage (5%--50% based on the size of the cluster) of the
|
||||
// nodes will be scored. It will override global PercentageOfNodesToScore. If it is empty,
|
||||
// global PercentageOfNodesToScore will be used.
|
||||
PercentageOfNodesToScore *int32 `json:"percentageOfNodesToScore,omitempty"`
|
||||
|
||||
// Plugins specify the set of plugins that should be enabled or disabled.
|
||||
// Enabled plugins are the ones that should be enabled in addition to the
|
||||
// default plugins. Disabled plugins are any of the default plugins that
|
||||
// should be disabled.
|
||||
// When no enabled or disabled plugin is specified for an extension point,
|
||||
// default plugins for that extension point will be used if there is any.
|
||||
// If a QueueSort plugin is specified, the same QueueSort Plugin and
|
||||
// PluginConfig must be specified for all profiles.
|
||||
Plugins *Plugins `json:"plugins,omitempty"`
|
||||
|
||||
// PluginConfig is an optional set of custom plugin arguments for each plugin.
|
||||
// Omitting config args for a plugin is equivalent to using the default config
|
||||
// for that plugin.
|
||||
// +listType=map
|
||||
// +listMapKey=name
|
||||
PluginConfig []PluginConfig `json:"pluginConfig,omitempty"`
|
||||
}
|
||||
|
||||
// Plugins include multiple extension points. When specified, the list of plugins for
|
||||
// a particular extension point are the only ones enabled. If an extension point is
|
||||
// omitted from the config, then the default set of plugins is used for that extension point.
|
||||
// Enabled plugins are called in the order specified here, after default plugins. If they need to
|
||||
// be invoked before default plugins, default plugins must be disabled and re-enabled here in desired order.
|
||||
type Plugins struct {
|
||||
// PreEnqueue is a list of plugins that should be invoked before adding pods to the scheduling queue.
|
||||
PreEnqueue PluginSet `json:"preEnqueue,omitempty"`
|
||||
|
||||
// QueueSort is a list of plugins that should be invoked when sorting pods in the scheduling queue.
|
||||
QueueSort PluginSet `json:"queueSort,omitempty"`
|
||||
|
||||
// PreFilter is a list of plugins that should be invoked at "PreFilter" extension point of the scheduling framework.
|
||||
PreFilter PluginSet `json:"preFilter,omitempty"`
|
||||
|
||||
// Filter is a list of plugins that should be invoked when filtering out nodes that cannot run the Pod.
|
||||
Filter PluginSet `json:"filter,omitempty"`
|
||||
|
||||
// PostFilter is a list of plugins that are invoked after filtering phase, but only when no feasible nodes were found for the pod.
|
||||
PostFilter PluginSet `json:"postFilter,omitempty"`
|
||||
|
||||
// PreScore is a list of plugins that are invoked before scoring.
|
||||
PreScore PluginSet `json:"preScore,omitempty"`
|
||||
|
||||
// Score is a list of plugins that should be invoked when ranking nodes that have passed the filtering phase.
|
||||
Score PluginSet `json:"score,omitempty"`
|
||||
|
||||
// Reserve is a list of plugins invoked when reserving/unreserving resources
|
||||
// after a node is assigned to run the pod.
|
||||
Reserve PluginSet `json:"reserve,omitempty"`
|
||||
|
||||
// Permit is a list of plugins that control binding of a Pod. These plugins can prevent or delay binding of a Pod.
|
||||
Permit PluginSet `json:"permit,omitempty"`
|
||||
|
||||
// PreBind is a list of plugins that should be invoked before a pod is bound.
|
||||
PreBind PluginSet `json:"preBind,omitempty"`
|
||||
|
||||
// Bind is a list of plugins that should be invoked at "Bind" extension point of the scheduling framework.
|
||||
// The scheduler call these plugins in order. Scheduler skips the rest of these plugins as soon as one returns success.
|
||||
Bind PluginSet `json:"bind,omitempty"`
|
||||
|
||||
// PostBind is a list of plugins that should be invoked after a pod is successfully bound.
|
||||
PostBind PluginSet `json:"postBind,omitempty"`
|
||||
|
||||
// MultiPoint is a simplified config section to enable plugins for all valid extension points.
|
||||
// Plugins enabled through MultiPoint will automatically register for every individual extension
|
||||
// point the plugin has implemented. Disabling a plugin through MultiPoint disables that behavior.
|
||||
// The same is true for disabling "*" through MultiPoint (no default plugins will be automatically registered).
|
||||
// Plugins can still be disabled through their individual extension points.
|
||||
//
|
||||
// In terms of precedence, plugin config follows this basic hierarchy
|
||||
// 1. Specific extension points
|
||||
// 2. Explicitly configured MultiPoint plugins
|
||||
// 3. The set of default plugins, as MultiPoint plugins
|
||||
// This implies that a higher precedence plugin will run first and overwrite any settings within MultiPoint.
|
||||
// Explicitly user-configured plugins also take a higher precedence over default plugins.
|
||||
// Within this hierarchy, an Enabled setting takes precedence over Disabled. For example, if a plugin is
|
||||
// set in both `multiPoint.Enabled` and `multiPoint.Disabled`, the plugin will be enabled. Similarly,
|
||||
// including `multiPoint.Disabled = '*'` and `multiPoint.Enabled = pluginA` will still register that specific
|
||||
// plugin through MultiPoint. This follows the same behavior as all other extension point configurations.
|
||||
MultiPoint PluginSet `json:"multiPoint,omitempty"`
|
||||
}
|
||||
|
||||
// PluginSet specifies enabled and disabled plugins for an extension point.
|
||||
// If an array is empty, missing, or nil, default plugins at that extension point will be used.
|
||||
type PluginSet struct {
|
||||
// Enabled specifies plugins that should be enabled in addition to default plugins.
|
||||
// If the default plugin is also configured in the scheduler config file, the weight of plugin will
|
||||
// be overridden accordingly.
|
||||
// These are called after default plugins and in the same order specified here.
|
||||
// +listType=atomic
|
||||
Enabled []Plugin `json:"enabled,omitempty"`
|
||||
// Disabled specifies default plugins that should be disabled.
|
||||
// When all default plugins need to be disabled, an array containing only one "*" should be provided.
|
||||
// +listType=map
|
||||
// +listMapKey=name
|
||||
Disabled []Plugin `json:"disabled,omitempty"`
|
||||
}
|
||||
|
||||
// Plugin specifies a plugin name and its weight when applicable. Weight is used only for Score plugins.
|
||||
type Plugin struct {
|
||||
// Name defines the name of plugin
|
||||
Name string `json:"name"`
|
||||
// Weight defines the weight of plugin, only used for Score plugins.
|
||||
Weight *int32 `json:"weight,omitempty"`
|
||||
}
|
||||
|
||||
// PluginConfig specifies arguments that should be passed to a plugin at the time of initialization.
|
||||
// A plugin that is invoked at multiple extension points is initialized once. Args can have arbitrary structure.
|
||||
// It is up to the plugin to process these Args.
|
||||
type PluginConfig struct {
|
||||
// Name defines the name of plugin being configured
|
||||
Name string `json:"name"`
|
||||
// Args defines the arguments passed to the plugins at the time of initialization. Args can have arbitrary structure.
|
||||
Args runtime.RawExtension `json:"args,omitempty"`
|
||||
}
|
||||
|
||||
func (c *PluginConfig) decodeNestedObjects(d runtime.Decoder) error {
|
||||
gvk := SchemeGroupVersion.WithKind(c.Name + "Args")
|
||||
// dry-run to detect and skip out-of-tree plugin args.
|
||||
if _, _, err := d.Decode(nil, &gvk, nil); runtime.IsNotRegisteredError(err) {
|
||||
return nil
|
||||
}
|
||||
|
||||
var strictDecodingErr error
|
||||
obj, parsedGvk, err := d.Decode(c.Args.Raw, &gvk, nil)
|
||||
if err != nil {
|
||||
decodingArgsErr := fmt.Errorf("decoding args for plugin %s: %w", c.Name, err)
|
||||
if obj != nil && runtime.IsStrictDecodingError(err) {
|
||||
strictDecodingErr = runtime.NewStrictDecodingError([]error{decodingArgsErr})
|
||||
} else {
|
||||
return decodingArgsErr
|
||||
}
|
||||
}
|
||||
if parsedGvk.GroupKind() != gvk.GroupKind() {
|
||||
return fmt.Errorf("args for plugin %s were not of type %s, got %s", c.Name, gvk.GroupKind(), parsedGvk.GroupKind())
|
||||
}
|
||||
c.Args.Object = obj
|
||||
return strictDecodingErr
|
||||
}
|
||||
|
||||
func (c *PluginConfig) encodeNestedObjects(e runtime.Encoder) error {
|
||||
if c.Args.Object == nil {
|
||||
return nil
|
||||
}
|
||||
var buf bytes.Buffer
|
||||
err := e.Encode(c.Args.Object, &buf)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
// The <e> encoder might be a YAML encoder, but the parent encoder expects
|
||||
// JSON output, so we convert YAML back to JSON.
|
||||
// This is a no-op if <e> produces JSON.
|
||||
json, err := yaml.YAMLToJSON(buf.Bytes())
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
c.Args.Raw = json
|
||||
return nil
|
||||
}
|
||||
|
||||
// Extender holds the parameters used to communicate with the extender. If a verb is unspecified/empty,
|
||||
// it is assumed that the extender chose not to provide that extension.
|
||||
type Extender struct {
|
||||
// URLPrefix at which the extender is available
|
||||
URLPrefix string `json:"urlPrefix"`
|
||||
// Verb for the filter call, empty if not supported. This verb is appended to the URLPrefix when issuing the filter call to extender.
|
||||
FilterVerb string `json:"filterVerb,omitempty"`
|
||||
// Verb for the preempt call, empty if not supported. This verb is appended to the URLPrefix when issuing the preempt call to extender.
|
||||
PreemptVerb string `json:"preemptVerb,omitempty"`
|
||||
// Verb for the prioritize call, empty if not supported. This verb is appended to the URLPrefix when issuing the prioritize call to extender.
|
||||
PrioritizeVerb string `json:"prioritizeVerb,omitempty"`
|
||||
// The numeric multiplier for the node scores that the prioritize call generates.
|
||||
// The weight should be a positive integer
|
||||
Weight int64 `json:"weight,omitempty"`
|
||||
// Verb for the bind call, empty if not supported. This verb is appended to the URLPrefix when issuing the bind call to extender.
|
||||
// If this method is implemented by the extender, it is the extender's responsibility to bind the pod to apiserver. Only one extender
|
||||
// can implement this function.
|
||||
BindVerb string `json:"bindVerb,omitempty"`
|
||||
// EnableHTTPS specifies whether https should be used to communicate with the extender
|
||||
EnableHTTPS bool `json:"enableHTTPS,omitempty"`
|
||||
// TLSConfig specifies the transport layer security config
|
||||
TLSConfig *ExtenderTLSConfig `json:"tlsConfig,omitempty"`
|
||||
// HTTPTimeout specifies the timeout duration for a call to the extender. Filter timeout fails the scheduling of the pod. Prioritize
|
||||
// timeout is ignored, k8s/other extenders priorities are used to select the node.
|
||||
HTTPTimeout metav1.Duration `json:"httpTimeout,omitempty"`
|
||||
// NodeCacheCapable specifies that the extender is capable of caching node information,
|
||||
// so the scheduler should only send minimal information about the eligible nodes
|
||||
// assuming that the extender already cached full details of all nodes in the cluster
|
||||
NodeCacheCapable bool `json:"nodeCacheCapable,omitempty"`
|
||||
// ManagedResources is a list of extended resources that are managed by
|
||||
// this extender.
|
||||
// - A pod will be sent to the extender on the Filter, Prioritize and Bind
|
||||
// (if the extender is the binder) phases iff the pod requests at least
|
||||
// one of the extended resources in this list. If empty or unspecified,
|
||||
// all pods will be sent to this extender.
|
||||
// - If IgnoredByScheduler is set to true for a resource, kube-scheduler
|
||||
// will skip checking the resource in predicates.
|
||||
// +optional
|
||||
// +listType=atomic
|
||||
ManagedResources []ExtenderManagedResource `json:"managedResources,omitempty"`
|
||||
// Ignorable specifies if the extender is ignorable, i.e. scheduling should not
|
||||
// fail when the extender returns an error or is not reachable.
|
||||
Ignorable bool `json:"ignorable,omitempty"`
|
||||
}
|
||||
|
||||
// ExtenderManagedResource describes the arguments of extended resources
|
||||
// managed by an extender.
|
||||
type ExtenderManagedResource struct {
|
||||
// Name is the extended resource name.
|
||||
Name string `json:"name"`
|
||||
// IgnoredByScheduler indicates whether kube-scheduler should ignore this
|
||||
// resource when applying predicates.
|
||||
IgnoredByScheduler bool `json:"ignoredByScheduler,omitempty"`
|
||||
}
|
||||
|
||||
// ExtenderTLSConfig contains settings to enable TLS with extender
|
||||
type ExtenderTLSConfig struct {
|
||||
// Server should be accessed without verifying the TLS certificate. For testing only.
|
||||
Insecure bool `json:"insecure,omitempty"`
|
||||
// ServerName is passed to the server for SNI and is used in the client to check server
|
||||
// certificates against. If ServerName is empty, the hostname used to contact the
|
||||
// server is used.
|
||||
ServerName string `json:"serverName,omitempty"`
|
||||
|
||||
// Server requires TLS client certificate authentication
|
||||
CertFile string `json:"certFile,omitempty"`
|
||||
// Server requires TLS client certificate authentication
|
||||
KeyFile string `json:"keyFile,omitempty"`
|
||||
// Trusted root certificates for server
|
||||
CAFile string `json:"caFile,omitempty"`
|
||||
|
||||
// CertData holds PEM-encoded bytes (typically read from a client certificate file).
|
||||
// CertData takes precedence over CertFile
|
||||
// +listType=atomic
|
||||
CertData []byte `json:"certData,omitempty"`
|
||||
// KeyData holds PEM-encoded bytes (typically read from a client certificate key file).
|
||||
// KeyData takes precedence over KeyFile
|
||||
// +listType=atomic
|
||||
KeyData []byte `json:"keyData,omitempty"`
|
||||
// CAData holds PEM-encoded bytes (typically read from a root certificates bundle).
|
||||
// CAData takes precedence over CAFile
|
||||
// +listType=atomic
|
||||
CAData []byte `json:"caData,omitempty"`
|
||||
}
|
229
e2e/vendor/k8s.io/kube-scheduler/config/v1/types_pluginargs.go
generated
vendored
Normal file
229
e2e/vendor/k8s.io/kube-scheduler/config/v1/types_pluginargs.go
generated
vendored
Normal file
@ -0,0 +1,229 @@
|
||||
/*
|
||||
Copyright 2022 The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
)
|
||||
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// DefaultPreemptionArgs holds arguments used to configure the
|
||||
// DefaultPreemption plugin.
|
||||
type DefaultPreemptionArgs struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
|
||||
// MinCandidateNodesPercentage is the minimum number of candidates to
|
||||
// shortlist when dry running preemption as a percentage of number of nodes.
|
||||
// Must be in the range [0, 100]. Defaults to 10% of the cluster size if
|
||||
// unspecified.
|
||||
MinCandidateNodesPercentage *int32 `json:"minCandidateNodesPercentage,omitempty"`
|
||||
// MinCandidateNodesAbsolute is the absolute minimum number of candidates to
|
||||
// shortlist. The likely number of candidates enumerated for dry running
|
||||
// preemption is given by the formula:
|
||||
// numCandidates = max(numNodes * minCandidateNodesPercentage, minCandidateNodesAbsolute)
|
||||
// We say "likely" because there are other factors such as PDB violations
|
||||
// that play a role in the number of candidates shortlisted. Must be at least
|
||||
// 0 nodes. Defaults to 100 nodes if unspecified.
|
||||
MinCandidateNodesAbsolute *int32 `json:"minCandidateNodesAbsolute,omitempty"`
|
||||
}
|
||||
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// InterPodAffinityArgs holds arguments used to configure the InterPodAffinity plugin.
|
||||
type InterPodAffinityArgs struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
|
||||
// HardPodAffinityWeight is the scoring weight for existing pods with a
|
||||
// matching hard affinity to the incoming pod.
|
||||
HardPodAffinityWeight *int32 `json:"hardPodAffinityWeight,omitempty"`
|
||||
|
||||
// IgnorePreferredTermsOfExistingPods configures the scheduler to ignore existing pods' preferred affinity
|
||||
// rules when scoring candidate nodes, unless the incoming pod has inter-pod affinities.
|
||||
IgnorePreferredTermsOfExistingPods bool `json:"ignorePreferredTermsOfExistingPods"`
|
||||
}
|
||||
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// NodeResourcesFitArgs holds arguments used to configure the NodeResourcesFit plugin.
|
||||
type NodeResourcesFitArgs struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
|
||||
// IgnoredResources is the list of resources that NodeResources fit filter
|
||||
// should ignore. This doesn't apply to scoring.
|
||||
// +listType=atomic
|
||||
IgnoredResources []string `json:"ignoredResources,omitempty"`
|
||||
// IgnoredResourceGroups defines the list of resource groups that NodeResources fit filter should ignore.
|
||||
// e.g. if group is ["example.com"], it will ignore all resource names that begin
|
||||
// with "example.com", such as "example.com/aaa" and "example.com/bbb".
|
||||
// A resource group name can't contain '/'. This doesn't apply to scoring.
|
||||
// +listType=atomic
|
||||
IgnoredResourceGroups []string `json:"ignoredResourceGroups,omitempty"`
|
||||
|
||||
// ScoringStrategy selects the node resource scoring strategy.
|
||||
// The default strategy is LeastAllocated with an equal "cpu" and "memory" weight.
|
||||
ScoringStrategy *ScoringStrategy `json:"scoringStrategy,omitempty"`
|
||||
}
|
||||
|
||||
// PodTopologySpreadConstraintsDefaulting defines how to set default constraints
|
||||
// for the PodTopologySpread plugin.
|
||||
type PodTopologySpreadConstraintsDefaulting string
|
||||
|
||||
const (
|
||||
// SystemDefaulting instructs to use the kubernetes defined default.
|
||||
SystemDefaulting PodTopologySpreadConstraintsDefaulting = "System"
|
||||
// ListDefaulting instructs to use the config provided default.
|
||||
ListDefaulting PodTopologySpreadConstraintsDefaulting = "List"
|
||||
)
|
||||
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// PodTopologySpreadArgs holds arguments used to configure the PodTopologySpread plugin.
|
||||
type PodTopologySpreadArgs struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
|
||||
// DefaultConstraints defines topology spread constraints to be applied to
|
||||
// Pods that don't define any in `pod.spec.topologySpreadConstraints`.
|
||||
// `.defaultConstraints[*].labelSelectors` must be empty, as they are
|
||||
// deduced from the Pod's membership to Services, ReplicationControllers,
|
||||
// ReplicaSets or StatefulSets.
|
||||
// When not empty, .defaultingType must be "List".
|
||||
// +optional
|
||||
// +listType=atomic
|
||||
DefaultConstraints []corev1.TopologySpreadConstraint `json:"defaultConstraints,omitempty"`
|
||||
|
||||
// DefaultingType determines how .defaultConstraints are deduced. Can be one
|
||||
// of "System" or "List".
|
||||
//
|
||||
// - "System": Use kubernetes defined constraints that spread Pods among
|
||||
// Nodes and Zones.
|
||||
// - "List": Use constraints defined in .defaultConstraints.
|
||||
//
|
||||
// Defaults to "System".
|
||||
// +optional
|
||||
DefaultingType PodTopologySpreadConstraintsDefaulting `json:"defaultingType,omitempty"`
|
||||
}
|
||||
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// NodeResourcesBalancedAllocationArgs holds arguments used to configure NodeResourcesBalancedAllocation plugin.
|
||||
type NodeResourcesBalancedAllocationArgs struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
|
||||
// Resources to be managed, the default is "cpu" and "memory" if not specified.
|
||||
// +listType=map
|
||||
// +listMapKey=name
|
||||
Resources []ResourceSpec `json:"resources,omitempty"`
|
||||
}
|
||||
|
||||
// UtilizationShapePoint represents single point of priority function shape.
|
||||
type UtilizationShapePoint struct {
|
||||
// Utilization (x axis). Valid values are 0 to 100. Fully utilized node maps to 100.
|
||||
Utilization int32 `json:"utilization"`
|
||||
// Score assigned to given utilization (y axis). Valid values are 0 to 10.
|
||||
Score int32 `json:"score"`
|
||||
}
|
||||
|
||||
// ResourceSpec represents a single resource.
|
||||
type ResourceSpec struct {
|
||||
// Name of the resource.
|
||||
Name string `json:"name"`
|
||||
// Weight of the resource.
|
||||
Weight int64 `json:"weight,omitempty"`
|
||||
}
|
||||
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// VolumeBindingArgs holds arguments used to configure the VolumeBinding plugin.
|
||||
type VolumeBindingArgs struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
|
||||
// BindTimeoutSeconds is the timeout in seconds in volume binding operation.
|
||||
// Value must be non-negative integer. The value zero indicates no waiting.
|
||||
// If this value is nil, the default value (600) will be used.
|
||||
BindTimeoutSeconds *int64 `json:"bindTimeoutSeconds,omitempty"`
|
||||
|
||||
// Shape specifies the points defining the score function shape, which is
|
||||
// used to score nodes based on the utilization of statically provisioned
|
||||
// PVs. The utilization is calculated by dividing the total requested
|
||||
// storage of the pod by the total capacity of feasible PVs on each node.
|
||||
// Each point contains utilization (ranges from 0 to 100) and its
|
||||
// associated score (ranges from 0 to 10). You can turn the priority by
|
||||
// specifying different scores for different utilization numbers.
|
||||
// The default shape points are:
|
||||
// 1) 0 for 0 utilization
|
||||
// 2) 10 for 100 utilization
|
||||
// All points must be sorted in increasing order by utilization.
|
||||
// +featureGate=VolumeCapacityPriority
|
||||
// +optional
|
||||
// +listType=atomic
|
||||
Shape []UtilizationShapePoint `json:"shape,omitempty"`
|
||||
}
|
||||
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// NodeAffinityArgs holds arguments to configure the NodeAffinity plugin.
|
||||
type NodeAffinityArgs struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
|
||||
// AddedAffinity is applied to all Pods additionally to the NodeAffinity
|
||||
// specified in the PodSpec. That is, Nodes need to satisfy AddedAffinity
|
||||
// AND .spec.NodeAffinity. AddedAffinity is empty by default (all Nodes
|
||||
// match).
|
||||
// When AddedAffinity is used, some Pods with affinity requirements that match
|
||||
// a specific Node (such as Daemonset Pods) might remain unschedulable.
|
||||
// +optional
|
||||
AddedAffinity *corev1.NodeAffinity `json:"addedAffinity,omitempty"`
|
||||
}
|
||||
|
||||
// ScoringStrategyType the type of scoring strategy used in NodeResourcesFit plugin.
|
||||
type ScoringStrategyType string
|
||||
|
||||
const (
|
||||
// LeastAllocated strategy prioritizes nodes with least allocated resources.
|
||||
LeastAllocated ScoringStrategyType = "LeastAllocated"
|
||||
// MostAllocated strategy prioritizes nodes with most allocated resources.
|
||||
MostAllocated ScoringStrategyType = "MostAllocated"
|
||||
// RequestedToCapacityRatio strategy allows specifying a custom shape function
|
||||
// to score nodes based on the request to capacity ratio.
|
||||
RequestedToCapacityRatio ScoringStrategyType = "RequestedToCapacityRatio"
|
||||
)
|
||||
|
||||
// ScoringStrategy define ScoringStrategyType for node resource plugin
|
||||
type ScoringStrategy struct {
|
||||
// Type selects which strategy to run.
|
||||
Type ScoringStrategyType `json:"type,omitempty"`
|
||||
|
||||
// Resources to consider when scoring.
|
||||
// The default resource set includes "cpu" and "memory" with an equal weight.
|
||||
// Allowed weights go from 1 to 100.
|
||||
// Weight defaults to 1 if not specified or explicitly set to 0.
|
||||
// +listType=map
|
||||
// +listMapKey=topologyKey
|
||||
Resources []ResourceSpec `json:"resources,omitempty"`
|
||||
|
||||
// Arguments specific to RequestedToCapacityRatio strategy.
|
||||
RequestedToCapacityRatio *RequestedToCapacityRatioParam `json:"requestedToCapacityRatio,omitempty"`
|
||||
}
|
||||
|
||||
// RequestedToCapacityRatioParam define RequestedToCapacityRatio parameters
|
||||
type RequestedToCapacityRatioParam struct {
|
||||
// Shape is a list of points defining the scoring function shape.
|
||||
// +listType=atomic
|
||||
Shape []UtilizationShapePoint `json:"shape,omitempty"`
|
||||
}
|
609
e2e/vendor/k8s.io/kube-scheduler/config/v1/zz_generated.deepcopy.go
generated
vendored
Normal file
609
e2e/vendor/k8s.io/kube-scheduler/config/v1/zz_generated.deepcopy.go
generated
vendored
Normal file
@ -0,0 +1,609 @@
|
||||
//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 deepcopy-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
corev1 "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 *DefaultPreemptionArgs) DeepCopyInto(out *DefaultPreemptionArgs) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
if in.MinCandidateNodesPercentage != nil {
|
||||
in, out := &in.MinCandidateNodesPercentage, &out.MinCandidateNodesPercentage
|
||||
*out = new(int32)
|
||||
**out = **in
|
||||
}
|
||||
if in.MinCandidateNodesAbsolute != nil {
|
||||
in, out := &in.MinCandidateNodesAbsolute, &out.MinCandidateNodesAbsolute
|
||||
*out = new(int32)
|
||||
**out = **in
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DefaultPreemptionArgs.
|
||||
func (in *DefaultPreemptionArgs) DeepCopy() *DefaultPreemptionArgs {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(DefaultPreemptionArgs)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *DefaultPreemptionArgs) 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 *Extender) DeepCopyInto(out *Extender) {
|
||||
*out = *in
|
||||
if in.TLSConfig != nil {
|
||||
in, out := &in.TLSConfig, &out.TLSConfig
|
||||
*out = new(ExtenderTLSConfig)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
out.HTTPTimeout = in.HTTPTimeout
|
||||
if in.ManagedResources != nil {
|
||||
in, out := &in.ManagedResources, &out.ManagedResources
|
||||
*out = make([]ExtenderManagedResource, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Extender.
|
||||
func (in *Extender) DeepCopy() *Extender {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(Extender)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *ExtenderManagedResource) DeepCopyInto(out *ExtenderManagedResource) {
|
||||
*out = *in
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExtenderManagedResource.
|
||||
func (in *ExtenderManagedResource) DeepCopy() *ExtenderManagedResource {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(ExtenderManagedResource)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *ExtenderTLSConfig) DeepCopyInto(out *ExtenderTLSConfig) {
|
||||
*out = *in
|
||||
if in.CertData != nil {
|
||||
in, out := &in.CertData, &out.CertData
|
||||
*out = make([]byte, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
if in.KeyData != nil {
|
||||
in, out := &in.KeyData, &out.KeyData
|
||||
*out = make([]byte, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
if in.CAData != nil {
|
||||
in, out := &in.CAData, &out.CAData
|
||||
*out = make([]byte, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExtenderTLSConfig.
|
||||
func (in *ExtenderTLSConfig) DeepCopy() *ExtenderTLSConfig {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(ExtenderTLSConfig)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *InterPodAffinityArgs) DeepCopyInto(out *InterPodAffinityArgs) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
if in.HardPodAffinityWeight != nil {
|
||||
in, out := &in.HardPodAffinityWeight, &out.HardPodAffinityWeight
|
||||
*out = new(int32)
|
||||
**out = **in
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InterPodAffinityArgs.
|
||||
func (in *InterPodAffinityArgs) DeepCopy() *InterPodAffinityArgs {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(InterPodAffinityArgs)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *InterPodAffinityArgs) 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 *KubeSchedulerConfiguration) DeepCopyInto(out *KubeSchedulerConfiguration) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
if in.Parallelism != nil {
|
||||
in, out := &in.Parallelism, &out.Parallelism
|
||||
*out = new(int32)
|
||||
**out = **in
|
||||
}
|
||||
in.LeaderElection.DeepCopyInto(&out.LeaderElection)
|
||||
out.ClientConnection = in.ClientConnection
|
||||
in.DebuggingConfiguration.DeepCopyInto(&out.DebuggingConfiguration)
|
||||
if in.PercentageOfNodesToScore != nil {
|
||||
in, out := &in.PercentageOfNodesToScore, &out.PercentageOfNodesToScore
|
||||
*out = new(int32)
|
||||
**out = **in
|
||||
}
|
||||
if in.PodInitialBackoffSeconds != nil {
|
||||
in, out := &in.PodInitialBackoffSeconds, &out.PodInitialBackoffSeconds
|
||||
*out = new(int64)
|
||||
**out = **in
|
||||
}
|
||||
if in.PodMaxBackoffSeconds != nil {
|
||||
in, out := &in.PodMaxBackoffSeconds, &out.PodMaxBackoffSeconds
|
||||
*out = new(int64)
|
||||
**out = **in
|
||||
}
|
||||
if in.Profiles != nil {
|
||||
in, out := &in.Profiles, &out.Profiles
|
||||
*out = make([]KubeSchedulerProfile, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
if in.Extenders != nil {
|
||||
in, out := &in.Extenders, &out.Extenders
|
||||
*out = make([]Extender, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubeSchedulerConfiguration.
|
||||
func (in *KubeSchedulerConfiguration) DeepCopy() *KubeSchedulerConfiguration {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(KubeSchedulerConfiguration)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *KubeSchedulerConfiguration) 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 *KubeSchedulerProfile) DeepCopyInto(out *KubeSchedulerProfile) {
|
||||
*out = *in
|
||||
if in.SchedulerName != nil {
|
||||
in, out := &in.SchedulerName, &out.SchedulerName
|
||||
*out = new(string)
|
||||
**out = **in
|
||||
}
|
||||
if in.PercentageOfNodesToScore != nil {
|
||||
in, out := &in.PercentageOfNodesToScore, &out.PercentageOfNodesToScore
|
||||
*out = new(int32)
|
||||
**out = **in
|
||||
}
|
||||
if in.Plugins != nil {
|
||||
in, out := &in.Plugins, &out.Plugins
|
||||
*out = new(Plugins)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
if in.PluginConfig != nil {
|
||||
in, out := &in.PluginConfig, &out.PluginConfig
|
||||
*out = make([]PluginConfig, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubeSchedulerProfile.
|
||||
func (in *KubeSchedulerProfile) DeepCopy() *KubeSchedulerProfile {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(KubeSchedulerProfile)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *NodeAffinityArgs) DeepCopyInto(out *NodeAffinityArgs) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
if in.AddedAffinity != nil {
|
||||
in, out := &in.AddedAffinity, &out.AddedAffinity
|
||||
*out = new(corev1.NodeAffinity)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeAffinityArgs.
|
||||
func (in *NodeAffinityArgs) DeepCopy() *NodeAffinityArgs {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(NodeAffinityArgs)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *NodeAffinityArgs) 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 *NodeResourcesBalancedAllocationArgs) DeepCopyInto(out *NodeResourcesBalancedAllocationArgs) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
if in.Resources != nil {
|
||||
in, out := &in.Resources, &out.Resources
|
||||
*out = make([]ResourceSpec, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeResourcesBalancedAllocationArgs.
|
||||
func (in *NodeResourcesBalancedAllocationArgs) DeepCopy() *NodeResourcesBalancedAllocationArgs {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(NodeResourcesBalancedAllocationArgs)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *NodeResourcesBalancedAllocationArgs) 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 *NodeResourcesFitArgs) DeepCopyInto(out *NodeResourcesFitArgs) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
if in.IgnoredResources != nil {
|
||||
in, out := &in.IgnoredResources, &out.IgnoredResources
|
||||
*out = make([]string, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
if in.IgnoredResourceGroups != nil {
|
||||
in, out := &in.IgnoredResourceGroups, &out.IgnoredResourceGroups
|
||||
*out = make([]string, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
if in.ScoringStrategy != nil {
|
||||
in, out := &in.ScoringStrategy, &out.ScoringStrategy
|
||||
*out = new(ScoringStrategy)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeResourcesFitArgs.
|
||||
func (in *NodeResourcesFitArgs) DeepCopy() *NodeResourcesFitArgs {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(NodeResourcesFitArgs)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *NodeResourcesFitArgs) 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 *Plugin) DeepCopyInto(out *Plugin) {
|
||||
*out = *in
|
||||
if in.Weight != nil {
|
||||
in, out := &in.Weight, &out.Weight
|
||||
*out = new(int32)
|
||||
**out = **in
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Plugin.
|
||||
func (in *Plugin) DeepCopy() *Plugin {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(Plugin)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *PluginConfig) DeepCopyInto(out *PluginConfig) {
|
||||
*out = *in
|
||||
in.Args.DeepCopyInto(&out.Args)
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PluginConfig.
|
||||
func (in *PluginConfig) DeepCopy() *PluginConfig {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(PluginConfig)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *PluginSet) DeepCopyInto(out *PluginSet) {
|
||||
*out = *in
|
||||
if in.Enabled != nil {
|
||||
in, out := &in.Enabled, &out.Enabled
|
||||
*out = make([]Plugin, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
if in.Disabled != nil {
|
||||
in, out := &in.Disabled, &out.Disabled
|
||||
*out = make([]Plugin, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PluginSet.
|
||||
func (in *PluginSet) DeepCopy() *PluginSet {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(PluginSet)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *Plugins) DeepCopyInto(out *Plugins) {
|
||||
*out = *in
|
||||
in.PreEnqueue.DeepCopyInto(&out.PreEnqueue)
|
||||
in.QueueSort.DeepCopyInto(&out.QueueSort)
|
||||
in.PreFilter.DeepCopyInto(&out.PreFilter)
|
||||
in.Filter.DeepCopyInto(&out.Filter)
|
||||
in.PostFilter.DeepCopyInto(&out.PostFilter)
|
||||
in.PreScore.DeepCopyInto(&out.PreScore)
|
||||
in.Score.DeepCopyInto(&out.Score)
|
||||
in.Reserve.DeepCopyInto(&out.Reserve)
|
||||
in.Permit.DeepCopyInto(&out.Permit)
|
||||
in.PreBind.DeepCopyInto(&out.PreBind)
|
||||
in.Bind.DeepCopyInto(&out.Bind)
|
||||
in.PostBind.DeepCopyInto(&out.PostBind)
|
||||
in.MultiPoint.DeepCopyInto(&out.MultiPoint)
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Plugins.
|
||||
func (in *Plugins) DeepCopy() *Plugins {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(Plugins)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *PodTopologySpreadArgs) DeepCopyInto(out *PodTopologySpreadArgs) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
if in.DefaultConstraints != nil {
|
||||
in, out := &in.DefaultConstraints, &out.DefaultConstraints
|
||||
*out = make([]corev1.TopologySpreadConstraint, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodTopologySpreadArgs.
|
||||
func (in *PodTopologySpreadArgs) DeepCopy() *PodTopologySpreadArgs {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(PodTopologySpreadArgs)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *PodTopologySpreadArgs) 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 *RequestedToCapacityRatioParam) DeepCopyInto(out *RequestedToCapacityRatioParam) {
|
||||
*out = *in
|
||||
if in.Shape != nil {
|
||||
in, out := &in.Shape, &out.Shape
|
||||
*out = make([]UtilizationShapePoint, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RequestedToCapacityRatioParam.
|
||||
func (in *RequestedToCapacityRatioParam) DeepCopy() *RequestedToCapacityRatioParam {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(RequestedToCapacityRatioParam)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *ResourceSpec) DeepCopyInto(out *ResourceSpec) {
|
||||
*out = *in
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceSpec.
|
||||
func (in *ResourceSpec) DeepCopy() *ResourceSpec {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(ResourceSpec)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *ScoringStrategy) DeepCopyInto(out *ScoringStrategy) {
|
||||
*out = *in
|
||||
if in.Resources != nil {
|
||||
in, out := &in.Resources, &out.Resources
|
||||
*out = make([]ResourceSpec, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
if in.RequestedToCapacityRatio != nil {
|
||||
in, out := &in.RequestedToCapacityRatio, &out.RequestedToCapacityRatio
|
||||
*out = new(RequestedToCapacityRatioParam)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScoringStrategy.
|
||||
func (in *ScoringStrategy) DeepCopy() *ScoringStrategy {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(ScoringStrategy)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *UtilizationShapePoint) DeepCopyInto(out *UtilizationShapePoint) {
|
||||
*out = *in
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UtilizationShapePoint.
|
||||
func (in *UtilizationShapePoint) DeepCopy() *UtilizationShapePoint {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(UtilizationShapePoint)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *VolumeBindingArgs) DeepCopyInto(out *VolumeBindingArgs) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
if in.BindTimeoutSeconds != nil {
|
||||
in, out := &in.BindTimeoutSeconds, &out.BindTimeoutSeconds
|
||||
*out = new(int64)
|
||||
**out = **in
|
||||
}
|
||||
if in.Shape != nil {
|
||||
in, out := &in.Shape, &out.Shape
|
||||
*out = make([]UtilizationShapePoint, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeBindingArgs.
|
||||
func (in *VolumeBindingArgs) DeepCopy() *VolumeBindingArgs {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(VolumeBindingArgs)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *VolumeBindingArgs) DeepCopyObject() runtime.Object {
|
||||
if c := in.DeepCopy(); c != nil {
|
||||
return c
|
||||
}
|
||||
return nil
|
||||
}
|
20
e2e/vendor/k8s.io/kube-scheduler/extender/v1/doc.go
generated
vendored
Normal file
20
e2e/vendor/k8s.io/kube-scheduler/extender/v1/doc.go
generated
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
/*
|
||||
Copyright 2019 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.
|
||||
*/
|
||||
|
||||
// +k8s:deepcopy-gen=package
|
||||
|
||||
// Package v1 contains scheduler API objects.
|
||||
package v1 // import "k8s.io/kube-scheduler/extender/v1"
|
132
e2e/vendor/k8s.io/kube-scheduler/extender/v1/types.go
generated
vendored
Normal file
132
e2e/vendor/k8s.io/kube-scheduler/extender/v1/types.go
generated
vendored
Normal file
@ -0,0 +1,132 @@
|
||||
/*
|
||||
Copyright 2019 The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
v1 "k8s.io/api/core/v1"
|
||||
"k8s.io/apimachinery/pkg/types"
|
||||
)
|
||||
|
||||
const (
|
||||
// MinExtenderPriority defines the min priority value for extender.
|
||||
MinExtenderPriority int64 = 0
|
||||
|
||||
// MaxExtenderPriority defines the max priority value for extender.
|
||||
MaxExtenderPriority int64 = 10
|
||||
)
|
||||
|
||||
// ExtenderPreemptionResult represents the result returned by preemption phase of extender.
|
||||
type ExtenderPreemptionResult struct {
|
||||
NodeNameToMetaVictims map[string]*MetaVictims
|
||||
}
|
||||
|
||||
// ExtenderPreemptionArgs represents the arguments needed by the extender to preempt pods on nodes.
|
||||
type ExtenderPreemptionArgs struct {
|
||||
// Pod being scheduled
|
||||
Pod *v1.Pod
|
||||
// Victims map generated by scheduler preemption phase
|
||||
// Only set NodeNameToMetaVictims if Extender.NodeCacheCapable == true. Otherwise, only set NodeNameToVictims.
|
||||
NodeNameToVictims map[string]*Victims
|
||||
NodeNameToMetaVictims map[string]*MetaVictims
|
||||
}
|
||||
|
||||
// Victims represents:
|
||||
//
|
||||
// pods: a group of pods expected to be preempted.
|
||||
// numPDBViolations: the count of violations of PodDisruptionBudget
|
||||
type Victims struct {
|
||||
Pods []*v1.Pod
|
||||
NumPDBViolations int64
|
||||
}
|
||||
|
||||
// MetaPod represent identifier for a v1.Pod
|
||||
type MetaPod struct {
|
||||
UID string
|
||||
}
|
||||
|
||||
// MetaVictims represents:
|
||||
//
|
||||
// pods: a group of pods expected to be preempted.
|
||||
// Only Pod identifiers will be sent and user are expect to get v1.Pod in their own way.
|
||||
// numPDBViolations: the count of violations of PodDisruptionBudget
|
||||
type MetaVictims struct {
|
||||
Pods []*MetaPod
|
||||
NumPDBViolations int64
|
||||
}
|
||||
|
||||
// ExtenderArgs represents the arguments needed by the extender to filter/prioritize
|
||||
// nodes for a pod.
|
||||
type ExtenderArgs struct {
|
||||
// Pod being scheduled
|
||||
Pod *v1.Pod
|
||||
// List of candidate nodes where the pod can be scheduled; to be populated
|
||||
// only if Extender.NodeCacheCapable == false
|
||||
Nodes *v1.NodeList
|
||||
// List of candidate node names where the pod can be scheduled; to be
|
||||
// populated only if Extender.NodeCacheCapable == true
|
||||
NodeNames *[]string
|
||||
}
|
||||
|
||||
// FailedNodesMap represents the filtered out nodes, with node names and failure messages
|
||||
type FailedNodesMap map[string]string
|
||||
|
||||
// ExtenderFilterResult represents the results of a filter call to an extender
|
||||
type ExtenderFilterResult struct {
|
||||
// Filtered set of nodes where the pod can be scheduled; to be populated
|
||||
// only if Extender.NodeCacheCapable == false
|
||||
Nodes *v1.NodeList
|
||||
// Filtered set of nodes where the pod can be scheduled; to be populated
|
||||
// only if Extender.NodeCacheCapable == true
|
||||
NodeNames *[]string
|
||||
// Filtered out nodes where the pod can't be scheduled and the failure messages
|
||||
FailedNodes FailedNodesMap
|
||||
// Filtered out nodes where the pod can't be scheduled and preemption would
|
||||
// not change anything. The value is the failure message same as FailedNodes.
|
||||
// Nodes specified here takes precedence over FailedNodes.
|
||||
FailedAndUnresolvableNodes FailedNodesMap
|
||||
// Error message indicating failure
|
||||
Error string
|
||||
}
|
||||
|
||||
// ExtenderBindingArgs represents the arguments to an extender for binding a pod to a node.
|
||||
type ExtenderBindingArgs struct {
|
||||
// PodName is the name of the pod being bound
|
||||
PodName string
|
||||
// PodNamespace is the namespace of the pod being bound
|
||||
PodNamespace string
|
||||
// PodUID is the UID of the pod being bound
|
||||
PodUID types.UID
|
||||
// Node selected by the scheduler
|
||||
Node string
|
||||
}
|
||||
|
||||
// ExtenderBindingResult represents the result of binding of a pod to a node from an extender.
|
||||
type ExtenderBindingResult struct {
|
||||
// Error message indicating failure
|
||||
Error string
|
||||
}
|
||||
|
||||
// HostPriority represents the priority of scheduling to a particular host, higher priority is better.
|
||||
type HostPriority struct {
|
||||
// Name of the host
|
||||
Host string
|
||||
// Score associated with the host
|
||||
Score int64
|
||||
}
|
||||
|
||||
// HostPriorityList declares a []HostPriority type.
|
||||
type HostPriorityList []HostPriority
|
347
e2e/vendor/k8s.io/kube-scheduler/extender/v1/zz_generated.deepcopy.go
generated
vendored
Normal file
347
e2e/vendor/k8s.io/kube-scheduler/extender/v1/zz_generated.deepcopy.go
generated
vendored
Normal file
@ -0,0 +1,347 @@
|
||||
//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 deepcopy-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
)
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *ExtenderArgs) DeepCopyInto(out *ExtenderArgs) {
|
||||
*out = *in
|
||||
if in.Pod != nil {
|
||||
in, out := &in.Pod, &out.Pod
|
||||
*out = new(corev1.Pod)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
if in.Nodes != nil {
|
||||
in, out := &in.Nodes, &out.Nodes
|
||||
*out = new(corev1.NodeList)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
if in.NodeNames != nil {
|
||||
in, out := &in.NodeNames, &out.NodeNames
|
||||
*out = new([]string)
|
||||
if **in != nil {
|
||||
in, out := *in, *out
|
||||
*out = make([]string, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExtenderArgs.
|
||||
func (in *ExtenderArgs) DeepCopy() *ExtenderArgs {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(ExtenderArgs)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *ExtenderBindingArgs) DeepCopyInto(out *ExtenderBindingArgs) {
|
||||
*out = *in
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExtenderBindingArgs.
|
||||
func (in *ExtenderBindingArgs) DeepCopy() *ExtenderBindingArgs {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(ExtenderBindingArgs)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *ExtenderBindingResult) DeepCopyInto(out *ExtenderBindingResult) {
|
||||
*out = *in
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExtenderBindingResult.
|
||||
func (in *ExtenderBindingResult) DeepCopy() *ExtenderBindingResult {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(ExtenderBindingResult)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *ExtenderFilterResult) DeepCopyInto(out *ExtenderFilterResult) {
|
||||
*out = *in
|
||||
if in.Nodes != nil {
|
||||
in, out := &in.Nodes, &out.Nodes
|
||||
*out = new(corev1.NodeList)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
if in.NodeNames != nil {
|
||||
in, out := &in.NodeNames, &out.NodeNames
|
||||
*out = new([]string)
|
||||
if **in != nil {
|
||||
in, out := *in, *out
|
||||
*out = make([]string, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
}
|
||||
if in.FailedNodes != nil {
|
||||
in, out := &in.FailedNodes, &out.FailedNodes
|
||||
*out = make(FailedNodesMap, len(*in))
|
||||
for key, val := range *in {
|
||||
(*out)[key] = val
|
||||
}
|
||||
}
|
||||
if in.FailedAndUnresolvableNodes != nil {
|
||||
in, out := &in.FailedAndUnresolvableNodes, &out.FailedAndUnresolvableNodes
|
||||
*out = make(FailedNodesMap, len(*in))
|
||||
for key, val := range *in {
|
||||
(*out)[key] = val
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExtenderFilterResult.
|
||||
func (in *ExtenderFilterResult) DeepCopy() *ExtenderFilterResult {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(ExtenderFilterResult)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *ExtenderPreemptionArgs) DeepCopyInto(out *ExtenderPreemptionArgs) {
|
||||
*out = *in
|
||||
if in.Pod != nil {
|
||||
in, out := &in.Pod, &out.Pod
|
||||
*out = new(corev1.Pod)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
if in.NodeNameToVictims != nil {
|
||||
in, out := &in.NodeNameToVictims, &out.NodeNameToVictims
|
||||
*out = make(map[string]*Victims, len(*in))
|
||||
for key, val := range *in {
|
||||
var outVal *Victims
|
||||
if val == nil {
|
||||
(*out)[key] = nil
|
||||
} else {
|
||||
in, out := &val, &outVal
|
||||
*out = new(Victims)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
(*out)[key] = outVal
|
||||
}
|
||||
}
|
||||
if in.NodeNameToMetaVictims != nil {
|
||||
in, out := &in.NodeNameToMetaVictims, &out.NodeNameToMetaVictims
|
||||
*out = make(map[string]*MetaVictims, len(*in))
|
||||
for key, val := range *in {
|
||||
var outVal *MetaVictims
|
||||
if val == nil {
|
||||
(*out)[key] = nil
|
||||
} else {
|
||||
in, out := &val, &outVal
|
||||
*out = new(MetaVictims)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
(*out)[key] = outVal
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExtenderPreemptionArgs.
|
||||
func (in *ExtenderPreemptionArgs) DeepCopy() *ExtenderPreemptionArgs {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(ExtenderPreemptionArgs)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *ExtenderPreemptionResult) DeepCopyInto(out *ExtenderPreemptionResult) {
|
||||
*out = *in
|
||||
if in.NodeNameToMetaVictims != nil {
|
||||
in, out := &in.NodeNameToMetaVictims, &out.NodeNameToMetaVictims
|
||||
*out = make(map[string]*MetaVictims, len(*in))
|
||||
for key, val := range *in {
|
||||
var outVal *MetaVictims
|
||||
if val == nil {
|
||||
(*out)[key] = nil
|
||||
} else {
|
||||
in, out := &val, &outVal
|
||||
*out = new(MetaVictims)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
(*out)[key] = outVal
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExtenderPreemptionResult.
|
||||
func (in *ExtenderPreemptionResult) DeepCopy() *ExtenderPreemptionResult {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(ExtenderPreemptionResult)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in FailedNodesMap) DeepCopyInto(out *FailedNodesMap) {
|
||||
{
|
||||
in := &in
|
||||
*out = make(FailedNodesMap, len(*in))
|
||||
for key, val := range *in {
|
||||
(*out)[key] = val
|
||||
}
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FailedNodesMap.
|
||||
func (in FailedNodesMap) DeepCopy() FailedNodesMap {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(FailedNodesMap)
|
||||
in.DeepCopyInto(out)
|
||||
return *out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *HostPriority) DeepCopyInto(out *HostPriority) {
|
||||
*out = *in
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HostPriority.
|
||||
func (in *HostPriority) DeepCopy() *HostPriority {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(HostPriority)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in HostPriorityList) DeepCopyInto(out *HostPriorityList) {
|
||||
{
|
||||
in := &in
|
||||
*out = make(HostPriorityList, len(*in))
|
||||
copy(*out, *in)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HostPriorityList.
|
||||
func (in HostPriorityList) DeepCopy() HostPriorityList {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(HostPriorityList)
|
||||
in.DeepCopyInto(out)
|
||||
return *out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *MetaPod) DeepCopyInto(out *MetaPod) {
|
||||
*out = *in
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MetaPod.
|
||||
func (in *MetaPod) DeepCopy() *MetaPod {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(MetaPod)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *MetaVictims) DeepCopyInto(out *MetaVictims) {
|
||||
*out = *in
|
||||
if in.Pods != nil {
|
||||
in, out := &in.Pods, &out.Pods
|
||||
*out = make([]*MetaPod, len(*in))
|
||||
for i := range *in {
|
||||
if (*in)[i] != nil {
|
||||
in, out := &(*in)[i], &(*out)[i]
|
||||
*out = new(MetaPod)
|
||||
**out = **in
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MetaVictims.
|
||||
func (in *MetaVictims) DeepCopy() *MetaVictims {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(MetaVictims)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *Victims) DeepCopyInto(out *Victims) {
|
||||
*out = *in
|
||||
if in.Pods != nil {
|
||||
in, out := &in.Pods, &out.Pods
|
||||
*out = make([]*corev1.Pod, len(*in))
|
||||
for i := range *in {
|
||||
if (*in)[i] != nil {
|
||||
in, out := &(*in)[i], &(*out)[i]
|
||||
*out = new(corev1.Pod)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Victims.
|
||||
func (in *Victims) DeepCopy() *Victims {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(Victims)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
Reference in New Issue
Block a user