mirror of
https://github.com/kubernetes/client-go.git
synced 2026-07-17 01:57:40 +00:00
Merge pull request #138560 from michaelasp/svmGA
Promote SVM to GA Kubernetes-commit: 6e8a59751db53d71701c6610ebe98043fed4ced7
This commit is contained in:
@@ -15769,6 +15769,48 @@ var schemaYAML = typed.YAMLObject(`types:
|
||||
- name: count
|
||||
type:
|
||||
scalar: numeric
|
||||
- name: io.k8s.api.storagemigration.v1.StorageVersionMigration
|
||||
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: io.k8s.api.storagemigration.v1.StorageVersionMigrationSpec
|
||||
default: {}
|
||||
- name: status
|
||||
type:
|
||||
namedType: io.k8s.api.storagemigration.v1.StorageVersionMigrationStatus
|
||||
default: {}
|
||||
- name: io.k8s.api.storagemigration.v1.StorageVersionMigrationSpec
|
||||
map:
|
||||
fields:
|
||||
- name: resource
|
||||
type:
|
||||
namedType: io.k8s.apimachinery.pkg.apis.meta.v1.GroupResource
|
||||
default: {}
|
||||
- name: io.k8s.api.storagemigration.v1.StorageVersionMigrationStatus
|
||||
map:
|
||||
fields:
|
||||
- name: conditions
|
||||
type:
|
||||
list:
|
||||
elementType:
|
||||
namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Condition
|
||||
elementRelationship: associative
|
||||
keys:
|
||||
- type
|
||||
- name: resourceVersion
|
||||
type:
|
||||
scalar: string
|
||||
- name: io.k8s.api.storagemigration.v1beta1.StorageVersionMigration
|
||||
map:
|
||||
fields:
|
||||
|
||||
@@ -0,0 +1,292 @@
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
storagemigrationv1 "k8s.io/api/storagemigration/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"
|
||||
metav1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
// StorageVersionMigrationApplyConfiguration represents a declarative configuration of the StorageVersionMigration type for use
|
||||
// with apply.
|
||||
//
|
||||
// StorageVersionMigration represents a migration of stored data to the latest
|
||||
// storage version.
|
||||
type StorageVersionMigrationApplyConfiguration struct {
|
||||
metav1.TypeMetaApplyConfiguration `json:""`
|
||||
// Standard object metadata.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
|
||||
*metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
|
||||
// Specification of the migration.
|
||||
Spec *StorageVersionMigrationSpecApplyConfiguration `json:"spec,omitempty"`
|
||||
// Status of the migration.
|
||||
Status *StorageVersionMigrationStatusApplyConfiguration `json:"status,omitempty"`
|
||||
}
|
||||
|
||||
// StorageVersionMigration constructs a declarative configuration of the StorageVersionMigration type for use with
|
||||
// apply.
|
||||
func StorageVersionMigration(name string) *StorageVersionMigrationApplyConfiguration {
|
||||
b := &StorageVersionMigrationApplyConfiguration{}
|
||||
b.WithName(name)
|
||||
b.WithKind("StorageVersionMigration")
|
||||
b.WithAPIVersion("storagemigration.k8s.io/v1")
|
||||
return b
|
||||
}
|
||||
|
||||
// ExtractStorageVersionMigrationFrom extracts the applied configuration owned by fieldManager from
|
||||
// storageVersionMigration for the specified subresource. Pass an empty string for subresource to extract
|
||||
// the main resource. Common subresources include "status", "scale", etc.
|
||||
// storageVersionMigration must be a unmodified StorageVersionMigration API object that was retrieved from the Kubernetes API.
|
||||
// ExtractStorageVersionMigrationFrom 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.
|
||||
func ExtractStorageVersionMigrationFrom(storageVersionMigration *storagemigrationv1.StorageVersionMigration, fieldManager string, subresource string) (*StorageVersionMigrationApplyConfiguration, error) {
|
||||
b := &StorageVersionMigrationApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(storageVersionMigration, internal.Parser().Type("io.k8s.api.storagemigration.v1.StorageVersionMigration"), fieldManager, b, subresource)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b.WithName(storageVersionMigration.Name)
|
||||
|
||||
b.WithKind("StorageVersionMigration")
|
||||
b.WithAPIVersion("storagemigration.k8s.io/v1")
|
||||
return b, nil
|
||||
}
|
||||
|
||||
// ExtractStorageVersionMigration extracts the applied configuration owned by fieldManager from
|
||||
// storageVersionMigration. If no managedFields are found in storageVersionMigration for fieldManager, a
|
||||
// StorageVersionMigrationApplyConfiguration 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.
|
||||
// storageVersionMigration must be a unmodified StorageVersionMigration API object that was retrieved from the Kubernetes API.
|
||||
// ExtractStorageVersionMigration 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.
|
||||
func ExtractStorageVersionMigration(storageVersionMigration *storagemigrationv1.StorageVersionMigration, fieldManager string) (*StorageVersionMigrationApplyConfiguration, error) {
|
||||
return ExtractStorageVersionMigrationFrom(storageVersionMigration, fieldManager, "")
|
||||
}
|
||||
|
||||
// ExtractStorageVersionMigrationStatus extracts the applied configuration owned by fieldManager from
|
||||
// storageVersionMigration for the status subresource.
|
||||
func ExtractStorageVersionMigrationStatus(storageVersionMigration *storagemigrationv1.StorageVersionMigration, fieldManager string) (*StorageVersionMigrationApplyConfiguration, error) {
|
||||
return ExtractStorageVersionMigrationFrom(storageVersionMigration, fieldManager, "status")
|
||||
}
|
||||
|
||||
func (b StorageVersionMigrationApplyConfiguration) IsApplyConfiguration() {}
|
||||
|
||||
// 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 *StorageVersionMigrationApplyConfiguration) WithKind(value string) *StorageVersionMigrationApplyConfiguration {
|
||||
b.TypeMetaApplyConfiguration.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 *StorageVersionMigrationApplyConfiguration) WithAPIVersion(value string) *StorageVersionMigrationApplyConfiguration {
|
||||
b.TypeMetaApplyConfiguration.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 *StorageVersionMigrationApplyConfiguration) WithName(value string) *StorageVersionMigrationApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.ObjectMetaApplyConfiguration.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 *StorageVersionMigrationApplyConfiguration) WithGenerateName(value string) *StorageVersionMigrationApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.ObjectMetaApplyConfiguration.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 *StorageVersionMigrationApplyConfiguration) WithNamespace(value string) *StorageVersionMigrationApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.ObjectMetaApplyConfiguration.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 *StorageVersionMigrationApplyConfiguration) WithUID(value types.UID) *StorageVersionMigrationApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.ObjectMetaApplyConfiguration.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 *StorageVersionMigrationApplyConfiguration) WithResourceVersion(value string) *StorageVersionMigrationApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.ObjectMetaApplyConfiguration.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 *StorageVersionMigrationApplyConfiguration) WithGeneration(value int64) *StorageVersionMigrationApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
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 *StorageVersionMigrationApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *StorageVersionMigrationApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
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 *StorageVersionMigrationApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *StorageVersionMigrationApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.ObjectMetaApplyConfiguration.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 *StorageVersionMigrationApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *StorageVersionMigrationApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.ObjectMetaApplyConfiguration.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 *StorageVersionMigrationApplyConfiguration) WithLabels(entries map[string]string) *StorageVersionMigrationApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 {
|
||||
b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries))
|
||||
}
|
||||
for k, v := range entries {
|
||||
b.ObjectMetaApplyConfiguration.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 *StorageVersionMigrationApplyConfiguration) WithAnnotations(entries map[string]string) *StorageVersionMigrationApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 {
|
||||
b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries))
|
||||
}
|
||||
for k, v := range entries {
|
||||
b.ObjectMetaApplyConfiguration.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 *StorageVersionMigrationApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *StorageVersionMigrationApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithOwnerReferences")
|
||||
}
|
||||
b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.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 *StorageVersionMigrationApplyConfiguration) WithFinalizers(values ...string) *StorageVersionMigrationApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
for i := range values {
|
||||
b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
func (b *StorageVersionMigrationApplyConfiguration) ensureObjectMetaApplyConfigurationExists() {
|
||||
if b.ObjectMetaApplyConfiguration == nil {
|
||||
b.ObjectMetaApplyConfiguration = &metav1.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 *StorageVersionMigrationApplyConfiguration) WithSpec(value *StorageVersionMigrationSpecApplyConfiguration) *StorageVersionMigrationApplyConfiguration {
|
||||
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 *StorageVersionMigrationApplyConfiguration) WithStatus(value *StorageVersionMigrationStatusApplyConfiguration) *StorageVersionMigrationApplyConfiguration {
|
||||
b.Status = value
|
||||
return b
|
||||
}
|
||||
|
||||
// GetKind retrieves the value of the Kind field in the declarative configuration.
|
||||
func (b *StorageVersionMigrationApplyConfiguration) GetKind() *string {
|
||||
return b.TypeMetaApplyConfiguration.Kind
|
||||
}
|
||||
|
||||
// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration.
|
||||
func (b *StorageVersionMigrationApplyConfiguration) GetAPIVersion() *string {
|
||||
return b.TypeMetaApplyConfiguration.APIVersion
|
||||
}
|
||||
|
||||
// GetName retrieves the value of the Name field in the declarative configuration.
|
||||
func (b *StorageVersionMigrationApplyConfiguration) GetName() *string {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
return b.ObjectMetaApplyConfiguration.Name
|
||||
}
|
||||
|
||||
// GetNamespace retrieves the value of the Namespace field in the declarative configuration.
|
||||
func (b *StorageVersionMigrationApplyConfiguration) GetNamespace() *string {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
return b.ObjectMetaApplyConfiguration.Namespace
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
metav1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
// StorageVersionMigrationSpecApplyConfiguration represents a declarative configuration of the StorageVersionMigrationSpec type for use
|
||||
// with apply.
|
||||
//
|
||||
// Spec of the storage version migration.
|
||||
type StorageVersionMigrationSpecApplyConfiguration struct {
|
||||
// The resource that is being migrated. The migrator sends requests to
|
||||
// the endpoint serving the resource.
|
||||
// Immutable.
|
||||
Resource *metav1.GroupResourceApplyConfiguration `json:"resource,omitempty"`
|
||||
}
|
||||
|
||||
// StorageVersionMigrationSpecApplyConfiguration constructs a declarative configuration of the StorageVersionMigrationSpec type for use with
|
||||
// apply.
|
||||
func StorageVersionMigrationSpec() *StorageVersionMigrationSpecApplyConfiguration {
|
||||
return &StorageVersionMigrationSpecApplyConfiguration{}
|
||||
}
|
||||
|
||||
// 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 *StorageVersionMigrationSpecApplyConfiguration) WithResource(value *metav1.GroupResourceApplyConfiguration) *StorageVersionMigrationSpecApplyConfiguration {
|
||||
b.Resource = value
|
||||
return b
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
metav1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
// StorageVersionMigrationStatusApplyConfiguration represents a declarative configuration of the StorageVersionMigrationStatus type for use
|
||||
// with apply.
|
||||
//
|
||||
// Status of the storage version migration.
|
||||
type StorageVersionMigrationStatusApplyConfiguration struct {
|
||||
// The latest available observations of the migration's current state.
|
||||
Conditions []metav1.ConditionApplyConfiguration `json:"conditions,omitempty"`
|
||||
// ResourceVersion to compare with the GC cache for performing the migration.
|
||||
// This is the current resource version of given group, version and resource when
|
||||
// kube-controller-manager first observes this StorageVersionMigration resource.
|
||||
ResourceVersion *string `json:"resourceVersion,omitempty"`
|
||||
}
|
||||
|
||||
// StorageVersionMigrationStatusApplyConfiguration constructs a declarative configuration of the StorageVersionMigrationStatus type for use with
|
||||
// apply.
|
||||
func StorageVersionMigrationStatus() *StorageVersionMigrationStatusApplyConfiguration {
|
||||
return &StorageVersionMigrationStatusApplyConfiguration{}
|
||||
}
|
||||
|
||||
// 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 *StorageVersionMigrationStatusApplyConfiguration) WithConditions(values ...*metav1.ConditionApplyConfiguration) *StorageVersionMigrationStatusApplyConfiguration {
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithConditions")
|
||||
}
|
||||
b.Conditions = append(b.Conditions, *values[i])
|
||||
}
|
||||
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 *StorageVersionMigrationStatusApplyConfiguration) WithResourceVersion(value string) *StorageVersionMigrationStatusApplyConfiguration {
|
||||
b.ResourceVersion = &value
|
||||
return b
|
||||
}
|
||||
@@ -67,6 +67,7 @@ import (
|
||||
storagev1 "k8s.io/api/storage/v1"
|
||||
storagev1alpha1 "k8s.io/api/storage/v1alpha1"
|
||||
storagev1beta1 "k8s.io/api/storage/v1beta1"
|
||||
storagemigrationv1 "k8s.io/api/storagemigration/v1"
|
||||
storagemigrationv1beta1 "k8s.io/api/storagemigration/v1beta1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
@@ -122,6 +123,7 @@ import (
|
||||
applyconfigurationsstoragev1 "k8s.io/client-go/applyconfigurations/storage/v1"
|
||||
applyconfigurationsstoragev1alpha1 "k8s.io/client-go/applyconfigurations/storage/v1alpha1"
|
||||
applyconfigurationsstoragev1beta1 "k8s.io/client-go/applyconfigurations/storage/v1beta1"
|
||||
applyconfigurationsstoragemigrationv1 "k8s.io/client-go/applyconfigurations/storagemigration/v1"
|
||||
applyconfigurationsstoragemigrationv1beta1 "k8s.io/client-go/applyconfigurations/storagemigration/v1beta1"
|
||||
)
|
||||
|
||||
@@ -1965,6 +1967,14 @@ func ForKind(kind schema.GroupVersionKind) interface{} {
|
||||
case storagev1beta1.SchemeGroupVersion.WithKind("VolumeNodeResources"):
|
||||
return &applyconfigurationsstoragev1beta1.VolumeNodeResourcesApplyConfiguration{}
|
||||
|
||||
// Group=storagemigration.k8s.io, Version=v1
|
||||
case storagemigrationv1.SchemeGroupVersion.WithKind("StorageVersionMigration"):
|
||||
return &applyconfigurationsstoragemigrationv1.StorageVersionMigrationApplyConfiguration{}
|
||||
case storagemigrationv1.SchemeGroupVersion.WithKind("StorageVersionMigrationSpec"):
|
||||
return &applyconfigurationsstoragemigrationv1.StorageVersionMigrationSpecApplyConfiguration{}
|
||||
case storagemigrationv1.SchemeGroupVersion.WithKind("StorageVersionMigrationStatus"):
|
||||
return &applyconfigurationsstoragemigrationv1.StorageVersionMigrationStatusApplyConfiguration{}
|
||||
|
||||
// Group=storagemigration.k8s.io, Version=v1beta1
|
||||
case storagemigrationv1beta1.SchemeGroupVersion.WithKind("StorageVersionMigration"):
|
||||
return &applyconfigurationsstoragemigrationv1beta1.StorageVersionMigrationApplyConfiguration{}
|
||||
|
||||
2
go.mod
2
go.mod
@@ -23,7 +23,7 @@ require (
|
||||
golang.org/x/time v0.15.0
|
||||
google.golang.org/protobuf v1.36.12-0.20260120151049-f2248ac996af
|
||||
gopkg.in/evanphx/json-patch.v4 v4.13.0
|
||||
k8s.io/api v0.0.0-20260708015948-643f0cd3c4da
|
||||
k8s.io/api v0.0.0-20260708015949-94f17a687154
|
||||
k8s.io/apimachinery v0.0.0-20260708015502-54f40c0d9f0b
|
||||
k8s.io/klog/v2 v2.140.0
|
||||
k8s.io/kube-openapi v0.0.0-20260618221249-bc653b64f974
|
||||
|
||||
4
go.sum
4
go.sum
@@ -118,8 +118,8 @@ gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc=
|
||||
gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw=
|
||||
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
||||
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
k8s.io/api v0.0.0-20260708015948-643f0cd3c4da h1:JcT6PF8kmr29DCKcYVzP6t2d0naFY3LqW5+IZ8Y918U=
|
||||
k8s.io/api v0.0.0-20260708015948-643f0cd3c4da/go.mod h1:sTejgfx4mv45PAqMVmygll46Uahae0jKMnP2iaPEH+Q=
|
||||
k8s.io/api v0.0.0-20260708015949-94f17a687154 h1:G29bMzdl4p7ry0pVV+oppQUG9EofWSukp1tJ26mcl8A=
|
||||
k8s.io/api v0.0.0-20260708015949-94f17a687154/go.mod h1:sTejgfx4mv45PAqMVmygll46Uahae0jKMnP2iaPEH+Q=
|
||||
k8s.io/apimachinery v0.0.0-20260708015502-54f40c0d9f0b h1:qEKe/madwZpQ2IKk3q8LMdQMlTYYlHtbuA04tRm1ZmQ=
|
||||
k8s.io/apimachinery v0.0.0-20260708015502-54f40c0d9f0b/go.mod h1:IeOBop4d7GmFHoiUEvaNkqUj+XwdQs3RoqyOLtpj4Ok=
|
||||
k8s.io/klog/v2 v2.140.0 h1:Tf+J3AH7xnUzZyVVXhTgGhEKnFqye14aadWv7bzXdzc=
|
||||
|
||||
@@ -68,6 +68,7 @@ import (
|
||||
storagev1 "k8s.io/api/storage/v1"
|
||||
storagev1alpha1 "k8s.io/api/storage/v1alpha1"
|
||||
storagev1beta1 "k8s.io/api/storage/v1beta1"
|
||||
storagemigrationv1 "k8s.io/api/storagemigration/v1"
|
||||
storagemigrationv1beta1 "k8s.io/api/storagemigration/v1beta1"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
@@ -469,6 +470,10 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource
|
||||
case storagev1beta1.SchemeGroupVersion.WithResource("volumeattributesclasses"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Storage().V1beta1().VolumeAttributesClasses().Informer()}, nil
|
||||
|
||||
// Group=storagemigration.k8s.io, Version=v1
|
||||
case storagemigrationv1.SchemeGroupVersion.WithResource("storageversionmigrations"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Storagemigration().V1().StorageVersionMigrations().Informer()}, nil
|
||||
|
||||
// Group=storagemigration.k8s.io, Version=v1beta1
|
||||
case storagemigrationv1beta1.SchemeGroupVersion.WithResource("storageversionmigrations"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Storagemigration().V1beta1().StorageVersionMigrations().Informer()}, nil
|
||||
|
||||
@@ -20,11 +20,14 @@ package storagemigration
|
||||
|
||||
import (
|
||||
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
|
||||
v1 "k8s.io/client-go/informers/storagemigration/v1"
|
||||
v1beta1 "k8s.io/client-go/informers/storagemigration/v1beta1"
|
||||
)
|
||||
|
||||
// Interface provides access to each of this group's versions.
|
||||
type Interface interface {
|
||||
// V1 provides access to shared informers for resources in V1.
|
||||
V1() v1.Interface
|
||||
// V1beta1 provides access to shared informers for resources in V1beta1.
|
||||
V1beta1() v1beta1.Interface
|
||||
}
|
||||
@@ -40,6 +43,11 @@ func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakList
|
||||
return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
|
||||
}
|
||||
|
||||
// V1 returns a new v1.Interface.
|
||||
func (g *group) V1() v1.Interface {
|
||||
return v1.New(g.factory, g.namespace, g.tweakListOptions)
|
||||
}
|
||||
|
||||
// V1beta1 returns a new v1beta1.Interface.
|
||||
func (g *group) V1beta1() v1beta1.Interface {
|
||||
return v1beta1.New(g.factory, g.namespace, g.tweakListOptions)
|
||||
|
||||
45
informers/storagemigration/v1/interface.go
Normal file
45
informers/storagemigration/v1/interface.go
Normal file
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by informer-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
|
||||
)
|
||||
|
||||
// Interface provides access to all the informers in this group version.
|
||||
type Interface interface {
|
||||
// StorageVersionMigrations returns a StorageVersionMigrationInformer.
|
||||
StorageVersionMigrations() StorageVersionMigrationInformer
|
||||
}
|
||||
|
||||
type version struct {
|
||||
factory internalinterfaces.SharedInformerFactory
|
||||
namespace string
|
||||
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
||||
}
|
||||
|
||||
// New returns a new Interface.
|
||||
func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface {
|
||||
return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
|
||||
}
|
||||
|
||||
// StorageVersionMigrations returns a StorageVersionMigrationInformer.
|
||||
func (v *version) StorageVersionMigrations() StorageVersionMigrationInformer {
|
||||
return &storageVersionMigrationInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}
|
||||
}
|
||||
115
informers/storagemigration/v1/storageversionmigration.go
Normal file
115
informers/storagemigration/v1/storageversionmigration.go
Normal file
@@ -0,0 +1,115 @@
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by informer-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
context "context"
|
||||
time "time"
|
||||
|
||||
apistoragemigrationv1 "k8s.io/api/storagemigration/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
|
||||
kubernetes "k8s.io/client-go/kubernetes"
|
||||
storagemigrationv1 "k8s.io/client-go/listers/storagemigration/v1"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
||||
// StorageVersionMigrationInformer provides access to a shared informer and lister for
|
||||
// StorageVersionMigrations.
|
||||
type StorageVersionMigrationInformer interface {
|
||||
Informer() cache.SharedIndexInformer
|
||||
Lister() storagemigrationv1.StorageVersionMigrationLister
|
||||
}
|
||||
|
||||
type storageVersionMigrationInformer struct {
|
||||
factory internalinterfaces.SharedInformerFactory
|
||||
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
||||
}
|
||||
|
||||
// NewStorageVersionMigrationInformer constructs a new informer for StorageVersionMigration 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 NewStorageVersionMigrationInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
|
||||
return NewStorageVersionMigrationInformerWithOptions(client, internalinterfaces.InformerOptions{ResyncPeriod: resyncPeriod, Indexers: indexers})
|
||||
}
|
||||
|
||||
// NewFilteredStorageVersionMigrationInformer constructs a new informer for StorageVersionMigration 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 NewFilteredStorageVersionMigrationInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
|
||||
return NewStorageVersionMigrationInformerWithOptions(client, internalinterfaces.InformerOptions{ResyncPeriod: resyncPeriod, Indexers: indexers, TweakListOptions: tweakListOptions})
|
||||
}
|
||||
|
||||
// NewStorageVersionMigrationInformerWithOptions constructs a new informer for StorageVersionMigration type with additional options.
|
||||
// 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 NewStorageVersionMigrationInformerWithOptions(client kubernetes.Interface, options internalinterfaces.InformerOptions) cache.SharedIndexInformer {
|
||||
gvr := schema.GroupVersionResource{Group: "storagemigration.k8s.io", Version: "v1", Resource: "storageversionmigrations"}
|
||||
identifier := options.InformerName.WithResource(gvr)
|
||||
tweakListOptions := options.TweakListOptions
|
||||
return cache.NewSharedIndexInformerWithOptions(
|
||||
cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{
|
||||
ListFunc: func(opts metav1.ListOptions) (runtime.Object, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&opts)
|
||||
}
|
||||
return client.StoragemigrationV1().StorageVersionMigrations().List(context.Background(), opts)
|
||||
},
|
||||
WatchFunc: func(opts metav1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&opts)
|
||||
}
|
||||
return client.StoragemigrationV1().StorageVersionMigrations().Watch(context.Background(), opts)
|
||||
},
|
||||
ListWithContextFunc: func(ctx context.Context, opts metav1.ListOptions) (runtime.Object, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&opts)
|
||||
}
|
||||
return client.StoragemigrationV1().StorageVersionMigrations().List(ctx, opts)
|
||||
},
|
||||
WatchFuncWithContext: func(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&opts)
|
||||
}
|
||||
return client.StoragemigrationV1().StorageVersionMigrations().Watch(ctx, opts)
|
||||
},
|
||||
}, client),
|
||||
&apistoragemigrationv1.StorageVersionMigration{},
|
||||
cache.SharedIndexInformerOptions{
|
||||
ResyncPeriod: options.ResyncPeriod,
|
||||
Indexers: options.Indexers,
|
||||
Identifier: identifier,
|
||||
},
|
||||
)
|
||||
}
|
||||
|
||||
func (f *storageVersionMigrationInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||
return NewStorageVersionMigrationInformerWithOptions(client, internalinterfaces.InformerOptions{ResyncPeriod: resyncPeriod, Indexers: cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, InformerName: f.factory.InformerName(), TweakListOptions: f.tweakListOptions})
|
||||
}
|
||||
|
||||
func (f *storageVersionMigrationInformer) Informer() cache.SharedIndexInformer {
|
||||
return f.factory.InformerFor(&apistoragemigrationv1.StorageVersionMigration{}, f.defaultInformer)
|
||||
}
|
||||
|
||||
func (f *storageVersionMigrationInformer) Lister() storagemigrationv1.StorageVersionMigrationLister {
|
||||
return storagemigrationv1.NewStorageVersionMigrationLister(f.Informer().GetIndexer())
|
||||
}
|
||||
@@ -75,6 +75,7 @@ import (
|
||||
storagev1 "k8s.io/client-go/kubernetes/typed/storage/v1"
|
||||
storagev1alpha1 "k8s.io/client-go/kubernetes/typed/storage/v1alpha1"
|
||||
storagev1beta1 "k8s.io/client-go/kubernetes/typed/storage/v1beta1"
|
||||
storagemigrationv1 "k8s.io/client-go/kubernetes/typed/storagemigration/v1"
|
||||
storagemigrationv1beta1 "k8s.io/client-go/kubernetes/typed/storagemigration/v1beta1"
|
||||
rest "k8s.io/client-go/rest"
|
||||
flowcontrol "k8s.io/client-go/util/flowcontrol"
|
||||
@@ -134,6 +135,7 @@ type Interface interface {
|
||||
StorageV1beta1() storagev1beta1.StorageV1beta1Interface
|
||||
StorageV1() storagev1.StorageV1Interface
|
||||
StorageV1alpha1() storagev1alpha1.StorageV1alpha1Interface
|
||||
StoragemigrationV1() storagemigrationv1.StoragemigrationV1Interface
|
||||
StoragemigrationV1beta1() storagemigrationv1beta1.StoragemigrationV1beta1Interface
|
||||
}
|
||||
|
||||
@@ -192,6 +194,7 @@ type Clientset struct {
|
||||
storageV1beta1 *storagev1beta1.StorageV1beta1Client
|
||||
storageV1 *storagev1.StorageV1Client
|
||||
storageV1alpha1 *storagev1alpha1.StorageV1alpha1Client
|
||||
storagemigrationV1 *storagemigrationv1.StoragemigrationV1Client
|
||||
storagemigrationV1beta1 *storagemigrationv1beta1.StoragemigrationV1beta1Client
|
||||
}
|
||||
|
||||
@@ -455,6 +458,11 @@ func (c *Clientset) StorageV1alpha1() storagev1alpha1.StorageV1alpha1Interface {
|
||||
return c.storageV1alpha1
|
||||
}
|
||||
|
||||
// StoragemigrationV1 retrieves the StoragemigrationV1Client
|
||||
func (c *Clientset) StoragemigrationV1() storagemigrationv1.StoragemigrationV1Interface {
|
||||
return c.storagemigrationV1
|
||||
}
|
||||
|
||||
// StoragemigrationV1beta1 retrieves the StoragemigrationV1beta1Client
|
||||
func (c *Clientset) StoragemigrationV1beta1() storagemigrationv1beta1.StoragemigrationV1beta1Interface {
|
||||
return c.storagemigrationV1beta1
|
||||
@@ -712,6 +720,10 @@ func NewForConfigAndClient(c *rest.Config, httpClient *http.Client) (*Clientset,
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
cs.storagemigrationV1, err = storagemigrationv1.NewForConfigAndClient(&configShallowCopy, httpClient)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
cs.storagemigrationV1beta1, err = storagemigrationv1beta1.NewForConfigAndClient(&configShallowCopy, httpClient)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -789,6 +801,7 @@ func New(c rest.Interface) *Clientset {
|
||||
cs.storageV1beta1 = storagev1beta1.New(c)
|
||||
cs.storageV1 = storagev1.New(c)
|
||||
cs.storageV1alpha1 = storagev1alpha1.New(c)
|
||||
cs.storagemigrationV1 = storagemigrationv1.New(c)
|
||||
cs.storagemigrationV1beta1 = storagemigrationv1beta1.New(c)
|
||||
|
||||
cs.DiscoveryClient = discovery.NewDiscoveryClient(c)
|
||||
|
||||
@@ -130,6 +130,8 @@ import (
|
||||
fakestoragev1alpha1 "k8s.io/client-go/kubernetes/typed/storage/v1alpha1/fake"
|
||||
storagev1beta1 "k8s.io/client-go/kubernetes/typed/storage/v1beta1"
|
||||
fakestoragev1beta1 "k8s.io/client-go/kubernetes/typed/storage/v1beta1/fake"
|
||||
storagemigrationv1 "k8s.io/client-go/kubernetes/typed/storagemigration/v1"
|
||||
fakestoragemigrationv1 "k8s.io/client-go/kubernetes/typed/storagemigration/v1/fake"
|
||||
storagemigrationv1beta1 "k8s.io/client-go/kubernetes/typed/storagemigration/v1beta1"
|
||||
fakestoragemigrationv1beta1 "k8s.io/client-go/kubernetes/typed/storagemigration/v1beta1/fake"
|
||||
"k8s.io/client-go/testing"
|
||||
@@ -500,6 +502,11 @@ func (c *Clientset) StorageV1alpha1() storagev1alpha1.StorageV1alpha1Interface {
|
||||
return &fakestoragev1alpha1.FakeStorageV1alpha1{Fake: &c.Fake}
|
||||
}
|
||||
|
||||
// StoragemigrationV1 retrieves the StoragemigrationV1Client
|
||||
func (c *Clientset) StoragemigrationV1() storagemigrationv1.StoragemigrationV1Interface {
|
||||
return &fakestoragemigrationv1.FakeStoragemigrationV1{Fake: &c.Fake}
|
||||
}
|
||||
|
||||
// StoragemigrationV1beta1 retrieves the StoragemigrationV1beta1Client
|
||||
func (c *Clientset) StoragemigrationV1beta1() storagemigrationv1beta1.StoragemigrationV1beta1Interface {
|
||||
return &fakestoragemigrationv1beta1.FakeStoragemigrationV1beta1{Fake: &c.Fake}
|
||||
|
||||
@@ -71,6 +71,7 @@ import (
|
||||
storagev1 "k8s.io/api/storage/v1"
|
||||
storagev1alpha1 "k8s.io/api/storage/v1alpha1"
|
||||
storagev1beta1 "k8s.io/api/storage/v1beta1"
|
||||
storagemigrationv1 "k8s.io/api/storagemigration/v1"
|
||||
storagemigrationv1beta1 "k8s.io/api/storagemigration/v1beta1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
@@ -135,6 +136,7 @@ var localSchemeBuilder = runtime.SchemeBuilder{
|
||||
storagev1beta1.AddToScheme,
|
||||
storagev1.AddToScheme,
|
||||
storagev1alpha1.AddToScheme,
|
||||
storagemigrationv1.AddToScheme,
|
||||
storagemigrationv1beta1.AddToScheme,
|
||||
}
|
||||
|
||||
|
||||
@@ -71,6 +71,7 @@ import (
|
||||
storagev1 "k8s.io/api/storage/v1"
|
||||
storagev1alpha1 "k8s.io/api/storage/v1alpha1"
|
||||
storagev1beta1 "k8s.io/api/storage/v1beta1"
|
||||
storagemigrationv1 "k8s.io/api/storagemigration/v1"
|
||||
storagemigrationv1beta1 "k8s.io/api/storagemigration/v1beta1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
@@ -135,6 +136,7 @@ var localSchemeBuilder = runtime.SchemeBuilder{
|
||||
storagev1beta1.AddToScheme,
|
||||
storagev1.AddToScheme,
|
||||
storagev1alpha1.AddToScheme,
|
||||
storagemigrationv1.AddToScheme,
|
||||
storagemigrationv1beta1.AddToScheme,
|
||||
}
|
||||
|
||||
|
||||
20
kubernetes/typed/storagemigration/v1/doc.go
Normal file
20
kubernetes/typed/storagemigration/v1/doc.go
Normal file
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
// This package has the automatically generated typed clients.
|
||||
package v1
|
||||
20
kubernetes/typed/storagemigration/v1/fake/doc.go
Normal file
20
kubernetes/typed/storagemigration/v1/fake/doc.go
Normal file
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
// Package fake has the automatically generated clients.
|
||||
package fake
|
||||
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
v1 "k8s.io/client-go/kubernetes/typed/storagemigration/v1"
|
||||
rest "k8s.io/client-go/rest"
|
||||
testing "k8s.io/client-go/testing"
|
||||
)
|
||||
|
||||
type FakeStoragemigrationV1 struct {
|
||||
*testing.Fake
|
||||
}
|
||||
|
||||
func (c *FakeStoragemigrationV1) StorageVersionMigrations() v1.StorageVersionMigrationInterface {
|
||||
return newFakeStorageVersionMigrations(c)
|
||||
}
|
||||
|
||||
// RESTClient returns a RESTClient that is used to communicate
|
||||
// with API server by this client implementation.
|
||||
func (c *FakeStoragemigrationV1) RESTClient() rest.Interface {
|
||||
var ret *rest.RESTClient
|
||||
return ret
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
v1 "k8s.io/api/storagemigration/v1"
|
||||
storagemigrationv1 "k8s.io/client-go/applyconfigurations/storagemigration/v1"
|
||||
gentype "k8s.io/client-go/gentype"
|
||||
typedstoragemigrationv1 "k8s.io/client-go/kubernetes/typed/storagemigration/v1"
|
||||
)
|
||||
|
||||
// fakeStorageVersionMigrations implements StorageVersionMigrationInterface
|
||||
type fakeStorageVersionMigrations struct {
|
||||
*gentype.FakeClientWithListAndApply[*v1.StorageVersionMigration, *v1.StorageVersionMigrationList, *storagemigrationv1.StorageVersionMigrationApplyConfiguration]
|
||||
Fake *FakeStoragemigrationV1
|
||||
}
|
||||
|
||||
func newFakeStorageVersionMigrations(fake *FakeStoragemigrationV1) typedstoragemigrationv1.StorageVersionMigrationInterface {
|
||||
return &fakeStorageVersionMigrations{
|
||||
gentype.NewFakeClientWithListAndApply[*v1.StorageVersionMigration, *v1.StorageVersionMigrationList, *storagemigrationv1.StorageVersionMigrationApplyConfiguration](
|
||||
fake.Fake,
|
||||
"",
|
||||
v1.SchemeGroupVersion.WithResource("storageversionmigrations"),
|
||||
v1.SchemeGroupVersion.WithKind("StorageVersionMigration"),
|
||||
func() *v1.StorageVersionMigration { return &v1.StorageVersionMigration{} },
|
||||
func() *v1.StorageVersionMigrationList { return &v1.StorageVersionMigrationList{} },
|
||||
func(dst, src *v1.StorageVersionMigrationList) { dst.ListMeta = src.ListMeta },
|
||||
func(list *v1.StorageVersionMigrationList) []*v1.StorageVersionMigration {
|
||||
return gentype.ToPointerSlice(list.Items)
|
||||
},
|
||||
func(list *v1.StorageVersionMigrationList, items []*v1.StorageVersionMigration) {
|
||||
list.Items = gentype.FromPointerSlice(items)
|
||||
},
|
||||
),
|
||||
fake,
|
||||
}
|
||||
}
|
||||
21
kubernetes/typed/storagemigration/v1/generated_expansion.go
Normal file
21
kubernetes/typed/storagemigration/v1/generated_expansion.go
Normal file
@@ -0,0 +1,21 @@
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
type StorageVersionMigrationExpansion interface{}
|
||||
101
kubernetes/typed/storagemigration/v1/storagemigration_client.go
Normal file
101
kubernetes/typed/storagemigration/v1/storagemigration_client.go
Normal file
@@ -0,0 +1,101 @@
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
http "net/http"
|
||||
|
||||
storagemigrationv1 "k8s.io/api/storagemigration/v1"
|
||||
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||
rest "k8s.io/client-go/rest"
|
||||
)
|
||||
|
||||
type StoragemigrationV1Interface interface {
|
||||
RESTClient() rest.Interface
|
||||
StorageVersionMigrationsGetter
|
||||
}
|
||||
|
||||
// StoragemigrationV1Client is used to interact with features provided by the storagemigration.k8s.io group.
|
||||
type StoragemigrationV1Client struct {
|
||||
restClient rest.Interface
|
||||
}
|
||||
|
||||
func (c *StoragemigrationV1Client) StorageVersionMigrations() StorageVersionMigrationInterface {
|
||||
return newStorageVersionMigrations(c)
|
||||
}
|
||||
|
||||
// NewForConfig creates a new StoragemigrationV1Client for the given config.
|
||||
// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient),
|
||||
// where httpClient was generated with rest.HTTPClientFor(c).
|
||||
func NewForConfig(c *rest.Config) (*StoragemigrationV1Client, error) {
|
||||
config := *c
|
||||
setConfigDefaults(&config)
|
||||
httpClient, err := rest.HTTPClientFor(&config)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return NewForConfigAndClient(&config, httpClient)
|
||||
}
|
||||
|
||||
// NewForConfigAndClient creates a new StoragemigrationV1Client for the given config and http client.
|
||||
// Note the http client provided takes precedence over the configured transport values.
|
||||
func NewForConfigAndClient(c *rest.Config, h *http.Client) (*StoragemigrationV1Client, error) {
|
||||
config := *c
|
||||
setConfigDefaults(&config)
|
||||
client, err := rest.RESTClientForConfigAndClient(&config, h)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &StoragemigrationV1Client{client}, nil
|
||||
}
|
||||
|
||||
// NewForConfigOrDie creates a new StoragemigrationV1Client for the given config and
|
||||
// panics if there is an error in the config.
|
||||
func NewForConfigOrDie(c *rest.Config) *StoragemigrationV1Client {
|
||||
client, err := NewForConfig(c)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
return client
|
||||
}
|
||||
|
||||
// New creates a new StoragemigrationV1Client for the given RESTClient.
|
||||
func New(c rest.Interface) *StoragemigrationV1Client {
|
||||
return &StoragemigrationV1Client{c}
|
||||
}
|
||||
|
||||
func setConfigDefaults(config *rest.Config) {
|
||||
gv := storagemigrationv1.SchemeGroupVersion
|
||||
config.GroupVersion = &gv
|
||||
config.APIPath = "/apis"
|
||||
config.NegotiatedSerializer = rest.CodecFactoryForGeneratedClient(scheme.Scheme, scheme.Codecs).WithoutConversion()
|
||||
|
||||
if config.UserAgent == "" {
|
||||
config.UserAgent = rest.DefaultKubernetesUserAgent()
|
||||
}
|
||||
}
|
||||
|
||||
// RESTClient returns a RESTClient that is used to communicate
|
||||
// with API server by this client implementation.
|
||||
func (c *StoragemigrationV1Client) RESTClient() rest.Interface {
|
||||
if c == nil {
|
||||
return nil
|
||||
}
|
||||
return c.restClient
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
context "context"
|
||||
|
||||
storagemigrationv1 "k8s.io/api/storagemigration/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
applyconfigurationsstoragemigrationv1 "k8s.io/client-go/applyconfigurations/storagemigration/v1"
|
||||
gentype "k8s.io/client-go/gentype"
|
||||
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||
)
|
||||
|
||||
// StorageVersionMigrationsGetter has a method to return a StorageVersionMigrationInterface.
|
||||
// A group's client should implement this interface.
|
||||
type StorageVersionMigrationsGetter interface {
|
||||
StorageVersionMigrations() StorageVersionMigrationInterface
|
||||
}
|
||||
|
||||
// StorageVersionMigrationInterface has methods to work with StorageVersionMigration resources.
|
||||
type StorageVersionMigrationInterface interface {
|
||||
Create(ctx context.Context, storageVersionMigration *storagemigrationv1.StorageVersionMigration, opts metav1.CreateOptions) (*storagemigrationv1.StorageVersionMigration, error)
|
||||
Update(ctx context.Context, storageVersionMigration *storagemigrationv1.StorageVersionMigration, opts metav1.UpdateOptions) (*storagemigrationv1.StorageVersionMigration, error)
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
UpdateStatus(ctx context.Context, storageVersionMigration *storagemigrationv1.StorageVersionMigration, opts metav1.UpdateOptions) (*storagemigrationv1.StorageVersionMigration, error)
|
||||
Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error
|
||||
Get(ctx context.Context, name string, opts metav1.GetOptions) (*storagemigrationv1.StorageVersionMigration, error)
|
||||
List(ctx context.Context, opts metav1.ListOptions) (*storagemigrationv1.StorageVersionMigrationList, error)
|
||||
Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error)
|
||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *storagemigrationv1.StorageVersionMigration, err error)
|
||||
Apply(ctx context.Context, storageVersionMigration *applyconfigurationsstoragemigrationv1.StorageVersionMigrationApplyConfiguration, opts metav1.ApplyOptions) (result *storagemigrationv1.StorageVersionMigration, err error)
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus().
|
||||
ApplyStatus(ctx context.Context, storageVersionMigration *applyconfigurationsstoragemigrationv1.StorageVersionMigrationApplyConfiguration, opts metav1.ApplyOptions) (result *storagemigrationv1.StorageVersionMigration, err error)
|
||||
StorageVersionMigrationExpansion
|
||||
}
|
||||
|
||||
// storageVersionMigrations implements StorageVersionMigrationInterface
|
||||
type storageVersionMigrations struct {
|
||||
*gentype.ClientWithListAndApply[*storagemigrationv1.StorageVersionMigration, *storagemigrationv1.StorageVersionMigrationList, *applyconfigurationsstoragemigrationv1.StorageVersionMigrationApplyConfiguration]
|
||||
}
|
||||
|
||||
// newStorageVersionMigrations returns a StorageVersionMigrations
|
||||
func newStorageVersionMigrations(c *StoragemigrationV1Client) *storageVersionMigrations {
|
||||
return &storageVersionMigrations{
|
||||
gentype.NewClientWithListAndApply[*storagemigrationv1.StorageVersionMigration, *storagemigrationv1.StorageVersionMigrationList, *applyconfigurationsstoragemigrationv1.StorageVersionMigrationApplyConfiguration](
|
||||
"storageversionmigrations",
|
||||
c.RESTClient(),
|
||||
scheme.ParameterCodec,
|
||||
"",
|
||||
func() *storagemigrationv1.StorageVersionMigration {
|
||||
return &storagemigrationv1.StorageVersionMigration{}
|
||||
},
|
||||
func() *storagemigrationv1.StorageVersionMigrationList {
|
||||
return &storagemigrationv1.StorageVersionMigrationList{}
|
||||
},
|
||||
gentype.PrefersProtobuf[*storagemigrationv1.StorageVersionMigration](),
|
||||
),
|
||||
}
|
||||
}
|
||||
23
listers/storagemigration/v1/expansion_generated.go
Normal file
23
listers/storagemigration/v1/expansion_generated.go
Normal file
@@ -0,0 +1,23 @@
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by lister-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
// StorageVersionMigrationListerExpansion allows custom methods to be added to
|
||||
// StorageVersionMigrationLister.
|
||||
type StorageVersionMigrationListerExpansion interface{}
|
||||
48
listers/storagemigration/v1/storageversionmigration.go
Normal file
48
listers/storagemigration/v1/storageversionmigration.go
Normal file
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by lister-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
storagemigrationv1 "k8s.io/api/storagemigration/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
listers "k8s.io/client-go/listers"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
||||
// StorageVersionMigrationLister helps list StorageVersionMigrations.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type StorageVersionMigrationLister interface {
|
||||
// List lists all StorageVersionMigrations in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*storagemigrationv1.StorageVersionMigration, err error)
|
||||
// Get retrieves the StorageVersionMigration from the index for a given name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*storagemigrationv1.StorageVersionMigration, error)
|
||||
StorageVersionMigrationListerExpansion
|
||||
}
|
||||
|
||||
// storageVersionMigrationLister implements the StorageVersionMigrationLister interface.
|
||||
type storageVersionMigrationLister struct {
|
||||
listers.ResourceIndexer[*storagemigrationv1.StorageVersionMigration]
|
||||
}
|
||||
|
||||
// NewStorageVersionMigrationLister returns a new StorageVersionMigrationLister.
|
||||
func NewStorageVersionMigrationLister(indexer cache.Indexer) StorageVersionMigrationLister {
|
||||
return &storageVersionMigrationLister{listers.New[*storagemigrationv1.StorageVersionMigration](indexer, storagemigrationv1.Resource("storageversionmigration"))}
|
||||
}
|
||||
Reference in New Issue
Block a user