mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 10:33:35 +00:00
rebase: update K8s packages to v0.32.1
Update K8s packages in go.mod to v0.32.1 Signed-off-by: Praveen M <m.praveen@ibm.com>
This commit is contained in:
68
vendor/k8s.io/client-go/applyconfigurations/apps/v1/statefulset.go
generated
vendored
68
vendor/k8s.io/client-go/applyconfigurations/apps/v1/statefulset.go
generated
vendored
@ -19,21 +19,21 @@ limitations under the License.
|
||||
package v1
|
||||
|
||||
import (
|
||||
apiappsv1 "k8s.io/api/apps/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
appsv1 "k8s.io/api/apps/v1"
|
||||
apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
||||
internal "k8s.io/client-go/applyconfigurations/internal"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
metav1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
// StatefulSetApplyConfiguration represents a declarative configuration of the StatefulSet type for use
|
||||
// with apply.
|
||||
type StatefulSetApplyConfiguration struct {
|
||||
v1.TypeMetaApplyConfiguration `json:",inline"`
|
||||
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
|
||||
Spec *StatefulSetSpecApplyConfiguration `json:"spec,omitempty"`
|
||||
Status *StatefulSetStatusApplyConfiguration `json:"status,omitempty"`
|
||||
metav1.TypeMetaApplyConfiguration `json:",inline"`
|
||||
*metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
|
||||
Spec *StatefulSetSpecApplyConfiguration `json:"spec,omitempty"`
|
||||
Status *StatefulSetStatusApplyConfiguration `json:"status,omitempty"`
|
||||
}
|
||||
|
||||
// StatefulSet constructs a declarative configuration of the StatefulSet type for use with
|
||||
@ -58,18 +58,18 @@ func StatefulSet(name, namespace string) *StatefulSetApplyConfiguration {
|
||||
// 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 ExtractStatefulSet(statefulSet *apiappsv1.StatefulSet, fieldManager string) (*StatefulSetApplyConfiguration, error) {
|
||||
func ExtractStatefulSet(statefulSet *appsv1.StatefulSet, fieldManager string) (*StatefulSetApplyConfiguration, error) {
|
||||
return extractStatefulSet(statefulSet, fieldManager, "")
|
||||
}
|
||||
|
||||
// ExtractStatefulSetStatus is the same as ExtractStatefulSet except
|
||||
// that it extracts the status subresource applied configuration.
|
||||
// Experimental!
|
||||
func ExtractStatefulSetStatus(statefulSet *apiappsv1.StatefulSet, fieldManager string) (*StatefulSetApplyConfiguration, error) {
|
||||
func ExtractStatefulSetStatus(statefulSet *appsv1.StatefulSet, fieldManager string) (*StatefulSetApplyConfiguration, error) {
|
||||
return extractStatefulSet(statefulSet, fieldManager, "status")
|
||||
}
|
||||
|
||||
func extractStatefulSet(statefulSet *apiappsv1.StatefulSet, fieldManager string, subresource string) (*StatefulSetApplyConfiguration, error) {
|
||||
func extractStatefulSet(statefulSet *appsv1.StatefulSet, fieldManager string, subresource string) (*StatefulSetApplyConfiguration, error) {
|
||||
b := &StatefulSetApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(statefulSet, internal.Parser().Type("io.k8s.api.apps.v1.StatefulSet"), fieldManager, b, subresource)
|
||||
if err != nil {
|
||||
@ -87,7 +87,7 @@ func extractStatefulSet(statefulSet *apiappsv1.StatefulSet, fieldManager string,
|
||||
// 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 *StatefulSetApplyConfiguration) WithKind(value string) *StatefulSetApplyConfiguration {
|
||||
b.Kind = &value
|
||||
b.TypeMetaApplyConfiguration.Kind = &value
|
||||
return b
|
||||
}
|
||||
|
||||
@ -95,7 +95,7 @@ func (b *StatefulSetApplyConfiguration) WithKind(value string) *StatefulSetApply
|
||||
// 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 *StatefulSetApplyConfiguration) WithAPIVersion(value string) *StatefulSetApplyConfiguration {
|
||||
b.APIVersion = &value
|
||||
b.TypeMetaApplyConfiguration.APIVersion = &value
|
||||
return b
|
||||
}
|
||||
|
||||
@ -104,7 +104,7 @@ func (b *StatefulSetApplyConfiguration) WithAPIVersion(value string) *StatefulSe
|
||||
// If called multiple times, the Name field is set to the value of the last call.
|
||||
func (b *StatefulSetApplyConfiguration) WithName(value string) *StatefulSetApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.Name = &value
|
||||
b.ObjectMetaApplyConfiguration.Name = &value
|
||||
return b
|
||||
}
|
||||
|
||||
@ -113,7 +113,7 @@ func (b *StatefulSetApplyConfiguration) WithName(value string) *StatefulSetApply
|
||||
// If called multiple times, the GenerateName field is set to the value of the last call.
|
||||
func (b *StatefulSetApplyConfiguration) WithGenerateName(value string) *StatefulSetApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.GenerateName = &value
|
||||
b.ObjectMetaApplyConfiguration.GenerateName = &value
|
||||
return b
|
||||
}
|
||||
|
||||
@ -122,7 +122,7 @@ func (b *StatefulSetApplyConfiguration) WithGenerateName(value string) *Stateful
|
||||
// If called multiple times, the Namespace field is set to the value of the last call.
|
||||
func (b *StatefulSetApplyConfiguration) WithNamespace(value string) *StatefulSetApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.Namespace = &value
|
||||
b.ObjectMetaApplyConfiguration.Namespace = &value
|
||||
return b
|
||||
}
|
||||
|
||||
@ -131,7 +131,7 @@ func (b *StatefulSetApplyConfiguration) WithNamespace(value string) *StatefulSet
|
||||
// If called multiple times, the UID field is set to the value of the last call.
|
||||
func (b *StatefulSetApplyConfiguration) WithUID(value types.UID) *StatefulSetApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.UID = &value
|
||||
b.ObjectMetaApplyConfiguration.UID = &value
|
||||
return b
|
||||
}
|
||||
|
||||
@ -140,7 +140,7 @@ func (b *StatefulSetApplyConfiguration) WithUID(value types.UID) *StatefulSetApp
|
||||
// If called multiple times, the ResourceVersion field is set to the value of the last call.
|
||||
func (b *StatefulSetApplyConfiguration) WithResourceVersion(value string) *StatefulSetApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.ResourceVersion = &value
|
||||
b.ObjectMetaApplyConfiguration.ResourceVersion = &value
|
||||
return b
|
||||
}
|
||||
|
||||
@ -149,25 +149,25 @@ func (b *StatefulSetApplyConfiguration) WithResourceVersion(value string) *State
|
||||
// If called multiple times, the Generation field is set to the value of the last call.
|
||||
func (b *StatefulSetApplyConfiguration) WithGeneration(value int64) *StatefulSetApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.Generation = &value
|
||||
b.ObjectMetaApplyConfiguration.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 *StatefulSetApplyConfiguration) WithCreationTimestamp(value metav1.Time) *StatefulSetApplyConfiguration {
|
||||
func (b *StatefulSetApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *StatefulSetApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.CreationTimestamp = &value
|
||||
b.ObjectMetaApplyConfiguration.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 *StatefulSetApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *StatefulSetApplyConfiguration {
|
||||
func (b *StatefulSetApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *StatefulSetApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.DeletionTimestamp = &value
|
||||
b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value
|
||||
return b
|
||||
}
|
||||
|
||||
@ -176,7 +176,7 @@ func (b *StatefulSetApplyConfiguration) WithDeletionTimestamp(value metav1.Time)
|
||||
// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call.
|
||||
func (b *StatefulSetApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *StatefulSetApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.DeletionGracePeriodSeconds = &value
|
||||
b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value
|
||||
return b
|
||||
}
|
||||
|
||||
@ -186,11 +186,11 @@ func (b *StatefulSetApplyConfiguration) WithDeletionGracePeriodSeconds(value int
|
||||
// overwriting an existing map entries in Labels field with the same key.
|
||||
func (b *StatefulSetApplyConfiguration) WithLabels(entries map[string]string) *StatefulSetApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
if b.Labels == nil && len(entries) > 0 {
|
||||
b.Labels = make(map[string]string, len(entries))
|
||||
if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 {
|
||||
b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries))
|
||||
}
|
||||
for k, v := range entries {
|
||||
b.Labels[k] = v
|
||||
b.ObjectMetaApplyConfiguration.Labels[k] = v
|
||||
}
|
||||
return b
|
||||
}
|
||||
@ -201,11 +201,11 @@ func (b *StatefulSetApplyConfiguration) WithLabels(entries map[string]string) *S
|
||||
// overwriting an existing map entries in Annotations field with the same key.
|
||||
func (b *StatefulSetApplyConfiguration) WithAnnotations(entries map[string]string) *StatefulSetApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
if b.Annotations == nil && len(entries) > 0 {
|
||||
b.Annotations = make(map[string]string, len(entries))
|
||||
if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 {
|
||||
b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries))
|
||||
}
|
||||
for k, v := range entries {
|
||||
b.Annotations[k] = v
|
||||
b.ObjectMetaApplyConfiguration.Annotations[k] = v
|
||||
}
|
||||
return b
|
||||
}
|
||||
@ -213,13 +213,13 @@ func (b *StatefulSetApplyConfiguration) WithAnnotations(entries map[string]strin
|
||||
// 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 *StatefulSetApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *StatefulSetApplyConfiguration {
|
||||
func (b *StatefulSetApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *StatefulSetApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithOwnerReferences")
|
||||
}
|
||||
b.OwnerReferences = append(b.OwnerReferences, *values[i])
|
||||
b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
@ -230,14 +230,14 @@ func (b *StatefulSetApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerR
|
||||
func (b *StatefulSetApplyConfiguration) WithFinalizers(values ...string) *StatefulSetApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
for i := range values {
|
||||
b.Finalizers = append(b.Finalizers, values[i])
|
||||
b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
func (b *StatefulSetApplyConfiguration) ensureObjectMetaApplyConfigurationExists() {
|
||||
if b.ObjectMetaApplyConfiguration == nil {
|
||||
b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{}
|
||||
b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{}
|
||||
}
|
||||
}
|
||||
|
||||
@ -260,5 +260,5 @@ func (b *StatefulSetApplyConfiguration) WithStatus(value *StatefulSetStatusApply
|
||||
// GetName retrieves the value of the Name field in the declarative configuration.
|
||||
func (b *StatefulSetApplyConfiguration) GetName() *string {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
return b.Name
|
||||
return b.ObjectMetaApplyConfiguration.Name
|
||||
}
|
||||
|
Reference in New Issue
Block a user