mirror of
https://github.com/kubernetes/client-go.git
synced 2025-06-25 22:51:40 +00:00
Merge pull request #116556 from pohly/dra-podschedulingcontext
dra: PodScheduling -> PodSchedulingContext Kubernetes-commit: fbfc887a097b2f7cddd065deacbff03abf0bfef6
This commit is contained in:
commit
48d97c09db
@ -11376,7 +11376,7 @@ var schemaYAML = typed.YAMLObject(`types:
|
|||||||
- name: shareable
|
- name: shareable
|
||||||
type:
|
type:
|
||||||
scalar: boolean
|
scalar: boolean
|
||||||
- name: io.k8s.api.resource.v1alpha2.PodScheduling
|
- name: io.k8s.api.resource.v1alpha2.PodSchedulingContext
|
||||||
map:
|
map:
|
||||||
fields:
|
fields:
|
||||||
- name: apiVersion
|
- name: apiVersion
|
||||||
@ -11391,13 +11391,13 @@ var schemaYAML = typed.YAMLObject(`types:
|
|||||||
default: {}
|
default: {}
|
||||||
- name: spec
|
- name: spec
|
||||||
type:
|
type:
|
||||||
namedType: io.k8s.api.resource.v1alpha2.PodSchedulingSpec
|
namedType: io.k8s.api.resource.v1alpha2.PodSchedulingContextSpec
|
||||||
default: {}
|
default: {}
|
||||||
- name: status
|
- name: status
|
||||||
type:
|
type:
|
||||||
namedType: io.k8s.api.resource.v1alpha2.PodSchedulingStatus
|
namedType: io.k8s.api.resource.v1alpha2.PodSchedulingContextStatus
|
||||||
default: {}
|
default: {}
|
||||||
- name: io.k8s.api.resource.v1alpha2.PodSchedulingSpec
|
- name: io.k8s.api.resource.v1alpha2.PodSchedulingContextSpec
|
||||||
map:
|
map:
|
||||||
fields:
|
fields:
|
||||||
- name: potentialNodes
|
- name: potentialNodes
|
||||||
@ -11409,7 +11409,7 @@ var schemaYAML = typed.YAMLObject(`types:
|
|||||||
- name: selectedNode
|
- name: selectedNode
|
||||||
type:
|
type:
|
||||||
scalar: string
|
scalar: string
|
||||||
- name: io.k8s.api.resource.v1alpha2.PodSchedulingStatus
|
- name: io.k8s.api.resource.v1alpha2.PodSchedulingContextStatus
|
||||||
map:
|
map:
|
||||||
fields:
|
fields:
|
||||||
- name: resourceClaims
|
- name: resourceClaims
|
||||||
|
@ -27,58 +27,58 @@ import (
|
|||||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||||
)
|
)
|
||||||
|
|
||||||
// PodSchedulingApplyConfiguration represents an declarative configuration of the PodScheduling type for use
|
// PodSchedulingContextApplyConfiguration represents an declarative configuration of the PodSchedulingContext type for use
|
||||||
// with apply.
|
// with apply.
|
||||||
type PodSchedulingApplyConfiguration struct {
|
type PodSchedulingContextApplyConfiguration struct {
|
||||||
v1.TypeMetaApplyConfiguration `json:",inline"`
|
v1.TypeMetaApplyConfiguration `json:",inline"`
|
||||||
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
|
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
|
||||||
Spec *PodSchedulingSpecApplyConfiguration `json:"spec,omitempty"`
|
Spec *PodSchedulingContextSpecApplyConfiguration `json:"spec,omitempty"`
|
||||||
Status *PodSchedulingStatusApplyConfiguration `json:"status,omitempty"`
|
Status *PodSchedulingContextStatusApplyConfiguration `json:"status,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// PodScheduling constructs an declarative configuration of the PodScheduling type for use with
|
// PodSchedulingContext constructs an declarative configuration of the PodSchedulingContext type for use with
|
||||||
// apply.
|
// apply.
|
||||||
func PodScheduling(name, namespace string) *PodSchedulingApplyConfiguration {
|
func PodSchedulingContext(name, namespace string) *PodSchedulingContextApplyConfiguration {
|
||||||
b := &PodSchedulingApplyConfiguration{}
|
b := &PodSchedulingContextApplyConfiguration{}
|
||||||
b.WithName(name)
|
b.WithName(name)
|
||||||
b.WithNamespace(namespace)
|
b.WithNamespace(namespace)
|
||||||
b.WithKind("PodScheduling")
|
b.WithKind("PodSchedulingContext")
|
||||||
b.WithAPIVersion("resource.k8s.io/v1alpha2")
|
b.WithAPIVersion("resource.k8s.io/v1alpha2")
|
||||||
return b
|
return b
|
||||||
}
|
}
|
||||||
|
|
||||||
// ExtractPodScheduling extracts the applied configuration owned by fieldManager from
|
// ExtractPodSchedulingContext extracts the applied configuration owned by fieldManager from
|
||||||
// podScheduling. If no managedFields are found in podScheduling for fieldManager, a
|
// podSchedulingContext. If no managedFields are found in podSchedulingContext for fieldManager, a
|
||||||
// PodSchedulingApplyConfiguration is returned with only the Name, Namespace (if applicable),
|
// PodSchedulingContextApplyConfiguration is returned with only the Name, Namespace (if applicable),
|
||||||
// APIVersion and Kind populated. It is possible that no managed fields were found for because other
|
// APIVersion and Kind populated. It is possible that no managed fields were found for because other
|
||||||
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
|
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
|
||||||
// the fieldManager never owned fields any fields.
|
// the fieldManager never owned fields any fields.
|
||||||
// podScheduling must be a unmodified PodScheduling API object that was retrieved from the Kubernetes API.
|
// podSchedulingContext must be a unmodified PodSchedulingContext API object that was retrieved from the Kubernetes API.
|
||||||
// ExtractPodScheduling provides a way to perform a extract/modify-in-place/apply workflow.
|
// ExtractPodSchedulingContext provides a way to perform a extract/modify-in-place/apply workflow.
|
||||||
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
||||||
// applied if another fieldManager has updated or force applied any of the previously applied fields.
|
// applied if another fieldManager has updated or force applied any of the previously applied fields.
|
||||||
// Experimental!
|
// Experimental!
|
||||||
func ExtractPodScheduling(podScheduling *resourcev1alpha2.PodScheduling, fieldManager string) (*PodSchedulingApplyConfiguration, error) {
|
func ExtractPodSchedulingContext(podSchedulingContext *resourcev1alpha2.PodSchedulingContext, fieldManager string) (*PodSchedulingContextApplyConfiguration, error) {
|
||||||
return extractPodScheduling(podScheduling, fieldManager, "")
|
return extractPodSchedulingContext(podSchedulingContext, fieldManager, "")
|
||||||
}
|
}
|
||||||
|
|
||||||
// ExtractPodSchedulingStatus is the same as ExtractPodScheduling except
|
// ExtractPodSchedulingContextStatus is the same as ExtractPodSchedulingContext except
|
||||||
// that it extracts the status subresource applied configuration.
|
// that it extracts the status subresource applied configuration.
|
||||||
// Experimental!
|
// Experimental!
|
||||||
func ExtractPodSchedulingStatus(podScheduling *resourcev1alpha2.PodScheduling, fieldManager string) (*PodSchedulingApplyConfiguration, error) {
|
func ExtractPodSchedulingContextStatus(podSchedulingContext *resourcev1alpha2.PodSchedulingContext, fieldManager string) (*PodSchedulingContextApplyConfiguration, error) {
|
||||||
return extractPodScheduling(podScheduling, fieldManager, "status")
|
return extractPodSchedulingContext(podSchedulingContext, fieldManager, "status")
|
||||||
}
|
}
|
||||||
|
|
||||||
func extractPodScheduling(podScheduling *resourcev1alpha2.PodScheduling, fieldManager string, subresource string) (*PodSchedulingApplyConfiguration, error) {
|
func extractPodSchedulingContext(podSchedulingContext *resourcev1alpha2.PodSchedulingContext, fieldManager string, subresource string) (*PodSchedulingContextApplyConfiguration, error) {
|
||||||
b := &PodSchedulingApplyConfiguration{}
|
b := &PodSchedulingContextApplyConfiguration{}
|
||||||
err := managedfields.ExtractInto(podScheduling, internal.Parser().Type("io.k8s.api.resource.v1alpha2.PodScheduling"), fieldManager, b, subresource)
|
err := managedfields.ExtractInto(podSchedulingContext, internal.Parser().Type("io.k8s.api.resource.v1alpha2.PodSchedulingContext"), fieldManager, b, subresource)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
b.WithName(podScheduling.Name)
|
b.WithName(podSchedulingContext.Name)
|
||||||
b.WithNamespace(podScheduling.Namespace)
|
b.WithNamespace(podSchedulingContext.Namespace)
|
||||||
|
|
||||||
b.WithKind("PodScheduling")
|
b.WithKind("PodSchedulingContext")
|
||||||
b.WithAPIVersion("resource.k8s.io/v1alpha2")
|
b.WithAPIVersion("resource.k8s.io/v1alpha2")
|
||||||
return b, nil
|
return b, nil
|
||||||
}
|
}
|
||||||
@ -86,7 +86,7 @@ func extractPodScheduling(podScheduling *resourcev1alpha2.PodScheduling, fieldMa
|
|||||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||||
// If called multiple times, the Kind field is set to the value of the last call.
|
// If called multiple times, the Kind field is set to the value of the last call.
|
||||||
func (b *PodSchedulingApplyConfiguration) WithKind(value string) *PodSchedulingApplyConfiguration {
|
func (b *PodSchedulingContextApplyConfiguration) WithKind(value string) *PodSchedulingContextApplyConfiguration {
|
||||||
b.Kind = &value
|
b.Kind = &value
|
||||||
return b
|
return b
|
||||||
}
|
}
|
||||||
@ -94,7 +94,7 @@ func (b *PodSchedulingApplyConfiguration) WithKind(value string) *PodSchedulingA
|
|||||||
// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value
|
// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||||
// If called multiple times, the APIVersion field is set to the value of the last call.
|
// If called multiple times, the APIVersion field is set to the value of the last call.
|
||||||
func (b *PodSchedulingApplyConfiguration) WithAPIVersion(value string) *PodSchedulingApplyConfiguration {
|
func (b *PodSchedulingContextApplyConfiguration) WithAPIVersion(value string) *PodSchedulingContextApplyConfiguration {
|
||||||
b.APIVersion = &value
|
b.APIVersion = &value
|
||||||
return b
|
return b
|
||||||
}
|
}
|
||||||
@ -102,7 +102,7 @@ func (b *PodSchedulingApplyConfiguration) WithAPIVersion(value string) *PodSched
|
|||||||
// WithName sets the Name field in the declarative configuration to the given value
|
// WithName sets the Name field in the declarative configuration to the given value
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||||
// If called multiple times, the Name field is set to the value of the last call.
|
// If called multiple times, the Name field is set to the value of the last call.
|
||||||
func (b *PodSchedulingApplyConfiguration) WithName(value string) *PodSchedulingApplyConfiguration {
|
func (b *PodSchedulingContextApplyConfiguration) WithName(value string) *PodSchedulingContextApplyConfiguration {
|
||||||
b.ensureObjectMetaApplyConfigurationExists()
|
b.ensureObjectMetaApplyConfigurationExists()
|
||||||
b.Name = &value
|
b.Name = &value
|
||||||
return b
|
return b
|
||||||
@ -111,7 +111,7 @@ func (b *PodSchedulingApplyConfiguration) WithName(value string) *PodSchedulingA
|
|||||||
// WithGenerateName sets the GenerateName field in the declarative configuration to the given value
|
// WithGenerateName sets the GenerateName field in the declarative configuration to the given value
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||||
// If called multiple times, the GenerateName field is set to the value of the last call.
|
// If called multiple times, the GenerateName field is set to the value of the last call.
|
||||||
func (b *PodSchedulingApplyConfiguration) WithGenerateName(value string) *PodSchedulingApplyConfiguration {
|
func (b *PodSchedulingContextApplyConfiguration) WithGenerateName(value string) *PodSchedulingContextApplyConfiguration {
|
||||||
b.ensureObjectMetaApplyConfigurationExists()
|
b.ensureObjectMetaApplyConfigurationExists()
|
||||||
b.GenerateName = &value
|
b.GenerateName = &value
|
||||||
return b
|
return b
|
||||||
@ -120,7 +120,7 @@ func (b *PodSchedulingApplyConfiguration) WithGenerateName(value string) *PodSch
|
|||||||
// WithNamespace sets the Namespace field in the declarative configuration to the given value
|
// WithNamespace sets the Namespace field in the declarative configuration to the given value
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||||
// If called multiple times, the Namespace field is set to the value of the last call.
|
// If called multiple times, the Namespace field is set to the value of the last call.
|
||||||
func (b *PodSchedulingApplyConfiguration) WithNamespace(value string) *PodSchedulingApplyConfiguration {
|
func (b *PodSchedulingContextApplyConfiguration) WithNamespace(value string) *PodSchedulingContextApplyConfiguration {
|
||||||
b.ensureObjectMetaApplyConfigurationExists()
|
b.ensureObjectMetaApplyConfigurationExists()
|
||||||
b.Namespace = &value
|
b.Namespace = &value
|
||||||
return b
|
return b
|
||||||
@ -129,7 +129,7 @@ func (b *PodSchedulingApplyConfiguration) WithNamespace(value string) *PodSchedu
|
|||||||
// WithUID sets the UID field in the declarative configuration to the given value
|
// WithUID sets the UID field in the declarative configuration to the given value
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||||
// If called multiple times, the UID field is set to the value of the last call.
|
// If called multiple times, the UID field is set to the value of the last call.
|
||||||
func (b *PodSchedulingApplyConfiguration) WithUID(value types.UID) *PodSchedulingApplyConfiguration {
|
func (b *PodSchedulingContextApplyConfiguration) WithUID(value types.UID) *PodSchedulingContextApplyConfiguration {
|
||||||
b.ensureObjectMetaApplyConfigurationExists()
|
b.ensureObjectMetaApplyConfigurationExists()
|
||||||
b.UID = &value
|
b.UID = &value
|
||||||
return b
|
return b
|
||||||
@ -138,7 +138,7 @@ func (b *PodSchedulingApplyConfiguration) WithUID(value types.UID) *PodSchedulin
|
|||||||
// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value
|
// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||||
// If called multiple times, the ResourceVersion field is set to the value of the last call.
|
// If called multiple times, the ResourceVersion field is set to the value of the last call.
|
||||||
func (b *PodSchedulingApplyConfiguration) WithResourceVersion(value string) *PodSchedulingApplyConfiguration {
|
func (b *PodSchedulingContextApplyConfiguration) WithResourceVersion(value string) *PodSchedulingContextApplyConfiguration {
|
||||||
b.ensureObjectMetaApplyConfigurationExists()
|
b.ensureObjectMetaApplyConfigurationExists()
|
||||||
b.ResourceVersion = &value
|
b.ResourceVersion = &value
|
||||||
return b
|
return b
|
||||||
@ -147,7 +147,7 @@ func (b *PodSchedulingApplyConfiguration) WithResourceVersion(value string) *Pod
|
|||||||
// WithGeneration sets the Generation field in the declarative configuration to the given value
|
// WithGeneration sets the Generation field in the declarative configuration to the given value
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||||
// If called multiple times, the Generation field is set to the value of the last call.
|
// If called multiple times, the Generation field is set to the value of the last call.
|
||||||
func (b *PodSchedulingApplyConfiguration) WithGeneration(value int64) *PodSchedulingApplyConfiguration {
|
func (b *PodSchedulingContextApplyConfiguration) WithGeneration(value int64) *PodSchedulingContextApplyConfiguration {
|
||||||
b.ensureObjectMetaApplyConfigurationExists()
|
b.ensureObjectMetaApplyConfigurationExists()
|
||||||
b.Generation = &value
|
b.Generation = &value
|
||||||
return b
|
return b
|
||||||
@ -156,7 +156,7 @@ func (b *PodSchedulingApplyConfiguration) WithGeneration(value int64) *PodSchedu
|
|||||||
// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value
|
// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||||
// If called multiple times, the CreationTimestamp field is set to the value of the last call.
|
// If called multiple times, the CreationTimestamp field is set to the value of the last call.
|
||||||
func (b *PodSchedulingApplyConfiguration) WithCreationTimestamp(value metav1.Time) *PodSchedulingApplyConfiguration {
|
func (b *PodSchedulingContextApplyConfiguration) WithCreationTimestamp(value metav1.Time) *PodSchedulingContextApplyConfiguration {
|
||||||
b.ensureObjectMetaApplyConfigurationExists()
|
b.ensureObjectMetaApplyConfigurationExists()
|
||||||
b.CreationTimestamp = &value
|
b.CreationTimestamp = &value
|
||||||
return b
|
return b
|
||||||
@ -165,7 +165,7 @@ func (b *PodSchedulingApplyConfiguration) WithCreationTimestamp(value metav1.Tim
|
|||||||
// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value
|
// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||||
// If called multiple times, the DeletionTimestamp field is set to the value of the last call.
|
// If called multiple times, the DeletionTimestamp field is set to the value of the last call.
|
||||||
func (b *PodSchedulingApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *PodSchedulingApplyConfiguration {
|
func (b *PodSchedulingContextApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *PodSchedulingContextApplyConfiguration {
|
||||||
b.ensureObjectMetaApplyConfigurationExists()
|
b.ensureObjectMetaApplyConfigurationExists()
|
||||||
b.DeletionTimestamp = &value
|
b.DeletionTimestamp = &value
|
||||||
return b
|
return b
|
||||||
@ -174,7 +174,7 @@ func (b *PodSchedulingApplyConfiguration) WithDeletionTimestamp(value metav1.Tim
|
|||||||
// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value
|
// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||||
// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call.
|
// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call.
|
||||||
func (b *PodSchedulingApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *PodSchedulingApplyConfiguration {
|
func (b *PodSchedulingContextApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *PodSchedulingContextApplyConfiguration {
|
||||||
b.ensureObjectMetaApplyConfigurationExists()
|
b.ensureObjectMetaApplyConfigurationExists()
|
||||||
b.DeletionGracePeriodSeconds = &value
|
b.DeletionGracePeriodSeconds = &value
|
||||||
return b
|
return b
|
||||||
@ -184,7 +184,7 @@ func (b *PodSchedulingApplyConfiguration) WithDeletionGracePeriodSeconds(value i
|
|||||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||||
// If called multiple times, the entries provided by each call will be put on the Labels field,
|
// If called multiple times, the entries provided by each call will be put on the Labels field,
|
||||||
// overwriting an existing map entries in Labels field with the same key.
|
// overwriting an existing map entries in Labels field with the same key.
|
||||||
func (b *PodSchedulingApplyConfiguration) WithLabels(entries map[string]string) *PodSchedulingApplyConfiguration {
|
func (b *PodSchedulingContextApplyConfiguration) WithLabels(entries map[string]string) *PodSchedulingContextApplyConfiguration {
|
||||||
b.ensureObjectMetaApplyConfigurationExists()
|
b.ensureObjectMetaApplyConfigurationExists()
|
||||||
if b.Labels == nil && len(entries) > 0 {
|
if b.Labels == nil && len(entries) > 0 {
|
||||||
b.Labels = make(map[string]string, len(entries))
|
b.Labels = make(map[string]string, len(entries))
|
||||||
@ -199,7 +199,7 @@ func (b *PodSchedulingApplyConfiguration) WithLabels(entries map[string]string)
|
|||||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||||
// If called multiple times, the entries provided by each call will be put on the Annotations field,
|
// If called multiple times, the entries provided by each call will be put on the Annotations field,
|
||||||
// overwriting an existing map entries in Annotations field with the same key.
|
// overwriting an existing map entries in Annotations field with the same key.
|
||||||
func (b *PodSchedulingApplyConfiguration) WithAnnotations(entries map[string]string) *PodSchedulingApplyConfiguration {
|
func (b *PodSchedulingContextApplyConfiguration) WithAnnotations(entries map[string]string) *PodSchedulingContextApplyConfiguration {
|
||||||
b.ensureObjectMetaApplyConfigurationExists()
|
b.ensureObjectMetaApplyConfigurationExists()
|
||||||
if b.Annotations == nil && len(entries) > 0 {
|
if b.Annotations == nil && len(entries) > 0 {
|
||||||
b.Annotations = make(map[string]string, len(entries))
|
b.Annotations = make(map[string]string, len(entries))
|
||||||
@ -213,7 +213,7 @@ func (b *PodSchedulingApplyConfiguration) WithAnnotations(entries map[string]str
|
|||||||
// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration
|
// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration
|
||||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||||
// If called multiple times, values provided by each call will be appended to the OwnerReferences field.
|
// If called multiple times, values provided by each call will be appended to the OwnerReferences field.
|
||||||
func (b *PodSchedulingApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *PodSchedulingApplyConfiguration {
|
func (b *PodSchedulingContextApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *PodSchedulingContextApplyConfiguration {
|
||||||
b.ensureObjectMetaApplyConfigurationExists()
|
b.ensureObjectMetaApplyConfigurationExists()
|
||||||
for i := range values {
|
for i := range values {
|
||||||
if values[i] == nil {
|
if values[i] == nil {
|
||||||
@ -227,7 +227,7 @@ func (b *PodSchedulingApplyConfiguration) WithOwnerReferences(values ...*v1.Owne
|
|||||||
// WithFinalizers adds the given value to the Finalizers field in the declarative configuration
|
// WithFinalizers adds the given value to the Finalizers field in the declarative configuration
|
||||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||||
// If called multiple times, values provided by each call will be appended to the Finalizers field.
|
// If called multiple times, values provided by each call will be appended to the Finalizers field.
|
||||||
func (b *PodSchedulingApplyConfiguration) WithFinalizers(values ...string) *PodSchedulingApplyConfiguration {
|
func (b *PodSchedulingContextApplyConfiguration) WithFinalizers(values ...string) *PodSchedulingContextApplyConfiguration {
|
||||||
b.ensureObjectMetaApplyConfigurationExists()
|
b.ensureObjectMetaApplyConfigurationExists()
|
||||||
for i := range values {
|
for i := range values {
|
||||||
b.Finalizers = append(b.Finalizers, values[i])
|
b.Finalizers = append(b.Finalizers, values[i])
|
||||||
@ -235,7 +235,7 @@ func (b *PodSchedulingApplyConfiguration) WithFinalizers(values ...string) *PodS
|
|||||||
return b
|
return b
|
||||||
}
|
}
|
||||||
|
|
||||||
func (b *PodSchedulingApplyConfiguration) ensureObjectMetaApplyConfigurationExists() {
|
func (b *PodSchedulingContextApplyConfiguration) ensureObjectMetaApplyConfigurationExists() {
|
||||||
if b.ObjectMetaApplyConfiguration == nil {
|
if b.ObjectMetaApplyConfiguration == nil {
|
||||||
b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{}
|
b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{}
|
||||||
}
|
}
|
||||||
@ -244,7 +244,7 @@ func (b *PodSchedulingApplyConfiguration) ensureObjectMetaApplyConfigurationExis
|
|||||||
// WithSpec sets the Spec field in the declarative configuration to the given value
|
// WithSpec sets the Spec field in the declarative configuration to the given value
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||||
// If called multiple times, the Spec field is set to the value of the last call.
|
// If called multiple times, the Spec field is set to the value of the last call.
|
||||||
func (b *PodSchedulingApplyConfiguration) WithSpec(value *PodSchedulingSpecApplyConfiguration) *PodSchedulingApplyConfiguration {
|
func (b *PodSchedulingContextApplyConfiguration) WithSpec(value *PodSchedulingContextSpecApplyConfiguration) *PodSchedulingContextApplyConfiguration {
|
||||||
b.Spec = value
|
b.Spec = value
|
||||||
return b
|
return b
|
||||||
}
|
}
|
||||||
@ -252,7 +252,7 @@ func (b *PodSchedulingApplyConfiguration) WithSpec(value *PodSchedulingSpecApply
|
|||||||
// WithStatus sets the Status field in the declarative configuration to the given value
|
// WithStatus sets the Status field in the declarative configuration to the given value
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||||
// If called multiple times, the Status field is set to the value of the last call.
|
// If called multiple times, the Status field is set to the value of the last call.
|
||||||
func (b *PodSchedulingApplyConfiguration) WithStatus(value *PodSchedulingStatusApplyConfiguration) *PodSchedulingApplyConfiguration {
|
func (b *PodSchedulingContextApplyConfiguration) WithStatus(value *PodSchedulingContextStatusApplyConfiguration) *PodSchedulingContextApplyConfiguration {
|
||||||
b.Status = value
|
b.Status = value
|
||||||
return b
|
return b
|
||||||
}
|
}
|
@ -18,23 +18,23 @@ limitations under the License.
|
|||||||
|
|
||||||
package v1alpha2
|
package v1alpha2
|
||||||
|
|
||||||
// PodSchedulingSpecApplyConfiguration represents an declarative configuration of the PodSchedulingSpec type for use
|
// PodSchedulingContextSpecApplyConfiguration represents an declarative configuration of the PodSchedulingContextSpec type for use
|
||||||
// with apply.
|
// with apply.
|
||||||
type PodSchedulingSpecApplyConfiguration struct {
|
type PodSchedulingContextSpecApplyConfiguration struct {
|
||||||
SelectedNode *string `json:"selectedNode,omitempty"`
|
SelectedNode *string `json:"selectedNode,omitempty"`
|
||||||
PotentialNodes []string `json:"potentialNodes,omitempty"`
|
PotentialNodes []string `json:"potentialNodes,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// PodSchedulingSpecApplyConfiguration constructs an declarative configuration of the PodSchedulingSpec type for use with
|
// PodSchedulingContextSpecApplyConfiguration constructs an declarative configuration of the PodSchedulingContextSpec type for use with
|
||||||
// apply.
|
// apply.
|
||||||
func PodSchedulingSpec() *PodSchedulingSpecApplyConfiguration {
|
func PodSchedulingContextSpec() *PodSchedulingContextSpecApplyConfiguration {
|
||||||
return &PodSchedulingSpecApplyConfiguration{}
|
return &PodSchedulingContextSpecApplyConfiguration{}
|
||||||
}
|
}
|
||||||
|
|
||||||
// WithSelectedNode sets the SelectedNode field in the declarative configuration to the given value
|
// WithSelectedNode sets the SelectedNode field in the declarative configuration to the given value
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||||
// If called multiple times, the SelectedNode field is set to the value of the last call.
|
// If called multiple times, the SelectedNode field is set to the value of the last call.
|
||||||
func (b *PodSchedulingSpecApplyConfiguration) WithSelectedNode(value string) *PodSchedulingSpecApplyConfiguration {
|
func (b *PodSchedulingContextSpecApplyConfiguration) WithSelectedNode(value string) *PodSchedulingContextSpecApplyConfiguration {
|
||||||
b.SelectedNode = &value
|
b.SelectedNode = &value
|
||||||
return b
|
return b
|
||||||
}
|
}
|
||||||
@ -42,7 +42,7 @@ func (b *PodSchedulingSpecApplyConfiguration) WithSelectedNode(value string) *Po
|
|||||||
// WithPotentialNodes adds the given value to the PotentialNodes field in the declarative configuration
|
// WithPotentialNodes adds the given value to the PotentialNodes field in the declarative configuration
|
||||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||||
// If called multiple times, values provided by each call will be appended to the PotentialNodes field.
|
// If called multiple times, values provided by each call will be appended to the PotentialNodes field.
|
||||||
func (b *PodSchedulingSpecApplyConfiguration) WithPotentialNodes(values ...string) *PodSchedulingSpecApplyConfiguration {
|
func (b *PodSchedulingContextSpecApplyConfiguration) WithPotentialNodes(values ...string) *PodSchedulingContextSpecApplyConfiguration {
|
||||||
for i := range values {
|
for i := range values {
|
||||||
b.PotentialNodes = append(b.PotentialNodes, values[i])
|
b.PotentialNodes = append(b.PotentialNodes, values[i])
|
||||||
}
|
}
|
@ -18,22 +18,22 @@ limitations under the License.
|
|||||||
|
|
||||||
package v1alpha2
|
package v1alpha2
|
||||||
|
|
||||||
// PodSchedulingStatusApplyConfiguration represents an declarative configuration of the PodSchedulingStatus type for use
|
// PodSchedulingContextStatusApplyConfiguration represents an declarative configuration of the PodSchedulingContextStatus type for use
|
||||||
// with apply.
|
// with apply.
|
||||||
type PodSchedulingStatusApplyConfiguration struct {
|
type PodSchedulingContextStatusApplyConfiguration struct {
|
||||||
ResourceClaims []ResourceClaimSchedulingStatusApplyConfiguration `json:"resourceClaims,omitempty"`
|
ResourceClaims []ResourceClaimSchedulingStatusApplyConfiguration `json:"resourceClaims,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// PodSchedulingStatusApplyConfiguration constructs an declarative configuration of the PodSchedulingStatus type for use with
|
// PodSchedulingContextStatusApplyConfiguration constructs an declarative configuration of the PodSchedulingContextStatus type for use with
|
||||||
// apply.
|
// apply.
|
||||||
func PodSchedulingStatus() *PodSchedulingStatusApplyConfiguration {
|
func PodSchedulingContextStatus() *PodSchedulingContextStatusApplyConfiguration {
|
||||||
return &PodSchedulingStatusApplyConfiguration{}
|
return &PodSchedulingContextStatusApplyConfiguration{}
|
||||||
}
|
}
|
||||||
|
|
||||||
// WithResourceClaims adds the given value to the ResourceClaims field in the declarative configuration
|
// WithResourceClaims adds the given value to the ResourceClaims field in the declarative configuration
|
||||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||||
// If called multiple times, values provided by each call will be appended to the ResourceClaims field.
|
// If called multiple times, values provided by each call will be appended to the ResourceClaims field.
|
||||||
func (b *PodSchedulingStatusApplyConfiguration) WithResourceClaims(values ...*ResourceClaimSchedulingStatusApplyConfiguration) *PodSchedulingStatusApplyConfiguration {
|
func (b *PodSchedulingContextStatusApplyConfiguration) WithResourceClaims(values ...*ResourceClaimSchedulingStatusApplyConfiguration) *PodSchedulingContextStatusApplyConfiguration {
|
||||||
for i := range values {
|
for i := range values {
|
||||||
if values[i] == nil {
|
if values[i] == nil {
|
||||||
panic("nil value passed to WithResourceClaims")
|
panic("nil value passed to WithResourceClaims")
|
@ -1451,12 +1451,12 @@ func ForKind(kind schema.GroupVersionKind) interface{} {
|
|||||||
// Group=resource.k8s.io, Version=v1alpha2
|
// Group=resource.k8s.io, Version=v1alpha2
|
||||||
case v1alpha2.SchemeGroupVersion.WithKind("AllocationResult"):
|
case v1alpha2.SchemeGroupVersion.WithKind("AllocationResult"):
|
||||||
return &resourcev1alpha2.AllocationResultApplyConfiguration{}
|
return &resourcev1alpha2.AllocationResultApplyConfiguration{}
|
||||||
case v1alpha2.SchemeGroupVersion.WithKind("PodScheduling"):
|
case v1alpha2.SchemeGroupVersion.WithKind("PodSchedulingContext"):
|
||||||
return &resourcev1alpha2.PodSchedulingApplyConfiguration{}
|
return &resourcev1alpha2.PodSchedulingContextApplyConfiguration{}
|
||||||
case v1alpha2.SchemeGroupVersion.WithKind("PodSchedulingSpec"):
|
case v1alpha2.SchemeGroupVersion.WithKind("PodSchedulingContextSpec"):
|
||||||
return &resourcev1alpha2.PodSchedulingSpecApplyConfiguration{}
|
return &resourcev1alpha2.PodSchedulingContextSpecApplyConfiguration{}
|
||||||
case v1alpha2.SchemeGroupVersion.WithKind("PodSchedulingStatus"):
|
case v1alpha2.SchemeGroupVersion.WithKind("PodSchedulingContextStatus"):
|
||||||
return &resourcev1alpha2.PodSchedulingStatusApplyConfiguration{}
|
return &resourcev1alpha2.PodSchedulingContextStatusApplyConfiguration{}
|
||||||
case v1alpha2.SchemeGroupVersion.WithKind("ResourceClaim"):
|
case v1alpha2.SchemeGroupVersion.WithKind("ResourceClaim"):
|
||||||
return &resourcev1alpha2.ResourceClaimApplyConfiguration{}
|
return &resourcev1alpha2.ResourceClaimApplyConfiguration{}
|
||||||
case v1alpha2.SchemeGroupVersion.WithKind("ResourceClaimConsumerReference"):
|
case v1alpha2.SchemeGroupVersion.WithKind("ResourceClaimConsumerReference"):
|
||||||
|
4
go.mod
4
go.mod
@ -24,7 +24,7 @@ require (
|
|||||||
golang.org/x/term v0.5.0
|
golang.org/x/term v0.5.0
|
||||||
golang.org/x/time v0.0.0-20220210224613-90d013bbcef8
|
golang.org/x/time v0.0.0-20220210224613-90d013bbcef8
|
||||||
google.golang.org/protobuf v1.28.1
|
google.golang.org/protobuf v1.28.1
|
||||||
k8s.io/api v0.0.0-20230314091508-112a65bae227
|
k8s.io/api v0.0.0-20230315055827-772ba56cf9f1
|
||||||
k8s.io/apimachinery v0.0.0-20230314010357-128166500c57
|
k8s.io/apimachinery v0.0.0-20230314010357-128166500c57
|
||||||
k8s.io/klog/v2 v2.90.1
|
k8s.io/klog/v2 v2.90.1
|
||||||
k8s.io/kube-openapi v0.0.0-20230308215209-15aac26d736a
|
k8s.io/kube-openapi v0.0.0-20230308215209-15aac26d736a
|
||||||
@ -59,6 +59,6 @@ require (
|
|||||||
)
|
)
|
||||||
|
|
||||||
replace (
|
replace (
|
||||||
k8s.io/api => k8s.io/api v0.0.0-20230314091508-112a65bae227
|
k8s.io/api => k8s.io/api v0.0.0-20230315055827-772ba56cf9f1
|
||||||
k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20230314010357-128166500c57
|
k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20230314010357-128166500c57
|
||||||
)
|
)
|
||||||
|
4
go.sum
4
go.sum
@ -473,8 +473,8 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh
|
|||||||
honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
|
honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
|
||||||
honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
|
honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
|
||||||
honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
|
honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
|
||||||
k8s.io/api v0.0.0-20230314091508-112a65bae227 h1:Ak4YrHI4101ZMfx2hkXnp//d5r0nKXA8RkNaHCBJ7MA=
|
k8s.io/api v0.0.0-20230315055827-772ba56cf9f1 h1:wsx1NWj399n+Np5dv3GJxXEzQexgLylAu4huCny1aHc=
|
||||||
k8s.io/api v0.0.0-20230314091508-112a65bae227/go.mod h1:YsFNxBfPYQZAIBg0XvL94rxDDVZvQQQUlo4KbwEEqNU=
|
k8s.io/api v0.0.0-20230315055827-772ba56cf9f1/go.mod h1:YsFNxBfPYQZAIBg0XvL94rxDDVZvQQQUlo4KbwEEqNU=
|
||||||
k8s.io/apimachinery v0.0.0-20230314010357-128166500c57 h1:Vr1geeI+at1NNCWyTN70NtPSNcveZ+fAcbZivzwHknM=
|
k8s.io/apimachinery v0.0.0-20230314010357-128166500c57 h1:Vr1geeI+at1NNCWyTN70NtPSNcveZ+fAcbZivzwHknM=
|
||||||
k8s.io/apimachinery v0.0.0-20230314010357-128166500c57/go.mod h1:1AlvkfXatlv5Kq9dCZg3Ksdu/DyrZ31Q0CncRqQ8Q9I=
|
k8s.io/apimachinery v0.0.0-20230314010357-128166500c57/go.mod h1:1AlvkfXatlv5Kq9dCZg3Ksdu/DyrZ31Q0CncRqQ8Q9I=
|
||||||
k8s.io/klog/v2 v2.90.1 h1:m4bYOKall2MmOiRaR1J+We67Do7vm9KiQVlT96lnHUw=
|
k8s.io/klog/v2 v2.90.1 h1:m4bYOKall2MmOiRaR1J+We67Do7vm9KiQVlT96lnHUw=
|
||||||
|
@ -349,8 +349,8 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource
|
|||||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Rbac().V1beta1().RoleBindings().Informer()}, nil
|
return &genericInformer{resource: resource.GroupResource(), informer: f.Rbac().V1beta1().RoleBindings().Informer()}, nil
|
||||||
|
|
||||||
// Group=resource.k8s.io, Version=v1alpha2
|
// Group=resource.k8s.io, Version=v1alpha2
|
||||||
case v1alpha2.SchemeGroupVersion.WithResource("podschedulings"):
|
case v1alpha2.SchemeGroupVersion.WithResource("podschedulingcontexts"):
|
||||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Resource().V1alpha2().PodSchedulings().Informer()}, nil
|
return &genericInformer{resource: resource.GroupResource(), informer: f.Resource().V1alpha2().PodSchedulingContexts().Informer()}, nil
|
||||||
case v1alpha2.SchemeGroupVersion.WithResource("resourceclaims"):
|
case v1alpha2.SchemeGroupVersion.WithResource("resourceclaims"):
|
||||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Resource().V1alpha2().ResourceClaims().Informer()}, nil
|
return &genericInformer{resource: resource.GroupResource(), informer: f.Resource().V1alpha2().ResourceClaims().Informer()}, nil
|
||||||
case v1alpha2.SchemeGroupVersion.WithResource("resourceclaimtemplates"):
|
case v1alpha2.SchemeGroupVersion.WithResource("resourceclaimtemplates"):
|
||||||
|
@ -24,8 +24,8 @@ import (
|
|||||||
|
|
||||||
// Interface provides access to all the informers in this group version.
|
// Interface provides access to all the informers in this group version.
|
||||||
type Interface interface {
|
type Interface interface {
|
||||||
// PodSchedulings returns a PodSchedulingInformer.
|
// PodSchedulingContexts returns a PodSchedulingContextInformer.
|
||||||
PodSchedulings() PodSchedulingInformer
|
PodSchedulingContexts() PodSchedulingContextInformer
|
||||||
// ResourceClaims returns a ResourceClaimInformer.
|
// ResourceClaims returns a ResourceClaimInformer.
|
||||||
ResourceClaims() ResourceClaimInformer
|
ResourceClaims() ResourceClaimInformer
|
||||||
// ResourceClaimTemplates returns a ResourceClaimTemplateInformer.
|
// ResourceClaimTemplates returns a ResourceClaimTemplateInformer.
|
||||||
@ -45,9 +45,9 @@ func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakList
|
|||||||
return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
|
return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
|
||||||
}
|
}
|
||||||
|
|
||||||
// PodSchedulings returns a PodSchedulingInformer.
|
// PodSchedulingContexts returns a PodSchedulingContextInformer.
|
||||||
func (v *version) PodSchedulings() PodSchedulingInformer {
|
func (v *version) PodSchedulingContexts() PodSchedulingContextInformer {
|
||||||
return &podSchedulingInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
|
return &podSchedulingContextInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ResourceClaims returns a ResourceClaimInformer.
|
// ResourceClaims returns a ResourceClaimInformer.
|
||||||
|
@ -32,59 +32,59 @@ import (
|
|||||||
cache "k8s.io/client-go/tools/cache"
|
cache "k8s.io/client-go/tools/cache"
|
||||||
)
|
)
|
||||||
|
|
||||||
// PodSchedulingInformer provides access to a shared informer and lister for
|
// PodSchedulingContextInformer provides access to a shared informer and lister for
|
||||||
// PodSchedulings.
|
// PodSchedulingContexts.
|
||||||
type PodSchedulingInformer interface {
|
type PodSchedulingContextInformer interface {
|
||||||
Informer() cache.SharedIndexInformer
|
Informer() cache.SharedIndexInformer
|
||||||
Lister() v1alpha2.PodSchedulingLister
|
Lister() v1alpha2.PodSchedulingContextLister
|
||||||
}
|
}
|
||||||
|
|
||||||
type podSchedulingInformer struct {
|
type podSchedulingContextInformer struct {
|
||||||
factory internalinterfaces.SharedInformerFactory
|
factory internalinterfaces.SharedInformerFactory
|
||||||
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
||||||
namespace string
|
namespace string
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewPodSchedulingInformer constructs a new informer for PodScheduling type.
|
// NewPodSchedulingContextInformer constructs a new informer for PodSchedulingContext type.
|
||||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
// 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.
|
// one. This reduces memory footprint and number of connections to the server.
|
||||||
func NewPodSchedulingInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
|
func NewPodSchedulingContextInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
|
||||||
return NewFilteredPodSchedulingInformer(client, namespace, resyncPeriod, indexers, nil)
|
return NewFilteredPodSchedulingContextInformer(client, namespace, resyncPeriod, indexers, nil)
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewFilteredPodSchedulingInformer constructs a new informer for PodScheduling type.
|
// NewFilteredPodSchedulingContextInformer constructs a new informer for PodSchedulingContext type.
|
||||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
// 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.
|
// one. This reduces memory footprint and number of connections to the server.
|
||||||
func NewFilteredPodSchedulingInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
|
func NewFilteredPodSchedulingContextInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
|
||||||
return cache.NewSharedIndexInformer(
|
return cache.NewSharedIndexInformer(
|
||||||
&cache.ListWatch{
|
&cache.ListWatch{
|
||||||
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
|
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
|
||||||
if tweakListOptions != nil {
|
if tweakListOptions != nil {
|
||||||
tweakListOptions(&options)
|
tweakListOptions(&options)
|
||||||
}
|
}
|
||||||
return client.ResourceV1alpha2().PodSchedulings(namespace).List(context.TODO(), options)
|
return client.ResourceV1alpha2().PodSchedulingContexts(namespace).List(context.TODO(), options)
|
||||||
},
|
},
|
||||||
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||||
if tweakListOptions != nil {
|
if tweakListOptions != nil {
|
||||||
tweakListOptions(&options)
|
tweakListOptions(&options)
|
||||||
}
|
}
|
||||||
return client.ResourceV1alpha2().PodSchedulings(namespace).Watch(context.TODO(), options)
|
return client.ResourceV1alpha2().PodSchedulingContexts(namespace).Watch(context.TODO(), options)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
&resourcev1alpha2.PodScheduling{},
|
&resourcev1alpha2.PodSchedulingContext{},
|
||||||
resyncPeriod,
|
resyncPeriod,
|
||||||
indexers,
|
indexers,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (f *podSchedulingInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
func (f *podSchedulingContextInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||||
return NewFilteredPodSchedulingInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
|
return NewFilteredPodSchedulingContextInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (f *podSchedulingInformer) Informer() cache.SharedIndexInformer {
|
func (f *podSchedulingContextInformer) Informer() cache.SharedIndexInformer {
|
||||||
return f.factory.InformerFor(&resourcev1alpha2.PodScheduling{}, f.defaultInformer)
|
return f.factory.InformerFor(&resourcev1alpha2.PodSchedulingContext{}, f.defaultInformer)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (f *podSchedulingInformer) Lister() v1alpha2.PodSchedulingLister {
|
func (f *podSchedulingContextInformer) Lister() v1alpha2.PodSchedulingContextLister {
|
||||||
return v1alpha2.NewPodSchedulingLister(f.Informer().GetIndexer())
|
return v1alpha2.NewPodSchedulingContextLister(f.Informer().GetIndexer())
|
||||||
}
|
}
|
@ -1,189 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by client-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
package fake
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
json "encoding/json"
|
|
||||||
"fmt"
|
|
||||||
|
|
||||||
v1alpha2 "k8s.io/api/resource/v1alpha2"
|
|
||||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
|
||||||
labels "k8s.io/apimachinery/pkg/labels"
|
|
||||||
types "k8s.io/apimachinery/pkg/types"
|
|
||||||
watch "k8s.io/apimachinery/pkg/watch"
|
|
||||||
resourcev1alpha2 "k8s.io/client-go/applyconfigurations/resource/v1alpha2"
|
|
||||||
testing "k8s.io/client-go/testing"
|
|
||||||
)
|
|
||||||
|
|
||||||
// FakePodSchedulings implements PodSchedulingInterface
|
|
||||||
type FakePodSchedulings struct {
|
|
||||||
Fake *FakeResourceV1alpha2
|
|
||||||
ns string
|
|
||||||
}
|
|
||||||
|
|
||||||
var podschedulingsResource = v1alpha2.SchemeGroupVersion.WithResource("podschedulings")
|
|
||||||
|
|
||||||
var podschedulingsKind = v1alpha2.SchemeGroupVersion.WithKind("PodScheduling")
|
|
||||||
|
|
||||||
// Get takes name of the podScheduling, and returns the corresponding podScheduling object, and an error if there is any.
|
|
||||||
func (c *FakePodSchedulings) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha2.PodScheduling, err error) {
|
|
||||||
obj, err := c.Fake.
|
|
||||||
Invokes(testing.NewGetAction(podschedulingsResource, c.ns, name), &v1alpha2.PodScheduling{})
|
|
||||||
|
|
||||||
if obj == nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return obj.(*v1alpha2.PodScheduling), err
|
|
||||||
}
|
|
||||||
|
|
||||||
// List takes label and field selectors, and returns the list of PodSchedulings that match those selectors.
|
|
||||||
func (c *FakePodSchedulings) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha2.PodSchedulingList, err error) {
|
|
||||||
obj, err := c.Fake.
|
|
||||||
Invokes(testing.NewListAction(podschedulingsResource, podschedulingsKind, c.ns, opts), &v1alpha2.PodSchedulingList{})
|
|
||||||
|
|
||||||
if obj == nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
|
||||||
if label == nil {
|
|
||||||
label = labels.Everything()
|
|
||||||
}
|
|
||||||
list := &v1alpha2.PodSchedulingList{ListMeta: obj.(*v1alpha2.PodSchedulingList).ListMeta}
|
|
||||||
for _, item := range obj.(*v1alpha2.PodSchedulingList).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 podSchedulings.
|
|
||||||
func (c *FakePodSchedulings) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
|
||||||
return c.Fake.
|
|
||||||
InvokesWatch(testing.NewWatchAction(podschedulingsResource, c.ns, opts))
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
// Create takes the representation of a podScheduling and creates it. Returns the server's representation of the podScheduling, and an error, if there is any.
|
|
||||||
func (c *FakePodSchedulings) Create(ctx context.Context, podScheduling *v1alpha2.PodScheduling, opts v1.CreateOptions) (result *v1alpha2.PodScheduling, err error) {
|
|
||||||
obj, err := c.Fake.
|
|
||||||
Invokes(testing.NewCreateAction(podschedulingsResource, c.ns, podScheduling), &v1alpha2.PodScheduling{})
|
|
||||||
|
|
||||||
if obj == nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return obj.(*v1alpha2.PodScheduling), err
|
|
||||||
}
|
|
||||||
|
|
||||||
// Update takes the representation of a podScheduling and updates it. Returns the server's representation of the podScheduling, and an error, if there is any.
|
|
||||||
func (c *FakePodSchedulings) Update(ctx context.Context, podScheduling *v1alpha2.PodScheduling, opts v1.UpdateOptions) (result *v1alpha2.PodScheduling, err error) {
|
|
||||||
obj, err := c.Fake.
|
|
||||||
Invokes(testing.NewUpdateAction(podschedulingsResource, c.ns, podScheduling), &v1alpha2.PodScheduling{})
|
|
||||||
|
|
||||||
if obj == nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return obj.(*v1alpha2.PodScheduling), 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 *FakePodSchedulings) UpdateStatus(ctx context.Context, podScheduling *v1alpha2.PodScheduling, opts v1.UpdateOptions) (*v1alpha2.PodScheduling, error) {
|
|
||||||
obj, err := c.Fake.
|
|
||||||
Invokes(testing.NewUpdateSubresourceAction(podschedulingsResource, "status", c.ns, podScheduling), &v1alpha2.PodScheduling{})
|
|
||||||
|
|
||||||
if obj == nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return obj.(*v1alpha2.PodScheduling), err
|
|
||||||
}
|
|
||||||
|
|
||||||
// Delete takes name of the podScheduling and deletes it. Returns an error if one occurs.
|
|
||||||
func (c *FakePodSchedulings) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
|
||||||
_, err := c.Fake.
|
|
||||||
Invokes(testing.NewDeleteActionWithOptions(podschedulingsResource, c.ns, name, opts), &v1alpha2.PodScheduling{})
|
|
||||||
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeleteCollection deletes a collection of objects.
|
|
||||||
func (c *FakePodSchedulings) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
|
||||||
action := testing.NewDeleteCollectionAction(podschedulingsResource, c.ns, listOpts)
|
|
||||||
|
|
||||||
_, err := c.Fake.Invokes(action, &v1alpha2.PodSchedulingList{})
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
// Patch applies the patch and returns the patched podScheduling.
|
|
||||||
func (c *FakePodSchedulings) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.PodScheduling, err error) {
|
|
||||||
obj, err := c.Fake.
|
|
||||||
Invokes(testing.NewPatchSubresourceAction(podschedulingsResource, c.ns, name, pt, data, subresources...), &v1alpha2.PodScheduling{})
|
|
||||||
|
|
||||||
if obj == nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return obj.(*v1alpha2.PodScheduling), err
|
|
||||||
}
|
|
||||||
|
|
||||||
// Apply takes the given apply declarative configuration, applies it and returns the applied podScheduling.
|
|
||||||
func (c *FakePodSchedulings) Apply(ctx context.Context, podScheduling *resourcev1alpha2.PodSchedulingApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.PodScheduling, err error) {
|
|
||||||
if podScheduling == nil {
|
|
||||||
return nil, fmt.Errorf("podScheduling provided to Apply must not be nil")
|
|
||||||
}
|
|
||||||
data, err := json.Marshal(podScheduling)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
name := podScheduling.Name
|
|
||||||
if name == nil {
|
|
||||||
return nil, fmt.Errorf("podScheduling.Name must be provided to Apply")
|
|
||||||
}
|
|
||||||
obj, err := c.Fake.
|
|
||||||
Invokes(testing.NewPatchSubresourceAction(podschedulingsResource, c.ns, *name, types.ApplyPatchType, data), &v1alpha2.PodScheduling{})
|
|
||||||
|
|
||||||
if obj == nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return obj.(*v1alpha2.PodScheduling), err
|
|
||||||
}
|
|
||||||
|
|
||||||
// ApplyStatus was generated because the type contains a Status member.
|
|
||||||
// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus().
|
|
||||||
func (c *FakePodSchedulings) ApplyStatus(ctx context.Context, podScheduling *resourcev1alpha2.PodSchedulingApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.PodScheduling, err error) {
|
|
||||||
if podScheduling == nil {
|
|
||||||
return nil, fmt.Errorf("podScheduling provided to Apply must not be nil")
|
|
||||||
}
|
|
||||||
data, err := json.Marshal(podScheduling)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
name := podScheduling.Name
|
|
||||||
if name == nil {
|
|
||||||
return nil, fmt.Errorf("podScheduling.Name must be provided to Apply")
|
|
||||||
}
|
|
||||||
obj, err := c.Fake.
|
|
||||||
Invokes(testing.NewPatchSubresourceAction(podschedulingsResource, c.ns, *name, types.ApplyPatchType, data, "status"), &v1alpha2.PodScheduling{})
|
|
||||||
|
|
||||||
if obj == nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return obj.(*v1alpha2.PodScheduling), err
|
|
||||||
}
|
|
@ -0,0 +1,189 @@
|
|||||||
|
/*
|
||||||
|
Copyright The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by client-gen. DO NOT EDIT.
|
||||||
|
|
||||||
|
package fake
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
json "encoding/json"
|
||||||
|
"fmt"
|
||||||
|
|
||||||
|
v1alpha2 "k8s.io/api/resource/v1alpha2"
|
||||||
|
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
labels "k8s.io/apimachinery/pkg/labels"
|
||||||
|
types "k8s.io/apimachinery/pkg/types"
|
||||||
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
|
resourcev1alpha2 "k8s.io/client-go/applyconfigurations/resource/v1alpha2"
|
||||||
|
testing "k8s.io/client-go/testing"
|
||||||
|
)
|
||||||
|
|
||||||
|
// FakePodSchedulingContexts implements PodSchedulingContextInterface
|
||||||
|
type FakePodSchedulingContexts struct {
|
||||||
|
Fake *FakeResourceV1alpha2
|
||||||
|
ns string
|
||||||
|
}
|
||||||
|
|
||||||
|
var podschedulingcontextsResource = v1alpha2.SchemeGroupVersion.WithResource("podschedulingcontexts")
|
||||||
|
|
||||||
|
var podschedulingcontextsKind = v1alpha2.SchemeGroupVersion.WithKind("PodSchedulingContext")
|
||||||
|
|
||||||
|
// Get takes name of the podSchedulingContext, and returns the corresponding podSchedulingContext object, and an error if there is any.
|
||||||
|
func (c *FakePodSchedulingContexts) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha2.PodSchedulingContext, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewGetAction(podschedulingcontextsResource, c.ns, name), &v1alpha2.PodSchedulingContext{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*v1alpha2.PodSchedulingContext), err
|
||||||
|
}
|
||||||
|
|
||||||
|
// List takes label and field selectors, and returns the list of PodSchedulingContexts that match those selectors.
|
||||||
|
func (c *FakePodSchedulingContexts) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha2.PodSchedulingContextList, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewListAction(podschedulingcontextsResource, podschedulingcontextsKind, c.ns, opts), &v1alpha2.PodSchedulingContextList{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||||
|
if label == nil {
|
||||||
|
label = labels.Everything()
|
||||||
|
}
|
||||||
|
list := &v1alpha2.PodSchedulingContextList{ListMeta: obj.(*v1alpha2.PodSchedulingContextList).ListMeta}
|
||||||
|
for _, item := range obj.(*v1alpha2.PodSchedulingContextList).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 podSchedulingContexts.
|
||||||
|
func (c *FakePodSchedulingContexts) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||||
|
return c.Fake.
|
||||||
|
InvokesWatch(testing.NewWatchAction(podschedulingcontextsResource, c.ns, opts))
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Create takes the representation of a podSchedulingContext and creates it. Returns the server's representation of the podSchedulingContext, and an error, if there is any.
|
||||||
|
func (c *FakePodSchedulingContexts) Create(ctx context.Context, podSchedulingContext *v1alpha2.PodSchedulingContext, opts v1.CreateOptions) (result *v1alpha2.PodSchedulingContext, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewCreateAction(podschedulingcontextsResource, c.ns, podSchedulingContext), &v1alpha2.PodSchedulingContext{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*v1alpha2.PodSchedulingContext), err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update takes the representation of a podSchedulingContext and updates it. Returns the server's representation of the podSchedulingContext, and an error, if there is any.
|
||||||
|
func (c *FakePodSchedulingContexts) Update(ctx context.Context, podSchedulingContext *v1alpha2.PodSchedulingContext, opts v1.UpdateOptions) (result *v1alpha2.PodSchedulingContext, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewUpdateAction(podschedulingcontextsResource, c.ns, podSchedulingContext), &v1alpha2.PodSchedulingContext{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*v1alpha2.PodSchedulingContext), 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 *FakePodSchedulingContexts) UpdateStatus(ctx context.Context, podSchedulingContext *v1alpha2.PodSchedulingContext, opts v1.UpdateOptions) (*v1alpha2.PodSchedulingContext, error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewUpdateSubresourceAction(podschedulingcontextsResource, "status", c.ns, podSchedulingContext), &v1alpha2.PodSchedulingContext{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*v1alpha2.PodSchedulingContext), err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Delete takes name of the podSchedulingContext and deletes it. Returns an error if one occurs.
|
||||||
|
func (c *FakePodSchedulingContexts) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||||
|
_, err := c.Fake.
|
||||||
|
Invokes(testing.NewDeleteActionWithOptions(podschedulingcontextsResource, c.ns, name, opts), &v1alpha2.PodSchedulingContext{})
|
||||||
|
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
// DeleteCollection deletes a collection of objects.
|
||||||
|
func (c *FakePodSchedulingContexts) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||||
|
action := testing.NewDeleteCollectionAction(podschedulingcontextsResource, c.ns, listOpts)
|
||||||
|
|
||||||
|
_, err := c.Fake.Invokes(action, &v1alpha2.PodSchedulingContextList{})
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Patch applies the patch and returns the patched podSchedulingContext.
|
||||||
|
func (c *FakePodSchedulingContexts) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.PodSchedulingContext, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewPatchSubresourceAction(podschedulingcontextsResource, c.ns, name, pt, data, subresources...), &v1alpha2.PodSchedulingContext{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*v1alpha2.PodSchedulingContext), err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Apply takes the given apply declarative configuration, applies it and returns the applied podSchedulingContext.
|
||||||
|
func (c *FakePodSchedulingContexts) Apply(ctx context.Context, podSchedulingContext *resourcev1alpha2.PodSchedulingContextApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.PodSchedulingContext, err error) {
|
||||||
|
if podSchedulingContext == nil {
|
||||||
|
return nil, fmt.Errorf("podSchedulingContext provided to Apply must not be nil")
|
||||||
|
}
|
||||||
|
data, err := json.Marshal(podSchedulingContext)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
name := podSchedulingContext.Name
|
||||||
|
if name == nil {
|
||||||
|
return nil, fmt.Errorf("podSchedulingContext.Name must be provided to Apply")
|
||||||
|
}
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewPatchSubresourceAction(podschedulingcontextsResource, c.ns, *name, types.ApplyPatchType, data), &v1alpha2.PodSchedulingContext{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*v1alpha2.PodSchedulingContext), err
|
||||||
|
}
|
||||||
|
|
||||||
|
// ApplyStatus was generated because the type contains a Status member.
|
||||||
|
// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus().
|
||||||
|
func (c *FakePodSchedulingContexts) ApplyStatus(ctx context.Context, podSchedulingContext *resourcev1alpha2.PodSchedulingContextApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.PodSchedulingContext, err error) {
|
||||||
|
if podSchedulingContext == nil {
|
||||||
|
return nil, fmt.Errorf("podSchedulingContext provided to Apply must not be nil")
|
||||||
|
}
|
||||||
|
data, err := json.Marshal(podSchedulingContext)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
name := podSchedulingContext.Name
|
||||||
|
if name == nil {
|
||||||
|
return nil, fmt.Errorf("podSchedulingContext.Name must be provided to Apply")
|
||||||
|
}
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewPatchSubresourceAction(podschedulingcontextsResource, c.ns, *name, types.ApplyPatchType, data, "status"), &v1alpha2.PodSchedulingContext{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*v1alpha2.PodSchedulingContext), err
|
||||||
|
}
|
@ -28,8 +28,8 @@ type FakeResourceV1alpha2 struct {
|
|||||||
*testing.Fake
|
*testing.Fake
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *FakeResourceV1alpha2) PodSchedulings(namespace string) v1alpha2.PodSchedulingInterface {
|
func (c *FakeResourceV1alpha2) PodSchedulingContexts(namespace string) v1alpha2.PodSchedulingContextInterface {
|
||||||
return &FakePodSchedulings{c, namespace}
|
return &FakePodSchedulingContexts{c, namespace}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *FakeResourceV1alpha2) ResourceClaims(namespace string) v1alpha2.ResourceClaimInterface {
|
func (c *FakeResourceV1alpha2) ResourceClaims(namespace string) v1alpha2.ResourceClaimInterface {
|
||||||
|
@ -18,7 +18,7 @@ limitations under the License.
|
|||||||
|
|
||||||
package v1alpha2
|
package v1alpha2
|
||||||
|
|
||||||
type PodSchedulingExpansion interface{}
|
type PodSchedulingContextExpansion interface{}
|
||||||
|
|
||||||
type ResourceClaimExpansion interface{}
|
type ResourceClaimExpansion interface{}
|
||||||
|
|
||||||
|
@ -1,256 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by client-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
package v1alpha2
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
json "encoding/json"
|
|
||||||
"fmt"
|
|
||||||
"time"
|
|
||||||
|
|
||||||
v1alpha2 "k8s.io/api/resource/v1alpha2"
|
|
||||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
|
||||||
types "k8s.io/apimachinery/pkg/types"
|
|
||||||
watch "k8s.io/apimachinery/pkg/watch"
|
|
||||||
resourcev1alpha2 "k8s.io/client-go/applyconfigurations/resource/v1alpha2"
|
|
||||||
scheme "k8s.io/client-go/kubernetes/scheme"
|
|
||||||
rest "k8s.io/client-go/rest"
|
|
||||||
)
|
|
||||||
|
|
||||||
// PodSchedulingsGetter has a method to return a PodSchedulingInterface.
|
|
||||||
// A group's client should implement this interface.
|
|
||||||
type PodSchedulingsGetter interface {
|
|
||||||
PodSchedulings(namespace string) PodSchedulingInterface
|
|
||||||
}
|
|
||||||
|
|
||||||
// PodSchedulingInterface has methods to work with PodScheduling resources.
|
|
||||||
type PodSchedulingInterface interface {
|
|
||||||
Create(ctx context.Context, podScheduling *v1alpha2.PodScheduling, opts v1.CreateOptions) (*v1alpha2.PodScheduling, error)
|
|
||||||
Update(ctx context.Context, podScheduling *v1alpha2.PodScheduling, opts v1.UpdateOptions) (*v1alpha2.PodScheduling, error)
|
|
||||||
UpdateStatus(ctx context.Context, podScheduling *v1alpha2.PodScheduling, opts v1.UpdateOptions) (*v1alpha2.PodScheduling, error)
|
|
||||||
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
|
|
||||||
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
|
|
||||||
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha2.PodScheduling, error)
|
|
||||||
List(ctx context.Context, opts v1.ListOptions) (*v1alpha2.PodSchedulingList, error)
|
|
||||||
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
|
|
||||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.PodScheduling, err error)
|
|
||||||
Apply(ctx context.Context, podScheduling *resourcev1alpha2.PodSchedulingApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.PodScheduling, err error)
|
|
||||||
ApplyStatus(ctx context.Context, podScheduling *resourcev1alpha2.PodSchedulingApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.PodScheduling, err error)
|
|
||||||
PodSchedulingExpansion
|
|
||||||
}
|
|
||||||
|
|
||||||
// podSchedulings implements PodSchedulingInterface
|
|
||||||
type podSchedulings struct {
|
|
||||||
client rest.Interface
|
|
||||||
ns string
|
|
||||||
}
|
|
||||||
|
|
||||||
// newPodSchedulings returns a PodSchedulings
|
|
||||||
func newPodSchedulings(c *ResourceV1alpha2Client, namespace string) *podSchedulings {
|
|
||||||
return &podSchedulings{
|
|
||||||
client: c.RESTClient(),
|
|
||||||
ns: namespace,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get takes name of the podScheduling, and returns the corresponding podScheduling object, and an error if there is any.
|
|
||||||
func (c *podSchedulings) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha2.PodScheduling, err error) {
|
|
||||||
result = &v1alpha2.PodScheduling{}
|
|
||||||
err = c.client.Get().
|
|
||||||
Namespace(c.ns).
|
|
||||||
Resource("podschedulings").
|
|
||||||
Name(name).
|
|
||||||
VersionedParams(&options, scheme.ParameterCodec).
|
|
||||||
Do(ctx).
|
|
||||||
Into(result)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// List takes label and field selectors, and returns the list of PodSchedulings that match those selectors.
|
|
||||||
func (c *podSchedulings) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha2.PodSchedulingList, err error) {
|
|
||||||
var timeout time.Duration
|
|
||||||
if opts.TimeoutSeconds != nil {
|
|
||||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
|
||||||
}
|
|
||||||
result = &v1alpha2.PodSchedulingList{}
|
|
||||||
err = c.client.Get().
|
|
||||||
Namespace(c.ns).
|
|
||||||
Resource("podschedulings").
|
|
||||||
VersionedParams(&opts, scheme.ParameterCodec).
|
|
||||||
Timeout(timeout).
|
|
||||||
Do(ctx).
|
|
||||||
Into(result)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// Watch returns a watch.Interface that watches the requested podSchedulings.
|
|
||||||
func (c *podSchedulings) 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("podschedulings").
|
|
||||||
VersionedParams(&opts, scheme.ParameterCodec).
|
|
||||||
Timeout(timeout).
|
|
||||||
Watch(ctx)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Create takes the representation of a podScheduling and creates it. Returns the server's representation of the podScheduling, and an error, if there is any.
|
|
||||||
func (c *podSchedulings) Create(ctx context.Context, podScheduling *v1alpha2.PodScheduling, opts v1.CreateOptions) (result *v1alpha2.PodScheduling, err error) {
|
|
||||||
result = &v1alpha2.PodScheduling{}
|
|
||||||
err = c.client.Post().
|
|
||||||
Namespace(c.ns).
|
|
||||||
Resource("podschedulings").
|
|
||||||
VersionedParams(&opts, scheme.ParameterCodec).
|
|
||||||
Body(podScheduling).
|
|
||||||
Do(ctx).
|
|
||||||
Into(result)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// Update takes the representation of a podScheduling and updates it. Returns the server's representation of the podScheduling, and an error, if there is any.
|
|
||||||
func (c *podSchedulings) Update(ctx context.Context, podScheduling *v1alpha2.PodScheduling, opts v1.UpdateOptions) (result *v1alpha2.PodScheduling, err error) {
|
|
||||||
result = &v1alpha2.PodScheduling{}
|
|
||||||
err = c.client.Put().
|
|
||||||
Namespace(c.ns).
|
|
||||||
Resource("podschedulings").
|
|
||||||
Name(podScheduling.Name).
|
|
||||||
VersionedParams(&opts, scheme.ParameterCodec).
|
|
||||||
Body(podScheduling).
|
|
||||||
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 *podSchedulings) UpdateStatus(ctx context.Context, podScheduling *v1alpha2.PodScheduling, opts v1.UpdateOptions) (result *v1alpha2.PodScheduling, err error) {
|
|
||||||
result = &v1alpha2.PodScheduling{}
|
|
||||||
err = c.client.Put().
|
|
||||||
Namespace(c.ns).
|
|
||||||
Resource("podschedulings").
|
|
||||||
Name(podScheduling.Name).
|
|
||||||
SubResource("status").
|
|
||||||
VersionedParams(&opts, scheme.ParameterCodec).
|
|
||||||
Body(podScheduling).
|
|
||||||
Do(ctx).
|
|
||||||
Into(result)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// Delete takes name of the podScheduling and deletes it. Returns an error if one occurs.
|
|
||||||
func (c *podSchedulings) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
|
||||||
return c.client.Delete().
|
|
||||||
Namespace(c.ns).
|
|
||||||
Resource("podschedulings").
|
|
||||||
Name(name).
|
|
||||||
Body(&opts).
|
|
||||||
Do(ctx).
|
|
||||||
Error()
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeleteCollection deletes a collection of objects.
|
|
||||||
func (c *podSchedulings) 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("podschedulings").
|
|
||||||
VersionedParams(&listOpts, scheme.ParameterCodec).
|
|
||||||
Timeout(timeout).
|
|
||||||
Body(&opts).
|
|
||||||
Do(ctx).
|
|
||||||
Error()
|
|
||||||
}
|
|
||||||
|
|
||||||
// Patch applies the patch and returns the patched podScheduling.
|
|
||||||
func (c *podSchedulings) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.PodScheduling, err error) {
|
|
||||||
result = &v1alpha2.PodScheduling{}
|
|
||||||
err = c.client.Patch(pt).
|
|
||||||
Namespace(c.ns).
|
|
||||||
Resource("podschedulings").
|
|
||||||
Name(name).
|
|
||||||
SubResource(subresources...).
|
|
||||||
VersionedParams(&opts, scheme.ParameterCodec).
|
|
||||||
Body(data).
|
|
||||||
Do(ctx).
|
|
||||||
Into(result)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// Apply takes the given apply declarative configuration, applies it and returns the applied podScheduling.
|
|
||||||
func (c *podSchedulings) Apply(ctx context.Context, podScheduling *resourcev1alpha2.PodSchedulingApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.PodScheduling, err error) {
|
|
||||||
if podScheduling == nil {
|
|
||||||
return nil, fmt.Errorf("podScheduling provided to Apply must not be nil")
|
|
||||||
}
|
|
||||||
patchOpts := opts.ToPatchOptions()
|
|
||||||
data, err := json.Marshal(podScheduling)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
name := podScheduling.Name
|
|
||||||
if name == nil {
|
|
||||||
return nil, fmt.Errorf("podScheduling.Name must be provided to Apply")
|
|
||||||
}
|
|
||||||
result = &v1alpha2.PodScheduling{}
|
|
||||||
err = c.client.Patch(types.ApplyPatchType).
|
|
||||||
Namespace(c.ns).
|
|
||||||
Resource("podschedulings").
|
|
||||||
Name(*name).
|
|
||||||
VersionedParams(&patchOpts, scheme.ParameterCodec).
|
|
||||||
Body(data).
|
|
||||||
Do(ctx).
|
|
||||||
Into(result)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// ApplyStatus was generated because the type contains a Status member.
|
|
||||||
// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus().
|
|
||||||
func (c *podSchedulings) ApplyStatus(ctx context.Context, podScheduling *resourcev1alpha2.PodSchedulingApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.PodScheduling, err error) {
|
|
||||||
if podScheduling == nil {
|
|
||||||
return nil, fmt.Errorf("podScheduling provided to Apply must not be nil")
|
|
||||||
}
|
|
||||||
patchOpts := opts.ToPatchOptions()
|
|
||||||
data, err := json.Marshal(podScheduling)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
name := podScheduling.Name
|
|
||||||
if name == nil {
|
|
||||||
return nil, fmt.Errorf("podScheduling.Name must be provided to Apply")
|
|
||||||
}
|
|
||||||
|
|
||||||
result = &v1alpha2.PodScheduling{}
|
|
||||||
err = c.client.Patch(types.ApplyPatchType).
|
|
||||||
Namespace(c.ns).
|
|
||||||
Resource("podschedulings").
|
|
||||||
Name(*name).
|
|
||||||
SubResource("status").
|
|
||||||
VersionedParams(&patchOpts, scheme.ParameterCodec).
|
|
||||||
Body(data).
|
|
||||||
Do(ctx).
|
|
||||||
Into(result)
|
|
||||||
return
|
|
||||||
}
|
|
256
kubernetes/typed/resource/v1alpha2/podschedulingcontext.go
Normal file
256
kubernetes/typed/resource/v1alpha2/podschedulingcontext.go
Normal file
@ -0,0 +1,256 @@
|
|||||||
|
/*
|
||||||
|
Copyright The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by client-gen. DO NOT EDIT.
|
||||||
|
|
||||||
|
package v1alpha2
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
json "encoding/json"
|
||||||
|
"fmt"
|
||||||
|
"time"
|
||||||
|
|
||||||
|
v1alpha2 "k8s.io/api/resource/v1alpha2"
|
||||||
|
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
types "k8s.io/apimachinery/pkg/types"
|
||||||
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
|
resourcev1alpha2 "k8s.io/client-go/applyconfigurations/resource/v1alpha2"
|
||||||
|
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||||
|
rest "k8s.io/client-go/rest"
|
||||||
|
)
|
||||||
|
|
||||||
|
// PodSchedulingContextsGetter has a method to return a PodSchedulingContextInterface.
|
||||||
|
// A group's client should implement this interface.
|
||||||
|
type PodSchedulingContextsGetter interface {
|
||||||
|
PodSchedulingContexts(namespace string) PodSchedulingContextInterface
|
||||||
|
}
|
||||||
|
|
||||||
|
// PodSchedulingContextInterface has methods to work with PodSchedulingContext resources.
|
||||||
|
type PodSchedulingContextInterface interface {
|
||||||
|
Create(ctx context.Context, podSchedulingContext *v1alpha2.PodSchedulingContext, opts v1.CreateOptions) (*v1alpha2.PodSchedulingContext, error)
|
||||||
|
Update(ctx context.Context, podSchedulingContext *v1alpha2.PodSchedulingContext, opts v1.UpdateOptions) (*v1alpha2.PodSchedulingContext, error)
|
||||||
|
UpdateStatus(ctx context.Context, podSchedulingContext *v1alpha2.PodSchedulingContext, opts v1.UpdateOptions) (*v1alpha2.PodSchedulingContext, error)
|
||||||
|
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
|
||||||
|
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
|
||||||
|
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha2.PodSchedulingContext, error)
|
||||||
|
List(ctx context.Context, opts v1.ListOptions) (*v1alpha2.PodSchedulingContextList, error)
|
||||||
|
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
|
||||||
|
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.PodSchedulingContext, err error)
|
||||||
|
Apply(ctx context.Context, podSchedulingContext *resourcev1alpha2.PodSchedulingContextApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.PodSchedulingContext, err error)
|
||||||
|
ApplyStatus(ctx context.Context, podSchedulingContext *resourcev1alpha2.PodSchedulingContextApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.PodSchedulingContext, err error)
|
||||||
|
PodSchedulingContextExpansion
|
||||||
|
}
|
||||||
|
|
||||||
|
// podSchedulingContexts implements PodSchedulingContextInterface
|
||||||
|
type podSchedulingContexts struct {
|
||||||
|
client rest.Interface
|
||||||
|
ns string
|
||||||
|
}
|
||||||
|
|
||||||
|
// newPodSchedulingContexts returns a PodSchedulingContexts
|
||||||
|
func newPodSchedulingContexts(c *ResourceV1alpha2Client, namespace string) *podSchedulingContexts {
|
||||||
|
return &podSchedulingContexts{
|
||||||
|
client: c.RESTClient(),
|
||||||
|
ns: namespace,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get takes name of the podSchedulingContext, and returns the corresponding podSchedulingContext object, and an error if there is any.
|
||||||
|
func (c *podSchedulingContexts) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha2.PodSchedulingContext, err error) {
|
||||||
|
result = &v1alpha2.PodSchedulingContext{}
|
||||||
|
err = c.client.Get().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("podschedulingcontexts").
|
||||||
|
Name(name).
|
||||||
|
VersionedParams(&options, scheme.ParameterCodec).
|
||||||
|
Do(ctx).
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// List takes label and field selectors, and returns the list of PodSchedulingContexts that match those selectors.
|
||||||
|
func (c *podSchedulingContexts) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha2.PodSchedulingContextList, err error) {
|
||||||
|
var timeout time.Duration
|
||||||
|
if opts.TimeoutSeconds != nil {
|
||||||
|
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||||
|
}
|
||||||
|
result = &v1alpha2.PodSchedulingContextList{}
|
||||||
|
err = c.client.Get().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("podschedulingcontexts").
|
||||||
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
|
Timeout(timeout).
|
||||||
|
Do(ctx).
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// Watch returns a watch.Interface that watches the requested podSchedulingContexts.
|
||||||
|
func (c *podSchedulingContexts) 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("podschedulingcontexts").
|
||||||
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
|
Timeout(timeout).
|
||||||
|
Watch(ctx)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Create takes the representation of a podSchedulingContext and creates it. Returns the server's representation of the podSchedulingContext, and an error, if there is any.
|
||||||
|
func (c *podSchedulingContexts) Create(ctx context.Context, podSchedulingContext *v1alpha2.PodSchedulingContext, opts v1.CreateOptions) (result *v1alpha2.PodSchedulingContext, err error) {
|
||||||
|
result = &v1alpha2.PodSchedulingContext{}
|
||||||
|
err = c.client.Post().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("podschedulingcontexts").
|
||||||
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
|
Body(podSchedulingContext).
|
||||||
|
Do(ctx).
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update takes the representation of a podSchedulingContext and updates it. Returns the server's representation of the podSchedulingContext, and an error, if there is any.
|
||||||
|
func (c *podSchedulingContexts) Update(ctx context.Context, podSchedulingContext *v1alpha2.PodSchedulingContext, opts v1.UpdateOptions) (result *v1alpha2.PodSchedulingContext, err error) {
|
||||||
|
result = &v1alpha2.PodSchedulingContext{}
|
||||||
|
err = c.client.Put().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("podschedulingcontexts").
|
||||||
|
Name(podSchedulingContext.Name).
|
||||||
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
|
Body(podSchedulingContext).
|
||||||
|
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 *podSchedulingContexts) UpdateStatus(ctx context.Context, podSchedulingContext *v1alpha2.PodSchedulingContext, opts v1.UpdateOptions) (result *v1alpha2.PodSchedulingContext, err error) {
|
||||||
|
result = &v1alpha2.PodSchedulingContext{}
|
||||||
|
err = c.client.Put().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("podschedulingcontexts").
|
||||||
|
Name(podSchedulingContext.Name).
|
||||||
|
SubResource("status").
|
||||||
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
|
Body(podSchedulingContext).
|
||||||
|
Do(ctx).
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// Delete takes name of the podSchedulingContext and deletes it. Returns an error if one occurs.
|
||||||
|
func (c *podSchedulingContexts) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||||
|
return c.client.Delete().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("podschedulingcontexts").
|
||||||
|
Name(name).
|
||||||
|
Body(&opts).
|
||||||
|
Do(ctx).
|
||||||
|
Error()
|
||||||
|
}
|
||||||
|
|
||||||
|
// DeleteCollection deletes a collection of objects.
|
||||||
|
func (c *podSchedulingContexts) 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("podschedulingcontexts").
|
||||||
|
VersionedParams(&listOpts, scheme.ParameterCodec).
|
||||||
|
Timeout(timeout).
|
||||||
|
Body(&opts).
|
||||||
|
Do(ctx).
|
||||||
|
Error()
|
||||||
|
}
|
||||||
|
|
||||||
|
// Patch applies the patch and returns the patched podSchedulingContext.
|
||||||
|
func (c *podSchedulingContexts) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.PodSchedulingContext, err error) {
|
||||||
|
result = &v1alpha2.PodSchedulingContext{}
|
||||||
|
err = c.client.Patch(pt).
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("podschedulingcontexts").
|
||||||
|
Name(name).
|
||||||
|
SubResource(subresources...).
|
||||||
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
|
Body(data).
|
||||||
|
Do(ctx).
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// Apply takes the given apply declarative configuration, applies it and returns the applied podSchedulingContext.
|
||||||
|
func (c *podSchedulingContexts) Apply(ctx context.Context, podSchedulingContext *resourcev1alpha2.PodSchedulingContextApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.PodSchedulingContext, err error) {
|
||||||
|
if podSchedulingContext == nil {
|
||||||
|
return nil, fmt.Errorf("podSchedulingContext provided to Apply must not be nil")
|
||||||
|
}
|
||||||
|
patchOpts := opts.ToPatchOptions()
|
||||||
|
data, err := json.Marshal(podSchedulingContext)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
name := podSchedulingContext.Name
|
||||||
|
if name == nil {
|
||||||
|
return nil, fmt.Errorf("podSchedulingContext.Name must be provided to Apply")
|
||||||
|
}
|
||||||
|
result = &v1alpha2.PodSchedulingContext{}
|
||||||
|
err = c.client.Patch(types.ApplyPatchType).
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("podschedulingcontexts").
|
||||||
|
Name(*name).
|
||||||
|
VersionedParams(&patchOpts, scheme.ParameterCodec).
|
||||||
|
Body(data).
|
||||||
|
Do(ctx).
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// ApplyStatus was generated because the type contains a Status member.
|
||||||
|
// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus().
|
||||||
|
func (c *podSchedulingContexts) ApplyStatus(ctx context.Context, podSchedulingContext *resourcev1alpha2.PodSchedulingContextApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.PodSchedulingContext, err error) {
|
||||||
|
if podSchedulingContext == nil {
|
||||||
|
return nil, fmt.Errorf("podSchedulingContext provided to Apply must not be nil")
|
||||||
|
}
|
||||||
|
patchOpts := opts.ToPatchOptions()
|
||||||
|
data, err := json.Marshal(podSchedulingContext)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
name := podSchedulingContext.Name
|
||||||
|
if name == nil {
|
||||||
|
return nil, fmt.Errorf("podSchedulingContext.Name must be provided to Apply")
|
||||||
|
}
|
||||||
|
|
||||||
|
result = &v1alpha2.PodSchedulingContext{}
|
||||||
|
err = c.client.Patch(types.ApplyPatchType).
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("podschedulingcontexts").
|
||||||
|
Name(*name).
|
||||||
|
SubResource("status").
|
||||||
|
VersionedParams(&patchOpts, scheme.ParameterCodec).
|
||||||
|
Body(data).
|
||||||
|
Do(ctx).
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
@ -28,7 +28,7 @@ import (
|
|||||||
|
|
||||||
type ResourceV1alpha2Interface interface {
|
type ResourceV1alpha2Interface interface {
|
||||||
RESTClient() rest.Interface
|
RESTClient() rest.Interface
|
||||||
PodSchedulingsGetter
|
PodSchedulingContextsGetter
|
||||||
ResourceClaimsGetter
|
ResourceClaimsGetter
|
||||||
ResourceClaimTemplatesGetter
|
ResourceClaimTemplatesGetter
|
||||||
ResourceClassesGetter
|
ResourceClassesGetter
|
||||||
@ -39,8 +39,8 @@ type ResourceV1alpha2Client struct {
|
|||||||
restClient rest.Interface
|
restClient rest.Interface
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *ResourceV1alpha2Client) PodSchedulings(namespace string) PodSchedulingInterface {
|
func (c *ResourceV1alpha2Client) PodSchedulingContexts(namespace string) PodSchedulingContextInterface {
|
||||||
return newPodSchedulings(c, namespace)
|
return newPodSchedulingContexts(c, namespace)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *ResourceV1alpha2Client) ResourceClaims(namespace string) ResourceClaimInterface {
|
func (c *ResourceV1alpha2Client) ResourceClaims(namespace string) ResourceClaimInterface {
|
||||||
|
@ -18,13 +18,13 @@ limitations under the License.
|
|||||||
|
|
||||||
package v1alpha2
|
package v1alpha2
|
||||||
|
|
||||||
// PodSchedulingListerExpansion allows custom methods to be added to
|
// PodSchedulingContextListerExpansion allows custom methods to be added to
|
||||||
// PodSchedulingLister.
|
// PodSchedulingContextLister.
|
||||||
type PodSchedulingListerExpansion interface{}
|
type PodSchedulingContextListerExpansion interface{}
|
||||||
|
|
||||||
// PodSchedulingNamespaceListerExpansion allows custom methods to be added to
|
// PodSchedulingContextNamespaceListerExpansion allows custom methods to be added to
|
||||||
// PodSchedulingNamespaceLister.
|
// PodSchedulingContextNamespaceLister.
|
||||||
type PodSchedulingNamespaceListerExpansion interface{}
|
type PodSchedulingContextNamespaceListerExpansion interface{}
|
||||||
|
|
||||||
// ResourceClaimListerExpansion allows custom methods to be added to
|
// ResourceClaimListerExpansion allows custom methods to be added to
|
||||||
// ResourceClaimLister.
|
// ResourceClaimLister.
|
||||||
|
@ -1,99 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by lister-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
package v1alpha2
|
|
||||||
|
|
||||||
import (
|
|
||||||
v1alpha2 "k8s.io/api/resource/v1alpha2"
|
|
||||||
"k8s.io/apimachinery/pkg/api/errors"
|
|
||||||
"k8s.io/apimachinery/pkg/labels"
|
|
||||||
"k8s.io/client-go/tools/cache"
|
|
||||||
)
|
|
||||||
|
|
||||||
// PodSchedulingLister helps list PodSchedulings.
|
|
||||||
// All objects returned here must be treated as read-only.
|
|
||||||
type PodSchedulingLister interface {
|
|
||||||
// List lists all PodSchedulings in the indexer.
|
|
||||||
// Objects returned here must be treated as read-only.
|
|
||||||
List(selector labels.Selector) (ret []*v1alpha2.PodScheduling, err error)
|
|
||||||
// PodSchedulings returns an object that can list and get PodSchedulings.
|
|
||||||
PodSchedulings(namespace string) PodSchedulingNamespaceLister
|
|
||||||
PodSchedulingListerExpansion
|
|
||||||
}
|
|
||||||
|
|
||||||
// podSchedulingLister implements the PodSchedulingLister interface.
|
|
||||||
type podSchedulingLister struct {
|
|
||||||
indexer cache.Indexer
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewPodSchedulingLister returns a new PodSchedulingLister.
|
|
||||||
func NewPodSchedulingLister(indexer cache.Indexer) PodSchedulingLister {
|
|
||||||
return &podSchedulingLister{indexer: indexer}
|
|
||||||
}
|
|
||||||
|
|
||||||
// List lists all PodSchedulings in the indexer.
|
|
||||||
func (s *podSchedulingLister) List(selector labels.Selector) (ret []*v1alpha2.PodScheduling, err error) {
|
|
||||||
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
|
|
||||||
ret = append(ret, m.(*v1alpha2.PodScheduling))
|
|
||||||
})
|
|
||||||
return ret, err
|
|
||||||
}
|
|
||||||
|
|
||||||
// PodSchedulings returns an object that can list and get PodSchedulings.
|
|
||||||
func (s *podSchedulingLister) PodSchedulings(namespace string) PodSchedulingNamespaceLister {
|
|
||||||
return podSchedulingNamespaceLister{indexer: s.indexer, namespace: namespace}
|
|
||||||
}
|
|
||||||
|
|
||||||
// PodSchedulingNamespaceLister helps list and get PodSchedulings.
|
|
||||||
// All objects returned here must be treated as read-only.
|
|
||||||
type PodSchedulingNamespaceLister interface {
|
|
||||||
// List lists all PodSchedulings in the indexer for a given namespace.
|
|
||||||
// Objects returned here must be treated as read-only.
|
|
||||||
List(selector labels.Selector) (ret []*v1alpha2.PodScheduling, err error)
|
|
||||||
// Get retrieves the PodScheduling from the indexer for a given namespace and name.
|
|
||||||
// Objects returned here must be treated as read-only.
|
|
||||||
Get(name string) (*v1alpha2.PodScheduling, error)
|
|
||||||
PodSchedulingNamespaceListerExpansion
|
|
||||||
}
|
|
||||||
|
|
||||||
// podSchedulingNamespaceLister implements the PodSchedulingNamespaceLister
|
|
||||||
// interface.
|
|
||||||
type podSchedulingNamespaceLister struct {
|
|
||||||
indexer cache.Indexer
|
|
||||||
namespace string
|
|
||||||
}
|
|
||||||
|
|
||||||
// List lists all PodSchedulings in the indexer for a given namespace.
|
|
||||||
func (s podSchedulingNamespaceLister) List(selector labels.Selector) (ret []*v1alpha2.PodScheduling, err error) {
|
|
||||||
err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
|
|
||||||
ret = append(ret, m.(*v1alpha2.PodScheduling))
|
|
||||||
})
|
|
||||||
return ret, err
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get retrieves the PodScheduling from the indexer for a given namespace and name.
|
|
||||||
func (s podSchedulingNamespaceLister) Get(name string) (*v1alpha2.PodScheduling, error) {
|
|
||||||
obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
if !exists {
|
|
||||||
return nil, errors.NewNotFound(v1alpha2.Resource("podscheduling"), name)
|
|
||||||
}
|
|
||||||
return obj.(*v1alpha2.PodScheduling), nil
|
|
||||||
}
|
|
99
listers/resource/v1alpha2/podschedulingcontext.go
Normal file
99
listers/resource/v1alpha2/podschedulingcontext.go
Normal file
@ -0,0 +1,99 @@
|
|||||||
|
/*
|
||||||
|
Copyright The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by lister-gen. DO NOT EDIT.
|
||||||
|
|
||||||
|
package v1alpha2
|
||||||
|
|
||||||
|
import (
|
||||||
|
v1alpha2 "k8s.io/api/resource/v1alpha2"
|
||||||
|
"k8s.io/apimachinery/pkg/api/errors"
|
||||||
|
"k8s.io/apimachinery/pkg/labels"
|
||||||
|
"k8s.io/client-go/tools/cache"
|
||||||
|
)
|
||||||
|
|
||||||
|
// PodSchedulingContextLister helps list PodSchedulingContexts.
|
||||||
|
// All objects returned here must be treated as read-only.
|
||||||
|
type PodSchedulingContextLister interface {
|
||||||
|
// List lists all PodSchedulingContexts in the indexer.
|
||||||
|
// Objects returned here must be treated as read-only.
|
||||||
|
List(selector labels.Selector) (ret []*v1alpha2.PodSchedulingContext, err error)
|
||||||
|
// PodSchedulingContexts returns an object that can list and get PodSchedulingContexts.
|
||||||
|
PodSchedulingContexts(namespace string) PodSchedulingContextNamespaceLister
|
||||||
|
PodSchedulingContextListerExpansion
|
||||||
|
}
|
||||||
|
|
||||||
|
// podSchedulingContextLister implements the PodSchedulingContextLister interface.
|
||||||
|
type podSchedulingContextLister struct {
|
||||||
|
indexer cache.Indexer
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewPodSchedulingContextLister returns a new PodSchedulingContextLister.
|
||||||
|
func NewPodSchedulingContextLister(indexer cache.Indexer) PodSchedulingContextLister {
|
||||||
|
return &podSchedulingContextLister{indexer: indexer}
|
||||||
|
}
|
||||||
|
|
||||||
|
// List lists all PodSchedulingContexts in the indexer.
|
||||||
|
func (s *podSchedulingContextLister) List(selector labels.Selector) (ret []*v1alpha2.PodSchedulingContext, err error) {
|
||||||
|
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
|
||||||
|
ret = append(ret, m.(*v1alpha2.PodSchedulingContext))
|
||||||
|
})
|
||||||
|
return ret, err
|
||||||
|
}
|
||||||
|
|
||||||
|
// PodSchedulingContexts returns an object that can list and get PodSchedulingContexts.
|
||||||
|
func (s *podSchedulingContextLister) PodSchedulingContexts(namespace string) PodSchedulingContextNamespaceLister {
|
||||||
|
return podSchedulingContextNamespaceLister{indexer: s.indexer, namespace: namespace}
|
||||||
|
}
|
||||||
|
|
||||||
|
// PodSchedulingContextNamespaceLister helps list and get PodSchedulingContexts.
|
||||||
|
// All objects returned here must be treated as read-only.
|
||||||
|
type PodSchedulingContextNamespaceLister interface {
|
||||||
|
// List lists all PodSchedulingContexts in the indexer for a given namespace.
|
||||||
|
// Objects returned here must be treated as read-only.
|
||||||
|
List(selector labels.Selector) (ret []*v1alpha2.PodSchedulingContext, err error)
|
||||||
|
// Get retrieves the PodSchedulingContext from the indexer for a given namespace and name.
|
||||||
|
// Objects returned here must be treated as read-only.
|
||||||
|
Get(name string) (*v1alpha2.PodSchedulingContext, error)
|
||||||
|
PodSchedulingContextNamespaceListerExpansion
|
||||||
|
}
|
||||||
|
|
||||||
|
// podSchedulingContextNamespaceLister implements the PodSchedulingContextNamespaceLister
|
||||||
|
// interface.
|
||||||
|
type podSchedulingContextNamespaceLister struct {
|
||||||
|
indexer cache.Indexer
|
||||||
|
namespace string
|
||||||
|
}
|
||||||
|
|
||||||
|
// List lists all PodSchedulingContexts in the indexer for a given namespace.
|
||||||
|
func (s podSchedulingContextNamespaceLister) List(selector labels.Selector) (ret []*v1alpha2.PodSchedulingContext, err error) {
|
||||||
|
err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
|
||||||
|
ret = append(ret, m.(*v1alpha2.PodSchedulingContext))
|
||||||
|
})
|
||||||
|
return ret, err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get retrieves the PodSchedulingContext from the indexer for a given namespace and name.
|
||||||
|
func (s podSchedulingContextNamespaceLister) Get(name string) (*v1alpha2.PodSchedulingContext, error) {
|
||||||
|
obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if !exists {
|
||||||
|
return nil, errors.NewNotFound(v1alpha2.Resource("podschedulingcontext"), name)
|
||||||
|
}
|
||||||
|
return obj.(*v1alpha2.PodSchedulingContext), nil
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user