Fetch master
Signed-off-by: FillZpp <FillZpp.pub@gmail.com>
This commit is contained in:
parent
73cd6bff30
commit
0ce8773a8f
34
Makefile
34
Makefile
|
@ -14,19 +14,21 @@ generate: controller-gen
|
|||
$(CONTROLLER_GEN) object:headerFile="hack/boilerplate.go.txt" paths="./..."
|
||||
@hack/generate_client.sh
|
||||
|
||||
# find or download controller-gen
|
||||
# download controller-gen if necessary
|
||||
controller-gen:
|
||||
ifeq (, $(shell which controller-gen))
|
||||
@{ \
|
||||
set -e ;\
|
||||
CONTROLLER_GEN_TMP_DIR=$$(mktemp -d) ;\
|
||||
cd $$CONTROLLER_GEN_TMP_DIR ;\
|
||||
go mod init tmp ;\
|
||||
go get sigs.k8s.io/controller-tools/cmd/controller-gen@v0.2.9 ;\
|
||||
rm -rf $$CONTROLLER_GEN_TMP_DIR ;\
|
||||
}
|
||||
CONTROLLER_GEN=$(GOBIN)/controller-gen
|
||||
else
|
||||
CONTROLLER_GEN=$(shell which controller-gen)
|
||||
endif
|
||||
CONTROLLER_GEN = $(shell pwd)/bin/controller-gen-0.7
|
||||
controller-gen: ## Download controller-gen locally if necessary.
|
||||
$(call go-get-tool-with-alias,$(CONTROLLER_GEN),sigs.k8s.io/controller-tools/cmd/controller-gen@v0.7.0,controller-gen)
|
||||
|
||||
# go-get-tool will 'go get' any package $2 and install it to $1.
|
||||
PROJECT_DIR := $(shell dirname $(abspath $(lastword $(MAKEFILE_LIST))))
|
||||
define go-get-tool-with-alias
|
||||
@[ -f $(1) ] || { \
|
||||
set -e ;\
|
||||
TMP_DIR=$$(mktemp -d) ;\
|
||||
cd $$TMP_DIR ;\
|
||||
go mod init tmp ;\
|
||||
echo "Downloading $(2)" ;\
|
||||
GOBIN=$(PROJECT_DIR)/bin go get $(2) ;\
|
||||
rm -rf $$TMP_DIR ;\
|
||||
mv $(PROJECT_DIR)/bin/$(3) $(1);\
|
||||
}
|
||||
endef
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// +build !ignore_autogenerated
|
||||
|
||||
/*
|
||||
Copyright 2020 The Kruise Authors.
|
||||
Copyright 2021 The Kruise Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
|
|
@ -71,6 +71,8 @@ type AdvancedCronJobSpec struct {
|
|||
type CronJobTemplate struct {
|
||||
// Specifies the job that will be created when executing a CronJob.
|
||||
// +optional
|
||||
// +kubebuilder:pruning:PreserveUnknownFields
|
||||
// +kubebuilder:validation:Schemaless
|
||||
JobTemplate *batchv1beta1.JobTemplateSpec `json:"jobTemplate,omitempty" protobuf:"bytes,1,opt,name=jobTemplate"`
|
||||
|
||||
// Specifies the broadcastjob that will be created when executing a BroadcastCronJob.
|
||||
|
|
|
@ -32,6 +32,8 @@ type BroadcastJobSpec struct {
|
|||
Parallelism *intstr.IntOrString `json:"parallelism,omitempty" protobuf:"varint,1,opt,name=parallelism"`
|
||||
|
||||
// Template describes the pod that will be created when executing a job.
|
||||
// +kubebuilder:pruning:PreserveUnknownFields
|
||||
// +kubebuilder:validation:Schemaless
|
||||
Template v1.PodTemplateSpec `json:"template" protobuf:"bytes,2,opt,name=template"`
|
||||
|
||||
// CompletionPolicy indicates the completion policy of the job.
|
||||
|
|
|
@ -46,10 +46,14 @@ type CloneSetSpec struct {
|
|||
Selector *metav1.LabelSelector `json:"selector"`
|
||||
|
||||
// Template describes the pods that will be created.
|
||||
// +kubebuilder:pruning:PreserveUnknownFields
|
||||
// +kubebuilder:validation:Schemaless
|
||||
Template v1.PodTemplateSpec `json:"template"`
|
||||
|
||||
// VolumeClaimTemplates is a list of claims that pods are allowed to reference.
|
||||
// Note that PVC will be deleted when its pod has been deleted.
|
||||
// +kubebuilder:pruning:PreserveUnknownFields
|
||||
// +kubebuilder:validation:Schemaless
|
||||
VolumeClaimTemplates []v1.PersistentVolumeClaim `json:"volumeClaimTemplates,omitempty"`
|
||||
|
||||
// ScaleStrategy indicates the ScaleStrategy that will be employed to
|
||||
|
@ -80,6 +84,11 @@ type CloneSetScaleStrategy struct {
|
|||
// PodsToDelete is the names of Pod should be deleted.
|
||||
// Note that this list will be truncated for non-existing pod names.
|
||||
PodsToDelete []string `json:"podsToDelete,omitempty"`
|
||||
// The maximum number of pods that can be unavailable for scaled pods.
|
||||
// This field can control the changes rate of replicas for CloneSet so as to minimize the impact for users' service.
|
||||
// The scale will fail if the number of unavailable pods were greater than this MaxUnavailable at scaling up.
|
||||
// MaxUnavailable works only when scaling up.
|
||||
MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,omitempty"`
|
||||
}
|
||||
|
||||
// CloneSetUpdateStrategy defines strategies for pods update.
|
||||
|
|
|
@ -48,7 +48,7 @@ const (
|
|||
StandardRollingUpdateType RollingUpdateType = "Standard"
|
||||
|
||||
// Replace container image without killing the pod.
|
||||
//InplaceRollingUpdateType RollingUpdateType = "Inplace"
|
||||
InplaceRollingUpdateType RollingUpdateType = "InPlaceIfPossible"
|
||||
|
||||
// SurgingRollingUpdateType replaces the old daemons by new ones using rolling update i.e replace them on each node one
|
||||
// after the other, creating the new pod and then killing the old one.
|
||||
|
@ -124,6 +124,8 @@ type DaemonSetSpec struct {
|
|||
// that matches the template's node selector (or on every node if no node
|
||||
// selector is specified).
|
||||
// More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template
|
||||
// +kubebuilder:pruning:PreserveUnknownFields
|
||||
// +kubebuilder:validation:Schemaless
|
||||
Template corev1.PodTemplateSpec `json:"template" protobuf:"bytes,2,opt,name=template"`
|
||||
|
||||
// An update strategy to replace existing DaemonSet pods with new pods.
|
||||
|
|
|
@ -0,0 +1,228 @@
|
|||
/*
|
||||
Copyright 2021 The Kruise 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 v1alpha1
|
||||
|
||||
import (
|
||||
v1 "k8s.io/api/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
)
|
||||
|
||||
// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN!
|
||||
// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized.
|
||||
|
||||
const (
|
||||
EphemeralContainerCreateByJob = "apps.kruise.io/ephemeraljob"
|
||||
EphemeralContainerEnvKey = "KRUISE_EJOB_ID"
|
||||
)
|
||||
|
||||
// EphemeralJobSpec defines the desired state of EphemeralJob
|
||||
type EphemeralJobSpec struct {
|
||||
// INSERT ADDITIONAL SPEC FIELDS - desired state of cluster
|
||||
// Important: Run "make" to regenerate code after modifying this file
|
||||
// Selector is a label query over pods that should match the pod labels.
|
||||
Selector *metav1.LabelSelector `json:"selector"`
|
||||
|
||||
// Replicas indicates a part of the quantity from matched pods by selector.
|
||||
// Usually it is used for gray scale working.
|
||||
// if Replicas exceeded the matched number by selector, replicas will not work.
|
||||
Replicas *int32 `json:"replicas,omitempty"`
|
||||
|
||||
// Parallelism specifies the maximum desired number of pods which matches running ephemeral containers.
|
||||
// +optional
|
||||
Parallelism *int32 `json:"parallelism,omitempty" protobuf:"varint,1,opt,name=parallelism"`
|
||||
|
||||
// Template describes the ephemeral container that will be created.
|
||||
Template EphemeralContainerTemplateSpec `json:"template"`
|
||||
|
||||
// Paused will pause the ephemeral job.
|
||||
// +optional
|
||||
Paused bool `json:"paused,omitempty" protobuf:"bytes,4,opt,name=paused"`
|
||||
|
||||
// ActiveDeadlineSeconds specifies the duration in seconds relative to the startTime that the job may be active
|
||||
// before the system tries to terminate it; value must be positive integer.
|
||||
// Only works for Always type.
|
||||
// +optional
|
||||
ActiveDeadlineSeconds *int64 `json:"activeDeadlineSeconds,omitempty" protobuf:"varint,2,opt,name=activeDeadlineSeconds"`
|
||||
|
||||
// ttlSecondsAfterFinished limits the lifetime of a Job that has finished
|
||||
// execution (either Complete or Failed). If this field is set,
|
||||
// ttlSecondsAfterFinished after the eJob finishes, it is eligible to be
|
||||
// automatically deleted. When the Job is being deleted, its lifecycle
|
||||
// guarantees (e.g. finalizers) will be honored.
|
||||
// If this field is unset, default value is 1800
|
||||
// If this field is set to zero,
|
||||
// the Job becomes eligible to be deleted immediately after it finishes.
|
||||
// +optional
|
||||
TTLSecondsAfterFinished *int32 `json:"ttlSecondsAfterFinished,omitempty" protobuf:"varint,4,opt,name=ttlSecondsAfterFinished"`
|
||||
}
|
||||
|
||||
// EphemeralContainerTemplateSpec describes template spec of ephemeral containers
|
||||
type EphemeralContainerTemplateSpec struct {
|
||||
|
||||
// EphemeralContainers defines ephemeral container list in match pods.
|
||||
// +kubebuilder:pruning:PreserveUnknownFields
|
||||
// +kubebuilder:validation:Schemaless
|
||||
EphemeralContainers []v1.EphemeralContainer `json:"ephemeralContainers"`
|
||||
}
|
||||
|
||||
// EphemeralJobStatus defines the observed state of EphemeralJob
|
||||
type EphemeralJobStatus struct {
|
||||
// INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
|
||||
// Important: Run "make" to regenerate code after modifying this file
|
||||
// +optional
|
||||
// +patchMergeKey=type
|
||||
// +patchStrategy=merge
|
||||
Conditions []EphemeralJobCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"`
|
||||
|
||||
// Represents time when the job was acknowledged by the job controller.
|
||||
// It is not guaranteed to be set in happens-before order across separate operations.
|
||||
// It is represented in RFC3339 form and is in UTC.
|
||||
// +optional
|
||||
StartTime *metav1.Time `json:"startTime,omitempty" protobuf:"bytes,2,opt,name=startTime"`
|
||||
|
||||
// Represents time when the job was completed. It is not guaranteed to
|
||||
// be set in happens-before order across separate operations.
|
||||
// It is represented in RFC3339 form and is in UTC.
|
||||
// +optional
|
||||
CompletionTime *metav1.Time `json:"completionTime,omitempty" protobuf:"bytes,3,opt,name=completionTime"`
|
||||
|
||||
// The phase of the job.
|
||||
// +optional
|
||||
Phase EphemeralJobPhase `json:"phase" protobuf:"varint,8,opt,name=phase"`
|
||||
|
||||
// The number of total matched pods.
|
||||
// +optional
|
||||
Matches int32 `json:"match" protobuf:"varint,4,opt,name=match"`
|
||||
|
||||
// The number of actively running pods.
|
||||
// +optional
|
||||
Running int32 `json:"running" protobuf:"varint,4,opt,name=running"`
|
||||
|
||||
// The number of pods which reached phase Succeeded.
|
||||
// +optional
|
||||
Succeeded int32 `json:"succeeded" protobuf:"varint,5,opt,name=completed"`
|
||||
|
||||
// The number of waiting pods.
|
||||
// +optional
|
||||
Waiting int32 `json:"waiting" protobuf:"varint,4,opt,name=waiting"`
|
||||
|
||||
// The number of pods which reached phase Failed.
|
||||
// +optional
|
||||
Failed int32 `json:"failed" protobuf:"varint,6,opt,name=failed"`
|
||||
}
|
||||
|
||||
// JobCondition describes current state of a job.
|
||||
type EphemeralJobCondition struct {
|
||||
// Type of job condition, Complete or Failed.
|
||||
Type EphemeralJobConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=EphemeralJobConditionType"`
|
||||
// Status of the condition, one of True, False, Unknown.
|
||||
Status v1.ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=k8s.io/api/core/v1.ConditionStatus"`
|
||||
// Last time the condition was checked.
|
||||
// +optional
|
||||
LastProbeTime metav1.Time `json:"lastProbeTime,omitempty" protobuf:"bytes,3,opt,name=lastProbeTime"`
|
||||
// Last time the condition transit from one status to another.
|
||||
// +optional
|
||||
LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,4,opt,name=lastTransitionTime"`
|
||||
// (brief) reason for the condition's last transition.
|
||||
// +optional
|
||||
Reason string `json:"reason,omitempty" protobuf:"bytes,5,opt,name=reason"`
|
||||
// Human readable message indicating details about last transition.
|
||||
// +optional
|
||||
Message string `json:"message,omitempty" protobuf:"bytes,6,opt,name=message"`
|
||||
}
|
||||
|
||||
// JobConditionType indicates valid conditions type of a job
|
||||
type EphemeralJobConditionType string
|
||||
|
||||
// These are valid conditions of a job.
|
||||
const (
|
||||
// EJobSucceeded means the ephemeral job has succeeded completed its execution. A succeeded job means pods have been
|
||||
// successful finished on all tasks on eligible nodes.
|
||||
EJobSucceeded EphemeralJobConditionType = "JobSucceeded"
|
||||
|
||||
// EJobFailed means there are some ephemeral containers matched by ephemeral job failed.
|
||||
EJobFailed EphemeralJobConditionType = "JobFailed"
|
||||
|
||||
// EJobError means some ephemeral containers matched by ephemeral job run error.
|
||||
EJobError EphemeralJobConditionType = "JobError"
|
||||
|
||||
// EJobInitialized means ephemeral job has created and initialized by controller.
|
||||
EJobInitialized EphemeralJobConditionType = "Initialized"
|
||||
|
||||
// EJobMatchedEmpty means the ephemeral job has not matched the target pods.
|
||||
EJobMatchedEmpty EphemeralJobConditionType = "MatchedEmpty"
|
||||
)
|
||||
|
||||
// EphemeralJobPhase indicates the type of EphemeralJobPhase.
|
||||
type EphemeralJobPhase string
|
||||
|
||||
const (
|
||||
// EphemeralJobSucceeded means the job has succeeded.
|
||||
EphemeralJobSucceeded EphemeralJobPhase = "Succeeded"
|
||||
|
||||
// EphemeralJobFailed means the job has failed.
|
||||
EphemeralJobFailed EphemeralJobPhase = "Failed"
|
||||
|
||||
// EphemeralJobWaiting means the job is waiting.
|
||||
EphemeralJobWaiting EphemeralJobPhase = "Waiting"
|
||||
|
||||
// EphemeralJobRunning means the job is running.
|
||||
EphemeralJobRunning EphemeralJobPhase = "Running"
|
||||
|
||||
// EphemeralJobPause means the ephemeral job paused.
|
||||
EphemeralJobPause EphemeralJobPhase = "Paused"
|
||||
|
||||
// EphemeralJobError means the ephemeral paused.
|
||||
EphemeralJobError EphemeralJobPhase = "Error"
|
||||
|
||||
EphemeralJobUnknown EphemeralJobPhase = "Unknown"
|
||||
)
|
||||
|
||||
// +genclient
|
||||
// +k8s:openapi-gen=true
|
||||
// +kubebuilder:object:root=true
|
||||
// +kubebuilder:subresource:status
|
||||
// +kubebuilder:resource:shortName=ejob
|
||||
// +kubebuilder:printcolumn:name="STATUS",type="string",JSONPath=".status.phase",description="The status of ephemeral job"
|
||||
// +kubebuilder:printcolumn:name="MATCH",type="integer",JSONPath=".status.match",description="Number of ephemeral container matched by this job"
|
||||
// +kubebuilder:printcolumn:name="SUCCEED",type="integer",JSONPath=".status.succeeded",description="Number of succeed ephemeral containers"
|
||||
// +kubebuilder:printcolumn:name="FAILED",type="integer",JSONPath=".status.failed",description="Number of failed ephemeral containers"
|
||||
// +kubebuilder:printcolumn:name="RUNNING",type="integer",JSONPath=".status.running",description="Number of running ephemeral containers"
|
||||
// +kubebuilder:printcolumn:name="WAITING",type="integer",JSONPath=".status.waiting",description="Number of waiting ephemeral containers"
|
||||
// +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp",description="CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC."
|
||||
|
||||
// EphemeralJob is the Schema for the ephemeraljobs API
|
||||
type EphemeralJob struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||
|
||||
Spec EphemeralJobSpec `json:"spec,omitempty"`
|
||||
Status EphemeralJobStatus `json:"status,omitempty"`
|
||||
}
|
||||
|
||||
// +kubebuilder:object:root=true
|
||||
|
||||
// EphemeralJobList contains a list of EphemeralJob
|
||||
type EphemeralJobList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ListMeta `json:"metadata,omitempty"`
|
||||
Items []EphemeralJob `json:"items"`
|
||||
}
|
||||
|
||||
func init() {
|
||||
SchemeBuilder.Register(&EphemeralJob{}, &EphemeralJobList{})
|
||||
}
|
|
@ -0,0 +1,186 @@
|
|||
/*
|
||||
Copyright 2021 The Kruise 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 v1alpha1
|
||||
|
||||
import (
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
)
|
||||
|
||||
// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN!
|
||||
// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized.
|
||||
|
||||
// ResourceDistributionSpec defines the desired state of ResourceDistribution.
|
||||
type ResourceDistributionSpec struct {
|
||||
// INSERT ADDITIONAL SPEC FIELDS - desired state of cluster
|
||||
// Important: Run "make" to regenerate code after modifying this file
|
||||
|
||||
// Resource must be the complete yaml that users want to distribute.
|
||||
// +kubebuilder:pruning:PreserveUnknownFields
|
||||
// +kubebuilder:validation:EmbeddedResource
|
||||
Resource runtime.RawExtension `json:"resource"`
|
||||
|
||||
// Targets defines the namespaces that users want to distribute to.
|
||||
Targets ResourceDistributionTargets `json:"targets"`
|
||||
}
|
||||
|
||||
// ResourceDistributionTargets defines the targets of Resource.
|
||||
// Four options are provided to select target namespaces.
|
||||
type ResourceDistributionTargets struct {
|
||||
// Priority: ExcludedNamespaces > AllNamespaces = IncludedNamespaces = NamespaceLabelSelector.
|
||||
// Firstly, ResourceDistributionTargets will parse AllNamespaces, IncludedNamespaces, and NamespaceLabelSelector,
|
||||
// then calculate their union,
|
||||
// At last ExcludedNamespaces will act on the union to remove and exclude the designated namespaces from it.
|
||||
|
||||
// If AllNamespaces is true, Resource will be distributed to the all namespaces
|
||||
// (except some forbidden namespaces, such as "kube-system" and "kube-public").
|
||||
// +optional
|
||||
AllNamespaces bool `json:"allNamespaces,omitempty"`
|
||||
|
||||
// If ExcludedNamespaces is not empty, Resource will never be distributed to the listed namespaces.
|
||||
// ExcludedNamespaces has the highest priority.
|
||||
// +optional
|
||||
ExcludedNamespaces ResourceDistributionTargetNamespaces `json:"excludedNamespaces,omitempty"`
|
||||
|
||||
// If IncludedNamespaces is not empty, Resource will be distributed to the listed namespaces.
|
||||
// +optional
|
||||
IncludedNamespaces ResourceDistributionTargetNamespaces `json:"includedNamespaces,omitempty"`
|
||||
|
||||
// If NamespaceLabelSelector is not empty, Resource will be distributed to the matched namespaces.
|
||||
// +optional
|
||||
NamespaceLabelSelector metav1.LabelSelector `json:"namespaceLabelSelector,omitempty"`
|
||||
}
|
||||
|
||||
type ResourceDistributionTargetNamespaces struct {
|
||||
/*
|
||||
// TODO: support regular expression in the future
|
||||
// +optional
|
||||
Pattern string `json:"pattern,omitempty"`
|
||||
*/
|
||||
|
||||
// +optional
|
||||
List []ResourceDistributionNamespace `json:"list,omitempty"`
|
||||
}
|
||||
|
||||
// ResourceDistributionNamespace contains a namespace name
|
||||
type ResourceDistributionNamespace struct {
|
||||
// Namespace name
|
||||
Name string `json:"name,omitempty"`
|
||||
}
|
||||
|
||||
// ResourceDistributionStatus defines the observed state of ResourceDistribution.
|
||||
// ResourceDistributionStatus is recorded by kruise, users' modification is invalid and meaningless.
|
||||
type ResourceDistributionStatus struct {
|
||||
// INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
|
||||
// Important: Run "make" to regenerate code after modifying this file
|
||||
|
||||
// Desired represents the number of total target namespaces.
|
||||
Desired int32 `json:"desired,omitempty"`
|
||||
|
||||
// Succeeded represents the number of successful distributions.
|
||||
Succeeded int32 `json:"succeeded,omitempty"`
|
||||
|
||||
// Failed represents the number of failed distributions.
|
||||
Failed int32 `json:"failed,omitempty"`
|
||||
|
||||
// ObservedGeneration represents the .metadata.generation that the condition was set based upon.
|
||||
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
|
||||
|
||||
// Conditions describe the condition when Resource creating, updating and deleting.
|
||||
Conditions []ResourceDistributionCondition `json:"conditions,omitempty"`
|
||||
}
|
||||
|
||||
// ResourceDistributionCondition allows a row to be marked with additional information.
|
||||
type ResourceDistributionCondition struct {
|
||||
// Type of ResourceDistributionCondition.
|
||||
Type ResourceDistributionConditionType `json:"type"`
|
||||
|
||||
// Status of the condition, one of True, False, Unknown.
|
||||
Status ResourceDistributionConditionStatus `json:"status"`
|
||||
|
||||
// LastTransitionTime is the last time the condition transitioned from one status to another.
|
||||
LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"`
|
||||
|
||||
// Reason describe human readable message indicating details about last transition.
|
||||
Reason string `json:"reason,omitempty"`
|
||||
|
||||
// FailedNamespaces describe all failed namespaces when Status is False
|
||||
FailedNamespaces []string `json:"failedNamespace,omitempty"`
|
||||
}
|
||||
|
||||
type ResourceDistributionConditionType string
|
||||
|
||||
// These are valid conditions of a ResourceDistribution.
|
||||
const (
|
||||
// ResourceDistributionConflictOccurred means there are conflict with existing resources when reconciling.
|
||||
ResourceDistributionConflictOccurred ResourceDistributionConditionType = "ConflictOccurred"
|
||||
|
||||
// ResourceDistributionNamespaceNotExists means some target namespaces not exist.
|
||||
ResourceDistributionNamespaceNotExists ResourceDistributionConditionType = "NamespaceNotExists"
|
||||
|
||||
// ResourceDistributionGetResourceFailed means some get operations about Resource are failed.
|
||||
ResourceDistributionGetResourceFailed ResourceDistributionConditionType = "GetResourceFailed"
|
||||
|
||||
// ResourceDistributionCreateResourceFailed means some create operations about Resource are failed.
|
||||
ResourceDistributionCreateResourceFailed ResourceDistributionConditionType = "CreateResourceFailed"
|
||||
|
||||
// ResourceDistributionUpdateResourceFailed means some update operations about Resource are failed.
|
||||
ResourceDistributionUpdateResourceFailed ResourceDistributionConditionType = "UpdateResourceFailed"
|
||||
|
||||
// ResourceDistributionDeleteResourceFailed means some delete operations about Resource are failed.
|
||||
ResourceDistributionDeleteResourceFailed ResourceDistributionConditionType = "DeleteResourceFailed"
|
||||
)
|
||||
|
||||
type ResourceDistributionConditionStatus string
|
||||
|
||||
// These are valid condition statuses.
|
||||
const (
|
||||
// ResourceDistributionConditionTrue means a resource is in the condition.
|
||||
ResourceDistributionConditionTrue ResourceDistributionConditionStatus = "True"
|
||||
|
||||
// ResourceDistributionConditionFalse means a resource is not in the condition.
|
||||
ResourceDistributionConditionFalse ResourceDistributionConditionStatus = "False"
|
||||
|
||||
// ResourceDistributionConditionUnknown means kubernetes can't decide if a resource is in the condition or not.
|
||||
ResourceDistributionConditionUnknown ResourceDistributionConditionStatus = "Unknown"
|
||||
)
|
||||
|
||||
// +genclient
|
||||
// +genclient:nonNamespaced
|
||||
// +k8s:openapi-gen=true
|
||||
//+kubebuilder:object:root=true
|
||||
//+kubebuilder:subresource:status
|
||||
//+kubebuilder:resource:scope=Cluster
|
||||
|
||||
// ResourceDistribution is the Schema for the resourcedistributions API.
|
||||
type ResourceDistribution struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||
|
||||
Spec ResourceDistributionSpec `json:"spec,omitempty"`
|
||||
Status ResourceDistributionStatus `json:"status,omitempty"`
|
||||
}
|
||||
|
||||
//+kubebuilder:object:root=true
|
||||
|
||||
// ResourceDistributionList contains a list of ResourceDistribution.
|
||||
type ResourceDistributionList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ListMeta `json:"metadata,omitempty"`
|
||||
Items []ResourceDistribution `json:"items"`
|
||||
}
|
||||
|
||||
func init() {
|
||||
SchemeBuilder.Register(&ResourceDistribution{}, &ResourceDistributionList{})
|
||||
}
|
|
@ -40,6 +40,8 @@ type SidecarSetSpec struct {
|
|||
Containers []SidecarContainer `json:"containers,omitempty"`
|
||||
|
||||
// List of volumes that can be mounted by sidecar containers
|
||||
// +kubebuilder:pruning:PreserveUnknownFields
|
||||
// +kubebuilder:validation:Schemaless
|
||||
Volumes []corev1.Volume `json:"volumes,omitempty"`
|
||||
|
||||
// The sidecarset updateStrategy to use to replace existing pods with new ones.
|
||||
|
@ -54,6 +56,8 @@ type SidecarSetSpec struct {
|
|||
|
||||
// SidecarContainer defines the container of Sidecar
|
||||
type SidecarContainer struct {
|
||||
// +kubebuilder:pruning:PreserveUnknownFields
|
||||
// +kubebuilder:validation:Schemaless
|
||||
corev1.Container `json:",inline"`
|
||||
|
||||
// The rules that injected SidecarContainer into Pod.spec.containers,
|
||||
|
|
|
@ -128,6 +128,8 @@ type StatefulSetSpec struct {
|
|||
// insufficient replicas are detected. Each pod stamped out by the StatefulSet
|
||||
// will fulfill this Template, but have a unique identity from the rest
|
||||
// of the StatefulSet.
|
||||
// +kubebuilder:pruning:PreserveUnknownFields
|
||||
// +kubebuilder:validation:Schemaless
|
||||
Template v1.PodTemplateSpec `json:"template"`
|
||||
|
||||
// volumeClaimTemplates is a list of claims that pods are allowed to reference.
|
||||
|
@ -138,6 +140,8 @@ type StatefulSetSpec struct {
|
|||
// any volumes in the template, with the same name.
|
||||
// TODO: Define the behavior if a claim already exists with the same name.
|
||||
// +optional
|
||||
// +kubebuilder:pruning:PreserveUnknownFields
|
||||
// +kubebuilder:validation:Schemaless
|
||||
VolumeClaimTemplates []v1.PersistentVolumeClaim `json:"volumeClaimTemplates,omitempty"`
|
||||
|
||||
// serviceName is the name of the service that governs this StatefulSet.
|
||||
|
@ -239,6 +243,8 @@ const (
|
|||
// +kubebuilder:printcolumn:name="UPDATED",type="integer",JSONPath=".status.updatedReplicas",description="The number of pods updated."
|
||||
// +kubebuilder:printcolumn:name="READY",type="integer",JSONPath=".status.readyReplicas",description="The number of pods ready."
|
||||
// +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp",description="CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC."
|
||||
// +kubebuilder:printcolumn:name="CONTAINERS",type="string",priority=1,JSONPath=".spec.template.spec.containers[*].name",description="The containers of currently advanced statefulset."
|
||||
// +kubebuilder:printcolumn:name="IMAGES",type="string",priority=1,JSONPath=".spec.template.spec.containers[*].image",description="The images of currently advanced statefulset."
|
||||
|
||||
// StatefulSet is the Schema for the statefulsets API
|
||||
type StatefulSet struct {
|
||||
|
|
|
@ -98,29 +98,38 @@ type SubsetTemplate struct {
|
|||
|
||||
// StatefulSetTemplateSpec defines the subset template of StatefulSet.
|
||||
type StatefulSetTemplateSpec struct {
|
||||
// +kubebuilder:validation:XPreserveUnknownFields
|
||||
// +kubebuilder:pruning:PreserveUnknownFields
|
||||
// +kubebuilder:validation:Schemaless
|
||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||
Spec appsv1.StatefulSetSpec `json:"spec"`
|
||||
// +kubebuilder:pruning:PreserveUnknownFields
|
||||
// +kubebuilder:validation:Schemaless
|
||||
Spec appsv1.StatefulSetSpec `json:"spec"`
|
||||
}
|
||||
|
||||
// AdvancedStatefulSetTemplateSpec defines the subset template of AdvancedStatefulSet.
|
||||
type AdvancedStatefulSetTemplateSpec struct {
|
||||
// +kubebuilder:validation:XPreserveUnknownFields
|
||||
// +kubebuilder:pruning:PreserveUnknownFields
|
||||
// +kubebuilder:validation:Schemaless
|
||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||
Spec StatefulSetSpec `json:"spec"`
|
||||
}
|
||||
|
||||
// CloneSetTemplateSpec defines the subset template of CloneSet.
|
||||
type CloneSetTemplateSpec struct {
|
||||
// +kubebuilder:validation:XPreserveUnknownFields
|
||||
// +kubebuilder:pruning:PreserveUnknownFields
|
||||
// +kubebuilder:validation:Schemaless
|
||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||
Spec CloneSetSpec `json:"spec"`
|
||||
}
|
||||
|
||||
// DeploymentTemplateSpec defines the subset template of Deployment.
|
||||
type DeploymentTemplateSpec struct {
|
||||
// +kubebuilder:pruning:PreserveUnknownFields
|
||||
// +kubebuilder:validation:Schemaless
|
||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||
Spec appsv1.DeploymentSpec `json:"spec"`
|
||||
// +kubebuilder:pruning:PreserveUnknownFields
|
||||
// +kubebuilder:validation:Schemaless
|
||||
Spec appsv1.DeploymentSpec `json:"spec"`
|
||||
}
|
||||
|
||||
// UnitedDeploymentUpdateStrategy defines the update performance
|
||||
|
|
|
@ -110,6 +110,8 @@ type WorkloadSpreadSubset struct {
|
|||
|
||||
// Patch indicates patching podTemplate to the Pod.
|
||||
// +optional
|
||||
// +kubebuilder:pruning:PreserveUnknownFields
|
||||
// +kubebuilder:validation:Schemaless
|
||||
Patch runtime.RawExtension `json:"patch,omitempty"`
|
||||
}
|
||||
|
||||
|
@ -164,14 +166,14 @@ type WorkloadSpreadSubsetStatus struct {
|
|||
// Name should be unique between all of the subsets under one WorkloadSpread.
|
||||
Name string `json:"name"`
|
||||
|
||||
// Replicas is the most recently observed number of replicas for subset.
|
||||
// Replicas is the most recently observed number of active replicas for subset.
|
||||
Replicas int32 `json:"replicas"`
|
||||
|
||||
// Conditions is an array of current observed subset conditions.
|
||||
// +optional
|
||||
Conditions []WorkloadSpreadSubsetCondition `json:"conditions,omitempty"`
|
||||
|
||||
// MissingReplicas is the number of replicas belong to this subset not be found.
|
||||
// MissingReplicas is the number of active replicas belong to this subset not be found.
|
||||
// MissingReplicas > 0 indicates the subset is still missing MissingReplicas pods to create
|
||||
// MissingReplicas = 0 indicates the subset already has enough pods, there is no need to create
|
||||
// MissingReplicas = -1 indicates the subset's MaxReplicas not set, then there is no limit for pods number
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// +build !ignore_autogenerated
|
||||
|
||||
/*
|
||||
Copyright 2020 The Kruise Authors.
|
||||
Copyright 2021 The Kruise Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
@ -398,6 +398,11 @@ func (in *CloneSetScaleStrategy) DeepCopyInto(out *CloneSetScaleStrategy) {
|
|||
*out = make([]string, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
if in.MaxUnavailable != nil {
|
||||
in, out := &in.MaxUnavailable, &out.MaxUnavailable
|
||||
*out = new(intstr.IntOrString)
|
||||
**out = **in
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CloneSetScaleStrategy.
|
||||
|
@ -985,6 +990,175 @@ func (in *DeploymentTemplateSpec) DeepCopy() *DeploymentTemplateSpec {
|
|||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *EphemeralContainerTemplateSpec) DeepCopyInto(out *EphemeralContainerTemplateSpec) {
|
||||
*out = *in
|
||||
if in.EphemeralContainers != nil {
|
||||
in, out := &in.EphemeralContainers, &out.EphemeralContainers
|
||||
*out = make([]v1.EphemeralContainer, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EphemeralContainerTemplateSpec.
|
||||
func (in *EphemeralContainerTemplateSpec) DeepCopy() *EphemeralContainerTemplateSpec {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(EphemeralContainerTemplateSpec)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *EphemeralJob) DeepCopyInto(out *EphemeralJob) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
||||
in.Spec.DeepCopyInto(&out.Spec)
|
||||
in.Status.DeepCopyInto(&out.Status)
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EphemeralJob.
|
||||
func (in *EphemeralJob) DeepCopy() *EphemeralJob {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(EphemeralJob)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *EphemeralJob) 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 *EphemeralJobCondition) DeepCopyInto(out *EphemeralJobCondition) {
|
||||
*out = *in
|
||||
in.LastProbeTime.DeepCopyInto(&out.LastProbeTime)
|
||||
in.LastTransitionTime.DeepCopyInto(&out.LastTransitionTime)
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EphemeralJobCondition.
|
||||
func (in *EphemeralJobCondition) DeepCopy() *EphemeralJobCondition {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(EphemeralJobCondition)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *EphemeralJobList) DeepCopyInto(out *EphemeralJobList) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ListMeta.DeepCopyInto(&out.ListMeta)
|
||||
if in.Items != nil {
|
||||
in, out := &in.Items, &out.Items
|
||||
*out = make([]EphemeralJob, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EphemeralJobList.
|
||||
func (in *EphemeralJobList) DeepCopy() *EphemeralJobList {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(EphemeralJobList)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *EphemeralJobList) 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 *EphemeralJobSpec) DeepCopyInto(out *EphemeralJobSpec) {
|
||||
*out = *in
|
||||
if in.Selector != nil {
|
||||
in, out := &in.Selector, &out.Selector
|
||||
*out = new(metav1.LabelSelector)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
if in.Replicas != nil {
|
||||
in, out := &in.Replicas, &out.Replicas
|
||||
*out = new(int32)
|
||||
**out = **in
|
||||
}
|
||||
if in.Parallelism != nil {
|
||||
in, out := &in.Parallelism, &out.Parallelism
|
||||
*out = new(int32)
|
||||
**out = **in
|
||||
}
|
||||
in.Template.DeepCopyInto(&out.Template)
|
||||
if in.ActiveDeadlineSeconds != nil {
|
||||
in, out := &in.ActiveDeadlineSeconds, &out.ActiveDeadlineSeconds
|
||||
*out = new(int64)
|
||||
**out = **in
|
||||
}
|
||||
if in.TTLSecondsAfterFinished != nil {
|
||||
in, out := &in.TTLSecondsAfterFinished, &out.TTLSecondsAfterFinished
|
||||
*out = new(int32)
|
||||
**out = **in
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EphemeralJobSpec.
|
||||
func (in *EphemeralJobSpec) DeepCopy() *EphemeralJobSpec {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(EphemeralJobSpec)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *EphemeralJobStatus) DeepCopyInto(out *EphemeralJobStatus) {
|
||||
*out = *in
|
||||
if in.Conditions != nil {
|
||||
in, out := &in.Conditions, &out.Conditions
|
||||
*out = make([]EphemeralJobCondition, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
if in.StartTime != nil {
|
||||
in, out := &in.StartTime, &out.StartTime
|
||||
*out = (*in).DeepCopy()
|
||||
}
|
||||
if in.CompletionTime != nil {
|
||||
in, out := &in.CompletionTime, &out.CompletionTime
|
||||
*out = (*in).DeepCopy()
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EphemeralJobStatus.
|
||||
func (in *EphemeralJobStatus) DeepCopy() *EphemeralJobStatus {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(EphemeralJobStatus)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *FailurePolicy) DeepCopyInto(out *FailurePolicy) {
|
||||
*out = *in
|
||||
|
@ -1488,6 +1662,178 @@ func (in *ReferenceObject) DeepCopy() *ReferenceObject {
|
|||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *ResourceDistribution) DeepCopyInto(out *ResourceDistribution) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
||||
in.Spec.DeepCopyInto(&out.Spec)
|
||||
in.Status.DeepCopyInto(&out.Status)
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceDistribution.
|
||||
func (in *ResourceDistribution) DeepCopy() *ResourceDistribution {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(ResourceDistribution)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *ResourceDistribution) 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 *ResourceDistributionCondition) DeepCopyInto(out *ResourceDistributionCondition) {
|
||||
*out = *in
|
||||
in.LastTransitionTime.DeepCopyInto(&out.LastTransitionTime)
|
||||
if in.FailedNamespaces != nil {
|
||||
in, out := &in.FailedNamespaces, &out.FailedNamespaces
|
||||
*out = make([]string, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceDistributionCondition.
|
||||
func (in *ResourceDistributionCondition) DeepCopy() *ResourceDistributionCondition {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(ResourceDistributionCondition)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *ResourceDistributionList) DeepCopyInto(out *ResourceDistributionList) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ListMeta.DeepCopyInto(&out.ListMeta)
|
||||
if in.Items != nil {
|
||||
in, out := &in.Items, &out.Items
|
||||
*out = make([]ResourceDistribution, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceDistributionList.
|
||||
func (in *ResourceDistributionList) DeepCopy() *ResourceDistributionList {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(ResourceDistributionList)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *ResourceDistributionList) 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 *ResourceDistributionNamespace) DeepCopyInto(out *ResourceDistributionNamespace) {
|
||||
*out = *in
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceDistributionNamespace.
|
||||
func (in *ResourceDistributionNamespace) DeepCopy() *ResourceDistributionNamespace {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(ResourceDistributionNamespace)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *ResourceDistributionSpec) DeepCopyInto(out *ResourceDistributionSpec) {
|
||||
*out = *in
|
||||
in.Resource.DeepCopyInto(&out.Resource)
|
||||
in.Targets.DeepCopyInto(&out.Targets)
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceDistributionSpec.
|
||||
func (in *ResourceDistributionSpec) DeepCopy() *ResourceDistributionSpec {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(ResourceDistributionSpec)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *ResourceDistributionStatus) DeepCopyInto(out *ResourceDistributionStatus) {
|
||||
*out = *in
|
||||
if in.Conditions != nil {
|
||||
in, out := &in.Conditions, &out.Conditions
|
||||
*out = make([]ResourceDistributionCondition, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceDistributionStatus.
|
||||
func (in *ResourceDistributionStatus) DeepCopy() *ResourceDistributionStatus {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(ResourceDistributionStatus)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *ResourceDistributionTargetNamespaces) DeepCopyInto(out *ResourceDistributionTargetNamespaces) {
|
||||
*out = *in
|
||||
if in.List != nil {
|
||||
in, out := &in.List, &out.List
|
||||
*out = make([]ResourceDistributionNamespace, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceDistributionTargetNamespaces.
|
||||
func (in *ResourceDistributionTargetNamespaces) DeepCopy() *ResourceDistributionTargetNamespaces {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(ResourceDistributionTargetNamespaces)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *ResourceDistributionTargets) DeepCopyInto(out *ResourceDistributionTargets) {
|
||||
*out = *in
|
||||
in.ExcludedNamespaces.DeepCopyInto(&out.ExcludedNamespaces)
|
||||
in.IncludedNamespaces.DeepCopyInto(&out.IncludedNamespaces)
|
||||
in.NamespaceLabelSelector.DeepCopyInto(&out.NamespaceLabelSelector)
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceDistributionTargets.
|
||||
func (in *ResourceDistributionTargets) DeepCopy() *ResourceDistributionTargets {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(ResourceDistributionTargets)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *RollingUpdateDaemonSet) DeepCopyInto(out *RollingUpdateDaemonSet) {
|
||||
*out = *in
|
||||
|
|
|
@ -128,6 +128,8 @@ type StatefulSetSpec struct {
|
|||
// insufficient replicas are detected. Each pod stamped out by the StatefulSet
|
||||
// will fulfill this Template, but have a unique identity from the rest
|
||||
// of the StatefulSet.
|
||||
// +kubebuilder:pruning:PreserveUnknownFields
|
||||
// +kubebuilder:validation:Schemaless
|
||||
Template v1.PodTemplateSpec `json:"template"`
|
||||
|
||||
// volumeClaimTemplates is a list of claims that pods are allowed to reference.
|
||||
|
@ -138,6 +140,8 @@ type StatefulSetSpec struct {
|
|||
// any volumes in the template, with the same name.
|
||||
// TODO: Define the behavior if a claim already exists with the same name.
|
||||
// +optional
|
||||
// +kubebuilder:pruning:PreserveUnknownFields
|
||||
// +kubebuilder:validation:Schemaless
|
||||
VolumeClaimTemplates []v1.PersistentVolumeClaim `json:"volumeClaimTemplates,omitempty"`
|
||||
|
||||
// serviceName is the name of the service that governs this StatefulSet.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// +build !ignore_autogenerated
|
||||
|
||||
/*
|
||||
Copyright 2020 The Kruise Authors.
|
||||
Copyright 2021 The Kruise Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
|
Binary file not shown.
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2020 The Kruise Authors.
|
||||
Copyright 2021 The Kruise Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2020 The Kruise Authors.
|
||||
Copyright 2021 The Kruise Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2020 The Kruise Authors.
|
||||
Copyright 2021 The Kruise Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2020 The Kruise Authors.
|
||||
Copyright 2021 The Kruise Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2020 The Kruise Authors.
|
||||
Copyright 2021 The Kruise Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
@ -31,7 +31,7 @@ import (
|
|||
|
||||
var scheme = runtime.NewScheme()
|
||||
var codecs = serializer.NewCodecFactory(scheme)
|
||||
var parameterCodec = runtime.NewParameterCodec(scheme)
|
||||
|
||||
var localSchemeBuilder = runtime.SchemeBuilder{
|
||||
appsv1alpha1.AddToScheme,
|
||||
appsv1beta1.AddToScheme,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2020 The Kruise Authors.
|
||||
Copyright 2021 The Kruise Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2020 The Kruise Authors.
|
||||
Copyright 2021 The Kruise Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2020 The Kruise Authors.
|
||||
Copyright 2021 The Kruise Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2020 The Kruise Authors.
|
||||
Copyright 2021 The Kruise Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
@ -31,8 +31,10 @@ type AppsV1alpha1Interface interface {
|
|||
CloneSetsGetter
|
||||
ContainerRecreateRequestsGetter
|
||||
DaemonSetsGetter
|
||||
EphemeralJobsGetter
|
||||
ImagePullJobsGetter
|
||||
NodeImagesGetter
|
||||
ResourceDistributionsGetter
|
||||
SidecarSetsGetter
|
||||
StatefulSetsGetter
|
||||
UnitedDeploymentsGetter
|
||||
|
@ -64,6 +66,10 @@ func (c *AppsV1alpha1Client) DaemonSets(namespace string) DaemonSetInterface {
|
|||
return newDaemonSets(c, namespace)
|
||||
}
|
||||
|
||||
func (c *AppsV1alpha1Client) EphemeralJobs(namespace string) EphemeralJobInterface {
|
||||
return newEphemeralJobs(c, namespace)
|
||||
}
|
||||
|
||||
func (c *AppsV1alpha1Client) ImagePullJobs(namespace string) ImagePullJobInterface {
|
||||
return newImagePullJobs(c, namespace)
|
||||
}
|
||||
|
@ -72,6 +78,10 @@ func (c *AppsV1alpha1Client) NodeImages() NodeImageInterface {
|
|||
return newNodeImages(c)
|
||||
}
|
||||
|
||||
func (c *AppsV1alpha1Client) ResourceDistributions() ResourceDistributionInterface {
|
||||
return newResourceDistributions(c)
|
||||
}
|
||||
|
||||
func (c *AppsV1alpha1Client) SidecarSets() SidecarSetInterface {
|
||||
return newSidecarSets(c)
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2020 The Kruise Authors.
|
||||
Copyright 2021 The Kruise Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2020 The Kruise Authors.
|
||||
Copyright 2021 The Kruise Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2020 The Kruise Authors.
|
||||
Copyright 2021 The Kruise Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2020 The Kruise Authors.
|
||||
Copyright 2021 The Kruise Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2020 The Kruise Authors.
|
||||
Copyright 2021 The Kruise Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
|
|
@ -0,0 +1,195 @@
|
|||
/*
|
||||
Copyright 2021 The Kruise 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"
|
||||
|
||||
v1alpha1 "github.com/openkruise/kruise-api/apps/v1alpha1"
|
||||
scheme "github.com/openkruise/kruise-api/client/clientset/versioned/scheme"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
rest "k8s.io/client-go/rest"
|
||||
)
|
||||
|
||||
// EphemeralJobsGetter has a method to return a EphemeralJobInterface.
|
||||
// A group's client should implement this interface.
|
||||
type EphemeralJobsGetter interface {
|
||||
EphemeralJobs(namespace string) EphemeralJobInterface
|
||||
}
|
||||
|
||||
// EphemeralJobInterface has methods to work with EphemeralJob resources.
|
||||
type EphemeralJobInterface interface {
|
||||
Create(ctx context.Context, ephemeralJob *v1alpha1.EphemeralJob, opts v1.CreateOptions) (*v1alpha1.EphemeralJob, error)
|
||||
Update(ctx context.Context, ephemeralJob *v1alpha1.EphemeralJob, opts v1.UpdateOptions) (*v1alpha1.EphemeralJob, error)
|
||||
UpdateStatus(ctx context.Context, ephemeralJob *v1alpha1.EphemeralJob, opts v1.UpdateOptions) (*v1alpha1.EphemeralJob, 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.EphemeralJob, error)
|
||||
List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.EphemeralJobList, 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.EphemeralJob, err error)
|
||||
EphemeralJobExpansion
|
||||
}
|
||||
|
||||
// ephemeralJobs implements EphemeralJobInterface
|
||||
type ephemeralJobs struct {
|
||||
client rest.Interface
|
||||
ns string
|
||||
}
|
||||
|
||||
// newEphemeralJobs returns a EphemeralJobs
|
||||
func newEphemeralJobs(c *AppsV1alpha1Client, namespace string) *ephemeralJobs {
|
||||
return &ephemeralJobs{
|
||||
client: c.RESTClient(),
|
||||
ns: namespace,
|
||||
}
|
||||
}
|
||||
|
||||
// Get takes name of the ephemeralJob, and returns the corresponding ephemeralJob object, and an error if there is any.
|
||||
func (c *ephemeralJobs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.EphemeralJob, err error) {
|
||||
result = &v1alpha1.EphemeralJob{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("ephemeraljobs").
|
||||
Name(name).
|
||||
VersionedParams(&options, scheme.ParameterCodec).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of EphemeralJobs that match those selectors.
|
||||
func (c *ephemeralJobs) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.EphemeralJobList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1alpha1.EphemeralJobList{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("ephemeraljobs").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested ephemeralJobs.
|
||||
func (c *ephemeralJobs) 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("ephemeraljobs").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Watch(ctx)
|
||||
}
|
||||
|
||||
// Create takes the representation of a ephemeralJob and creates it. Returns the server's representation of the ephemeralJob, and an error, if there is any.
|
||||
func (c *ephemeralJobs) Create(ctx context.Context, ephemeralJob *v1alpha1.EphemeralJob, opts v1.CreateOptions) (result *v1alpha1.EphemeralJob, err error) {
|
||||
result = &v1alpha1.EphemeralJob{}
|
||||
err = c.client.Post().
|
||||
Namespace(c.ns).
|
||||
Resource("ephemeraljobs").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(ephemeralJob).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Update takes the representation of a ephemeralJob and updates it. Returns the server's representation of the ephemeralJob, and an error, if there is any.
|
||||
func (c *ephemeralJobs) Update(ctx context.Context, ephemeralJob *v1alpha1.EphemeralJob, opts v1.UpdateOptions) (result *v1alpha1.EphemeralJob, err error) {
|
||||
result = &v1alpha1.EphemeralJob{}
|
||||
err = c.client.Put().
|
||||
Namespace(c.ns).
|
||||
Resource("ephemeraljobs").
|
||||
Name(ephemeralJob.Name).
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(ephemeralJob).
|
||||
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 *ephemeralJobs) UpdateStatus(ctx context.Context, ephemeralJob *v1alpha1.EphemeralJob, opts v1.UpdateOptions) (result *v1alpha1.EphemeralJob, err error) {
|
||||
result = &v1alpha1.EphemeralJob{}
|
||||
err = c.client.Put().
|
||||
Namespace(c.ns).
|
||||
Resource("ephemeraljobs").
|
||||
Name(ephemeralJob.Name).
|
||||
SubResource("status").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(ephemeralJob).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Delete takes name of the ephemeralJob and deletes it. Returns an error if one occurs.
|
||||
func (c *ephemeralJobs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("ephemeraljobs").
|
||||
Name(name).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *ephemeralJobs) 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("ephemeraljobs").
|
||||
VersionedParams(&listOpts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched ephemeralJob.
|
||||
func (c *ephemeralJobs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.EphemeralJob, err error) {
|
||||
result = &v1alpha1.EphemeralJob{}
|
||||
err = c.client.Patch(pt).
|
||||
Namespace(c.ns).
|
||||
Resource("ephemeraljobs").
|
||||
Name(name).
|
||||
SubResource(subresources...).
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(data).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2020 The Kruise Authors.
|
||||
Copyright 2021 The Kruise Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2020 The Kruise Authors.
|
||||
Copyright 2021 The Kruise Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2020 The Kruise Authors.
|
||||
Copyright 2021 The Kruise Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
@ -48,6 +48,10 @@ func (c *FakeAppsV1alpha1) DaemonSets(namespace string) v1alpha1.DaemonSetInterf
|
|||
return &FakeDaemonSets{c, namespace}
|
||||
}
|
||||
|
||||
func (c *FakeAppsV1alpha1) EphemeralJobs(namespace string) v1alpha1.EphemeralJobInterface {
|
||||
return &FakeEphemeralJobs{c, namespace}
|
||||
}
|
||||
|
||||
func (c *FakeAppsV1alpha1) ImagePullJobs(namespace string) v1alpha1.ImagePullJobInterface {
|
||||
return &FakeImagePullJobs{c, namespace}
|
||||
}
|
||||
|
@ -56,6 +60,10 @@ func (c *FakeAppsV1alpha1) NodeImages() v1alpha1.NodeImageInterface {
|
|||
return &FakeNodeImages{c}
|
||||
}
|
||||
|
||||
func (c *FakeAppsV1alpha1) ResourceDistributions() v1alpha1.ResourceDistributionInterface {
|
||||
return &FakeResourceDistributions{c}
|
||||
}
|
||||
|
||||
func (c *FakeAppsV1alpha1) SidecarSets() v1alpha1.SidecarSetInterface {
|
||||
return &FakeSidecarSets{c}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2020 The Kruise Authors.
|
||||
Copyright 2021 The Kruise Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2020 The Kruise Authors.
|
||||
Copyright 2021 The Kruise Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2020 The Kruise Authors.
|
||||
Copyright 2021 The Kruise Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2020 The Kruise Authors.
|
||||
Copyright 2021 The Kruise Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
|
|
@ -0,0 +1,142 @@
|
|||
/*
|
||||
Copyright 2021 The Kruise Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
v1alpha1 "github.com/openkruise/kruise-api/apps/v1alpha1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
)
|
||||
|
||||
// FakeEphemeralJobs implements EphemeralJobInterface
|
||||
type FakeEphemeralJobs struct {
|
||||
Fake *FakeAppsV1alpha1
|
||||
ns string
|
||||
}
|
||||
|
||||
var ephemeraljobsResource = schema.GroupVersionResource{Group: "apps.kruise.io", Version: "v1alpha1", Resource: "ephemeraljobs"}
|
||||
|
||||
var ephemeraljobsKind = schema.GroupVersionKind{Group: "apps.kruise.io", Version: "v1alpha1", Kind: "EphemeralJob"}
|
||||
|
||||
// Get takes name of the ephemeralJob, and returns the corresponding ephemeralJob object, and an error if there is any.
|
||||
func (c *FakeEphemeralJobs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.EphemeralJob, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewGetAction(ephemeraljobsResource, c.ns, name), &v1alpha1.EphemeralJob{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.EphemeralJob), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of EphemeralJobs that match those selectors.
|
||||
func (c *FakeEphemeralJobs) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.EphemeralJobList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewListAction(ephemeraljobsResource, ephemeraljobsKind, c.ns, opts), &v1alpha1.EphemeralJobList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &v1alpha1.EphemeralJobList{ListMeta: obj.(*v1alpha1.EphemeralJobList).ListMeta}
|
||||
for _, item := range obj.(*v1alpha1.EphemeralJobList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
}
|
||||
}
|
||||
return list, err
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested ephemeralJobs.
|
||||
func (c *FakeEphemeralJobs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(testing.NewWatchAction(ephemeraljobsResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
||||
// Create takes the representation of a ephemeralJob and creates it. Returns the server's representation of the ephemeralJob, and an error, if there is any.
|
||||
func (c *FakeEphemeralJobs) Create(ctx context.Context, ephemeralJob *v1alpha1.EphemeralJob, opts v1.CreateOptions) (result *v1alpha1.EphemeralJob, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewCreateAction(ephemeraljobsResource, c.ns, ephemeralJob), &v1alpha1.EphemeralJob{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.EphemeralJob), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a ephemeralJob and updates it. Returns the server's representation of the ephemeralJob, and an error, if there is any.
|
||||
func (c *FakeEphemeralJobs) Update(ctx context.Context, ephemeralJob *v1alpha1.EphemeralJob, opts v1.UpdateOptions) (result *v1alpha1.EphemeralJob, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateAction(ephemeraljobsResource, c.ns, ephemeralJob), &v1alpha1.EphemeralJob{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.EphemeralJob), err
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *FakeEphemeralJobs) UpdateStatus(ctx context.Context, ephemeralJob *v1alpha1.EphemeralJob, opts v1.UpdateOptions) (*v1alpha1.EphemeralJob, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateSubresourceAction(ephemeraljobsResource, "status", c.ns, ephemeralJob), &v1alpha1.EphemeralJob{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.EphemeralJob), err
|
||||
}
|
||||
|
||||
// Delete takes name of the ephemeralJob and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeEphemeralJobs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewDeleteAction(ephemeraljobsResource, c.ns, name), &v1alpha1.EphemeralJob{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeEphemeralJobs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(ephemeraljobsResource, c.ns, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1alpha1.EphemeralJobList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched ephemeralJob.
|
||||
func (c *FakeEphemeralJobs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.EphemeralJob, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(ephemeraljobsResource, c.ns, name, pt, data, subresources...), &v1alpha1.EphemeralJob{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.EphemeralJob), err
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2020 The Kruise Authors.
|
||||
Copyright 2021 The Kruise Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2020 The Kruise Authors.
|
||||
Copyright 2021 The Kruise Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
|
|
@ -0,0 +1,133 @@
|
|||
/*
|
||||
Copyright 2021 The Kruise Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
v1alpha1 "github.com/openkruise/kruise-api/apps/v1alpha1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
)
|
||||
|
||||
// FakeResourceDistributions implements ResourceDistributionInterface
|
||||
type FakeResourceDistributions struct {
|
||||
Fake *FakeAppsV1alpha1
|
||||
}
|
||||
|
||||
var resourcedistributionsResource = schema.GroupVersionResource{Group: "apps.kruise.io", Version: "v1alpha1", Resource: "resourcedistributions"}
|
||||
|
||||
var resourcedistributionsKind = schema.GroupVersionKind{Group: "apps.kruise.io", Version: "v1alpha1", Kind: "ResourceDistribution"}
|
||||
|
||||
// Get takes name of the resourceDistribution, and returns the corresponding resourceDistribution object, and an error if there is any.
|
||||
func (c *FakeResourceDistributions) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.ResourceDistribution, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootGetAction(resourcedistributionsResource, name), &v1alpha1.ResourceDistribution{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.ResourceDistribution), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of ResourceDistributions that match those selectors.
|
||||
func (c *FakeResourceDistributions) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ResourceDistributionList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootListAction(resourcedistributionsResource, resourcedistributionsKind, opts), &v1alpha1.ResourceDistributionList{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &v1alpha1.ResourceDistributionList{ListMeta: obj.(*v1alpha1.ResourceDistributionList).ListMeta}
|
||||
for _, item := range obj.(*v1alpha1.ResourceDistributionList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
}
|
||||
}
|
||||
return list, err
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested resourceDistributions.
|
||||
func (c *FakeResourceDistributions) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(testing.NewRootWatchAction(resourcedistributionsResource, opts))
|
||||
}
|
||||
|
||||
// Create takes the representation of a resourceDistribution and creates it. Returns the server's representation of the resourceDistribution, and an error, if there is any.
|
||||
func (c *FakeResourceDistributions) Create(ctx context.Context, resourceDistribution *v1alpha1.ResourceDistribution, opts v1.CreateOptions) (result *v1alpha1.ResourceDistribution, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootCreateAction(resourcedistributionsResource, resourceDistribution), &v1alpha1.ResourceDistribution{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.ResourceDistribution), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a resourceDistribution and updates it. Returns the server's representation of the resourceDistribution, and an error, if there is any.
|
||||
func (c *FakeResourceDistributions) Update(ctx context.Context, resourceDistribution *v1alpha1.ResourceDistribution, opts v1.UpdateOptions) (result *v1alpha1.ResourceDistribution, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootUpdateAction(resourcedistributionsResource, resourceDistribution), &v1alpha1.ResourceDistribution{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.ResourceDistribution), err
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *FakeResourceDistributions) UpdateStatus(ctx context.Context, resourceDistribution *v1alpha1.ResourceDistribution, opts v1.UpdateOptions) (*v1alpha1.ResourceDistribution, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootUpdateSubresourceAction(resourcedistributionsResource, "status", resourceDistribution), &v1alpha1.ResourceDistribution{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.ResourceDistribution), err
|
||||
}
|
||||
|
||||
// Delete takes name of the resourceDistribution and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeResourceDistributions) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewRootDeleteAction(resourcedistributionsResource, name), &v1alpha1.ResourceDistribution{})
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeResourceDistributions) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
action := testing.NewRootDeleteCollectionAction(resourcedistributionsResource, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1alpha1.ResourceDistributionList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched resourceDistribution.
|
||||
func (c *FakeResourceDistributions) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ResourceDistribution, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootPatchSubresourceAction(resourcedistributionsResource, name, pt, data, subresources...), &v1alpha1.ResourceDistribution{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.ResourceDistribution), err
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2020 The Kruise Authors.
|
||||
Copyright 2021 The Kruise Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2020 The Kruise Authors.
|
||||
Copyright 2021 The Kruise Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2020 The Kruise Authors.
|
||||
Copyright 2021 The Kruise Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2020 The Kruise Authors.
|
||||
Copyright 2021 The Kruise Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2020 The Kruise Authors.
|
||||
Copyright 2021 The Kruise Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
@ -28,10 +28,14 @@ type ContainerRecreateRequestExpansion interface{}
|
|||
|
||||
type DaemonSetExpansion interface{}
|
||||
|
||||
type EphemeralJobExpansion interface{}
|
||||
|
||||
type ImagePullJobExpansion interface{}
|
||||
|
||||
type NodeImageExpansion interface{}
|
||||
|
||||
type ResourceDistributionExpansion interface{}
|
||||
|
||||
type SidecarSetExpansion interface{}
|
||||
|
||||
type StatefulSetExpansion interface{}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2020 The Kruise Authors.
|
||||
Copyright 2021 The Kruise Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2020 The Kruise Authors.
|
||||
Copyright 2021 The Kruise Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
|
|
@ -0,0 +1,184 @@
|
|||
/*
|
||||
Copyright 2021 The Kruise 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"
|
||||
|
||||
v1alpha1 "github.com/openkruise/kruise-api/apps/v1alpha1"
|
||||
scheme "github.com/openkruise/kruise-api/client/clientset/versioned/scheme"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
rest "k8s.io/client-go/rest"
|
||||
)
|
||||
|
||||
// ResourceDistributionsGetter has a method to return a ResourceDistributionInterface.
|
||||
// A group's client should implement this interface.
|
||||
type ResourceDistributionsGetter interface {
|
||||
ResourceDistributions() ResourceDistributionInterface
|
||||
}
|
||||
|
||||
// ResourceDistributionInterface has methods to work with ResourceDistribution resources.
|
||||
type ResourceDistributionInterface interface {
|
||||
Create(ctx context.Context, resourceDistribution *v1alpha1.ResourceDistribution, opts v1.CreateOptions) (*v1alpha1.ResourceDistribution, error)
|
||||
Update(ctx context.Context, resourceDistribution *v1alpha1.ResourceDistribution, opts v1.UpdateOptions) (*v1alpha1.ResourceDistribution, error)
|
||||
UpdateStatus(ctx context.Context, resourceDistribution *v1alpha1.ResourceDistribution, opts v1.UpdateOptions) (*v1alpha1.ResourceDistribution, 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.ResourceDistribution, error)
|
||||
List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.ResourceDistributionList, 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.ResourceDistribution, err error)
|
||||
ResourceDistributionExpansion
|
||||
}
|
||||
|
||||
// resourceDistributions implements ResourceDistributionInterface
|
||||
type resourceDistributions struct {
|
||||
client rest.Interface
|
||||
}
|
||||
|
||||
// newResourceDistributions returns a ResourceDistributions
|
||||
func newResourceDistributions(c *AppsV1alpha1Client) *resourceDistributions {
|
||||
return &resourceDistributions{
|
||||
client: c.RESTClient(),
|
||||
}
|
||||
}
|
||||
|
||||
// Get takes name of the resourceDistribution, and returns the corresponding resourceDistribution object, and an error if there is any.
|
||||
func (c *resourceDistributions) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.ResourceDistribution, err error) {
|
||||
result = &v1alpha1.ResourceDistribution{}
|
||||
err = c.client.Get().
|
||||
Resource("resourcedistributions").
|
||||
Name(name).
|
||||
VersionedParams(&options, scheme.ParameterCodec).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of ResourceDistributions that match those selectors.
|
||||
func (c *resourceDistributions) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ResourceDistributionList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1alpha1.ResourceDistributionList{}
|
||||
err = c.client.Get().
|
||||
Resource("resourcedistributions").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested resourceDistributions.
|
||||
func (c *resourceDistributions) 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("resourcedistributions").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Watch(ctx)
|
||||
}
|
||||
|
||||
// Create takes the representation of a resourceDistribution and creates it. Returns the server's representation of the resourceDistribution, and an error, if there is any.
|
||||
func (c *resourceDistributions) Create(ctx context.Context, resourceDistribution *v1alpha1.ResourceDistribution, opts v1.CreateOptions) (result *v1alpha1.ResourceDistribution, err error) {
|
||||
result = &v1alpha1.ResourceDistribution{}
|
||||
err = c.client.Post().
|
||||
Resource("resourcedistributions").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(resourceDistribution).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Update takes the representation of a resourceDistribution and updates it. Returns the server's representation of the resourceDistribution, and an error, if there is any.
|
||||
func (c *resourceDistributions) Update(ctx context.Context, resourceDistribution *v1alpha1.ResourceDistribution, opts v1.UpdateOptions) (result *v1alpha1.ResourceDistribution, err error) {
|
||||
result = &v1alpha1.ResourceDistribution{}
|
||||
err = c.client.Put().
|
||||
Resource("resourcedistributions").
|
||||
Name(resourceDistribution.Name).
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(resourceDistribution).
|
||||
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 *resourceDistributions) UpdateStatus(ctx context.Context, resourceDistribution *v1alpha1.ResourceDistribution, opts v1.UpdateOptions) (result *v1alpha1.ResourceDistribution, err error) {
|
||||
result = &v1alpha1.ResourceDistribution{}
|
||||
err = c.client.Put().
|
||||
Resource("resourcedistributions").
|
||||
Name(resourceDistribution.Name).
|
||||
SubResource("status").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(resourceDistribution).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Delete takes name of the resourceDistribution and deletes it. Returns an error if one occurs.
|
||||
func (c *resourceDistributions) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
return c.client.Delete().
|
||||
Resource("resourcedistributions").
|
||||
Name(name).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *resourceDistributions) 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("resourcedistributions").
|
||||
VersionedParams(&listOpts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched resourceDistribution.
|
||||
func (c *resourceDistributions) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ResourceDistribution, err error) {
|
||||
result = &v1alpha1.ResourceDistribution{}
|
||||
err = c.client.Patch(pt).
|
||||
Resource("resourcedistributions").
|
||||
Name(name).
|
||||
SubResource(subresources...).
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(data).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2020 The Kruise Authors.
|
||||
Copyright 2021 The Kruise Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2020 The Kruise Authors.
|
||||
Copyright 2021 The Kruise Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2020 The Kruise Authors.
|
||||
Copyright 2021 The Kruise Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2020 The Kruise Authors.
|
||||
Copyright 2021 The Kruise Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2020 The Kruise Authors.
|
||||
Copyright 2021 The Kruise Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2020 The Kruise Authors.
|
||||
Copyright 2021 The Kruise Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2020 The Kruise Authors.
|
||||
Copyright 2021 The Kruise Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2020 The Kruise Authors.
|
||||
Copyright 2021 The Kruise Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2020 The Kruise Authors.
|
||||
Copyright 2021 The Kruise Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2020 The Kruise Authors.
|
||||
Copyright 2021 The Kruise Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2020 The Kruise Authors.
|
||||
Copyright 2021 The Kruise Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2020 The Kruise Authors.
|
||||
Copyright 2021 The Kruise Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2020 The Kruise Authors.
|
||||
Copyright 2021 The Kruise Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2020 The Kruise Authors.
|
||||
Copyright 2021 The Kruise Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2020 The Kruise Authors.
|
||||
Copyright 2021 The Kruise Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2020 The Kruise Authors.
|
||||
Copyright 2021 The Kruise Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2020 The Kruise Authors.
|
||||
Copyright 2021 The Kruise Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2020 The Kruise Authors.
|
||||
Copyright 2021 The Kruise Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2020 The Kruise Authors.
|
||||
Copyright 2021 The Kruise Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2020 The Kruise Authors.
|
||||
Copyright 2021 The Kruise Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2020 The Kruise Authors.
|
||||
Copyright 2021 The Kruise Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2020 The Kruise Authors.
|
||||
Copyright 2021 The Kruise Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2020 The Kruise Authors.
|
||||
Copyright 2021 The Kruise Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2020 The Kruise Authors.
|
||||
Copyright 2021 The Kruise Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
|
|
@ -0,0 +1,90 @@
|
|||
/*
|
||||
Copyright 2021 The Kruise 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 informer-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
"context"
|
||||
time "time"
|
||||
|
||||
appsv1alpha1 "github.com/openkruise/kruise-api/apps/v1alpha1"
|
||||
versioned "github.com/openkruise/kruise-api/client/clientset/versioned"
|
||||
internalinterfaces "github.com/openkruise/kruise-api/client/informers/externalversions/internalinterfaces"
|
||||
v1alpha1 "github.com/openkruise/kruise-api/client/listers/apps/v1alpha1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
||||
// EphemeralJobInformer provides access to a shared informer and lister for
|
||||
// EphemeralJobs.
|
||||
type EphemeralJobInformer interface {
|
||||
Informer() cache.SharedIndexInformer
|
||||
Lister() v1alpha1.EphemeralJobLister
|
||||
}
|
||||
|
||||
type ephemeralJobInformer struct {
|
||||
factory internalinterfaces.SharedInformerFactory
|
||||
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
||||
namespace string
|
||||
}
|
||||
|
||||
// NewEphemeralJobInformer constructs a new informer for EphemeralJob type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewEphemeralJobInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
|
||||
return NewFilteredEphemeralJobInformer(client, namespace, resyncPeriod, indexers, nil)
|
||||
}
|
||||
|
||||
// NewFilteredEphemeralJobInformer constructs a new informer for EphemeralJob type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewFilteredEphemeralJobInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
|
||||
return cache.NewSharedIndexInformer(
|
||||
&cache.ListWatch{
|
||||
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.AppsV1alpha1().EphemeralJobs(namespace).List(context.TODO(), options)
|
||||
},
|
||||
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.AppsV1alpha1().EphemeralJobs(namespace).Watch(context.TODO(), options)
|
||||
},
|
||||
},
|
||||
&appsv1alpha1.EphemeralJob{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
)
|
||||
}
|
||||
|
||||
func (f *ephemeralJobInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||
return NewFilteredEphemeralJobInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
|
||||
}
|
||||
|
||||
func (f *ephemeralJobInformer) Informer() cache.SharedIndexInformer {
|
||||
return f.factory.InformerFor(&appsv1alpha1.EphemeralJob{}, f.defaultInformer)
|
||||
}
|
||||
|
||||
func (f *ephemeralJobInformer) Lister() v1alpha1.EphemeralJobLister {
|
||||
return v1alpha1.NewEphemeralJobLister(f.Informer().GetIndexer())
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2020 The Kruise Authors.
|
||||
Copyright 2021 The Kruise Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2020 The Kruise Authors.
|
||||
Copyright 2021 The Kruise Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
@ -34,10 +34,14 @@ type Interface interface {
|
|||
ContainerRecreateRequests() ContainerRecreateRequestInformer
|
||||
// DaemonSets returns a DaemonSetInformer.
|
||||
DaemonSets() DaemonSetInformer
|
||||
// EphemeralJobs returns a EphemeralJobInformer.
|
||||
EphemeralJobs() EphemeralJobInformer
|
||||
// ImagePullJobs returns a ImagePullJobInformer.
|
||||
ImagePullJobs() ImagePullJobInformer
|
||||
// NodeImages returns a NodeImageInformer.
|
||||
NodeImages() NodeImageInformer
|
||||
// ResourceDistributions returns a ResourceDistributionInformer.
|
||||
ResourceDistributions() ResourceDistributionInformer
|
||||
// SidecarSets returns a SidecarSetInformer.
|
||||
SidecarSets() SidecarSetInformer
|
||||
// StatefulSets returns a StatefulSetInformer.
|
||||
|
@ -84,6 +88,11 @@ func (v *version) DaemonSets() DaemonSetInformer {
|
|||
return &daemonSetInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
|
||||
}
|
||||
|
||||
// EphemeralJobs returns a EphemeralJobInformer.
|
||||
func (v *version) EphemeralJobs() EphemeralJobInformer {
|
||||
return &ephemeralJobInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
|
||||
}
|
||||
|
||||
// ImagePullJobs returns a ImagePullJobInformer.
|
||||
func (v *version) ImagePullJobs() ImagePullJobInformer {
|
||||
return &imagePullJobInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
|
||||
|
@ -94,6 +103,11 @@ func (v *version) NodeImages() NodeImageInformer {
|
|||
return &nodeImageInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}
|
||||
}
|
||||
|
||||
// ResourceDistributions returns a ResourceDistributionInformer.
|
||||
func (v *version) ResourceDistributions() ResourceDistributionInformer {
|
||||
return &resourceDistributionInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}
|
||||
}
|
||||
|
||||
// SidecarSets returns a SidecarSetInformer.
|
||||
func (v *version) SidecarSets() SidecarSetInformer {
|
||||
return &sidecarSetInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2020 The Kruise Authors.
|
||||
Copyright 2021 The Kruise Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
|
|
@ -0,0 +1,89 @@
|
|||
/*
|
||||
Copyright 2021 The Kruise 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 informer-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
"context"
|
||||
time "time"
|
||||
|
||||
appsv1alpha1 "github.com/openkruise/kruise-api/apps/v1alpha1"
|
||||
versioned "github.com/openkruise/kruise-api/client/clientset/versioned"
|
||||
internalinterfaces "github.com/openkruise/kruise-api/client/informers/externalversions/internalinterfaces"
|
||||
v1alpha1 "github.com/openkruise/kruise-api/client/listers/apps/v1alpha1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
||||
// ResourceDistributionInformer provides access to a shared informer and lister for
|
||||
// ResourceDistributions.
|
||||
type ResourceDistributionInformer interface {
|
||||
Informer() cache.SharedIndexInformer
|
||||
Lister() v1alpha1.ResourceDistributionLister
|
||||
}
|
||||
|
||||
type resourceDistributionInformer struct {
|
||||
factory internalinterfaces.SharedInformerFactory
|
||||
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
||||
}
|
||||
|
||||
// NewResourceDistributionInformer constructs a new informer for ResourceDistribution type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewResourceDistributionInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
|
||||
return NewFilteredResourceDistributionInformer(client, resyncPeriod, indexers, nil)
|
||||
}
|
||||
|
||||
// NewFilteredResourceDistributionInformer constructs a new informer for ResourceDistribution type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewFilteredResourceDistributionInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
|
||||
return cache.NewSharedIndexInformer(
|
||||
&cache.ListWatch{
|
||||
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.AppsV1alpha1().ResourceDistributions().List(context.TODO(), options)
|
||||
},
|
||||
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.AppsV1alpha1().ResourceDistributions().Watch(context.TODO(), options)
|
||||
},
|
||||
},
|
||||
&appsv1alpha1.ResourceDistribution{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
)
|
||||
}
|
||||
|
||||
func (f *resourceDistributionInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||
return NewFilteredResourceDistributionInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
|
||||
}
|
||||
|
||||
func (f *resourceDistributionInformer) Informer() cache.SharedIndexInformer {
|
||||
return f.factory.InformerFor(&appsv1alpha1.ResourceDistribution{}, f.defaultInformer)
|
||||
}
|
||||
|
||||
func (f *resourceDistributionInformer) Lister() v1alpha1.ResourceDistributionLister {
|
||||
return v1alpha1.NewResourceDistributionLister(f.Informer().GetIndexer())
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2020 The Kruise Authors.
|
||||
Copyright 2021 The Kruise Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2020 The Kruise Authors.
|
||||
Copyright 2021 The Kruise Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2020 The Kruise Authors.
|
||||
Copyright 2021 The Kruise Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2020 The Kruise Authors.
|
||||
Copyright 2021 The Kruise Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2020 The Kruise Authors.
|
||||
Copyright 2021 The Kruise Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2020 The Kruise Authors.
|
||||
Copyright 2021 The Kruise Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2020 The Kruise Authors.
|
||||
Copyright 2021 The Kruise Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2020 The Kruise Authors.
|
||||
Copyright 2021 The Kruise Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
@ -65,10 +65,14 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource
|
|||
return &genericInformer{resource: resource.GroupResource(), informer: f.Apps().V1alpha1().ContainerRecreateRequests().Informer()}, nil
|
||||
case v1alpha1.SchemeGroupVersion.WithResource("daemonsets"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Apps().V1alpha1().DaemonSets().Informer()}, nil
|
||||
case v1alpha1.SchemeGroupVersion.WithResource("ephemeraljobs"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Apps().V1alpha1().EphemeralJobs().Informer()}, nil
|
||||
case v1alpha1.SchemeGroupVersion.WithResource("imagepulljobs"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Apps().V1alpha1().ImagePullJobs().Informer()}, nil
|
||||
case v1alpha1.SchemeGroupVersion.WithResource("nodeimages"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Apps().V1alpha1().NodeImages().Informer()}, nil
|
||||
case v1alpha1.SchemeGroupVersion.WithResource("resourcedistributions"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Apps().V1alpha1().ResourceDistributions().Informer()}, nil
|
||||
case v1alpha1.SchemeGroupVersion.WithResource("sidecarsets"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Apps().V1alpha1().SidecarSets().Informer()}, nil
|
||||
case v1alpha1.SchemeGroupVersion.WithResource("statefulsets"):
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2020 The Kruise Authors.
|
||||
Copyright 2021 The Kruise Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2020 The Kruise Authors.
|
||||
Copyright 2021 The Kruise Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2020 The Kruise Authors.
|
||||
Copyright 2021 The Kruise Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2020 The Kruise Authors.
|
||||
Copyright 2021 The Kruise Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2020 The Kruise Authors.
|
||||
Copyright 2021 The Kruise Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
@ -26,8 +26,10 @@ import (
|
|||
)
|
||||
|
||||
// AdvancedCronJobLister helps list AdvancedCronJobs.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type AdvancedCronJobLister interface {
|
||||
// List lists all AdvancedCronJobs in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1alpha1.AdvancedCronJob, err error)
|
||||
// AdvancedCronJobs returns an object that can list and get AdvancedCronJobs.
|
||||
AdvancedCronJobs(namespace string) AdvancedCronJobNamespaceLister
|
||||
|
@ -58,10 +60,13 @@ func (s *advancedCronJobLister) AdvancedCronJobs(namespace string) AdvancedCronJ
|
|||
}
|
||||
|
||||
// AdvancedCronJobNamespaceLister helps list and get AdvancedCronJobs.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type AdvancedCronJobNamespaceLister interface {
|
||||
// List lists all AdvancedCronJobs in the indexer for a given namespace.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1alpha1.AdvancedCronJob, err error)
|
||||
// Get retrieves the AdvancedCronJob from the indexer for a given namespace and name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1alpha1.AdvancedCronJob, error)
|
||||
AdvancedCronJobNamespaceListerExpansion
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2020 The Kruise Authors.
|
||||
Copyright 2021 The Kruise Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
@ -26,8 +26,10 @@ import (
|
|||
)
|
||||
|
||||
// BroadcastJobLister helps list BroadcastJobs.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type BroadcastJobLister interface {
|
||||
// List lists all BroadcastJobs in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1alpha1.BroadcastJob, err error)
|
||||
// BroadcastJobs returns an object that can list and get BroadcastJobs.
|
||||
BroadcastJobs(namespace string) BroadcastJobNamespaceLister
|
||||
|
@ -58,10 +60,13 @@ func (s *broadcastJobLister) BroadcastJobs(namespace string) BroadcastJobNamespa
|
|||
}
|
||||
|
||||
// BroadcastJobNamespaceLister helps list and get BroadcastJobs.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type BroadcastJobNamespaceLister interface {
|
||||
// List lists all BroadcastJobs in the indexer for a given namespace.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1alpha1.BroadcastJob, err error)
|
||||
// Get retrieves the BroadcastJob from the indexer for a given namespace and name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1alpha1.BroadcastJob, error)
|
||||
BroadcastJobNamespaceListerExpansion
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2020 The Kruise Authors.
|
||||
Copyright 2021 The Kruise Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
@ -26,8 +26,10 @@ import (
|
|||
)
|
||||
|
||||
// CloneSetLister helps list CloneSets.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type CloneSetLister interface {
|
||||
// List lists all CloneSets in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1alpha1.CloneSet, err error)
|
||||
// CloneSets returns an object that can list and get CloneSets.
|
||||
CloneSets(namespace string) CloneSetNamespaceLister
|
||||
|
@ -58,10 +60,13 @@ func (s *cloneSetLister) CloneSets(namespace string) CloneSetNamespaceLister {
|
|||
}
|
||||
|
||||
// CloneSetNamespaceLister helps list and get CloneSets.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type CloneSetNamespaceLister interface {
|
||||
// List lists all CloneSets in the indexer for a given namespace.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1alpha1.CloneSet, err error)
|
||||
// Get retrieves the CloneSet from the indexer for a given namespace and name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1alpha1.CloneSet, error)
|
||||
CloneSetNamespaceListerExpansion
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2020 The Kruise Authors.
|
||||
Copyright 2021 The Kruise Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
@ -26,8 +26,10 @@ import (
|
|||
)
|
||||
|
||||
// ContainerRecreateRequestLister helps list ContainerRecreateRequests.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type ContainerRecreateRequestLister interface {
|
||||
// List lists all ContainerRecreateRequests in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1alpha1.ContainerRecreateRequest, err error)
|
||||
// ContainerRecreateRequests returns an object that can list and get ContainerRecreateRequests.
|
||||
ContainerRecreateRequests(namespace string) ContainerRecreateRequestNamespaceLister
|
||||
|
@ -58,10 +60,13 @@ func (s *containerRecreateRequestLister) ContainerRecreateRequests(namespace str
|
|||
}
|
||||
|
||||
// ContainerRecreateRequestNamespaceLister helps list and get ContainerRecreateRequests.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type ContainerRecreateRequestNamespaceLister interface {
|
||||
// List lists all ContainerRecreateRequests in the indexer for a given namespace.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1alpha1.ContainerRecreateRequest, err error)
|
||||
// Get retrieves the ContainerRecreateRequest from the indexer for a given namespace and name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1alpha1.ContainerRecreateRequest, error)
|
||||
ContainerRecreateRequestNamespaceListerExpansion
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2020 The Kruise Authors.
|
||||
Copyright 2021 The Kruise Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
@ -26,8 +26,10 @@ import (
|
|||
)
|
||||
|
||||
// DaemonSetLister helps list DaemonSets.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type DaemonSetLister interface {
|
||||
// List lists all DaemonSets in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1alpha1.DaemonSet, err error)
|
||||
// DaemonSets returns an object that can list and get DaemonSets.
|
||||
DaemonSets(namespace string) DaemonSetNamespaceLister
|
||||
|
@ -58,10 +60,13 @@ func (s *daemonSetLister) DaemonSets(namespace string) DaemonSetNamespaceLister
|
|||
}
|
||||
|
||||
// DaemonSetNamespaceLister helps list and get DaemonSets.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type DaemonSetNamespaceLister interface {
|
||||
// List lists all DaemonSets in the indexer for a given namespace.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1alpha1.DaemonSet, err error)
|
||||
// Get retrieves the DaemonSet from the indexer for a given namespace and name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1alpha1.DaemonSet, error)
|
||||
DaemonSetNamespaceListerExpansion
|
||||
}
|
||||
|
|
|
@ -0,0 +1,99 @@
|
|||
/*
|
||||
Copyright 2021 The Kruise 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 lister-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
v1alpha1 "github.com/openkruise/kruise-api/apps/v1alpha1"
|
||||
"k8s.io/apimachinery/pkg/api/errors"
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
"k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
||||
// EphemeralJobLister helps list EphemeralJobs.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type EphemeralJobLister interface {
|
||||
// List lists all EphemeralJobs in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1alpha1.EphemeralJob, err error)
|
||||
// EphemeralJobs returns an object that can list and get EphemeralJobs.
|
||||
EphemeralJobs(namespace string) EphemeralJobNamespaceLister
|
||||
EphemeralJobListerExpansion
|
||||
}
|
||||
|
||||
// ephemeralJobLister implements the EphemeralJobLister interface.
|
||||
type ephemeralJobLister struct {
|
||||
indexer cache.Indexer
|
||||
}
|
||||
|
||||
// NewEphemeralJobLister returns a new EphemeralJobLister.
|
||||
func NewEphemeralJobLister(indexer cache.Indexer) EphemeralJobLister {
|
||||
return &ephemeralJobLister{indexer: indexer}
|
||||
}
|
||||
|
||||
// List lists all EphemeralJobs in the indexer.
|
||||
func (s *ephemeralJobLister) List(selector labels.Selector) (ret []*v1alpha1.EphemeralJob, err error) {
|
||||
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
|
||||
ret = append(ret, m.(*v1alpha1.EphemeralJob))
|
||||
})
|
||||
return ret, err
|
||||
}
|
||||
|
||||
// EphemeralJobs returns an object that can list and get EphemeralJobs.
|
||||
func (s *ephemeralJobLister) EphemeralJobs(namespace string) EphemeralJobNamespaceLister {
|
||||
return ephemeralJobNamespaceLister{indexer: s.indexer, namespace: namespace}
|
||||
}
|
||||
|
||||
// EphemeralJobNamespaceLister helps list and get EphemeralJobs.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type EphemeralJobNamespaceLister interface {
|
||||
// List lists all EphemeralJobs in the indexer for a given namespace.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1alpha1.EphemeralJob, err error)
|
||||
// Get retrieves the EphemeralJob from the indexer for a given namespace and name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1alpha1.EphemeralJob, error)
|
||||
EphemeralJobNamespaceListerExpansion
|
||||
}
|
||||
|
||||
// ephemeralJobNamespaceLister implements the EphemeralJobNamespaceLister
|
||||
// interface.
|
||||
type ephemeralJobNamespaceLister struct {
|
||||
indexer cache.Indexer
|
||||
namespace string
|
||||
}
|
||||
|
||||
// List lists all EphemeralJobs in the indexer for a given namespace.
|
||||
func (s ephemeralJobNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.EphemeralJob, err error) {
|
||||
err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
|
||||
ret = append(ret, m.(*v1alpha1.EphemeralJob))
|
||||
})
|
||||
return ret, err
|
||||
}
|
||||
|
||||
// Get retrieves the EphemeralJob from the indexer for a given namespace and name.
|
||||
func (s ephemeralJobNamespaceLister) Get(name string) (*v1alpha1.EphemeralJob, error) {
|
||||
obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if !exists {
|
||||
return nil, errors.NewNotFound(v1alpha1.Resource("ephemeraljob"), name)
|
||||
}
|
||||
return obj.(*v1alpha1.EphemeralJob), nil
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2020 The Kruise Authors.
|
||||
Copyright 2021 The Kruise Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
@ -58,6 +58,14 @@ type DaemonSetListerExpansion interface{}
|
|||
// DaemonSetNamespaceLister.
|
||||
type DaemonSetNamespaceListerExpansion interface{}
|
||||
|
||||
// EphemeralJobListerExpansion allows custom methods to be added to
|
||||
// EphemeralJobLister.
|
||||
type EphemeralJobListerExpansion interface{}
|
||||
|
||||
// EphemeralJobNamespaceListerExpansion allows custom methods to be added to
|
||||
// EphemeralJobNamespaceLister.
|
||||
type EphemeralJobNamespaceListerExpansion interface{}
|
||||
|
||||
// ImagePullJobListerExpansion allows custom methods to be added to
|
||||
// ImagePullJobLister.
|
||||
type ImagePullJobListerExpansion interface{}
|
||||
|
@ -70,6 +78,10 @@ type ImagePullJobNamespaceListerExpansion interface{}
|
|||
// NodeImageLister.
|
||||
type NodeImageListerExpansion interface{}
|
||||
|
||||
// ResourceDistributionListerExpansion allows custom methods to be added to
|
||||
// ResourceDistributionLister.
|
||||
type ResourceDistributionListerExpansion interface{}
|
||||
|
||||
// SidecarSetListerExpansion allows custom methods to be added to
|
||||
// SidecarSetLister.
|
||||
type SidecarSetListerExpansion interface{}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2020 The Kruise Authors.
|
||||
Copyright 2021 The Kruise Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
@ -26,8 +26,10 @@ import (
|
|||
)
|
||||
|
||||
// ImagePullJobLister helps list ImagePullJobs.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type ImagePullJobLister interface {
|
||||
// List lists all ImagePullJobs in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1alpha1.ImagePullJob, err error)
|
||||
// ImagePullJobs returns an object that can list and get ImagePullJobs.
|
||||
ImagePullJobs(namespace string) ImagePullJobNamespaceLister
|
||||
|
@ -58,10 +60,13 @@ func (s *imagePullJobLister) ImagePullJobs(namespace string) ImagePullJobNamespa
|
|||
}
|
||||
|
||||
// ImagePullJobNamespaceLister helps list and get ImagePullJobs.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type ImagePullJobNamespaceLister interface {
|
||||
// List lists all ImagePullJobs in the indexer for a given namespace.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1alpha1.ImagePullJob, err error)
|
||||
// Get retrieves the ImagePullJob from the indexer for a given namespace and name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1alpha1.ImagePullJob, error)
|
||||
ImagePullJobNamespaceListerExpansion
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2020 The Kruise Authors.
|
||||
Copyright 2021 The Kruise Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
@ -26,10 +26,13 @@ import (
|
|||
)
|
||||
|
||||
// NodeImageLister helps list NodeImages.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type NodeImageLister interface {
|
||||
// List lists all NodeImages in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1alpha1.NodeImage, err error)
|
||||
// Get retrieves the NodeImage from the index for a given name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1alpha1.NodeImage, error)
|
||||
NodeImageListerExpansion
|
||||
}
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue