diff --git a/force-commit b/force-commit index 112fe7a87..b4d7280a4 100644 --- a/force-commit +++ b/force-commit @@ -4,3 +4,4 @@ Avoid empty commits 3 Avoid empty commits 4 Avoid empty commits 5 Avoid empty commits 6 +Avoid empty commits 7 diff --git a/go.mod b/go.mod index 837a995d0..5f5e00c27 100644 --- a/go.mod +++ b/go.mod @@ -119,4 +119,4 @@ require ( replace github.com/openshift/api => github.com/petr-muller/api v0.0.0-20240710133749-d1e5dc52eaf7 -replace github.com/openshift/client-go => github.com/petr-muller/openshift-client-go update-status-operator +replace github.com/openshift/client-go => github.com/petr-muller/openshift-client-go v0.0.0-20240710134752-3867934647d5 diff --git a/go.sum b/go.sum index bf60350db..12be20531 100644 --- a/go.sum +++ b/go.sum @@ -138,8 +138,6 @@ github.com/onsi/ginkgo/v2 v2.15.0 h1:79HwNRBAZHOEwrczrgSOPy+eFTTlIGELKy5as+ClttY github.com/onsi/ginkgo/v2 v2.15.0/go.mod h1:HlxMHtYF57y6Dpf+mc5529KKmSq9h2FpCF+/ZkwUxKM= github.com/onsi/gomega v1.31.0 h1:54UJxxj6cPInHS3a35wm6BK/F9nHYueZ1NVujHDrnXE= github.com/onsi/gomega v1.31.0/go.mod h1:DW9aCi7U6Yi40wNVAvT6kzFnEVEI5n3DloYBiKiT6zk= -github.com/openshift/client-go v0.0.0-20240528061634-b054aa794d87 h1:JtLhaGpSEconE+1IKmIgCOof/Len5ceG6H1pk43yv5U= -github.com/openshift/client-go v0.0.0-20240528061634-b054aa794d87/go.mod h1:3IPD4U0qyovZS4EFady2kqY32m8lGcbs/Wx+yprg9z8= github.com/openshift/library-go v0.0.0-20240709182732-b94141242b0c h1:J79MQ2jYap7l9ugCosp73mIcb6PNcXeczINlyfGC7XA= github.com/openshift/library-go v0.0.0-20240709182732-b94141242b0c/go.mod h1:PdASVamWinll2BPxiUpXajTwZxV8A1pQbWEsCN1od7I= github.com/operator-framework/api v0.17.1 h1:J/6+Xj4IEV8C7hcirqUFwOiZAU3PbnJhWvB0/bB51c4= @@ -148,6 +146,8 @@ github.com/operator-framework/operator-lifecycle-manager v0.22.0 h1:7DEWOq24HQ0l github.com/operator-framework/operator-lifecycle-manager v0.22.0/go.mod h1:4zssIIl23ohxS1nXRU9xTkBmwt+qleuHMO02BaWOHLA= github.com/petr-muller/api v0.0.0-20240710133749-d1e5dc52eaf7 h1:8NVkfoxzY8BuxiZE1S0npjMCd3BapAjjii0RkxyM9ho= github.com/petr-muller/api v0.0.0-20240710133749-d1e5dc52eaf7/go.mod h1:OOh6Qopf21pSzqNVCB5gomomBXb8o5sGKZxG2KNpaXM= +github.com/petr-muller/openshift-client-go v0.0.0-20240710134752-3867934647d5 h1:Tr7f57HyNH18hPuLgUX+NbbeyrmToV5R2UtqGQEgIlM= +github.com/petr-muller/openshift-client-go v0.0.0-20240710134752-3867934647d5/go.mod h1:Pvzjula0DEAwkhPewMW99PrOTrIfXIYu0F1V/b6JwpE= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/profile v1.3.0 h1:OQIvuDgm00gWVWGTf4m4mCt6W1/0YqU7Ntg0mySWgaI= diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/controlplaneupdatestatus.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/controlplaneupdatestatus.go new file mode 100644 index 000000000..50c561417 --- /dev/null +++ b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/controlplaneupdatestatus.go @@ -0,0 +1,55 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + v1 "k8s.io/client-go/applyconfigurations/meta/v1" +) + +// ControlPlaneUpdateStatusApplyConfiguration represents an declarative configuration of the ControlPlaneUpdateStatus type for use +// with apply. +type ControlPlaneUpdateStatusApplyConfiguration struct { + Summary *ControlPlaneUpdateStatusSummaryApplyConfiguration `json:",inline"` + Informers []UpdateInformerApplyConfiguration `json:"informers,omitempty"` + Conditions []v1.ConditionApplyConfiguration `json:"conditions,omitempty"` +} + +// ControlPlaneUpdateStatusApplyConfiguration constructs an declarative configuration of the ControlPlaneUpdateStatus type for use with +// apply. +func ControlPlaneUpdateStatus() *ControlPlaneUpdateStatusApplyConfiguration { + return &ControlPlaneUpdateStatusApplyConfiguration{} +} + +// WithSummary sets the Summary 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 Summary field is set to the value of the last call. +func (b *ControlPlaneUpdateStatusApplyConfiguration) WithSummary(value *ControlPlaneUpdateStatusSummaryApplyConfiguration) *ControlPlaneUpdateStatusApplyConfiguration { + b.Summary = value + return b +} + +// WithInformers adds the given value to the Informers 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 Informers field. +func (b *ControlPlaneUpdateStatusApplyConfiguration) WithInformers(values ...*UpdateInformerApplyConfiguration) *ControlPlaneUpdateStatusApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithInformers") + } + b.Informers = append(b.Informers, *values[i]) + } + 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 *ControlPlaneUpdateStatusApplyConfiguration) WithConditions(values ...*v1.ConditionApplyConfiguration) *ControlPlaneUpdateStatusApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithConditions") + } + b.Conditions = append(b.Conditions, *values[i]) + } + return b +} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/controlplaneupdatestatussummary.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/controlplaneupdatestatussummary.go new file mode 100644 index 000000000..eb99c90a3 --- /dev/null +++ b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/controlplaneupdatestatussummary.go @@ -0,0 +1,72 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// ControlPlaneUpdateStatusSummaryApplyConfiguration represents an declarative configuration of the ControlPlaneUpdateStatusSummary type for use +// with apply. +type ControlPlaneUpdateStatusSummaryApplyConfiguration struct { + Assessment *string `json:"assessment,omitempty"` + Versions *ControlPlaneUpdateVersionsApplyConfiguration `json:"versions,omitempty"` + Completion *int32 `json:"completion,omitempty"` + StartedAt *v1.Time `json:"startedAt,omitempty"` + CompletedAt *v1.Time `json:"completedAt,omitempty"` + EstimatedCompletedAt *v1.Time `json:"estimatedCompletedAt,omitempty"` +} + +// ControlPlaneUpdateStatusSummaryApplyConfiguration constructs an declarative configuration of the ControlPlaneUpdateStatusSummary type for use with +// apply. +func ControlPlaneUpdateStatusSummary() *ControlPlaneUpdateStatusSummaryApplyConfiguration { + return &ControlPlaneUpdateStatusSummaryApplyConfiguration{} +} + +// WithAssessment sets the Assessment 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 Assessment field is set to the value of the last call. +func (b *ControlPlaneUpdateStatusSummaryApplyConfiguration) WithAssessment(value string) *ControlPlaneUpdateStatusSummaryApplyConfiguration { + b.Assessment = &value + return b +} + +// WithVersions sets the Versions 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 Versions field is set to the value of the last call. +func (b *ControlPlaneUpdateStatusSummaryApplyConfiguration) WithVersions(value *ControlPlaneUpdateVersionsApplyConfiguration) *ControlPlaneUpdateStatusSummaryApplyConfiguration { + b.Versions = value + return b +} + +// WithCompletion sets the Completion 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 Completion field is set to the value of the last call. +func (b *ControlPlaneUpdateStatusSummaryApplyConfiguration) WithCompletion(value int32) *ControlPlaneUpdateStatusSummaryApplyConfiguration { + b.Completion = &value + return b +} + +// WithStartedAt sets the StartedAt 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 StartedAt field is set to the value of the last call. +func (b *ControlPlaneUpdateStatusSummaryApplyConfiguration) WithStartedAt(value v1.Time) *ControlPlaneUpdateStatusSummaryApplyConfiguration { + b.StartedAt = &value + return b +} + +// WithCompletedAt sets the CompletedAt 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 CompletedAt field is set to the value of the last call. +func (b *ControlPlaneUpdateStatusSummaryApplyConfiguration) WithCompletedAt(value v1.Time) *ControlPlaneUpdateStatusSummaryApplyConfiguration { + b.CompletedAt = &value + return b +} + +// WithEstimatedCompletedAt sets the EstimatedCompletedAt 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 EstimatedCompletedAt field is set to the value of the last call. +func (b *ControlPlaneUpdateStatusSummaryApplyConfiguration) WithEstimatedCompletedAt(value v1.Time) *ControlPlaneUpdateStatusSummaryApplyConfiguration { + b.EstimatedCompletedAt = &value + return b +} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/controlplaneupdateversions.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/controlplaneupdateversions.go new file mode 100644 index 000000000..0e00290b6 --- /dev/null +++ b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/controlplaneupdateversions.go @@ -0,0 +1,41 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +// ControlPlaneUpdateVersionsApplyConfiguration represents an declarative configuration of the ControlPlaneUpdateVersions type for use +// with apply. +type ControlPlaneUpdateVersionsApplyConfiguration struct { + Original *string `json:"original,omitempty"` + OriginalPartial *bool `json:"originalPartial,omitempty"` + Target *string `json:"target,omitempty"` +} + +// ControlPlaneUpdateVersionsApplyConfiguration constructs an declarative configuration of the ControlPlaneUpdateVersions type for use with +// apply. +func ControlPlaneUpdateVersions() *ControlPlaneUpdateVersionsApplyConfiguration { + return &ControlPlaneUpdateVersionsApplyConfiguration{} +} + +// WithOriginal sets the Original 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 Original field is set to the value of the last call. +func (b *ControlPlaneUpdateVersionsApplyConfiguration) WithOriginal(value string) *ControlPlaneUpdateVersionsApplyConfiguration { + b.Original = &value + return b +} + +// WithOriginalPartial sets the OriginalPartial 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 OriginalPartial field is set to the value of the last call. +func (b *ControlPlaneUpdateVersionsApplyConfiguration) WithOriginalPartial(value bool) *ControlPlaneUpdateVersionsApplyConfiguration { + b.OriginalPartial = &value + return b +} + +// WithTarget sets the Target 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 Target field is set to the value of the last call. +func (b *ControlPlaneUpdateVersionsApplyConfiguration) WithTarget(value string) *ControlPlaneUpdateVersionsApplyConfiguration { + b.Target = &value + return b +} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/poolresourceref.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/poolresourceref.go new file mode 100644 index 000000000..b90693cc4 --- /dev/null +++ b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/poolresourceref.go @@ -0,0 +1,47 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +// PoolResourceRefApplyConfiguration represents an declarative configuration of the PoolResourceRef type for use +// with apply. +type PoolResourceRefApplyConfiguration struct { + ResourceRefApplyConfiguration `json:",inline"` +} + +// PoolResourceRefApplyConfiguration constructs an declarative configuration of the PoolResourceRef type for use with +// apply. +func PoolResourceRef() *PoolResourceRefApplyConfiguration { + return &PoolResourceRefApplyConfiguration{} +} + +// 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 *PoolResourceRefApplyConfiguration) WithKind(value string) *PoolResourceRefApplyConfiguration { + b.Kind = &value + return b +} + +// WithAPIGroup sets the APIGroup 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 APIGroup field is set to the value of the last call. +func (b *PoolResourceRefApplyConfiguration) WithAPIGroup(value string) *PoolResourceRefApplyConfiguration { + b.APIGroup = &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 *PoolResourceRefApplyConfiguration) WithName(value string) *PoolResourceRefApplyConfiguration { + b.Name = &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 *PoolResourceRefApplyConfiguration) WithNamespace(value string) *PoolResourceRefApplyConfiguration { + b.Namespace = &value + return b +} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/poolupdatestatus.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/poolupdatestatus.go new file mode 100644 index 000000000..978f6ba89 --- /dev/null +++ b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/poolupdatestatus.go @@ -0,0 +1,55 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + v1 "k8s.io/client-go/applyconfigurations/meta/v1" +) + +// PoolUpdateStatusApplyConfiguration represents an declarative configuration of the PoolUpdateStatus type for use +// with apply. +type PoolUpdateStatusApplyConfiguration struct { + Resource *PoolResourceRefApplyConfiguration `json:",inline"` + Informers []UpdateInformerApplyConfiguration `json:"informers,omitempty"` + Conditions []v1.ConditionApplyConfiguration `json:"conditions,omitempty"` +} + +// PoolUpdateStatusApplyConfiguration constructs an declarative configuration of the PoolUpdateStatus type for use with +// apply. +func PoolUpdateStatus() *PoolUpdateStatusApplyConfiguration { + return &PoolUpdateStatusApplyConfiguration{} +} + +// WithResource sets the Resource 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 Resource field is set to the value of the last call. +func (b *PoolUpdateStatusApplyConfiguration) WithResource(value *PoolResourceRefApplyConfiguration) *PoolUpdateStatusApplyConfiguration { + b.Resource = value + return b +} + +// WithInformers adds the given value to the Informers 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 Informers field. +func (b *PoolUpdateStatusApplyConfiguration) WithInformers(values ...*UpdateInformerApplyConfiguration) *PoolUpdateStatusApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithInformers") + } + b.Informers = append(b.Informers, *values[i]) + } + 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 *PoolUpdateStatusApplyConfiguration) WithConditions(values ...*v1.ConditionApplyConfiguration) *PoolUpdateStatusApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithConditions") + } + b.Conditions = append(b.Conditions, *values[i]) + } + return b +} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/resourceref.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/resourceref.go new file mode 100644 index 000000000..d57bd58e9 --- /dev/null +++ b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/resourceref.go @@ -0,0 +1,50 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +// ResourceRefApplyConfiguration represents an declarative configuration of the ResourceRef type for use +// with apply. +type ResourceRefApplyConfiguration struct { + Kind *string `json:"kind,omitempty"` + APIGroup *string `json:"apiGroup,omitempty"` + Name *string `json:"name,omitempty"` + Namespace *string `json:"namespace,omitempty"` +} + +// ResourceRefApplyConfiguration constructs an declarative configuration of the ResourceRef type for use with +// apply. +func ResourceRef() *ResourceRefApplyConfiguration { + return &ResourceRefApplyConfiguration{} +} + +// 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 *ResourceRefApplyConfiguration) WithKind(value string) *ResourceRefApplyConfiguration { + b.Kind = &value + return b +} + +// WithAPIGroup sets the APIGroup 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 APIGroup field is set to the value of the last call. +func (b *ResourceRefApplyConfiguration) WithAPIGroup(value string) *ResourceRefApplyConfiguration { + b.APIGroup = &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 *ResourceRefApplyConfiguration) WithName(value string) *ResourceRefApplyConfiguration { + b.Name = &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 *ResourceRefApplyConfiguration) WithNamespace(value string) *ResourceRefApplyConfiguration { + b.Namespace = &value + return b +} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/updateinformer.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/updateinformer.go new file mode 100644 index 000000000..d833c49bf --- /dev/null +++ b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/updateinformer.go @@ -0,0 +1,37 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +// UpdateInformerApplyConfiguration represents an declarative configuration of the UpdateInformer type for use +// with apply. +type UpdateInformerApplyConfiguration struct { + Name *string `json:"name,omitempty"` + Insights []UpdateInsightApplyConfiguration `json:"insights,omitempty"` +} + +// UpdateInformerApplyConfiguration constructs an declarative configuration of the UpdateInformer type for use with +// apply. +func UpdateInformer() *UpdateInformerApplyConfiguration { + return &UpdateInformerApplyConfiguration{} +} + +// 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 *UpdateInformerApplyConfiguration) WithName(value string) *UpdateInformerApplyConfiguration { + b.Name = &value + return b +} + +// WithInsights adds the given value to the Insights 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 Insights field. +func (b *UpdateInformerApplyConfiguration) WithInsights(values ...*UpdateInsightApplyConfiguration) *UpdateInformerApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithInsights") + } + b.Insights = append(b.Insights, *values[i]) + } + return b +} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/updateinsight.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/updateinsight.go new file mode 100644 index 000000000..65278a6fa --- /dev/null +++ b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/updateinsight.go @@ -0,0 +1,72 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// UpdateInsightApplyConfiguration represents an declarative configuration of the UpdateInsight type for use +// with apply. +type UpdateInsightApplyConfiguration struct { + UID *string `json:"uid,omitempty"` + AcquiredAt *v1.Time `json:"acquisitionTime,omitempty"` + StartedAt *v1.Time `json:"startedAt,omitempty"` + Scope *UpdateInsightScopeApplyConfiguration `json:"scope,omitempty"` + Impact *UpdateInsightImpactApplyConfiguration `json:"impact,omitempty"` + Remediation *UpdateInsightRemediationApplyConfiguration `json:"remediation,omitempty"` +} + +// UpdateInsightApplyConfiguration constructs an declarative configuration of the UpdateInsight type for use with +// apply. +func UpdateInsight() *UpdateInsightApplyConfiguration { + return &UpdateInsightApplyConfiguration{} +} + +// 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 *UpdateInsightApplyConfiguration) WithUID(value string) *UpdateInsightApplyConfiguration { + b.UID = &value + return b +} + +// WithAcquiredAt sets the AcquiredAt 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 AcquiredAt field is set to the value of the last call. +func (b *UpdateInsightApplyConfiguration) WithAcquiredAt(value v1.Time) *UpdateInsightApplyConfiguration { + b.AcquiredAt = &value + return b +} + +// WithStartedAt sets the StartedAt 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 StartedAt field is set to the value of the last call. +func (b *UpdateInsightApplyConfiguration) WithStartedAt(value v1.Time) *UpdateInsightApplyConfiguration { + b.StartedAt = &value + return b +} + +// WithScope sets the Scope 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 Scope field is set to the value of the last call. +func (b *UpdateInsightApplyConfiguration) WithScope(value *UpdateInsightScopeApplyConfiguration) *UpdateInsightApplyConfiguration { + b.Scope = value + return b +} + +// WithImpact sets the Impact 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 Impact field is set to the value of the last call. +func (b *UpdateInsightApplyConfiguration) WithImpact(value *UpdateInsightImpactApplyConfiguration) *UpdateInsightApplyConfiguration { + b.Impact = value + return b +} + +// WithRemediation sets the Remediation 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 Remediation field is set to the value of the last call. +func (b *UpdateInsightApplyConfiguration) WithRemediation(value *UpdateInsightRemediationApplyConfiguration) *UpdateInsightApplyConfiguration { + b.Remediation = value + return b +} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/updateinsightimpact.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/updateinsightimpact.go new file mode 100644 index 000000000..88ed1ceb3 --- /dev/null +++ b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/updateinsightimpact.go @@ -0,0 +1,50 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +// UpdateInsightImpactApplyConfiguration represents an declarative configuration of the UpdateInsightImpact type for use +// with apply. +type UpdateInsightImpactApplyConfiguration struct { + Level *string `json:"level,omitempty"` + Type *string `json:"type,omitempty"` + Summary *string `json:"summary,omitempty"` + Description *string `json:"description,omitempty"` +} + +// UpdateInsightImpactApplyConfiguration constructs an declarative configuration of the UpdateInsightImpact type for use with +// apply. +func UpdateInsightImpact() *UpdateInsightImpactApplyConfiguration { + return &UpdateInsightImpactApplyConfiguration{} +} + +// WithLevel sets the Level 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 Level field is set to the value of the last call. +func (b *UpdateInsightImpactApplyConfiguration) WithLevel(value string) *UpdateInsightImpactApplyConfiguration { + b.Level = &value + return b +} + +// WithType sets the Type 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 Type field is set to the value of the last call. +func (b *UpdateInsightImpactApplyConfiguration) WithType(value string) *UpdateInsightImpactApplyConfiguration { + b.Type = &value + return b +} + +// WithSummary sets the Summary 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 Summary field is set to the value of the last call. +func (b *UpdateInsightImpactApplyConfiguration) WithSummary(value string) *UpdateInsightImpactApplyConfiguration { + b.Summary = &value + return b +} + +// WithDescription sets the Description 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 Description field is set to the value of the last call. +func (b *UpdateInsightImpactApplyConfiguration) WithDescription(value string) *UpdateInsightImpactApplyConfiguration { + b.Description = &value + return b +} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/updateinsightremediation.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/updateinsightremediation.go new file mode 100644 index 000000000..1adc01712 --- /dev/null +++ b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/updateinsightremediation.go @@ -0,0 +1,36 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// UpdateInsightRemediationApplyConfiguration represents an declarative configuration of the UpdateInsightRemediation type for use +// with apply. +type UpdateInsightRemediationApplyConfiguration struct { + Reference *string `json:"reference,omitempty"` + EstimatedFinish *v1.Time `json:"estimatedFinish,omitempty"` +} + +// UpdateInsightRemediationApplyConfiguration constructs an declarative configuration of the UpdateInsightRemediation type for use with +// apply. +func UpdateInsightRemediation() *UpdateInsightRemediationApplyConfiguration { + return &UpdateInsightRemediationApplyConfiguration{} +} + +// WithReference sets the Reference 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 Reference field is set to the value of the last call. +func (b *UpdateInsightRemediationApplyConfiguration) WithReference(value string) *UpdateInsightRemediationApplyConfiguration { + b.Reference = &value + return b +} + +// WithEstimatedFinish sets the EstimatedFinish 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 EstimatedFinish field is set to the value of the last call. +func (b *UpdateInsightRemediationApplyConfiguration) WithEstimatedFinish(value v1.Time) *UpdateInsightRemediationApplyConfiguration { + b.EstimatedFinish = &value + return b +} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/updateinsightscope.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/updateinsightscope.go new file mode 100644 index 000000000..5087c631f --- /dev/null +++ b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/updateinsightscope.go @@ -0,0 +1,37 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +// UpdateInsightScopeApplyConfiguration represents an declarative configuration of the UpdateInsightScope type for use +// with apply. +type UpdateInsightScopeApplyConfiguration struct { + Type *string `json:"type,omitempty"` + Resources []ResourceRefApplyConfiguration `json:"resources,omitempty"` +} + +// UpdateInsightScopeApplyConfiguration constructs an declarative configuration of the UpdateInsightScope type for use with +// apply. +func UpdateInsightScope() *UpdateInsightScopeApplyConfiguration { + return &UpdateInsightScopeApplyConfiguration{} +} + +// WithType sets the Type 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 Type field is set to the value of the last call. +func (b *UpdateInsightScopeApplyConfiguration) WithType(value string) *UpdateInsightScopeApplyConfiguration { + b.Type = &value + return b +} + +// WithResources adds the given value to the Resources 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 Resources field. +func (b *UpdateInsightScopeApplyConfiguration) WithResources(values ...*ResourceRefApplyConfiguration) *UpdateInsightScopeApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithResources") + } + b.Resources = append(b.Resources, *values[i]) + } + return b +} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/updatestatus.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/updatestatus.go new file mode 100644 index 000000000..9b0eefdfb --- /dev/null +++ b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/updatestatus.go @@ -0,0 +1,240 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + v1alpha1 "github.com/openshift/api/config/v1alpha1" + internal "github.com/openshift/client-go/config/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" +) + +// UpdateStatusApplyConfiguration represents an declarative configuration of the UpdateStatus type for use +// with apply. +type UpdateStatusApplyConfiguration struct { + v1.TypeMetaApplyConfiguration `json:",inline"` + *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *v1alpha1.UpdateStatusSpec `json:"spec,omitempty"` + Status *UpdateStatusStatusApplyConfiguration `json:"status,omitempty"` +} + +// UpdateStatus constructs an declarative configuration of the UpdateStatus type for use with +// apply. +func UpdateStatus(name string) *UpdateStatusApplyConfiguration { + b := &UpdateStatusApplyConfiguration{} + b.WithName(name) + b.WithKind("UpdateStatus") + b.WithAPIVersion("config.openshift.io/v1alpha1") + return b +} + +// ExtractUpdateStatus extracts the applied configuration owned by fieldManager from +// updateStatus. If no managedFields are found in updateStatus for fieldManager, a +// UpdateStatusApplyConfiguration 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. +// updateStatus must be a unmodified UpdateStatus API object that was retrieved from the Kubernetes API. +// ExtractUpdateStatus 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 ExtractUpdateStatus(updateStatus *v1alpha1.UpdateStatus, fieldManager string) (*UpdateStatusApplyConfiguration, error) { + return extractUpdateStatus(updateStatus, fieldManager, "") +} + +// ExtractUpdateStatusStatus is the same as ExtractUpdateStatus except +// that it extracts the status subresource applied configuration. +// Experimental! +func ExtractUpdateStatusStatus(updateStatus *v1alpha1.UpdateStatus, fieldManager string) (*UpdateStatusApplyConfiguration, error) { + return extractUpdateStatus(updateStatus, fieldManager, "status") +} + +func extractUpdateStatus(updateStatus *v1alpha1.UpdateStatus, fieldManager string, subresource string) (*UpdateStatusApplyConfiguration, error) { + b := &UpdateStatusApplyConfiguration{} + err := managedfields.ExtractInto(updateStatus, internal.Parser().Type("com.github.openshift.api.config.v1alpha1.UpdateStatus"), fieldManager, b, subresource) + if err != nil { + return nil, err + } + b.WithName(updateStatus.Name) + + b.WithKind("UpdateStatus") + b.WithAPIVersion("config.openshift.io/v1alpha1") + 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 *UpdateStatusApplyConfiguration) WithKind(value string) *UpdateStatusApplyConfiguration { + 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 *UpdateStatusApplyConfiguration) WithAPIVersion(value string) *UpdateStatusApplyConfiguration { + 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 *UpdateStatusApplyConfiguration) WithName(value string) *UpdateStatusApplyConfiguration { + 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 *UpdateStatusApplyConfiguration) WithGenerateName(value string) *UpdateStatusApplyConfiguration { + 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 *UpdateStatusApplyConfiguration) WithNamespace(value string) *UpdateStatusApplyConfiguration { + 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 *UpdateStatusApplyConfiguration) WithUID(value types.UID) *UpdateStatusApplyConfiguration { + 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 *UpdateStatusApplyConfiguration) WithResourceVersion(value string) *UpdateStatusApplyConfiguration { + 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 *UpdateStatusApplyConfiguration) WithGeneration(value int64) *UpdateStatusApplyConfiguration { + 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 *UpdateStatusApplyConfiguration) WithCreationTimestamp(value metav1.Time) *UpdateStatusApplyConfiguration { + 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 *UpdateStatusApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *UpdateStatusApplyConfiguration { + 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 *UpdateStatusApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *UpdateStatusApplyConfiguration { + 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 *UpdateStatusApplyConfiguration) WithLabels(entries map[string]string) *UpdateStatusApplyConfiguration { + 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 *UpdateStatusApplyConfiguration) WithAnnotations(entries map[string]string) *UpdateStatusApplyConfiguration { + 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 *UpdateStatusApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *UpdateStatusApplyConfiguration { + 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 *UpdateStatusApplyConfiguration) WithFinalizers(values ...string) *UpdateStatusApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + b.Finalizers = append(b.Finalizers, values[i]) + } + return b +} + +func (b *UpdateStatusApplyConfiguration) 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 *UpdateStatusApplyConfiguration) WithSpec(value v1alpha1.UpdateStatusSpec) *UpdateStatusApplyConfiguration { + 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 *UpdateStatusApplyConfiguration) WithStatus(value *UpdateStatusStatusApplyConfiguration) *UpdateStatusApplyConfiguration { + b.Status = value + return b +} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/updatestatusstatus.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/updatestatusstatus.go new file mode 100644 index 000000000..af7752613 --- /dev/null +++ b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/updatestatusstatus.go @@ -0,0 +1,55 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + v1 "k8s.io/client-go/applyconfigurations/meta/v1" +) + +// UpdateStatusStatusApplyConfiguration represents an declarative configuration of the UpdateStatusStatus type for use +// with apply. +type UpdateStatusStatusApplyConfiguration struct { + ControlPlane *ControlPlaneUpdateStatusApplyConfiguration `json:"controlPlane,omitempty"` + WorkerPools []PoolUpdateStatusApplyConfiguration `json:"workerPools,omitempty"` + Conditions []v1.ConditionApplyConfiguration `json:"conditions,omitempty"` +} + +// UpdateStatusStatusApplyConfiguration constructs an declarative configuration of the UpdateStatusStatus type for use with +// apply. +func UpdateStatusStatus() *UpdateStatusStatusApplyConfiguration { + return &UpdateStatusStatusApplyConfiguration{} +} + +// WithControlPlane sets the ControlPlane 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 ControlPlane field is set to the value of the last call. +func (b *UpdateStatusStatusApplyConfiguration) WithControlPlane(value *ControlPlaneUpdateStatusApplyConfiguration) *UpdateStatusStatusApplyConfiguration { + b.ControlPlane = value + return b +} + +// WithWorkerPools adds the given value to the WorkerPools 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 WorkerPools field. +func (b *UpdateStatusStatusApplyConfiguration) WithWorkerPools(values ...*PoolUpdateStatusApplyConfiguration) *UpdateStatusStatusApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithWorkerPools") + } + b.WorkerPools = append(b.WorkerPools, *values[i]) + } + 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 *UpdateStatusStatusApplyConfiguration) WithConditions(values ...*v1.ConditionApplyConfiguration) *UpdateStatusStatusApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithConditions") + } + b.Conditions = append(b.Conditions, *values[i]) + } + return b +} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/internal/internal.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/internal/internal.go index fc70cbc32..3edc02df1 100644 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/internal/internal.go +++ b/vendor/github.com/openshift/client-go/config/applyconfigurations/internal/internal.go @@ -3652,6 +3652,63 @@ var schemaYAML = typed.YAMLObject(`types: elementRelationship: associative keys: - type +- name: com.github.openshift.api.config.v1alpha1.ControlPlaneUpdateStatus + map: + fields: + - name: assessment + type: + scalar: string + default: "" + - name: completedAt + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time + default: {} + - name: completion + type: + scalar: numeric + default: 0 + - name: conditions + type: + list: + elementType: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Condition + elementRelationship: associative + keys: + - type + - name: estimatedCompletedAt + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time + default: {} + - name: informers + type: + list: + elementType: + namedType: com.github.openshift.api.config.v1alpha1.UpdateInformer + elementRelationship: associative + keys: + - name + - name: startedAt + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time + default: {} + - name: versions + type: + namedType: com.github.openshift.api.config.v1alpha1.ControlPlaneUpdateVersions + default: {} +- name: com.github.openshift.api.config.v1alpha1.ControlPlaneUpdateVersions + map: + fields: + - name: original + type: + scalar: string + default: "" + - name: originalPartial + type: + scalar: boolean + - name: target + type: + scalar: string + default: "" - name: com.github.openshift.api.config.v1alpha1.EtcdBackupSpec map: fields: @@ -3861,6 +3918,39 @@ var schemaYAML = typed.YAMLObject(`types: discriminatorValue: FulcioCAWithRekor - fieldName: publicKey discriminatorValue: PublicKey +- name: com.github.openshift.api.config.v1alpha1.PoolUpdateStatus + map: + fields: + - name: apiGroup + type: + scalar: string + - name: conditions + type: + list: + elementType: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Condition + elementRelationship: associative + keys: + - type + - name: informers + type: + list: + elementType: + namedType: com.github.openshift.api.config.v1alpha1.UpdateInformer + elementRelationship: associative + keys: + - name + - name: kind + type: + scalar: string + default: "" + - name: name + type: + scalar: string + default: "" + - name: namespace + type: + scalar: string - name: com.github.openshift.api.config.v1alpha1.PublicKey map: fields: @@ -3870,6 +3960,23 @@ var schemaYAML = typed.YAMLObject(`types: - name: rekorKeyData type: scalar: string +- name: com.github.openshift.api.config.v1alpha1.ResourceRef + map: + fields: + - name: apiGroup + type: + scalar: string + - name: kind + type: + scalar: string + default: "" + - name: name + type: + scalar: string + default: "" + - name: namespace + type: + scalar: string - name: com.github.openshift.api.config.v1alpha1.RetentionNumberConfig map: fields: @@ -3902,6 +4009,143 @@ var schemaYAML = typed.YAMLObject(`types: - name: maxSizeOfBackupsGb type: scalar: numeric +- name: com.github.openshift.api.config.v1alpha1.UpdateInformer + map: + fields: + - name: insights + type: + list: + elementType: + namedType: com.github.openshift.api.config.v1alpha1.UpdateInsight + elementRelationship: atomic + - name: name + type: + scalar: string + default: "" +- name: com.github.openshift.api.config.v1alpha1.UpdateInsight + map: + fields: + - name: acquisitionTime + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time + default: {} + - name: impact + type: + namedType: com.github.openshift.api.config.v1alpha1.UpdateInsightImpact + default: {} + - name: remediation + type: + namedType: com.github.openshift.api.config.v1alpha1.UpdateInsightRemediation + default: {} + - name: scope + type: + namedType: com.github.openshift.api.config.v1alpha1.UpdateInsightScope + default: {} + - name: startedAt + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time + default: {} + - name: uid + type: + scalar: string + default: "" +- name: com.github.openshift.api.config.v1alpha1.UpdateInsightImpact + map: + fields: + - name: description + type: + scalar: string + default: "" + - name: level + type: + scalar: string + default: "" + - name: summary + type: + scalar: string + default: "" + - name: type + type: + scalar: string + default: "" +- name: com.github.openshift.api.config.v1alpha1.UpdateInsightRemediation + map: + fields: + - name: estimatedFinish + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time + default: {} + - name: reference + type: + scalar: string + default: "" +- name: com.github.openshift.api.config.v1alpha1.UpdateInsightScope + map: + fields: + - name: resources + type: + list: + elementType: + namedType: com.github.openshift.api.config.v1alpha1.ResourceRef + elementRelationship: atomic + - name: type + type: + scalar: string + default: "" +- name: com.github.openshift.api.config.v1alpha1.UpdateStatus + 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.config.v1alpha1.UpdateStatusSpec + default: {} + - name: status + type: + namedType: com.github.openshift.api.config.v1alpha1.UpdateStatusStatus + default: {} +- name: com.github.openshift.api.config.v1alpha1.UpdateStatusSpec + map: + elementType: + scalar: untyped + list: + elementType: + namedType: __untyped_atomic_ + elementRelationship: atomic + map: + elementType: + namedType: __untyped_deduced_ + elementRelationship: separable +- name: com.github.openshift.api.config.v1alpha1.UpdateStatusStatus + map: + fields: + - name: conditions + type: + list: + elementType: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Condition + elementRelationship: associative + keys: + - type + - name: controlPlane + type: + namedType: com.github.openshift.api.config.v1alpha1.ControlPlaneUpdateStatus + default: {} + - name: workerPools + type: + list: + elementType: + namedType: com.github.openshift.api.config.v1alpha1.PoolUpdateStatus + elementRelationship: atomic - name: io.k8s.api.core.v1.ConfigMapKeySelector map: fields: diff --git a/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1alpha1/config_client.go b/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1alpha1/config_client.go index cfbbd848b..a1b5d6a68 100644 --- a/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1alpha1/config_client.go +++ b/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1alpha1/config_client.go @@ -16,6 +16,7 @@ type ConfigV1alpha1Interface interface { ClusterImagePoliciesGetter ImagePoliciesGetter InsightsDataGathersGetter + UpdateStatusesGetter } // ConfigV1alpha1Client is used to interact with features provided by the config.openshift.io group. @@ -39,6 +40,10 @@ func (c *ConfigV1alpha1Client) InsightsDataGathers() InsightsDataGatherInterface return newInsightsDataGathers(c) } +func (c *ConfigV1alpha1Client) UpdateStatuses() UpdateStatusInterface { + return newUpdateStatuses(c) +} + // NewForConfig creates a new ConfigV1alpha1Client for the given config. // NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), // where httpClient was generated with rest.HTTPClientFor(c). diff --git a/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1alpha1/fake/fake_config_client.go b/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1alpha1/fake/fake_config_client.go index c720aa837..ae8a5e969 100644 --- a/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1alpha1/fake/fake_config_client.go +++ b/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1alpha1/fake/fake_config_client.go @@ -28,6 +28,10 @@ func (c *FakeConfigV1alpha1) InsightsDataGathers() v1alpha1.InsightsDataGatherIn return &FakeInsightsDataGathers{c} } +func (c *FakeConfigV1alpha1) UpdateStatuses() v1alpha1.UpdateStatusInterface { + return &FakeUpdateStatuses{c} +} + // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. func (c *FakeConfigV1alpha1) RESTClient() rest.Interface { diff --git a/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1alpha1/fake/fake_updatestatus.go b/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1alpha1/fake/fake_updatestatus.go new file mode 100644 index 000000000..4565c2969 --- /dev/null +++ b/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1alpha1/fake/fake_updatestatus.go @@ -0,0 +1,162 @@ +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + v1alpha1 "github.com/openshift/api/config/v1alpha1" + configv1alpha1 "github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1" + 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" + testing "k8s.io/client-go/testing" +) + +// FakeUpdateStatuses implements UpdateStatusInterface +type FakeUpdateStatuses struct { + Fake *FakeConfigV1alpha1 +} + +var updatestatusesResource = v1alpha1.SchemeGroupVersion.WithResource("updatestatuses") + +var updatestatusesKind = v1alpha1.SchemeGroupVersion.WithKind("UpdateStatus") + +// Get takes name of the updateStatus, and returns the corresponding updateStatus object, and an error if there is any. +func (c *FakeUpdateStatuses) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.UpdateStatus, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootGetAction(updatestatusesResource, name), &v1alpha1.UpdateStatus{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.UpdateStatus), err +} + +// List takes label and field selectors, and returns the list of UpdateStatuses that match those selectors. +func (c *FakeUpdateStatuses) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.UpdateStatusList, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootListAction(updatestatusesResource, updatestatusesKind, opts), &v1alpha1.UpdateStatusList{}) + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1alpha1.UpdateStatusList{ListMeta: obj.(*v1alpha1.UpdateStatusList).ListMeta} + for _, item := range obj.(*v1alpha1.UpdateStatusList).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 updateStatuses. +func (c *FakeUpdateStatuses) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewRootWatchAction(updatestatusesResource, opts)) +} + +// Create takes the representation of a updateStatus and creates it. Returns the server's representation of the updateStatus, and an error, if there is any. +func (c *FakeUpdateStatuses) Create(ctx context.Context, updateStatus *v1alpha1.UpdateStatus, opts v1.CreateOptions) (result *v1alpha1.UpdateStatus, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootCreateAction(updatestatusesResource, updateStatus), &v1alpha1.UpdateStatus{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.UpdateStatus), err +} + +// Update takes the representation of a updateStatus and updates it. Returns the server's representation of the updateStatus, and an error, if there is any. +func (c *FakeUpdateStatuses) Update(ctx context.Context, updateStatus *v1alpha1.UpdateStatus, opts v1.UpdateOptions) (result *v1alpha1.UpdateStatus, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateAction(updatestatusesResource, updateStatus), &v1alpha1.UpdateStatus{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.UpdateStatus), 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 *FakeUpdateStatuses) UpdateStatus(ctx context.Context, updateStatus *v1alpha1.UpdateStatus, opts v1.UpdateOptions) (*v1alpha1.UpdateStatus, error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateSubresourceAction(updatestatusesResource, "status", updateStatus), &v1alpha1.UpdateStatus{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.UpdateStatus), err +} + +// Delete takes name of the updateStatus and deletes it. Returns an error if one occurs. +func (c *FakeUpdateStatuses) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewRootDeleteActionWithOptions(updatestatusesResource, name, opts), &v1alpha1.UpdateStatus{}) + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeUpdateStatuses) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(updatestatusesResource, listOpts) + + _, err := c.Fake.Invokes(action, &v1alpha1.UpdateStatusList{}) + return err +} + +// Patch applies the patch and returns the patched updateStatus. +func (c *FakeUpdateStatuses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.UpdateStatus, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(updatestatusesResource, name, pt, data, subresources...), &v1alpha1.UpdateStatus{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.UpdateStatus), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied updateStatus. +func (c *FakeUpdateStatuses) Apply(ctx context.Context, updateStatus *configv1alpha1.UpdateStatusApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.UpdateStatus, err error) { + if updateStatus == nil { + return nil, fmt.Errorf("updateStatus provided to Apply must not be nil") + } + data, err := json.Marshal(updateStatus) + if err != nil { + return nil, err + } + name := updateStatus.Name + if name == nil { + return nil, fmt.Errorf("updateStatus.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(updatestatusesResource, *name, types.ApplyPatchType, data), &v1alpha1.UpdateStatus{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.UpdateStatus), 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 *FakeUpdateStatuses) ApplyStatus(ctx context.Context, updateStatus *configv1alpha1.UpdateStatusApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.UpdateStatus, err error) { + if updateStatus == nil { + return nil, fmt.Errorf("updateStatus provided to Apply must not be nil") + } + data, err := json.Marshal(updateStatus) + if err != nil { + return nil, err + } + name := updateStatus.Name + if name == nil { + return nil, fmt.Errorf("updateStatus.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(updatestatusesResource, *name, types.ApplyPatchType, data, "status"), &v1alpha1.UpdateStatus{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.UpdateStatus), err +} diff --git a/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1alpha1/generated_expansion.go b/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1alpha1/generated_expansion.go index 3a69741b1..91c4e0c07 100644 --- a/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1alpha1/generated_expansion.go +++ b/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1alpha1/generated_expansion.go @@ -9,3 +9,5 @@ type ClusterImagePolicyExpansion interface{} type ImagePolicyExpansion interface{} type InsightsDataGatherExpansion interface{} + +type UpdateStatusExpansion interface{} diff --git a/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1alpha1/updatestatus.go b/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1alpha1/updatestatus.go new file mode 100644 index 000000000..a8f4cda8e --- /dev/null +++ b/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1alpha1/updatestatus.go @@ -0,0 +1,227 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "context" + json "encoding/json" + "fmt" + "time" + + v1alpha1 "github.com/openshift/api/config/v1alpha1" + configv1alpha1 "github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1" + scheme "github.com/openshift/client-go/config/clientset/versioned/scheme" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// UpdateStatusesGetter has a method to return a UpdateStatusInterface. +// A group's client should implement this interface. +type UpdateStatusesGetter interface { + UpdateStatuses() UpdateStatusInterface +} + +// UpdateStatusInterface has methods to work with UpdateStatus resources. +type UpdateStatusInterface interface { + Create(ctx context.Context, updateStatus *v1alpha1.UpdateStatus, opts v1.CreateOptions) (*v1alpha1.UpdateStatus, error) + Update(ctx context.Context, updateStatus *v1alpha1.UpdateStatus, opts v1.UpdateOptions) (*v1alpha1.UpdateStatus, error) + UpdateStatus(ctx context.Context, updateStatus *v1alpha1.UpdateStatus, opts v1.UpdateOptions) (*v1alpha1.UpdateStatus, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.UpdateStatus, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.UpdateStatusList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.UpdateStatus, err error) + Apply(ctx context.Context, updateStatus *configv1alpha1.UpdateStatusApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.UpdateStatus, err error) + ApplyStatus(ctx context.Context, updateStatus *configv1alpha1.UpdateStatusApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.UpdateStatus, err error) + UpdateStatusExpansion +} + +// updateStatuses implements UpdateStatusInterface +type updateStatuses struct { + client rest.Interface +} + +// newUpdateStatuses returns a UpdateStatuses +func newUpdateStatuses(c *ConfigV1alpha1Client) *updateStatuses { + return &updateStatuses{ + client: c.RESTClient(), + } +} + +// Get takes name of the updateStatus, and returns the corresponding updateStatus object, and an error if there is any. +func (c *updateStatuses) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.UpdateStatus, err error) { + result = &v1alpha1.UpdateStatus{} + err = c.client.Get(). + Resource("updatestatuses"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of UpdateStatuses that match those selectors. +func (c *updateStatuses) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.UpdateStatusList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1alpha1.UpdateStatusList{} + err = c.client.Get(). + Resource("updatestatuses"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested updateStatuses. +func (c *updateStatuses) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Resource("updatestatuses"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a updateStatus and creates it. Returns the server's representation of the updateStatus, and an error, if there is any. +func (c *updateStatuses) Create(ctx context.Context, updateStatus *v1alpha1.UpdateStatus, opts v1.CreateOptions) (result *v1alpha1.UpdateStatus, err error) { + result = &v1alpha1.UpdateStatus{} + err = c.client.Post(). + Resource("updatestatuses"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(updateStatus). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a updateStatus and updates it. Returns the server's representation of the updateStatus, and an error, if there is any. +func (c *updateStatuses) Update(ctx context.Context, updateStatus *v1alpha1.UpdateStatus, opts v1.UpdateOptions) (result *v1alpha1.UpdateStatus, err error) { + result = &v1alpha1.UpdateStatus{} + err = c.client.Put(). + Resource("updatestatuses"). + Name(updateStatus.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(updateStatus). + 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 *updateStatuses) UpdateStatus(ctx context.Context, updateStatus *v1alpha1.UpdateStatus, opts v1.UpdateOptions) (result *v1alpha1.UpdateStatus, err error) { + result = &v1alpha1.UpdateStatus{} + err = c.client.Put(). + Resource("updatestatuses"). + Name(updateStatus.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(updateStatus). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the updateStatus and deletes it. Returns an error if one occurs. +func (c *updateStatuses) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + return c.client.Delete(). + Resource("updatestatuses"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *updateStatuses) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Resource("updatestatuses"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched updateStatus. +func (c *updateStatuses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.UpdateStatus, err error) { + result = &v1alpha1.UpdateStatus{} + err = c.client.Patch(pt). + Resource("updatestatuses"). + 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 updateStatus. +func (c *updateStatuses) Apply(ctx context.Context, updateStatus *configv1alpha1.UpdateStatusApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.UpdateStatus, err error) { + if updateStatus == nil { + return nil, fmt.Errorf("updateStatus provided to Apply must not be nil") + } + patchOpts := opts.ToPatchOptions() + data, err := json.Marshal(updateStatus) + if err != nil { + return nil, err + } + name := updateStatus.Name + if name == nil { + return nil, fmt.Errorf("updateStatus.Name must be provided to Apply") + } + result = &v1alpha1.UpdateStatus{} + err = c.client.Patch(types.ApplyPatchType). + Resource("updatestatuses"). + 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 *updateStatuses) ApplyStatus(ctx context.Context, updateStatus *configv1alpha1.UpdateStatusApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.UpdateStatus, err error) { + if updateStatus == nil { + return nil, fmt.Errorf("updateStatus provided to Apply must not be nil") + } + patchOpts := opts.ToPatchOptions() + data, err := json.Marshal(updateStatus) + if err != nil { + return nil, err + } + + name := updateStatus.Name + if name == nil { + return nil, fmt.Errorf("updateStatus.Name must be provided to Apply") + } + + result = &v1alpha1.UpdateStatus{} + err = c.client.Patch(types.ApplyPatchType). + Resource("updatestatuses"). + Name(*name). + SubResource("status"). + VersionedParams(&patchOpts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1alpha1/interface.go b/vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1alpha1/interface.go index 69b5569fa..e410609a8 100644 --- a/vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1alpha1/interface.go +++ b/vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1alpha1/interface.go @@ -16,6 +16,8 @@ type Interface interface { ImagePolicies() ImagePolicyInformer // InsightsDataGathers returns a InsightsDataGatherInformer. InsightsDataGathers() InsightsDataGatherInformer + // UpdateStatuses returns a UpdateStatusInformer. + UpdateStatuses() UpdateStatusInformer } type version struct { @@ -48,3 +50,8 @@ func (v *version) ImagePolicies() ImagePolicyInformer { func (v *version) InsightsDataGathers() InsightsDataGatherInformer { return &insightsDataGatherInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} } + +// UpdateStatuses returns a UpdateStatusInformer. +func (v *version) UpdateStatuses() UpdateStatusInformer { + return &updateStatusInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} +} diff --git a/vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1alpha1/updatestatus.go b/vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1alpha1/updatestatus.go new file mode 100644 index 000000000..1cb085e11 --- /dev/null +++ b/vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1alpha1/updatestatus.go @@ -0,0 +1,73 @@ +// Code generated by informer-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "context" + time "time" + + configv1alpha1 "github.com/openshift/api/config/v1alpha1" + versioned "github.com/openshift/client-go/config/clientset/versioned" + internalinterfaces "github.com/openshift/client-go/config/informers/externalversions/internalinterfaces" + v1alpha1 "github.com/openshift/client-go/config/listers/config/v1alpha1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +// UpdateStatusInformer provides access to a shared informer and lister for +// UpdateStatuses. +type UpdateStatusInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1alpha1.UpdateStatusLister +} + +type updateStatusInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc +} + +// NewUpdateStatusInformer constructs a new informer for UpdateStatus 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 NewUpdateStatusInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { + return NewFilteredUpdateStatusInformer(client, resyncPeriod, indexers, nil) +} + +// NewFilteredUpdateStatusInformer constructs a new informer for UpdateStatus 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 NewFilteredUpdateStatusInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { + return cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.ConfigV1alpha1().UpdateStatuses().List(context.TODO(), options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.ConfigV1alpha1().UpdateStatuses().Watch(context.TODO(), options) + }, + }, + &configv1alpha1.UpdateStatus{}, + resyncPeriod, + indexers, + ) +} + +func (f *updateStatusInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredUpdateStatusInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +} + +func (f *updateStatusInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&configv1alpha1.UpdateStatus{}, f.defaultInformer) +} + +func (f *updateStatusInformer) Lister() v1alpha1.UpdateStatusLister { + return v1alpha1.NewUpdateStatusLister(f.Informer().GetIndexer()) +} diff --git a/vendor/github.com/openshift/client-go/config/informers/externalversions/generic.go b/vendor/github.com/openshift/client-go/config/informers/externalversions/generic.go index 20b3b4e60..30665f649 100644 --- a/vendor/github.com/openshift/client-go/config/informers/externalversions/generic.go +++ b/vendor/github.com/openshift/client-go/config/informers/externalversions/generic.go @@ -90,6 +90,8 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource return &genericInformer{resource: resource.GroupResource(), informer: f.Config().V1alpha1().ImagePolicies().Informer()}, nil case v1alpha1.SchemeGroupVersion.WithResource("insightsdatagathers"): return &genericInformer{resource: resource.GroupResource(), informer: f.Config().V1alpha1().InsightsDataGathers().Informer()}, nil + case v1alpha1.SchemeGroupVersion.WithResource("updatestatuses"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Config().V1alpha1().UpdateStatuses().Informer()}, nil } diff --git a/vendor/github.com/openshift/client-go/config/listers/config/v1alpha1/expansion_generated.go b/vendor/github.com/openshift/client-go/config/listers/config/v1alpha1/expansion_generated.go index 97e64a7cc..0d41caff6 100644 --- a/vendor/github.com/openshift/client-go/config/listers/config/v1alpha1/expansion_generated.go +++ b/vendor/github.com/openshift/client-go/config/listers/config/v1alpha1/expansion_generated.go @@ -21,3 +21,7 @@ type ImagePolicyNamespaceListerExpansion interface{} // InsightsDataGatherListerExpansion allows custom methods to be added to // InsightsDataGatherLister. type InsightsDataGatherListerExpansion interface{} + +// UpdateStatusListerExpansion allows custom methods to be added to +// UpdateStatusLister. +type UpdateStatusListerExpansion interface{} diff --git a/vendor/github.com/openshift/client-go/config/listers/config/v1alpha1/updatestatus.go b/vendor/github.com/openshift/client-go/config/listers/config/v1alpha1/updatestatus.go new file mode 100644 index 000000000..ff704ed72 --- /dev/null +++ b/vendor/github.com/openshift/client-go/config/listers/config/v1alpha1/updatestatus.go @@ -0,0 +1,52 @@ +// Code generated by lister-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + v1alpha1 "github.com/openshift/api/config/v1alpha1" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" +) + +// UpdateStatusLister helps list UpdateStatuses. +// All objects returned here must be treated as read-only. +type UpdateStatusLister interface { + // List lists all UpdateStatuses in the indexer. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v1alpha1.UpdateStatus, err error) + // Get retrieves the UpdateStatus from the index for a given name. + // Objects returned here must be treated as read-only. + Get(name string) (*v1alpha1.UpdateStatus, error) + UpdateStatusListerExpansion +} + +// updateStatusLister implements the UpdateStatusLister interface. +type updateStatusLister struct { + indexer cache.Indexer +} + +// NewUpdateStatusLister returns a new UpdateStatusLister. +func NewUpdateStatusLister(indexer cache.Indexer) UpdateStatusLister { + return &updateStatusLister{indexer: indexer} +} + +// List lists all UpdateStatuses in the indexer. +func (s *updateStatusLister) List(selector labels.Selector) (ret []*v1alpha1.UpdateStatus, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1alpha1.UpdateStatus)) + }) + return ret, err +} + +// Get retrieves the UpdateStatus from the index for a given name. +func (s *updateStatusLister) Get(name string) (*v1alpha1.UpdateStatus, error) { + obj, exists, err := s.indexer.GetByKey(name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v1alpha1.Resource("updatestatus"), name) + } + return obj.(*v1alpha1.UpdateStatus), nil +} diff --git a/vendor/modules.txt b/vendor/modules.txt index 4e9c8936e..4c781d418 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -180,7 +180,7 @@ github.com/openshift/api/image/v1 github.com/openshift/api/operator/v1 github.com/openshift/api/operator/v1alpha1 github.com/openshift/api/security/v1 -# github.com/openshift/client-go v0.0.0-20240528061634-b054aa794d87 +# github.com/openshift/client-go v0.0.0-20240528061634-b054aa794d87 => github.com/petr-muller/openshift-client-go v0.0.0-20240710134752-3867934647d5 ## explicit; go 1.22.0 github.com/openshift/client-go/config/applyconfigurations/config/v1 github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1 @@ -1289,3 +1289,4 @@ sigs.k8s.io/structured-merge-diff/v4/value ## explicit; go 1.12 sigs.k8s.io/yaml # github.com/openshift/api => github.com/petr-muller/api v0.0.0-20240710133749-d1e5dc52eaf7 +# github.com/openshift/client-go => github.com/petr-muller/openshift-client-go v0.0.0-20240710134752-3867934647d5