From 60a2d41f7acf0b8a855ee2f06a195414a440e696 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 13 Oct 2023 13:45:58 +0000 Subject: [PATCH] chore(deps): update github.com/openshift/client-go digest to e81400b --- go.mod | 2 +- go.sum | 2 + .../applyconfigurations/internal/internal.go | 97 ++++++- .../operator/v1/machineconfiguration.go | 240 ++++++++++++++++++ .../operator/v1/machineconfigurationspec.go | 84 ++++++ .../operator/v1/machineconfigurationstatus.go | 94 +++++++ .../typed/operator/v1/generated_expansion.go | 2 + .../typed/operator/v1/machineconfiguration.go | 227 +++++++++++++++++ .../typed/operator/v1/operator_client.go | 5 + .../informers/externalversions/generic.go | 2 + .../externalversions/operator/v1/interface.go | 7 + .../operator/v1/machineconfiguration.go | 73 ++++++ .../operator/v1/expansion_generated.go | 4 + .../operator/v1/machineconfiguration.go | 52 ++++ vendor/modules.txt | 4 +- 15 files changed, 884 insertions(+), 11 deletions(-) create mode 100644 vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/machineconfiguration.go create mode 100644 vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/machineconfigurationspec.go create mode 100644 vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/machineconfigurationstatus.go create mode 100644 vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/machineconfiguration.go create mode 100644 vendor/github.com/openshift/client-go/operator/informers/externalversions/operator/v1/machineconfiguration.go create mode 100644 vendor/github.com/openshift/client-go/operator/listers/operator/v1/machineconfiguration.go diff --git a/go.mod b/go.mod index 2b4e40e75..ab1ae71cf 100644 --- a/go.mod +++ b/go.mod @@ -137,5 +137,5 @@ require ( replace ( github.com/openshift/api => github.com/openshift/api v0.0.0-20231012181603-8f468d7b55a8 - github.com/openshift/client-go => github.com/openshift/client-go v0.0.0-20230926161409-848405da69e1 + github.com/openshift/client-go => github.com/openshift/client-go v0.0.0-20231005121823-e81400b97c46 ) diff --git a/go.sum b/go.sum index bd3a709f7..30d6a093c 100644 --- a/go.sum +++ b/go.sum @@ -202,6 +202,8 @@ github.com/openshift/api v0.0.0-20231012181603-8f468d7b55a8 h1:x7k5FGR9J0/5qsDaX github.com/openshift/api v0.0.0-20231012181603-8f468d7b55a8/go.mod h1:qNtV0315F+f8ld52TLtPvrfivZpdimOzTi3kn9IVbtU= github.com/openshift/client-go v0.0.0-20230926161409-848405da69e1 h1:W1N/3nVciqmjPjn2xldHjb0AwwCQzlGxLvX5BCgE8H4= github.com/openshift/client-go v0.0.0-20230926161409-848405da69e1/go.mod h1:ihUJrhBcYAGYQrJu/gP2OMgfVds5f5z5kbeLNBqjHLo= +github.com/openshift/client-go v0.0.0-20231005121823-e81400b97c46 h1:J7UsTNgyM1krYnfsmijowYqt5I4mDM1qxNAy4eEa0xc= +github.com/openshift/client-go v0.0.0-20231005121823-e81400b97c46/go.mod h1:xM64ClnmCheAmffZZdTSJejy3yPE1nTRWQthKaZQ7JY= github.com/openshift/library-go v0.0.0-20230927113136-405c34317fa4 h1:nNPH6wOCPP6XLDyHECflAlgW7xLorcUq7wl0vqyRQ34= github.com/openshift/library-go v0.0.0-20230927113136-405c34317fa4/go.mod h1:hl8bxWuFMM72N4YH7FKLGWtYhDz/A0xwvaa8Yr5fxYU= github.com/openshift/library-go v0.0.0-20231010152045-c91dd9756953 h1:YE/jLh4Q1vm6Z38yAU0ZmkLWi/iWlxX+pukuLOQe1Lk= diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/internal/internal.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/internal/internal.go index 43d41174e..5aefe244f 100644 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/internal/internal.go +++ b/vendor/github.com/openshift/client-go/operator/applyconfigurations/internal/internal.go @@ -1137,11 +1137,9 @@ var schemaYAML = typed.YAMLObject(`types: - name: latestAvailableRevision type: scalar: numeric - default: 0 - name: latestAvailableRevisionReason type: scalar: string - default: "" - name: nodeStatuses type: list: @@ -1864,11 +1862,9 @@ var schemaYAML = typed.YAMLObject(`types: - name: latestAvailableRevision type: scalar: numeric - default: 0 - name: latestAvailableRevisionReason type: scalar: string - default: "" - name: nodeStatuses type: list: @@ -1965,11 +1961,9 @@ var schemaYAML = typed.YAMLObject(`types: - name: latestAvailableRevision type: scalar: numeric - default: 0 - name: latestAvailableRevisionReason type: scalar: string - default: "" - name: nodeStatuses type: list: @@ -2056,11 +2050,9 @@ var schemaYAML = typed.YAMLObject(`types: - name: latestAvailableRevision type: scalar: numeric - default: 0 - name: latestAvailableRevisionReason type: scalar: string - default: "" - name: nodeStatuses type: list: @@ -2229,6 +2221,95 @@ var schemaYAML = typed.YAMLObject(`types: - name: to type: scalar: numeric +- name: com.github.openshift.api.operator.v1.MachineConfiguration + map: + fields: + - name: apiVersion + type: + scalar: string + - name: kind + type: + scalar: string + - name: metadata + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta + default: {} + - name: spec + type: + namedType: com.github.openshift.api.operator.v1.MachineConfigurationSpec + default: {} + - name: status + type: + namedType: com.github.openshift.api.operator.v1.MachineConfigurationStatus + default: {} +- name: com.github.openshift.api.operator.v1.MachineConfigurationSpec + map: + fields: + - name: failedRevisionLimit + type: + scalar: numeric + - name: forceRedeploymentReason + type: + scalar: string + default: "" + - name: logLevel + type: + scalar: string + - name: managementState + type: + scalar: string + default: "" + - name: observedConfig + type: + namedType: __untyped_atomic_ + default: {} + - name: operatorLogLevel + type: + scalar: string + - name: succeededRevisionLimit + type: + scalar: numeric + - name: unsupportedConfigOverrides + type: + namedType: __untyped_atomic_ + default: {} +- name: com.github.openshift.api.operator.v1.MachineConfigurationStatus + map: + fields: + - name: conditions + type: + list: + elementType: + namedType: com.github.openshift.api.operator.v1.OperatorCondition + elementRelationship: atomic + - name: generations + type: + list: + elementType: + namedType: com.github.openshift.api.operator.v1.GenerationStatus + elementRelationship: atomic + - name: latestAvailableRevision + type: + scalar: numeric + - name: latestAvailableRevisionReason + type: + scalar: string + - name: nodeStatuses + type: + list: + elementType: + namedType: com.github.openshift.api.operator.v1.NodeStatus + elementRelationship: atomic + - name: observedGeneration + type: + scalar: numeric + - name: readyReplicas + type: + scalar: numeric + default: 0 + - name: version + type: + scalar: string - name: com.github.openshift.api.operator.v1.NetFlowConfig map: fields: diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/machineconfiguration.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/machineconfiguration.go new file mode 100644 index 000000000..5865b0a6d --- /dev/null +++ b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/machineconfiguration.go @@ -0,0 +1,240 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +import ( + apioperatorv1 "github.com/openshift/api/operator/v1" + internal "github.com/openshift/client-go/operator/applyconfigurations/internal" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + managedfields "k8s.io/apimachinery/pkg/util/managedfields" + v1 "k8s.io/client-go/applyconfigurations/meta/v1" +) + +// MachineConfigurationApplyConfiguration represents an declarative configuration of the MachineConfiguration type for use +// with apply. +type MachineConfigurationApplyConfiguration struct { + v1.TypeMetaApplyConfiguration `json:",inline"` + *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *MachineConfigurationSpecApplyConfiguration `json:"spec,omitempty"` + Status *MachineConfigurationStatusApplyConfiguration `json:"status,omitempty"` +} + +// MachineConfiguration constructs an declarative configuration of the MachineConfiguration type for use with +// apply. +func MachineConfiguration(name string) *MachineConfigurationApplyConfiguration { + b := &MachineConfigurationApplyConfiguration{} + b.WithName(name) + b.WithKind("MachineConfiguration") + b.WithAPIVersion("operator.openshift.io/v1") + return b +} + +// ExtractMachineConfiguration extracts the applied configuration owned by fieldManager from +// machineConfiguration. If no managedFields are found in machineConfiguration for fieldManager, a +// MachineConfigurationApplyConfiguration 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 +// field managers have taken ownership of all the fields previously owned by fieldManager, or because +// the fieldManager never owned fields any fields. +// machineConfiguration must be a unmodified MachineConfiguration API object that was retrieved from the Kubernetes API. +// ExtractMachineConfiguration 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 +// applied if another fieldManager has updated or force applied any of the previously applied fields. +// Experimental! +func ExtractMachineConfiguration(machineConfiguration *apioperatorv1.MachineConfiguration, fieldManager string) (*MachineConfigurationApplyConfiguration, error) { + return extractMachineConfiguration(machineConfiguration, fieldManager, "") +} + +// ExtractMachineConfigurationStatus is the same as ExtractMachineConfiguration except +// that it extracts the status subresource applied configuration. +// Experimental! +func ExtractMachineConfigurationStatus(machineConfiguration *apioperatorv1.MachineConfiguration, fieldManager string) (*MachineConfigurationApplyConfiguration, error) { + return extractMachineConfiguration(machineConfiguration, fieldManager, "status") +} + +func extractMachineConfiguration(machineConfiguration *apioperatorv1.MachineConfiguration, fieldManager string, subresource string) (*MachineConfigurationApplyConfiguration, error) { + b := &MachineConfigurationApplyConfiguration{} + err := managedfields.ExtractInto(machineConfiguration, internal.Parser().Type("com.github.openshift.api.operator.v1.MachineConfiguration"), fieldManager, b, subresource) + if err != nil { + return nil, err + } + b.WithName(machineConfiguration.Name) + + b.WithKind("MachineConfiguration") + b.WithAPIVersion("operator.openshift.io/v1") + return b, nil +} + +// 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. +// If called multiple times, the Kind field is set to the value of the last call. +func (b *MachineConfigurationApplyConfiguration) WithKind(value string) *MachineConfigurationApplyConfiguration { + b.Kind = &value + return b +} + +// 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. +// If called multiple times, the APIVersion field is set to the value of the last call. +func (b *MachineConfigurationApplyConfiguration) WithAPIVersion(value string) *MachineConfigurationApplyConfiguration { + b.APIVersion = &value + return b +} + +// 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. +// If called multiple times, the Name field is set to the value of the last call. +func (b *MachineConfigurationApplyConfiguration) WithName(value string) *MachineConfigurationApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Name = &value + return b +} + +// 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. +// If called multiple times, the GenerateName field is set to the value of the last call. +func (b *MachineConfigurationApplyConfiguration) WithGenerateName(value string) *MachineConfigurationApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.GenerateName = &value + return b +} + +// 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. +// If called multiple times, the Namespace field is set to the value of the last call. +func (b *MachineConfigurationApplyConfiguration) WithNamespace(value string) *MachineConfigurationApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Namespace = &value + return b +} + +// 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. +// If called multiple times, the UID field is set to the value of the last call. +func (b *MachineConfigurationApplyConfiguration) WithUID(value types.UID) *MachineConfigurationApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.UID = &value + return b +} + +// 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. +// If called multiple times, the ResourceVersion field is set to the value of the last call. +func (b *MachineConfigurationApplyConfiguration) WithResourceVersion(value string) *MachineConfigurationApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ResourceVersion = &value + return b +} + +// 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. +// If called multiple times, the Generation field is set to the value of the last call. +func (b *MachineConfigurationApplyConfiguration) WithGeneration(value int64) *MachineConfigurationApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Generation = &value + return b +} + +// 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. +// If called multiple times, the CreationTimestamp field is set to the value of the last call. +func (b *MachineConfigurationApplyConfiguration) WithCreationTimestamp(value metav1.Time) *MachineConfigurationApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.CreationTimestamp = &value + return b +} + +// 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. +// If called multiple times, the DeletionTimestamp field is set to the value of the last call. +func (b *MachineConfigurationApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *MachineConfigurationApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.DeletionTimestamp = &value + return b +} + +// 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. +// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. +func (b *MachineConfigurationApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *MachineConfigurationApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.DeletionGracePeriodSeconds = &value + return b +} + +// WithLabels puts the entries into the Labels field in the declarative configuration +// 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, +// overwriting an existing map entries in Labels field with the same key. +func (b *MachineConfigurationApplyConfiguration) WithLabels(entries map[string]string) *MachineConfigurationApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.Labels == nil && len(entries) > 0 { + b.Labels = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.Labels[k] = v + } + return b +} + +// WithAnnotations puts the entries into the Annotations field in the declarative configuration +// 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, +// overwriting an existing map entries in Annotations field with the same key. +func (b *MachineConfigurationApplyConfiguration) WithAnnotations(entries map[string]string) *MachineConfigurationApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.Annotations == nil && len(entries) > 0 { + b.Annotations = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.Annotations[k] = v + } + return b +} + +// 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. +// If called multiple times, values provided by each call will be appended to the OwnerReferences field. +func (b *MachineConfigurationApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *MachineConfigurationApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + if values[i] == nil { + panic("nil value passed to WithOwnerReferences") + } + b.OwnerReferences = append(b.OwnerReferences, *values[i]) + } + return b +} + +// 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. +// If called multiple times, values provided by each call will be appended to the Finalizers field. +func (b *MachineConfigurationApplyConfiguration) WithFinalizers(values ...string) *MachineConfigurationApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + b.Finalizers = append(b.Finalizers, values[i]) + } + return b +} + +func (b *MachineConfigurationApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { + if b.ObjectMetaApplyConfiguration == nil { + b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + } +} + +// 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. +// If called multiple times, the Spec field is set to the value of the last call. +func (b *MachineConfigurationApplyConfiguration) WithSpec(value *MachineConfigurationSpecApplyConfiguration) *MachineConfigurationApplyConfiguration { + b.Spec = value + return b +} + +// 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. +// If called multiple times, the Status field is set to the value of the last call. +func (b *MachineConfigurationApplyConfiguration) WithStatus(value *MachineConfigurationStatusApplyConfiguration) *MachineConfigurationApplyConfiguration { + b.Status = value + return b +} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/machineconfigurationspec.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/machineconfigurationspec.go new file mode 100644 index 000000000..4ca52827e --- /dev/null +++ b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/machineconfigurationspec.go @@ -0,0 +1,84 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +import ( + operatorv1 "github.com/openshift/api/operator/v1" + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// MachineConfigurationSpecApplyConfiguration represents an declarative configuration of the MachineConfigurationSpec type for use +// with apply. +type MachineConfigurationSpecApplyConfiguration struct { + StaticPodOperatorSpecApplyConfiguration `json:",inline"` +} + +// MachineConfigurationSpecApplyConfiguration constructs an declarative configuration of the MachineConfigurationSpec type for use with +// apply. +func MachineConfigurationSpec() *MachineConfigurationSpecApplyConfiguration { + return &MachineConfigurationSpecApplyConfiguration{} +} + +// WithManagementState sets the ManagementState field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ManagementState field is set to the value of the last call. +func (b *MachineConfigurationSpecApplyConfiguration) WithManagementState(value operatorv1.ManagementState) *MachineConfigurationSpecApplyConfiguration { + b.ManagementState = &value + return b +} + +// WithLogLevel sets the LogLevel field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the LogLevel field is set to the value of the last call. +func (b *MachineConfigurationSpecApplyConfiguration) WithLogLevel(value operatorv1.LogLevel) *MachineConfigurationSpecApplyConfiguration { + b.LogLevel = &value + return b +} + +// WithOperatorLogLevel sets the OperatorLogLevel field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the OperatorLogLevel field is set to the value of the last call. +func (b *MachineConfigurationSpecApplyConfiguration) WithOperatorLogLevel(value operatorv1.LogLevel) *MachineConfigurationSpecApplyConfiguration { + b.OperatorLogLevel = &value + return b +} + +// WithUnsupportedConfigOverrides sets the UnsupportedConfigOverrides field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the UnsupportedConfigOverrides field is set to the value of the last call. +func (b *MachineConfigurationSpecApplyConfiguration) WithUnsupportedConfigOverrides(value runtime.RawExtension) *MachineConfigurationSpecApplyConfiguration { + b.UnsupportedConfigOverrides = &value + return b +} + +// WithObservedConfig sets the ObservedConfig field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ObservedConfig field is set to the value of the last call. +func (b *MachineConfigurationSpecApplyConfiguration) WithObservedConfig(value runtime.RawExtension) *MachineConfigurationSpecApplyConfiguration { + b.ObservedConfig = &value + return b +} + +// WithForceRedeploymentReason sets the ForceRedeploymentReason field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ForceRedeploymentReason field is set to the value of the last call. +func (b *MachineConfigurationSpecApplyConfiguration) WithForceRedeploymentReason(value string) *MachineConfigurationSpecApplyConfiguration { + b.ForceRedeploymentReason = &value + return b +} + +// WithFailedRevisionLimit sets the FailedRevisionLimit field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the FailedRevisionLimit field is set to the value of the last call. +func (b *MachineConfigurationSpecApplyConfiguration) WithFailedRevisionLimit(value int32) *MachineConfigurationSpecApplyConfiguration { + b.FailedRevisionLimit = &value + return b +} + +// WithSucceededRevisionLimit sets the SucceededRevisionLimit field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SucceededRevisionLimit field is set to the value of the last call. +func (b *MachineConfigurationSpecApplyConfiguration) WithSucceededRevisionLimit(value int32) *MachineConfigurationSpecApplyConfiguration { + b.SucceededRevisionLimit = &value + return b +} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/machineconfigurationstatus.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/machineconfigurationstatus.go new file mode 100644 index 000000000..5740627b4 --- /dev/null +++ b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/machineconfigurationstatus.go @@ -0,0 +1,94 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +// MachineConfigurationStatusApplyConfiguration represents an declarative configuration of the MachineConfigurationStatus type for use +// with apply. +type MachineConfigurationStatusApplyConfiguration struct { + StaticPodOperatorStatusApplyConfiguration `json:",inline"` +} + +// MachineConfigurationStatusApplyConfiguration constructs an declarative configuration of the MachineConfigurationStatus type for use with +// apply. +func MachineConfigurationStatus() *MachineConfigurationStatusApplyConfiguration { + return &MachineConfigurationStatusApplyConfiguration{} +} + +// WithObservedGeneration sets the ObservedGeneration field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ObservedGeneration field is set to the value of the last call. +func (b *MachineConfigurationStatusApplyConfiguration) WithObservedGeneration(value int64) *MachineConfigurationStatusApplyConfiguration { + b.ObservedGeneration = &value + return b +} + +// WithConditions adds the given value to the Conditions field in the declarative configuration +// 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 Conditions field. +func (b *MachineConfigurationStatusApplyConfiguration) WithConditions(values ...*OperatorConditionApplyConfiguration) *MachineConfigurationStatusApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithConditions") + } + b.Conditions = append(b.Conditions, *values[i]) + } + return b +} + +// WithVersion sets the Version field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Version field is set to the value of the last call. +func (b *MachineConfigurationStatusApplyConfiguration) WithVersion(value string) *MachineConfigurationStatusApplyConfiguration { + b.Version = &value + return b +} + +// WithReadyReplicas sets the ReadyReplicas field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ReadyReplicas field is set to the value of the last call. +func (b *MachineConfigurationStatusApplyConfiguration) WithReadyReplicas(value int32) *MachineConfigurationStatusApplyConfiguration { + b.ReadyReplicas = &value + return b +} + +// WithGenerations adds the given value to the Generations field in the declarative configuration +// 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 Generations field. +func (b *MachineConfigurationStatusApplyConfiguration) WithGenerations(values ...*GenerationStatusApplyConfiguration) *MachineConfigurationStatusApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithGenerations") + } + b.Generations = append(b.Generations, *values[i]) + } + return b +} + +// WithLatestAvailableRevision sets the LatestAvailableRevision field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the LatestAvailableRevision field is set to the value of the last call. +func (b *MachineConfigurationStatusApplyConfiguration) WithLatestAvailableRevision(value int32) *MachineConfigurationStatusApplyConfiguration { + b.LatestAvailableRevision = &value + return b +} + +// WithLatestAvailableRevisionReason sets the LatestAvailableRevisionReason field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the LatestAvailableRevisionReason field is set to the value of the last call. +func (b *MachineConfigurationStatusApplyConfiguration) WithLatestAvailableRevisionReason(value string) *MachineConfigurationStatusApplyConfiguration { + b.LatestAvailableRevisionReason = &value + return b +} + +// WithNodeStatuses adds the given value to the NodeStatuses field in the declarative configuration +// 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 NodeStatuses field. +func (b *MachineConfigurationStatusApplyConfiguration) WithNodeStatuses(values ...*NodeStatusApplyConfiguration) *MachineConfigurationStatusApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithNodeStatuses") + } + b.NodeStatuses = append(b.NodeStatuses, *values[i]) + } + return b +} diff --git a/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/generated_expansion.go b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/generated_expansion.go index 025a746b6..dd8a5efd3 100644 --- a/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/generated_expansion.go +++ b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/generated_expansion.go @@ -30,6 +30,8 @@ type KubeSchedulerExpansion interface{} type KubeStorageVersionMigratorExpansion interface{} +type MachineConfigurationExpansion interface{} + type NetworkExpansion interface{} type OpenShiftAPIServerExpansion interface{} diff --git a/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/machineconfiguration.go b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/machineconfiguration.go new file mode 100644 index 000000000..3ab0d46be --- /dev/null +++ b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/machineconfiguration.go @@ -0,0 +1,227 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + "context" + json "encoding/json" + "fmt" + "time" + + v1 "github.com/openshift/api/operator/v1" + operatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" + scheme "github.com/openshift/client-go/operator/clientset/versioned/scheme" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// MachineConfigurationsGetter has a method to return a MachineConfigurationInterface. +// A group's client should implement this interface. +type MachineConfigurationsGetter interface { + MachineConfigurations() MachineConfigurationInterface +} + +// MachineConfigurationInterface has methods to work with MachineConfiguration resources. +type MachineConfigurationInterface interface { + Create(ctx context.Context, machineConfiguration *v1.MachineConfiguration, opts metav1.CreateOptions) (*v1.MachineConfiguration, error) + Update(ctx context.Context, machineConfiguration *v1.MachineConfiguration, opts metav1.UpdateOptions) (*v1.MachineConfiguration, error) + UpdateStatus(ctx context.Context, machineConfiguration *v1.MachineConfiguration, opts metav1.UpdateOptions) (*v1.MachineConfiguration, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.MachineConfiguration, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.MachineConfigurationList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.MachineConfiguration, err error) + Apply(ctx context.Context, machineConfiguration *operatorv1.MachineConfigurationApplyConfiguration, opts metav1.ApplyOptions) (result *v1.MachineConfiguration, err error) + ApplyStatus(ctx context.Context, machineConfiguration *operatorv1.MachineConfigurationApplyConfiguration, opts metav1.ApplyOptions) (result *v1.MachineConfiguration, err error) + MachineConfigurationExpansion +} + +// machineConfigurations implements MachineConfigurationInterface +type machineConfigurations struct { + client rest.Interface +} + +// newMachineConfigurations returns a MachineConfigurations +func newMachineConfigurations(c *OperatorV1Client) *machineConfigurations { + return &machineConfigurations{ + client: c.RESTClient(), + } +} + +// Get takes name of the machineConfiguration, and returns the corresponding machineConfiguration object, and an error if there is any. +func (c *machineConfigurations) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.MachineConfiguration, err error) { + result = &v1.MachineConfiguration{} + err = c.client.Get(). + Resource("machineconfigurations"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of MachineConfigurations that match those selectors. +func (c *machineConfigurations) List(ctx context.Context, opts metav1.ListOptions) (result *v1.MachineConfigurationList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1.MachineConfigurationList{} + err = c.client.Get(). + Resource("machineconfigurations"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested machineConfigurations. +func (c *machineConfigurations) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Resource("machineconfigurations"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a machineConfiguration and creates it. Returns the server's representation of the machineConfiguration, and an error, if there is any. +func (c *machineConfigurations) Create(ctx context.Context, machineConfiguration *v1.MachineConfiguration, opts metav1.CreateOptions) (result *v1.MachineConfiguration, err error) { + result = &v1.MachineConfiguration{} + err = c.client.Post(). + Resource("machineconfigurations"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(machineConfiguration). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a machineConfiguration and updates it. Returns the server's representation of the machineConfiguration, and an error, if there is any. +func (c *machineConfigurations) Update(ctx context.Context, machineConfiguration *v1.MachineConfiguration, opts metav1.UpdateOptions) (result *v1.MachineConfiguration, err error) { + result = &v1.MachineConfiguration{} + err = c.client.Put(). + Resource("machineconfigurations"). + Name(machineConfiguration.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(machineConfiguration). + 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 *machineConfigurations) UpdateStatus(ctx context.Context, machineConfiguration *v1.MachineConfiguration, opts metav1.UpdateOptions) (result *v1.MachineConfiguration, err error) { + result = &v1.MachineConfiguration{} + err = c.client.Put(). + Resource("machineconfigurations"). + Name(machineConfiguration.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(machineConfiguration). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the machineConfiguration and deletes it. Returns an error if one occurs. +func (c *machineConfigurations) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { + return c.client.Delete(). + Resource("machineconfigurations"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *machineConfigurations) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Resource("machineconfigurations"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched machineConfiguration. +func (c *machineConfigurations) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.MachineConfiguration, err error) { + result = &v1.MachineConfiguration{} + err = c.client.Patch(pt). + Resource("machineconfigurations"). + 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 machineConfiguration. +func (c *machineConfigurations) Apply(ctx context.Context, machineConfiguration *operatorv1.MachineConfigurationApplyConfiguration, opts metav1.ApplyOptions) (result *v1.MachineConfiguration, err error) { + if machineConfiguration == nil { + return nil, fmt.Errorf("machineConfiguration provided to Apply must not be nil") + } + patchOpts := opts.ToPatchOptions() + data, err := json.Marshal(machineConfiguration) + if err != nil { + return nil, err + } + name := machineConfiguration.Name + if name == nil { + return nil, fmt.Errorf("machineConfiguration.Name must be provided to Apply") + } + result = &v1.MachineConfiguration{} + err = c.client.Patch(types.ApplyPatchType). + Resource("machineconfigurations"). + 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 *machineConfigurations) ApplyStatus(ctx context.Context, machineConfiguration *operatorv1.MachineConfigurationApplyConfiguration, opts metav1.ApplyOptions) (result *v1.MachineConfiguration, err error) { + if machineConfiguration == nil { + return nil, fmt.Errorf("machineConfiguration provided to Apply must not be nil") + } + patchOpts := opts.ToPatchOptions() + data, err := json.Marshal(machineConfiguration) + if err != nil { + return nil, err + } + + name := machineConfiguration.Name + if name == nil { + return nil, fmt.Errorf("machineConfiguration.Name must be provided to Apply") + } + + result = &v1.MachineConfiguration{} + err = c.client.Patch(types.ApplyPatchType). + Resource("machineconfigurations"). + Name(*name). + SubResource("status"). + VersionedParams(&patchOpts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/operator_client.go b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/operator_client.go index eb4f78717..996fad76d 100644 --- a/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/operator_client.go +++ b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/operator_client.go @@ -26,6 +26,7 @@ type OperatorV1Interface interface { KubeControllerManagersGetter KubeSchedulersGetter KubeStorageVersionMigratorsGetter + MachineConfigurationsGetter NetworksGetter OpenShiftAPIServersGetter OpenShiftControllerManagersGetter @@ -96,6 +97,10 @@ func (c *OperatorV1Client) KubeStorageVersionMigrators() KubeStorageVersionMigra return newKubeStorageVersionMigrators(c) } +func (c *OperatorV1Client) MachineConfigurations() MachineConfigurationInterface { + return newMachineConfigurations(c) +} + func (c *OperatorV1Client) Networks() NetworkInterface { return newNetworks(c) } diff --git a/vendor/github.com/openshift/client-go/operator/informers/externalversions/generic.go b/vendor/github.com/openshift/client-go/operator/informers/externalversions/generic.go index 7d08938b5..f255f0f37 100644 --- a/vendor/github.com/openshift/client-go/operator/informers/externalversions/generic.go +++ b/vendor/github.com/openshift/client-go/operator/informers/externalversions/generic.go @@ -66,6 +66,8 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource return &genericInformer{resource: resource.GroupResource(), informer: f.Operator().V1().KubeSchedulers().Informer()}, nil case v1.SchemeGroupVersion.WithResource("kubestorageversionmigrators"): return &genericInformer{resource: resource.GroupResource(), informer: f.Operator().V1().KubeStorageVersionMigrators().Informer()}, nil + case v1.SchemeGroupVersion.WithResource("machineconfigurations"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Operator().V1().MachineConfigurations().Informer()}, nil case v1.SchemeGroupVersion.WithResource("networks"): return &genericInformer{resource: resource.GroupResource(), informer: f.Operator().V1().Networks().Informer()}, nil case v1.SchemeGroupVersion.WithResource("openshiftapiservers"): diff --git a/vendor/github.com/openshift/client-go/operator/informers/externalversions/operator/v1/interface.go b/vendor/github.com/openshift/client-go/operator/informers/externalversions/operator/v1/interface.go index 59eb5eb93..a6331e803 100644 --- a/vendor/github.com/openshift/client-go/operator/informers/externalversions/operator/v1/interface.go +++ b/vendor/github.com/openshift/client-go/operator/informers/externalversions/operator/v1/interface.go @@ -36,6 +36,8 @@ type Interface interface { KubeSchedulers() KubeSchedulerInformer // KubeStorageVersionMigrators returns a KubeStorageVersionMigratorInformer. KubeStorageVersionMigrators() KubeStorageVersionMigratorInformer + // MachineConfigurations returns a MachineConfigurationInformer. + MachineConfigurations() MachineConfigurationInformer // Networks returns a NetworkInformer. Networks() NetworkInformer // OpenShiftAPIServers returns a OpenShiftAPIServerInformer. @@ -133,6 +135,11 @@ func (v *version) KubeStorageVersionMigrators() KubeStorageVersionMigratorInform return &kubeStorageVersionMigratorInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} } +// MachineConfigurations returns a MachineConfigurationInformer. +func (v *version) MachineConfigurations() MachineConfigurationInformer { + return &machineConfigurationInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} +} + // Networks returns a NetworkInformer. func (v *version) Networks() NetworkInformer { return &networkInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} diff --git a/vendor/github.com/openshift/client-go/operator/informers/externalversions/operator/v1/machineconfiguration.go b/vendor/github.com/openshift/client-go/operator/informers/externalversions/operator/v1/machineconfiguration.go new file mode 100644 index 000000000..e16f6ff10 --- /dev/null +++ b/vendor/github.com/openshift/client-go/operator/informers/externalversions/operator/v1/machineconfiguration.go @@ -0,0 +1,73 @@ +// Code generated by informer-gen. DO NOT EDIT. + +package v1 + +import ( + "context" + time "time" + + operatorv1 "github.com/openshift/api/operator/v1" + versioned "github.com/openshift/client-go/operator/clientset/versioned" + internalinterfaces "github.com/openshift/client-go/operator/informers/externalversions/internalinterfaces" + v1 "github.com/openshift/client-go/operator/listers/operator/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +// MachineConfigurationInformer provides access to a shared informer and lister for +// MachineConfigurations. +type MachineConfigurationInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1.MachineConfigurationLister +} + +type machineConfigurationInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc +} + +// NewMachineConfigurationInformer constructs a new informer for MachineConfiguration type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewMachineConfigurationInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { + return NewFilteredMachineConfigurationInformer(client, resyncPeriod, indexers, nil) +} + +// NewFilteredMachineConfigurationInformer constructs a new informer for MachineConfiguration type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewFilteredMachineConfigurationInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { + return cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.OperatorV1().MachineConfigurations().List(context.TODO(), options) + }, + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.OperatorV1().MachineConfigurations().Watch(context.TODO(), options) + }, + }, + &operatorv1.MachineConfiguration{}, + resyncPeriod, + indexers, + ) +} + +func (f *machineConfigurationInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredMachineConfigurationInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +} + +func (f *machineConfigurationInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&operatorv1.MachineConfiguration{}, f.defaultInformer) +} + +func (f *machineConfigurationInformer) Lister() v1.MachineConfigurationLister { + return v1.NewMachineConfigurationLister(f.Informer().GetIndexer()) +} diff --git a/vendor/github.com/openshift/client-go/operator/listers/operator/v1/expansion_generated.go b/vendor/github.com/openshift/client-go/operator/listers/operator/v1/expansion_generated.go index f7d082e1a..d2e75d0c3 100644 --- a/vendor/github.com/openshift/client-go/operator/listers/operator/v1/expansion_generated.go +++ b/vendor/github.com/openshift/client-go/operator/listers/operator/v1/expansion_generated.go @@ -62,6 +62,10 @@ type KubeSchedulerListerExpansion interface{} // KubeStorageVersionMigratorLister. type KubeStorageVersionMigratorListerExpansion interface{} +// MachineConfigurationListerExpansion allows custom methods to be added to +// MachineConfigurationLister. +type MachineConfigurationListerExpansion interface{} + // NetworkListerExpansion allows custom methods to be added to // NetworkLister. type NetworkListerExpansion interface{} diff --git a/vendor/github.com/openshift/client-go/operator/listers/operator/v1/machineconfiguration.go b/vendor/github.com/openshift/client-go/operator/listers/operator/v1/machineconfiguration.go new file mode 100644 index 000000000..304d8f297 --- /dev/null +++ b/vendor/github.com/openshift/client-go/operator/listers/operator/v1/machineconfiguration.go @@ -0,0 +1,52 @@ +// Code generated by lister-gen. DO NOT EDIT. + +package v1 + +import ( + v1 "github.com/openshift/api/operator/v1" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" +) + +// MachineConfigurationLister helps list MachineConfigurations. +// All objects returned here must be treated as read-only. +type MachineConfigurationLister interface { + // List lists all MachineConfigurations in the indexer. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v1.MachineConfiguration, err error) + // Get retrieves the MachineConfiguration from the index for a given name. + // Objects returned here must be treated as read-only. + Get(name string) (*v1.MachineConfiguration, error) + MachineConfigurationListerExpansion +} + +// machineConfigurationLister implements the MachineConfigurationLister interface. +type machineConfigurationLister struct { + indexer cache.Indexer +} + +// NewMachineConfigurationLister returns a new MachineConfigurationLister. +func NewMachineConfigurationLister(indexer cache.Indexer) MachineConfigurationLister { + return &machineConfigurationLister{indexer: indexer} +} + +// List lists all MachineConfigurations in the indexer. +func (s *machineConfigurationLister) List(selector labels.Selector) (ret []*v1.MachineConfiguration, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1.MachineConfiguration)) + }) + return ret, err +} + +// Get retrieves the MachineConfiguration from the index for a given name. +func (s *machineConfigurationLister) Get(name string) (*v1.MachineConfiguration, error) { + obj, exists, err := s.indexer.GetByKey(name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v1.Resource("machineconfiguration"), name) + } + return obj.(*v1.MachineConfiguration), nil +} diff --git a/vendor/modules.txt b/vendor/modules.txt index 9c9cbea01..f5a69c0b9 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -369,7 +369,7 @@ github.com/openshift/api/template github.com/openshift/api/template/v1 github.com/openshift/api/user github.com/openshift/api/user/v1 -# github.com/openshift/client-go v0.0.0-20230926161409-848405da69e1 => github.com/openshift/client-go v0.0.0-20230926161409-848405da69e1 +# github.com/openshift/client-go v0.0.0-20230926161409-848405da69e1 => github.com/openshift/client-go v0.0.0-20231005121823-e81400b97c46 ## explicit; go 1.20 github.com/openshift/client-go/build/applyconfigurations/build/v1 github.com/openshift/client-go/build/applyconfigurations/internal @@ -1218,4 +1218,4 @@ sigs.k8s.io/structured-merge-diff/v4/value ## explicit; go 1.12 sigs.k8s.io/yaml # github.com/openshift/api => github.com/openshift/api v0.0.0-20231012181603-8f468d7b55a8 -# github.com/openshift/client-go => github.com/openshift/client-go v0.0.0-20230926161409-848405da69e1 +# github.com/openshift/client-go => github.com/openshift/client-go v0.0.0-20231005121823-e81400b97c46