Implement API changes necessary for recovery from resize failure

Kubernetes-commit: 63fffd37b1f39a661d00b5ed11097c616850a80d
This commit is contained in:
Hemant Kumar
2021-11-12 11:00:57 -05:00
committed by Kubernetes Publisher
parent 28b1932f62
commit c643e47235
2 changed files with 30 additions and 4 deletions

View File

@@ -25,10 +25,12 @@ import (
// PersistentVolumeClaimStatusApplyConfiguration represents an declarative configuration of the PersistentVolumeClaimStatus type for use
// with apply.
type PersistentVolumeClaimStatusApplyConfiguration struct {
Phase *v1.PersistentVolumeClaimPhase `json:"phase,omitempty"`
AccessModes []v1.PersistentVolumeAccessMode `json:"accessModes,omitempty"`
Capacity *v1.ResourceList `json:"capacity,omitempty"`
Conditions []PersistentVolumeClaimConditionApplyConfiguration `json:"conditions,omitempty"`
Phase *v1.PersistentVolumeClaimPhase `json:"phase,omitempty"`
AccessModes []v1.PersistentVolumeAccessMode `json:"accessModes,omitempty"`
Capacity *v1.ResourceList `json:"capacity,omitempty"`
Conditions []PersistentVolumeClaimConditionApplyConfiguration `json:"conditions,omitempty"`
AllocatedResources *v1.ResourceList `json:"allocatedResources,omitempty"`
ResizeStatus *v1.PersistentVolumeClaimResizeStatus `json:"resizeStatus,omitempty"`
}
// PersistentVolumeClaimStatusApplyConfiguration constructs an declarative configuration of the PersistentVolumeClaimStatus type for use with
@@ -75,3 +77,19 @@ func (b *PersistentVolumeClaimStatusApplyConfiguration) WithConditions(values ..
}
return b
}
// WithAllocatedResources sets the AllocatedResources 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 AllocatedResources field is set to the value of the last call.
func (b *PersistentVolumeClaimStatusApplyConfiguration) WithAllocatedResources(value v1.ResourceList) *PersistentVolumeClaimStatusApplyConfiguration {
b.AllocatedResources = &value
return b
}
// WithResizeStatus sets the ResizeStatus 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 ResizeStatus field is set to the value of the last call.
func (b *PersistentVolumeClaimStatusApplyConfiguration) WithResizeStatus(value v1.PersistentVolumeClaimResizeStatus) *PersistentVolumeClaimStatusApplyConfiguration {
b.ResizeStatus = &value
return b
}

View File

@@ -5291,6 +5291,11 @@ var schemaYAML = typed.YAMLObject(`types:
elementType:
scalar: string
elementRelationship: atomic
- name: allocatedResources
type:
map:
elementType:
namedType: io.k8s.apimachinery.pkg.api.resource.Quantity
- name: capacity
type:
map:
@@ -5307,6 +5312,9 @@ var schemaYAML = typed.YAMLObject(`types:
- name: phase
type:
scalar: string
- name: resizeStatus
type:
scalar: string
- name: io.k8s.api.core.v1.PersistentVolumeClaimTemplate
map:
fields: