mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 10:33:35 +00:00
rebase: bump the golang-dependencies group with 1 update
Bumps the golang-dependencies group with 1 update: [golang.org/x/crypto](https://github.com/golang/crypto). Updates `golang.org/x/crypto` from 0.16.0 to 0.17.0 - [Commits](https://github.com/golang/crypto/compare/v0.16.0...v0.17.0) --- updated-dependencies: - dependency-name: golang.org/x/crypto dependency-type: direct:production update-type: version-update:semver-minor dependency-group: golang-dependencies ... Signed-off-by: dependabot[bot] <support@github.com>
This commit is contained in:
committed by
mergify[bot]
parent
1ad79314f9
commit
e5d9b68d36
24
vendor/k8s.io/kubernetes/pkg/apis/batch/types.go
generated
vendored
24
vendor/k8s.io/kubernetes/pkg/apis/batch/types.go
generated
vendored
@ -129,7 +129,7 @@ const (
|
||||
// This is an action which might be taken on a pod failure - mark the
|
||||
// Job's index as failed to avoid restarts within this index. This action
|
||||
// can only be used when backoffLimitPerIndex is set.
|
||||
// This value is alpha-level.
|
||||
// This value is beta-level.
|
||||
PodFailurePolicyActionFailIndex PodFailurePolicyAction = "FailIndex"
|
||||
|
||||
// This is an action which might be taken on a pod failure - the counter towards
|
||||
@ -306,8 +306,8 @@ type JobSpec struct {
|
||||
// batch.kubernetes.io/job-index-failure-count annotation. It can only
|
||||
// be set when Job's completionMode=Indexed, and the Pod's restart
|
||||
// policy is Never. The field is immutable.
|
||||
// This field is alpha-level. It can be used when the `JobBackoffLimitPerIndex`
|
||||
// feature gate is enabled (disabled by default).
|
||||
// This field is beta-level. It can be used when the `JobBackoffLimitPerIndex`
|
||||
// feature gate is enabled (enabled by default).
|
||||
// +optional
|
||||
BackoffLimitPerIndex *int32
|
||||
|
||||
@ -319,8 +319,8 @@ type JobSpec struct {
|
||||
// It can only be specified when backoffLimitPerIndex is set.
|
||||
// It can be null or up to completions. It is required and must be
|
||||
// less than or equal to 10^4 when is completions greater than 10^5.
|
||||
// This field is alpha-level. It can be used when the `JobBackoffLimitPerIndex`
|
||||
// feature gate is enabled (disabled by default).
|
||||
// This field is beta-level. It can be used when the `JobBackoffLimitPerIndex`
|
||||
// feature gate is enabled (enabled by default).
|
||||
// +optional
|
||||
MaxFailedIndexes *int32
|
||||
|
||||
@ -405,7 +405,8 @@ type JobSpec struct {
|
||||
//
|
||||
// When using podFailurePolicy, Failed is the the only allowed value.
|
||||
// TerminatingOrFailed and Failed are allowed values when podFailurePolicy is not in use.
|
||||
// This is an alpha field. Enable JobPodReplacementPolicy to be able to use this field.
|
||||
// This is an beta field. To use this, enable the JobPodReplacementPolicy feature toggle.
|
||||
// This is on by default.
|
||||
// +optional
|
||||
PodReplacementPolicy *PodReplacementPolicy
|
||||
}
|
||||
@ -443,15 +444,12 @@ type JobStatus struct {
|
||||
// The number of pods which are terminating (in phase Pending or Running
|
||||
// and have a deletionTimestamp).
|
||||
//
|
||||
// This field is alpha-level. The job controller populates the field when
|
||||
// the feature gate JobPodReplacementPolicy is enabled (disabled by default).
|
||||
// This field is beta-level. The job controller populates the field when
|
||||
// the feature gate JobPodReplacementPolicy is enabled (enabled by default).
|
||||
// +optional
|
||||
Terminating *int32
|
||||
|
||||
// The number of active pods which have a Ready condition.
|
||||
//
|
||||
// This field is beta-level. The job controller populates the field when
|
||||
// the feature gate JobReadyPods is enabled (enabled by default).
|
||||
// +optional
|
||||
Ready *int32
|
||||
|
||||
@ -481,8 +479,8 @@ type JobStatus struct {
|
||||
// last element of the series, separated by a hyphen.
|
||||
// For example, if the failed indexes are 1, 3, 4, 5 and 7, they are
|
||||
// represented as "1,3-5,7".
|
||||
// This field is alpha-level. It can be used when the `JobBackoffLimitPerIndex`
|
||||
// feature gate is enabled (disabled by default).
|
||||
// This field is beta-level. It can be used when the `JobBackoffLimitPerIndex`
|
||||
// feature gate is enabled (enabled by default).
|
||||
// +optional
|
||||
FailedIndexes *string
|
||||
|
||||
|
176
vendor/k8s.io/kubernetes/pkg/apis/core/helper/helpers.go
generated
vendored
176
vendor/k8s.io/kubernetes/pkg/apis/core/helper/helpers.go
generated
vendored
@ -113,34 +113,34 @@ var Semantic = conversion.EqualitiesOrDie(
|
||||
},
|
||||
)
|
||||
|
||||
var standardResourceQuotaScopes = sets.NewString(
|
||||
string(core.ResourceQuotaScopeTerminating),
|
||||
string(core.ResourceQuotaScopeNotTerminating),
|
||||
string(core.ResourceQuotaScopeBestEffort),
|
||||
string(core.ResourceQuotaScopeNotBestEffort),
|
||||
string(core.ResourceQuotaScopePriorityClass),
|
||||
var standardResourceQuotaScopes = sets.New(
|
||||
core.ResourceQuotaScopeTerminating,
|
||||
core.ResourceQuotaScopeNotTerminating,
|
||||
core.ResourceQuotaScopeBestEffort,
|
||||
core.ResourceQuotaScopeNotBestEffort,
|
||||
core.ResourceQuotaScopePriorityClass,
|
||||
)
|
||||
|
||||
// IsStandardResourceQuotaScope returns true if the scope is a standard value
|
||||
func IsStandardResourceQuotaScope(str string) bool {
|
||||
return standardResourceQuotaScopes.Has(str) || str == string(core.ResourceQuotaScopeCrossNamespacePodAffinity)
|
||||
func IsStandardResourceQuotaScope(scope core.ResourceQuotaScope) bool {
|
||||
return standardResourceQuotaScopes.Has(scope) || scope == core.ResourceQuotaScopeCrossNamespacePodAffinity
|
||||
}
|
||||
|
||||
var podObjectCountQuotaResources = sets.NewString(
|
||||
string(core.ResourcePods),
|
||||
var podObjectCountQuotaResources = sets.New(
|
||||
core.ResourcePods,
|
||||
)
|
||||
|
||||
var podComputeQuotaResources = sets.NewString(
|
||||
string(core.ResourceCPU),
|
||||
string(core.ResourceMemory),
|
||||
string(core.ResourceLimitsCPU),
|
||||
string(core.ResourceLimitsMemory),
|
||||
string(core.ResourceRequestsCPU),
|
||||
string(core.ResourceRequestsMemory),
|
||||
var podComputeQuotaResources = sets.New(
|
||||
core.ResourceCPU,
|
||||
core.ResourceMemory,
|
||||
core.ResourceLimitsCPU,
|
||||
core.ResourceLimitsMemory,
|
||||
core.ResourceRequestsCPU,
|
||||
core.ResourceRequestsMemory,
|
||||
)
|
||||
|
||||
// IsResourceQuotaScopeValidForResource returns true if the resource applies to the specified scope
|
||||
func IsResourceQuotaScopeValidForResource(scope core.ResourceQuotaScope, resource string) bool {
|
||||
func IsResourceQuotaScopeValidForResource(scope core.ResourceQuotaScope, resource core.ResourceName) bool {
|
||||
switch scope {
|
||||
case core.ResourceQuotaScopeTerminating, core.ResourceQuotaScopeNotTerminating, core.ResourceQuotaScopeNotBestEffort,
|
||||
core.ResourceQuotaScopePriorityClass, core.ResourceQuotaScopeCrossNamespacePodAffinity:
|
||||
@ -152,16 +152,16 @@ func IsResourceQuotaScopeValidForResource(scope core.ResourceQuotaScope, resourc
|
||||
}
|
||||
}
|
||||
|
||||
var standardContainerResources = sets.NewString(
|
||||
string(core.ResourceCPU),
|
||||
string(core.ResourceMemory),
|
||||
string(core.ResourceEphemeralStorage),
|
||||
var standardContainerResources = sets.New(
|
||||
core.ResourceCPU,
|
||||
core.ResourceMemory,
|
||||
core.ResourceEphemeralStorage,
|
||||
)
|
||||
|
||||
// IsStandardContainerResourceName returns true if the container can make a resource request
|
||||
// for the specified resource
|
||||
func IsStandardContainerResourceName(str string) bool {
|
||||
return standardContainerResources.Has(str) || IsHugePageResourceName(core.ResourceName(str))
|
||||
func IsStandardContainerResourceName(name core.ResourceName) bool {
|
||||
return standardContainerResources.Has(name) || IsHugePageResourceName(name)
|
||||
}
|
||||
|
||||
// IsExtendedResourceName returns true if:
|
||||
@ -196,88 +196,88 @@ func IsOvercommitAllowed(name core.ResourceName) bool {
|
||||
!IsHugePageResourceName(name)
|
||||
}
|
||||
|
||||
var standardLimitRangeTypes = sets.NewString(
|
||||
string(core.LimitTypePod),
|
||||
string(core.LimitTypeContainer),
|
||||
string(core.LimitTypePersistentVolumeClaim),
|
||||
var standardLimitRangeTypes = sets.New(
|
||||
core.LimitTypePod,
|
||||
core.LimitTypeContainer,
|
||||
core.LimitTypePersistentVolumeClaim,
|
||||
)
|
||||
|
||||
// IsStandardLimitRangeType returns true if the type is Pod or Container
|
||||
func IsStandardLimitRangeType(str string) bool {
|
||||
return standardLimitRangeTypes.Has(str)
|
||||
func IsStandardLimitRangeType(value core.LimitType) bool {
|
||||
return standardLimitRangeTypes.Has(value)
|
||||
}
|
||||
|
||||
var standardQuotaResources = sets.NewString(
|
||||
string(core.ResourceCPU),
|
||||
string(core.ResourceMemory),
|
||||
string(core.ResourceEphemeralStorage),
|
||||
string(core.ResourceRequestsCPU),
|
||||
string(core.ResourceRequestsMemory),
|
||||
string(core.ResourceRequestsStorage),
|
||||
string(core.ResourceRequestsEphemeralStorage),
|
||||
string(core.ResourceLimitsCPU),
|
||||
string(core.ResourceLimitsMemory),
|
||||
string(core.ResourceLimitsEphemeralStorage),
|
||||
string(core.ResourcePods),
|
||||
string(core.ResourceQuotas),
|
||||
string(core.ResourceServices),
|
||||
string(core.ResourceReplicationControllers),
|
||||
string(core.ResourceSecrets),
|
||||
string(core.ResourcePersistentVolumeClaims),
|
||||
string(core.ResourceConfigMaps),
|
||||
string(core.ResourceServicesNodePorts),
|
||||
string(core.ResourceServicesLoadBalancers),
|
||||
var standardQuotaResources = sets.New(
|
||||
core.ResourceCPU,
|
||||
core.ResourceMemory,
|
||||
core.ResourceEphemeralStorage,
|
||||
core.ResourceRequestsCPU,
|
||||
core.ResourceRequestsMemory,
|
||||
core.ResourceRequestsStorage,
|
||||
core.ResourceRequestsEphemeralStorage,
|
||||
core.ResourceLimitsCPU,
|
||||
core.ResourceLimitsMemory,
|
||||
core.ResourceLimitsEphemeralStorage,
|
||||
core.ResourcePods,
|
||||
core.ResourceQuotas,
|
||||
core.ResourceServices,
|
||||
core.ResourceReplicationControllers,
|
||||
core.ResourceSecrets,
|
||||
core.ResourcePersistentVolumeClaims,
|
||||
core.ResourceConfigMaps,
|
||||
core.ResourceServicesNodePorts,
|
||||
core.ResourceServicesLoadBalancers,
|
||||
)
|
||||
|
||||
// IsStandardQuotaResourceName returns true if the resource is known to
|
||||
// the quota tracking system
|
||||
func IsStandardQuotaResourceName(str string) bool {
|
||||
return standardQuotaResources.Has(str) || IsQuotaHugePageResourceName(core.ResourceName(str))
|
||||
func IsStandardQuotaResourceName(name core.ResourceName) bool {
|
||||
return standardQuotaResources.Has(name) || IsQuotaHugePageResourceName(name)
|
||||
}
|
||||
|
||||
var standardResources = sets.NewString(
|
||||
string(core.ResourceCPU),
|
||||
string(core.ResourceMemory),
|
||||
string(core.ResourceEphemeralStorage),
|
||||
string(core.ResourceRequestsCPU),
|
||||
string(core.ResourceRequestsMemory),
|
||||
string(core.ResourceRequestsEphemeralStorage),
|
||||
string(core.ResourceLimitsCPU),
|
||||
string(core.ResourceLimitsMemory),
|
||||
string(core.ResourceLimitsEphemeralStorage),
|
||||
string(core.ResourcePods),
|
||||
string(core.ResourceQuotas),
|
||||
string(core.ResourceServices),
|
||||
string(core.ResourceReplicationControllers),
|
||||
string(core.ResourceSecrets),
|
||||
string(core.ResourceConfigMaps),
|
||||
string(core.ResourcePersistentVolumeClaims),
|
||||
string(core.ResourceStorage),
|
||||
string(core.ResourceRequestsStorage),
|
||||
string(core.ResourceServicesNodePorts),
|
||||
string(core.ResourceServicesLoadBalancers),
|
||||
var standardResources = sets.New(
|
||||
core.ResourceCPU,
|
||||
core.ResourceMemory,
|
||||
core.ResourceEphemeralStorage,
|
||||
core.ResourceRequestsCPU,
|
||||
core.ResourceRequestsMemory,
|
||||
core.ResourceRequestsEphemeralStorage,
|
||||
core.ResourceLimitsCPU,
|
||||
core.ResourceLimitsMemory,
|
||||
core.ResourceLimitsEphemeralStorage,
|
||||
core.ResourcePods,
|
||||
core.ResourceQuotas,
|
||||
core.ResourceServices,
|
||||
core.ResourceReplicationControllers,
|
||||
core.ResourceSecrets,
|
||||
core.ResourceConfigMaps,
|
||||
core.ResourcePersistentVolumeClaims,
|
||||
core.ResourceStorage,
|
||||
core.ResourceRequestsStorage,
|
||||
core.ResourceServicesNodePorts,
|
||||
core.ResourceServicesLoadBalancers,
|
||||
)
|
||||
|
||||
// IsStandardResourceName returns true if the resource is known to the system
|
||||
func IsStandardResourceName(str string) bool {
|
||||
return standardResources.Has(str) || IsQuotaHugePageResourceName(core.ResourceName(str))
|
||||
func IsStandardResourceName(name core.ResourceName) bool {
|
||||
return standardResources.Has(name) || IsQuotaHugePageResourceName(name)
|
||||
}
|
||||
|
||||
var integerResources = sets.NewString(
|
||||
string(core.ResourcePods),
|
||||
string(core.ResourceQuotas),
|
||||
string(core.ResourceServices),
|
||||
string(core.ResourceReplicationControllers),
|
||||
string(core.ResourceSecrets),
|
||||
string(core.ResourceConfigMaps),
|
||||
string(core.ResourcePersistentVolumeClaims),
|
||||
string(core.ResourceServicesNodePorts),
|
||||
string(core.ResourceServicesLoadBalancers),
|
||||
var integerResources = sets.New(
|
||||
core.ResourcePods,
|
||||
core.ResourceQuotas,
|
||||
core.ResourceServices,
|
||||
core.ResourceReplicationControllers,
|
||||
core.ResourceSecrets,
|
||||
core.ResourceConfigMaps,
|
||||
core.ResourcePersistentVolumeClaims,
|
||||
core.ResourceServicesNodePorts,
|
||||
core.ResourceServicesLoadBalancers,
|
||||
)
|
||||
|
||||
// IsIntegerResourceName returns true if the resource is measured in integer values
|
||||
func IsIntegerResourceName(str string) bool {
|
||||
return integerResources.Has(str) || IsExtendedResourceName(core.ResourceName(str))
|
||||
func IsIntegerResourceName(name core.ResourceName) bool {
|
||||
return integerResources.Has(name) || IsExtendedResourceName(name)
|
||||
}
|
||||
|
||||
// IsServiceIPSet aims to check if the service's ClusterIP is set or not
|
||||
@ -289,7 +289,7 @@ func IsServiceIPSet(service *core.Service) bool {
|
||||
service.Spec.ClusterIP != core.ClusterIPNone
|
||||
}
|
||||
|
||||
var standardFinalizers = sets.NewString(
|
||||
var standardFinalizers = sets.New(
|
||||
string(core.FinalizerKubernetes),
|
||||
metav1.FinalizerOrphanDependents,
|
||||
metav1.FinalizerDeleteDependents,
|
||||
|
14
vendor/k8s.io/kubernetes/pkg/apis/core/helper/qos/qos.go
generated
vendored
14
vendor/k8s.io/kubernetes/pkg/apis/core/helper/qos/qos.go
generated
vendored
@ -30,12 +30,22 @@ func isSupportedQoSComputeResource(name core.ResourceName) bool {
|
||||
return supportedQoSComputeResources.Has(string(name))
|
||||
}
|
||||
|
||||
// GetPodQOS returns the QoS class of a pod.
|
||||
// GetPodQOS returns the QoS class of a pod persisted in the PodStatus.QOSClass field.
|
||||
// If PodStatus.QOSClass is empty, it returns value of ComputePodQOS() which evaluates pod's QoS class.
|
||||
func GetPodQOS(pod *core.Pod) core.PodQOSClass {
|
||||
if pod.Status.QOSClass != "" {
|
||||
return pod.Status.QOSClass
|
||||
}
|
||||
return ComputePodQOS(pod)
|
||||
}
|
||||
|
||||
// ComputePodQOS evaluates the list of containers to determine a pod's QoS class. This function is more
|
||||
// expensive than GetPodQOS which should be used for pods having a non-empty .Status.QOSClass.
|
||||
// A pod is besteffort if none of its containers have specified any requests or limits.
|
||||
// A pod is guaranteed only when requests and limits are specified for all the containers and they are equal.
|
||||
// A pod is burstable if limits and requests do not match across all containers.
|
||||
// When this function is updated please also update staging/src/k8s.io/kubectl/pkg/util/qos/qos.go
|
||||
func GetPodQOS(pod *core.Pod) core.PodQOSClass {
|
||||
func ComputePodQOS(pod *core.Pod) core.PodQOSClass {
|
||||
requests := core.ResourceList{}
|
||||
limits := core.ResourceList{}
|
||||
zeroQuantity := resource.MustParse("0")
|
||||
|
177
vendor/k8s.io/kubernetes/pkg/apis/core/types.go
generated
vendored
177
vendor/k8s.io/kubernetes/pkg/apis/core/types.go
generated
vendored
@ -335,6 +335,16 @@ type PersistentVolumeSpec struct {
|
||||
// This field influences the scheduling of pods that use this volume.
|
||||
// +optional
|
||||
NodeAffinity *VolumeNodeAffinity
|
||||
// Name of VolumeAttributesClass to which this persistent volume belongs. Empty value
|
||||
// is not allowed. When this field is not set, it indicates that this volume does not belong to any
|
||||
// VolumeAttributesClass. This field is mutable and can be changed by the CSI driver
|
||||
// after a volume has been updated successfully to a new class.
|
||||
// For an unbound PersistentVolume, the volumeAttributesClassName will be matched with unbound
|
||||
// PersistentVolumeClaims during the binding process.
|
||||
// This is an alpha field and requires enabling VolumeAttributesClass feature.
|
||||
// +featureGate=VolumeAttributesClass
|
||||
// +optional
|
||||
VolumeAttributesClassName *string
|
||||
}
|
||||
|
||||
// VolumeNodeAffinity defines constraints that limit what nodes this volume can be accessed from.
|
||||
@ -440,7 +450,7 @@ type PersistentVolumeClaimSpec struct {
|
||||
// that are lower than previous value but must still be higher than capacity recorded in the
|
||||
// status field of the claim.
|
||||
// +optional
|
||||
Resources ResourceRequirements
|
||||
Resources VolumeResourceRequirements
|
||||
// VolumeName is the binding reference to the PersistentVolume backing this
|
||||
// claim. When set to non-empty value Selector is not evaluated
|
||||
// +optional
|
||||
@ -488,6 +498,21 @@ type PersistentVolumeClaimSpec struct {
|
||||
// (Alpha) Using the namespace field of dataSourceRef requires the CrossNamespaceVolumeDataSource feature gate to be enabled.
|
||||
// +optional
|
||||
DataSourceRef *TypedObjectReference
|
||||
// volumeAttributesClassName may be used to set the VolumeAttributesClass used by this claim.
|
||||
// If specified, the CSI driver will create or update the volume with the attributes defined
|
||||
// in the corresponding VolumeAttributesClass. This has a different purpose than storageClassName,
|
||||
// it can be changed after the claim is created. An empty string value means that no VolumeAttributesClass
|
||||
// will be applied to the claim but it's not allowed to reset this field to empty string once it is set.
|
||||
// If unspecified and the PersistentVolumeClaim is unbound, the default VolumeAttributesClass
|
||||
// will be set by the persistentvolume controller if it exists.
|
||||
// If the resource referred to by volumeAttributesClass does not exist, this PersistentVolumeClaim will be
|
||||
// set to a Pending state, as reflected by the modifyVolumeStatus field, until such as a resource
|
||||
// exists.
|
||||
// More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#volumeattributesclass
|
||||
// (Alpha) Using this field requires the VolumeAttributesClass feature gate to be enabled.
|
||||
// +featureGate=VolumeAttributesClass
|
||||
// +optional
|
||||
VolumeAttributesClassName *string
|
||||
}
|
||||
|
||||
type TypedObjectReference struct {
|
||||
@ -518,6 +543,11 @@ const (
|
||||
PersistentVolumeClaimResizing PersistentVolumeClaimConditionType = "Resizing"
|
||||
// PersistentVolumeClaimFileSystemResizePending - controller resize is finished and a file system resize is pending on node
|
||||
PersistentVolumeClaimFileSystemResizePending PersistentVolumeClaimConditionType = "FileSystemResizePending"
|
||||
|
||||
// Applying the target VolumeAttributesClass encountered an error
|
||||
PersistentVolumeClaimVolumeModifyVolumeError PersistentVolumeClaimConditionType = "ModifyVolumeError"
|
||||
// Volume is being modified
|
||||
PersistentVolumeClaimVolumeModifyingVolume PersistentVolumeClaimConditionType = "ModifyingVolume"
|
||||
)
|
||||
|
||||
// +enum
|
||||
@ -544,6 +574,38 @@ const (
|
||||
PersistentVolumeClaimNodeResizeFailed ClaimResourceStatus = "NodeResizeFailed"
|
||||
)
|
||||
|
||||
// +enum
|
||||
// New statuses can be added in the future. Consumers should check for unknown statuses and fail appropriately
|
||||
type PersistentVolumeClaimModifyVolumeStatus string
|
||||
|
||||
const (
|
||||
// Pending indicates that the PersistentVolumeClaim cannot be modified due to unmet requirements, such as
|
||||
// the specified VolumeAttributesClass not existing
|
||||
PersistentVolumeClaimModifyVolumePending PersistentVolumeClaimModifyVolumeStatus = "Pending"
|
||||
// InProgress indicates that the volume is being modified
|
||||
PersistentVolumeClaimModifyVolumeInProgress PersistentVolumeClaimModifyVolumeStatus = "InProgress"
|
||||
// Infeasible indicates that the request has been rejected as invalid by the CSI driver. To
|
||||
// resolve the error, a valid VolumeAttributesClass needs to be specified
|
||||
PersistentVolumeClaimModifyVolumeInfeasible PersistentVolumeClaimModifyVolumeStatus = "Infeasible"
|
||||
)
|
||||
|
||||
// ModifyVolumeStatus represents the status object of ControllerModifyVolume operation
|
||||
type ModifyVolumeStatus struct {
|
||||
// targetVolumeAttributesClassName is the name of the VolumeAttributesClass the PVC currently being reconciled
|
||||
TargetVolumeAttributesClassName string
|
||||
// status is the status of the ControllerModifyVolume operation. It can be in any of following states:
|
||||
// - Pending
|
||||
// Pending indicates that the PersistentVolumeClaim cannot be modified due to unmet requirements, such as
|
||||
// the specified VolumeAttributesClass not existing.
|
||||
// - InProgress
|
||||
// InProgress indicates that the volume is being modified.
|
||||
// - Infeasible
|
||||
// Infeasible indicates that the request has been rejected as invalid by the CSI driver. To
|
||||
// resolve the error, a valid VolumeAttributesClass needs to be specified.
|
||||
// Note: New statuses can be added in the future. Consumers should check for unknown statuses and fail appropriately.
|
||||
Status PersistentVolumeClaimModifyVolumeStatus
|
||||
}
|
||||
|
||||
// PersistentVolumeClaimCondition represents the current condition of PV claim
|
||||
type PersistentVolumeClaimCondition struct {
|
||||
Type PersistentVolumeClaimConditionType
|
||||
@ -635,6 +697,18 @@ type PersistentVolumeClaimStatus struct {
|
||||
// +mapType=granular
|
||||
// +optional
|
||||
AllocatedResourceStatuses map[ResourceName]ClaimResourceStatus
|
||||
// currentVolumeAttributesClassName is the current name of the VolumeAttributesClass the PVC is using.
|
||||
// When unset, there is no VolumeAttributeClass applied to this PersistentVolumeClaim
|
||||
// This is an alpha field and requires enabling VolumeAttributesClass feature.
|
||||
// +featureGate=VolumeAttributesClass
|
||||
// +optional
|
||||
CurrentVolumeAttributesClassName *string
|
||||
// ModifyVolumeStatus represents the status object of ControllerModifyVolume operation.
|
||||
// When this is unset, there is no ModifyVolume operation being attempted.
|
||||
// This is an alpha field and requires enabling VolumeAttributesClass feature.
|
||||
// +featureGate=VolumeAttributesClass
|
||||
// +optional
|
||||
ModifyVolumeStatus *ModifyVolumeStatus
|
||||
}
|
||||
|
||||
// PersistentVolumeAccessMode defines various access modes for PV.
|
||||
@ -1685,6 +1759,29 @@ type ServiceAccountTokenProjection struct {
|
||||
Path string
|
||||
}
|
||||
|
||||
// ClusterTrustBundleProjection allows a pod to access the
|
||||
// `.spec.trustBundle` field of a ClusterTrustBundle object in an auto-updating
|
||||
// file.
|
||||
type ClusterTrustBundleProjection struct {
|
||||
// Select a single ClusterTrustBundle by object name. Mutually-exclusive
|
||||
// with SignerName and LabelSelector.
|
||||
Name *string
|
||||
|
||||
// Select all ClusterTrustBundles for this signer that match LabelSelector.
|
||||
// Mutually-exclusive with Name.
|
||||
SignerName *string
|
||||
|
||||
// Select all ClusterTrustBundles that match this LabelSelecotr.
|
||||
// Mutually-exclusive with Name.
|
||||
LabelSelector *metav1.LabelSelector
|
||||
|
||||
// Block pod startup if the selected ClusterTrustBundle(s) aren't available?
|
||||
Optional *bool
|
||||
|
||||
// Relative path from the volume root to write the bundle.
|
||||
Path string
|
||||
}
|
||||
|
||||
// ProjectedVolumeSource represents a projected volume source
|
||||
type ProjectedVolumeSource struct {
|
||||
// list of volume projections
|
||||
@ -1710,6 +1807,8 @@ type VolumeProjection struct {
|
||||
ConfigMap *ConfigMapProjection
|
||||
// information about the serviceAccountToken data to project
|
||||
ServiceAccountToken *ServiceAccountTokenProjection
|
||||
// information about the ClusterTrustBundle data to project
|
||||
ClusterTrustBundle *ClusterTrustBundleProjection
|
||||
}
|
||||
|
||||
// KeyToPath maps a string key to a path within a volume.
|
||||
@ -1805,10 +1904,8 @@ type CSIPersistentVolumeSource struct {
|
||||
// NodeExpandSecretRef is a reference to the secret object containing
|
||||
// sensitive information to pass to the CSI driver to complete the CSI
|
||||
// NodeExpandVolume call.
|
||||
// This is a beta field which is enabled default by CSINodeExpandSecret feature gate.
|
||||
// This field is optional, may be omitted if no secret is required. If the
|
||||
// secret object contains more than one secret, all secrets are passed.
|
||||
// +featureGate=CSINodeExpandSecret
|
||||
// +optional
|
||||
NodeExpandSecretRef *SecretReference
|
||||
}
|
||||
@ -2150,6 +2247,12 @@ type ExecAction struct {
|
||||
Command []string
|
||||
}
|
||||
|
||||
// SleepAction describes a "sleep" action.
|
||||
type SleepAction struct {
|
||||
// Seconds is the number of seconds to sleep.
|
||||
Seconds int64
|
||||
}
|
||||
|
||||
// Probe describes a health check to be performed against a container to determine whether it is
|
||||
// alive or ready to receive traffic.
|
||||
type Probe struct {
|
||||
@ -2282,6 +2385,18 @@ type ResourceRequirements struct {
|
||||
Claims []ResourceClaim
|
||||
}
|
||||
|
||||
// VolumeResourceRequirements describes the storage resource requirements for a volume.
|
||||
type VolumeResourceRequirements struct {
|
||||
// Limits describes the maximum amount of compute resources allowed.
|
||||
// +optional
|
||||
Limits ResourceList
|
||||
// Requests describes the minimum amount of compute resources required.
|
||||
// If Request is omitted for a container, it defaults to Limits if that is explicitly specified,
|
||||
// otherwise to an implementation-defined value
|
||||
// +optional
|
||||
Requests ResourceList
|
||||
}
|
||||
|
||||
// ResourceClaim references one entry in PodSpec.ResourceClaims.
|
||||
type ResourceClaim struct {
|
||||
// Name must match the name of one entry in pod.spec.resourceClaims of
|
||||
@ -2420,6 +2535,10 @@ type LifecycleHandler struct {
|
||||
// lifecycle hooks will fail in runtime when tcp handler is specified.
|
||||
// +optional
|
||||
TCPSocket *TCPSocketAction
|
||||
// Sleep represents the duration that the container should sleep before being terminated.
|
||||
// +featureGate=PodLifecycleSleepAction
|
||||
// +optional
|
||||
Sleep *SleepAction
|
||||
}
|
||||
|
||||
type GRPCAction struct {
|
||||
@ -2617,12 +2736,6 @@ const (
|
||||
PodReady PodConditionType = "Ready"
|
||||
// PodInitialized means that all init containers in the pod have started successfully.
|
||||
PodInitialized PodConditionType = "Initialized"
|
||||
// PodReasonUnschedulable reason in PodScheduled PodCondition means that the scheduler
|
||||
// can't schedule the pod right now, for example due to insufficient resources in the cluster.
|
||||
PodReasonUnschedulable = "Unschedulable"
|
||||
// PodReasonSchedulingGated reason in PodScheduled PodCondition means that the scheduler
|
||||
// skips scheduling the pod because one or more scheduling gates are still present.
|
||||
PodReasonSchedulingGated = "SchedulingGated"
|
||||
// ContainersReady indicates whether all containers in the pod are ready.
|
||||
ContainersReady PodConditionType = "ContainersReady"
|
||||
// DisruptionTarget indicates the pod is about to be terminated due to a
|
||||
@ -2886,6 +2999,7 @@ type WeightedPodAffinityTerm struct {
|
||||
// a pod of the set of pods is running.
|
||||
type PodAffinityTerm struct {
|
||||
// A label query over a set of resources, in this case pods.
|
||||
// If it's null, this PodAffinityTerm matches with no Pods.
|
||||
// +optional
|
||||
LabelSelector *metav1.LabelSelector
|
||||
// namespaces specifies a static list of namespace names that the term applies to.
|
||||
@ -2907,6 +3021,24 @@ type PodAffinityTerm struct {
|
||||
// An empty selector ({}) matches all namespaces.
|
||||
// +optional
|
||||
NamespaceSelector *metav1.LabelSelector
|
||||
// MatchLabelKeys is a set of pod label keys to select which pods will
|
||||
// be taken into consideration. The keys are used to lookup values from the
|
||||
// incoming pod labels, those key-value labels are merged with `LabelSelector` as `key in (value)`
|
||||
// to select the group of existing pods which pods will be taken into consideration
|
||||
// for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming
|
||||
// pod labels will be ignored. The default value is empty.
|
||||
// +listType=atomic
|
||||
// +optional
|
||||
MatchLabelKeys []string
|
||||
// MismatchLabelKeys is a set of pod label keys to select which pods will
|
||||
// be taken into consideration. The keys are used to lookup values from the
|
||||
// incoming pod labels, those key-value labels are merged with `LabelSelector` as `key notin (value)`
|
||||
// to select the group of existing pods which pods will be taken into consideration
|
||||
// for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming
|
||||
// pod labels will be ignored. The default value is empty.
|
||||
// +listType=atomic
|
||||
// +optional
|
||||
MismatchLabelKeys []string
|
||||
}
|
||||
|
||||
// NodeAffinity is a group of node affinity scheduling rules.
|
||||
@ -4074,6 +4206,15 @@ type LoadBalancerIngress struct {
|
||||
// +optional
|
||||
Hostname string
|
||||
|
||||
// IPMode specifies how the load-balancer IP behaves, and may only be specified when the ip field is specified.
|
||||
// Setting this to "VIP" indicates that traffic is delivered to the node with
|
||||
// the destination set to the load-balancer's IP and port.
|
||||
// Setting this to "Proxy" indicates that traffic is delivered to the node or pod with
|
||||
// the destination set to the node's IP and node port or the pod's IP and port.
|
||||
// Service implementations may use this information to adjust traffic routing.
|
||||
// +optional
|
||||
IPMode *LoadBalancerIPMode
|
||||
|
||||
// Ports is a list of records of service ports
|
||||
// If used, every port defined in the service should have an entry in it
|
||||
// +optional
|
||||
@ -4310,7 +4451,7 @@ type ServicePort struct {
|
||||
// RFC-6335 and https://www.iana.org/assignments/service-names).
|
||||
//
|
||||
// * Kubernetes-defined prefixed names:
|
||||
// * 'kubernetes.io/h2c' - HTTP/2 over cleartext as described in https://www.rfc-editor.org/rfc/rfc7540
|
||||
// * 'kubernetes.io/h2c' - HTTP/2 prior knowledge over cleartext as described in https://www.rfc-editor.org/rfc/rfc9113.html#name-starting-http-2-with-prior-
|
||||
// * 'kubernetes.io/ws' - WebSocket over cleartext as described in https://www.rfc-editor.org/rfc/rfc6455
|
||||
// * 'kubernetes.io/wss' - WebSocket over TLS as described in https://www.rfc-editor.org/rfc/rfc6455
|
||||
//
|
||||
@ -4475,7 +4616,7 @@ type EndpointPort struct {
|
||||
// RFC-6335 and https://www.iana.org/assignments/service-names).
|
||||
//
|
||||
// * Kubernetes-defined prefixed names:
|
||||
// * 'kubernetes.io/h2c' - HTTP/2 over cleartext as described in https://www.rfc-editor.org/rfc/rfc7540
|
||||
// * 'kubernetes.io/h2c' - HTTP/2 prior knowledge over cleartext as described in https://www.rfc-editor.org/rfc/rfc9113.html#name-starting-http-2-with-prior-
|
||||
// * 'kubernetes.io/ws' - WebSocket over cleartext as described in https://www.rfc-editor.org/rfc/rfc6455
|
||||
// * 'kubernetes.io/wss' - WebSocket over TLS as described in https://www.rfc-editor.org/rfc/rfc6455
|
||||
//
|
||||
@ -4596,7 +4737,7 @@ type NodeSystemInfo struct {
|
||||
ContainerRuntimeVersion string
|
||||
// Kubelet Version reported by the node.
|
||||
KubeletVersion string
|
||||
// KubeProxy Version reported by the node.
|
||||
// Deprecated: KubeProxy Version reported by the node.
|
||||
KubeProxyVersion string
|
||||
// The Operating System reported by the node
|
||||
OperatingSystem string
|
||||
@ -6146,3 +6287,15 @@ type PortStatus struct {
|
||||
// +kubebuilder:validation:MaxLength=316
|
||||
Error *string
|
||||
}
|
||||
|
||||
// LoadBalancerIPMode represents the mode of the LoadBalancer ingress IP
|
||||
type LoadBalancerIPMode string
|
||||
|
||||
const (
|
||||
// LoadBalancerIPModeVIP indicates that traffic is delivered to the node with
|
||||
// the destination set to the load-balancer's IP and port.
|
||||
LoadBalancerIPModeVIP LoadBalancerIPMode = "VIP"
|
||||
// LoadBalancerIPModeProxy indicates that traffic is delivered to the node or pod with
|
||||
// the destination set to the node's IP and port or the pod's IP and port.
|
||||
LoadBalancerIPModeProxy LoadBalancerIPMode = "Proxy"
|
||||
)
|
||||
|
20
vendor/k8s.io/kubernetes/pkg/apis/core/v1/defaults.go
generated
vendored
20
vendor/k8s.io/kubernetes/pkg/apis/core/v1/defaults.go
generated
vendored
@ -23,6 +23,7 @@ import (
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/apimachinery/pkg/util/intstr"
|
||||
utilfeature "k8s.io/apiserver/pkg/util/feature"
|
||||
"k8s.io/kubernetes/pkg/api/v1/service"
|
||||
"k8s.io/kubernetes/pkg/features"
|
||||
"k8s.io/kubernetes/pkg/util/parsers"
|
||||
"k8s.io/utils/pointer"
|
||||
@ -122,11 +123,9 @@ func SetDefaults_Service(obj *v1.Service) {
|
||||
sp.TargetPort = intstr.FromInt32(sp.Port)
|
||||
}
|
||||
}
|
||||
// Defaults ExternalTrafficPolicy field for NodePort / LoadBalancer service
|
||||
// Defaults ExternalTrafficPolicy field for externally-accessible service
|
||||
// to Global for consistency.
|
||||
if (obj.Spec.Type == v1.ServiceTypeNodePort ||
|
||||
obj.Spec.Type == v1.ServiceTypeLoadBalancer) &&
|
||||
obj.Spec.ExternalTrafficPolicy == "" {
|
||||
if service.ExternallyAccessible(obj) && obj.Spec.ExternalTrafficPolicy == "" {
|
||||
obj.Spec.ExternalTrafficPolicy = v1.ServiceExternalTrafficPolicyCluster
|
||||
}
|
||||
|
||||
@ -142,6 +141,19 @@ func SetDefaults_Service(obj *v1.Service) {
|
||||
obj.Spec.AllocateLoadBalancerNodePorts = pointer.Bool(true)
|
||||
}
|
||||
}
|
||||
|
||||
if obj.Spec.Type == v1.ServiceTypeLoadBalancer {
|
||||
if utilfeature.DefaultFeatureGate.Enabled(features.LoadBalancerIPMode) {
|
||||
ipMode := v1.LoadBalancerIPModeVIP
|
||||
|
||||
for i, ing := range obj.Status.LoadBalancer.Ingress {
|
||||
if ing.IP != "" && ing.IPMode == nil {
|
||||
obj.Status.LoadBalancer.Ingress[i].IPMode = &ipMode
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
func SetDefaults_Pod(obj *v1.Pod) {
|
||||
// If limits are specified, but requests are not, default requests to limits
|
||||
|
154
vendor/k8s.io/kubernetes/pkg/apis/core/v1/zz_generated.conversion.go
generated
vendored
154
vendor/k8s.io/kubernetes/pkg/apis/core/v1/zz_generated.conversion.go
generated
vendored
@ -212,6 +212,16 @@ func RegisterConversions(s *runtime.Scheme) error {
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*v1.ClusterTrustBundleProjection)(nil), (*core.ClusterTrustBundleProjection)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_v1_ClusterTrustBundleProjection_To_core_ClusterTrustBundleProjection(a.(*v1.ClusterTrustBundleProjection), b.(*core.ClusterTrustBundleProjection), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*core.ClusterTrustBundleProjection)(nil), (*v1.ClusterTrustBundleProjection)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_core_ClusterTrustBundleProjection_To_v1_ClusterTrustBundleProjection(a.(*core.ClusterTrustBundleProjection), b.(*v1.ClusterTrustBundleProjection), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*v1.ComponentCondition)(nil), (*core.ComponentCondition)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_v1_ComponentCondition_To_core_ComponentCondition(a.(*v1.ComponentCondition), b.(*core.ComponentCondition), scope)
|
||||
}); err != nil {
|
||||
@ -882,6 +892,16 @@ func RegisterConversions(s *runtime.Scheme) error {
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*v1.ModifyVolumeStatus)(nil), (*core.ModifyVolumeStatus)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_v1_ModifyVolumeStatus_To_core_ModifyVolumeStatus(a.(*v1.ModifyVolumeStatus), b.(*core.ModifyVolumeStatus), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*core.ModifyVolumeStatus)(nil), (*v1.ModifyVolumeStatus)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_core_ModifyVolumeStatus_To_v1_ModifyVolumeStatus(a.(*core.ModifyVolumeStatus), b.(*v1.ModifyVolumeStatus), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*v1.NFSVolumeSource)(nil), (*core.NFSVolumeSource)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_v1_NFSVolumeSource_To_core_NFSVolumeSource(a.(*v1.NFSVolumeSource), b.(*core.NFSVolumeSource), scope)
|
||||
}); err != nil {
|
||||
@ -1937,6 +1957,16 @@ func RegisterConversions(s *runtime.Scheme) error {
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*v1.SleepAction)(nil), (*core.SleepAction)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_v1_SleepAction_To_core_SleepAction(a.(*v1.SleepAction), b.(*core.SleepAction), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*core.SleepAction)(nil), (*v1.SleepAction)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_core_SleepAction_To_v1_SleepAction(a.(*core.SleepAction), b.(*v1.SleepAction), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*v1.StorageOSPersistentVolumeSource)(nil), (*core.StorageOSPersistentVolumeSource)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_v1_StorageOSPersistentVolumeSource_To_core_StorageOSPersistentVolumeSource(a.(*v1.StorageOSPersistentVolumeSource), b.(*core.StorageOSPersistentVolumeSource), scope)
|
||||
}); err != nil {
|
||||
@ -2087,6 +2117,16 @@ func RegisterConversions(s *runtime.Scheme) error {
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*v1.VolumeResourceRequirements)(nil), (*core.VolumeResourceRequirements)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_v1_VolumeResourceRequirements_To_core_VolumeResourceRequirements(a.(*v1.VolumeResourceRequirements), b.(*core.VolumeResourceRequirements), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*core.VolumeResourceRequirements)(nil), (*v1.VolumeResourceRequirements)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_core_VolumeResourceRequirements_To_v1_VolumeResourceRequirements(a.(*core.VolumeResourceRequirements), b.(*v1.VolumeResourceRequirements), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*v1.VolumeSource)(nil), (*core.VolumeSource)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_v1_VolumeSource_To_core_VolumeSource(a.(*v1.VolumeSource), b.(*core.VolumeSource), scope)
|
||||
}); err != nil {
|
||||
@ -2735,6 +2775,34 @@ func Convert_core_ClientIPConfig_To_v1_ClientIPConfig(in *core.ClientIPConfig, o
|
||||
return autoConvert_core_ClientIPConfig_To_v1_ClientIPConfig(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1_ClusterTrustBundleProjection_To_core_ClusterTrustBundleProjection(in *v1.ClusterTrustBundleProjection, out *core.ClusterTrustBundleProjection, s conversion.Scope) error {
|
||||
out.Name = (*string)(unsafe.Pointer(in.Name))
|
||||
out.SignerName = (*string)(unsafe.Pointer(in.SignerName))
|
||||
out.LabelSelector = (*metav1.LabelSelector)(unsafe.Pointer(in.LabelSelector))
|
||||
out.Optional = (*bool)(unsafe.Pointer(in.Optional))
|
||||
out.Path = in.Path
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v1_ClusterTrustBundleProjection_To_core_ClusterTrustBundleProjection is an autogenerated conversion function.
|
||||
func Convert_v1_ClusterTrustBundleProjection_To_core_ClusterTrustBundleProjection(in *v1.ClusterTrustBundleProjection, out *core.ClusterTrustBundleProjection, s conversion.Scope) error {
|
||||
return autoConvert_v1_ClusterTrustBundleProjection_To_core_ClusterTrustBundleProjection(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_core_ClusterTrustBundleProjection_To_v1_ClusterTrustBundleProjection(in *core.ClusterTrustBundleProjection, out *v1.ClusterTrustBundleProjection, s conversion.Scope) error {
|
||||
out.Name = (*string)(unsafe.Pointer(in.Name))
|
||||
out.SignerName = (*string)(unsafe.Pointer(in.SignerName))
|
||||
out.LabelSelector = (*metav1.LabelSelector)(unsafe.Pointer(in.LabelSelector))
|
||||
out.Optional = (*bool)(unsafe.Pointer(in.Optional))
|
||||
out.Path = in.Path
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_core_ClusterTrustBundleProjection_To_v1_ClusterTrustBundleProjection is an autogenerated conversion function.
|
||||
func Convert_core_ClusterTrustBundleProjection_To_v1_ClusterTrustBundleProjection(in *core.ClusterTrustBundleProjection, out *v1.ClusterTrustBundleProjection, s conversion.Scope) error {
|
||||
return autoConvert_core_ClusterTrustBundleProjection_To_v1_ClusterTrustBundleProjection(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1_ComponentCondition_To_core_ComponentCondition(in *v1.ComponentCondition, out *core.ComponentCondition, s conversion.Scope) error {
|
||||
out.Type = core.ComponentConditionType(in.Type)
|
||||
out.Status = core.ConditionStatus(in.Status)
|
||||
@ -4315,6 +4383,7 @@ func autoConvert_v1_LifecycleHandler_To_core_LifecycleHandler(in *v1.LifecycleHa
|
||||
out.Exec = (*core.ExecAction)(unsafe.Pointer(in.Exec))
|
||||
out.HTTPGet = (*core.HTTPGetAction)(unsafe.Pointer(in.HTTPGet))
|
||||
out.TCPSocket = (*core.TCPSocketAction)(unsafe.Pointer(in.TCPSocket))
|
||||
out.Sleep = (*core.SleepAction)(unsafe.Pointer(in.Sleep))
|
||||
return nil
|
||||
}
|
||||
|
||||
@ -4327,6 +4396,7 @@ func autoConvert_core_LifecycleHandler_To_v1_LifecycleHandler(in *core.Lifecycle
|
||||
out.Exec = (*v1.ExecAction)(unsafe.Pointer(in.Exec))
|
||||
out.HTTPGet = (*v1.HTTPGetAction)(unsafe.Pointer(in.HTTPGet))
|
||||
out.TCPSocket = (*v1.TCPSocketAction)(unsafe.Pointer(in.TCPSocket))
|
||||
out.Sleep = (*v1.SleepAction)(unsafe.Pointer(in.Sleep))
|
||||
return nil
|
||||
}
|
||||
|
||||
@ -4478,6 +4548,7 @@ func Convert_core_List_To_v1_List(in *core.List, out *v1.List, s conversion.Scop
|
||||
func autoConvert_v1_LoadBalancerIngress_To_core_LoadBalancerIngress(in *v1.LoadBalancerIngress, out *core.LoadBalancerIngress, s conversion.Scope) error {
|
||||
out.IP = in.IP
|
||||
out.Hostname = in.Hostname
|
||||
out.IPMode = (*core.LoadBalancerIPMode)(unsafe.Pointer(in.IPMode))
|
||||
out.Ports = *(*[]core.PortStatus)(unsafe.Pointer(&in.Ports))
|
||||
return nil
|
||||
}
|
||||
@ -4490,6 +4561,7 @@ func Convert_v1_LoadBalancerIngress_To_core_LoadBalancerIngress(in *v1.LoadBalan
|
||||
func autoConvert_core_LoadBalancerIngress_To_v1_LoadBalancerIngress(in *core.LoadBalancerIngress, out *v1.LoadBalancerIngress, s conversion.Scope) error {
|
||||
out.IP = in.IP
|
||||
out.Hostname = in.Hostname
|
||||
out.IPMode = (*v1.LoadBalancerIPMode)(unsafe.Pointer(in.IPMode))
|
||||
out.Ports = *(*[]v1.PortStatus)(unsafe.Pointer(&in.Ports))
|
||||
return nil
|
||||
}
|
||||
@ -4551,6 +4623,28 @@ func Convert_core_LocalVolumeSource_To_v1_LocalVolumeSource(in *core.LocalVolume
|
||||
return autoConvert_core_LocalVolumeSource_To_v1_LocalVolumeSource(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1_ModifyVolumeStatus_To_core_ModifyVolumeStatus(in *v1.ModifyVolumeStatus, out *core.ModifyVolumeStatus, s conversion.Scope) error {
|
||||
out.TargetVolumeAttributesClassName = in.TargetVolumeAttributesClassName
|
||||
out.Status = core.PersistentVolumeClaimModifyVolumeStatus(in.Status)
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v1_ModifyVolumeStatus_To_core_ModifyVolumeStatus is an autogenerated conversion function.
|
||||
func Convert_v1_ModifyVolumeStatus_To_core_ModifyVolumeStatus(in *v1.ModifyVolumeStatus, out *core.ModifyVolumeStatus, s conversion.Scope) error {
|
||||
return autoConvert_v1_ModifyVolumeStatus_To_core_ModifyVolumeStatus(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_core_ModifyVolumeStatus_To_v1_ModifyVolumeStatus(in *core.ModifyVolumeStatus, out *v1.ModifyVolumeStatus, s conversion.Scope) error {
|
||||
out.TargetVolumeAttributesClassName = in.TargetVolumeAttributesClassName
|
||||
out.Status = v1.PersistentVolumeClaimModifyVolumeStatus(in.Status)
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_core_ModifyVolumeStatus_To_v1_ModifyVolumeStatus is an autogenerated conversion function.
|
||||
func Convert_core_ModifyVolumeStatus_To_v1_ModifyVolumeStatus(in *core.ModifyVolumeStatus, out *v1.ModifyVolumeStatus, s conversion.Scope) error {
|
||||
return autoConvert_core_ModifyVolumeStatus_To_v1_ModifyVolumeStatus(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1_NFSVolumeSource_To_core_NFSVolumeSource(in *v1.NFSVolumeSource, out *core.NFSVolumeSource, s conversion.Scope) error {
|
||||
out.Server = in.Server
|
||||
out.Path = in.Path
|
||||
@ -5321,7 +5415,7 @@ func Convert_core_PersistentVolumeClaimList_To_v1_PersistentVolumeClaimList(in *
|
||||
func autoConvert_v1_PersistentVolumeClaimSpec_To_core_PersistentVolumeClaimSpec(in *v1.PersistentVolumeClaimSpec, out *core.PersistentVolumeClaimSpec, s conversion.Scope) error {
|
||||
out.AccessModes = *(*[]core.PersistentVolumeAccessMode)(unsafe.Pointer(&in.AccessModes))
|
||||
out.Selector = (*metav1.LabelSelector)(unsafe.Pointer(in.Selector))
|
||||
if err := Convert_v1_ResourceRequirements_To_core_ResourceRequirements(&in.Resources, &out.Resources, s); err != nil {
|
||||
if err := Convert_v1_VolumeResourceRequirements_To_core_VolumeResourceRequirements(&in.Resources, &out.Resources, s); err != nil {
|
||||
return err
|
||||
}
|
||||
out.VolumeName = in.VolumeName
|
||||
@ -5329,6 +5423,7 @@ func autoConvert_v1_PersistentVolumeClaimSpec_To_core_PersistentVolumeClaimSpec(
|
||||
out.VolumeMode = (*core.PersistentVolumeMode)(unsafe.Pointer(in.VolumeMode))
|
||||
out.DataSource = (*core.TypedLocalObjectReference)(unsafe.Pointer(in.DataSource))
|
||||
out.DataSourceRef = (*core.TypedObjectReference)(unsafe.Pointer(in.DataSourceRef))
|
||||
out.VolumeAttributesClassName = (*string)(unsafe.Pointer(in.VolumeAttributesClassName))
|
||||
return nil
|
||||
}
|
||||
|
||||
@ -5340,7 +5435,7 @@ func Convert_v1_PersistentVolumeClaimSpec_To_core_PersistentVolumeClaimSpec(in *
|
||||
func autoConvert_core_PersistentVolumeClaimSpec_To_v1_PersistentVolumeClaimSpec(in *core.PersistentVolumeClaimSpec, out *v1.PersistentVolumeClaimSpec, s conversion.Scope) error {
|
||||
out.AccessModes = *(*[]v1.PersistentVolumeAccessMode)(unsafe.Pointer(&in.AccessModes))
|
||||
out.Selector = (*metav1.LabelSelector)(unsafe.Pointer(in.Selector))
|
||||
if err := Convert_core_ResourceRequirements_To_v1_ResourceRequirements(&in.Resources, &out.Resources, s); err != nil {
|
||||
if err := Convert_core_VolumeResourceRequirements_To_v1_VolumeResourceRequirements(&in.Resources, &out.Resources, s); err != nil {
|
||||
return err
|
||||
}
|
||||
out.VolumeName = in.VolumeName
|
||||
@ -5348,6 +5443,7 @@ func autoConvert_core_PersistentVolumeClaimSpec_To_v1_PersistentVolumeClaimSpec(
|
||||
out.VolumeMode = (*v1.PersistentVolumeMode)(unsafe.Pointer(in.VolumeMode))
|
||||
out.DataSource = (*v1.TypedLocalObjectReference)(unsafe.Pointer(in.DataSource))
|
||||
out.DataSourceRef = (*v1.TypedObjectReference)(unsafe.Pointer(in.DataSourceRef))
|
||||
out.VolumeAttributesClassName = (*string)(unsafe.Pointer(in.VolumeAttributesClassName))
|
||||
return nil
|
||||
}
|
||||
|
||||
@ -5363,6 +5459,8 @@ func autoConvert_v1_PersistentVolumeClaimStatus_To_core_PersistentVolumeClaimSta
|
||||
out.Conditions = *(*[]core.PersistentVolumeClaimCondition)(unsafe.Pointer(&in.Conditions))
|
||||
out.AllocatedResources = *(*core.ResourceList)(unsafe.Pointer(&in.AllocatedResources))
|
||||
out.AllocatedResourceStatuses = *(*map[core.ResourceName]core.ClaimResourceStatus)(unsafe.Pointer(&in.AllocatedResourceStatuses))
|
||||
out.CurrentVolumeAttributesClassName = (*string)(unsafe.Pointer(in.CurrentVolumeAttributesClassName))
|
||||
out.ModifyVolumeStatus = (*core.ModifyVolumeStatus)(unsafe.Pointer(in.ModifyVolumeStatus))
|
||||
return nil
|
||||
}
|
||||
|
||||
@ -5378,6 +5476,8 @@ func autoConvert_core_PersistentVolumeClaimStatus_To_v1_PersistentVolumeClaimSta
|
||||
out.Conditions = *(*[]v1.PersistentVolumeClaimCondition)(unsafe.Pointer(&in.Conditions))
|
||||
out.AllocatedResources = *(*v1.ResourceList)(unsafe.Pointer(&in.AllocatedResources))
|
||||
out.AllocatedResourceStatuses = *(*map[v1.ResourceName]v1.ClaimResourceStatus)(unsafe.Pointer(&in.AllocatedResourceStatuses))
|
||||
out.CurrentVolumeAttributesClassName = (*string)(unsafe.Pointer(in.CurrentVolumeAttributesClassName))
|
||||
out.ModifyVolumeStatus = (*v1.ModifyVolumeStatus)(unsafe.Pointer(in.ModifyVolumeStatus))
|
||||
return nil
|
||||
}
|
||||
|
||||
@ -5550,6 +5650,7 @@ func autoConvert_v1_PersistentVolumeSpec_To_core_PersistentVolumeSpec(in *v1.Per
|
||||
out.MountOptions = *(*[]string)(unsafe.Pointer(&in.MountOptions))
|
||||
out.VolumeMode = (*core.PersistentVolumeMode)(unsafe.Pointer(in.VolumeMode))
|
||||
out.NodeAffinity = (*core.VolumeNodeAffinity)(unsafe.Pointer(in.NodeAffinity))
|
||||
out.VolumeAttributesClassName = (*string)(unsafe.Pointer(in.VolumeAttributesClassName))
|
||||
return nil
|
||||
}
|
||||
|
||||
@ -5565,6 +5666,7 @@ func autoConvert_core_PersistentVolumeSpec_To_v1_PersistentVolumeSpec(in *core.P
|
||||
out.MountOptions = *(*[]string)(unsafe.Pointer(&in.MountOptions))
|
||||
out.VolumeMode = (*v1.PersistentVolumeMode)(unsafe.Pointer(in.VolumeMode))
|
||||
out.NodeAffinity = (*v1.VolumeNodeAffinity)(unsafe.Pointer(in.NodeAffinity))
|
||||
out.VolumeAttributesClassName = (*string)(unsafe.Pointer(in.VolumeAttributesClassName))
|
||||
return nil
|
||||
}
|
||||
|
||||
@ -5665,6 +5767,8 @@ func autoConvert_v1_PodAffinityTerm_To_core_PodAffinityTerm(in *v1.PodAffinityTe
|
||||
out.Namespaces = *(*[]string)(unsafe.Pointer(&in.Namespaces))
|
||||
out.TopologyKey = in.TopologyKey
|
||||
out.NamespaceSelector = (*metav1.LabelSelector)(unsafe.Pointer(in.NamespaceSelector))
|
||||
out.MatchLabelKeys = *(*[]string)(unsafe.Pointer(&in.MatchLabelKeys))
|
||||
out.MismatchLabelKeys = *(*[]string)(unsafe.Pointer(&in.MismatchLabelKeys))
|
||||
return nil
|
||||
}
|
||||
|
||||
@ -5678,6 +5782,8 @@ func autoConvert_core_PodAffinityTerm_To_v1_PodAffinityTerm(in *core.PodAffinity
|
||||
out.Namespaces = *(*[]string)(unsafe.Pointer(&in.Namespaces))
|
||||
out.TopologyKey = in.TopologyKey
|
||||
out.NamespaceSelector = (*metav1.LabelSelector)(unsafe.Pointer(in.NamespaceSelector))
|
||||
out.MatchLabelKeys = *(*[]string)(unsafe.Pointer(&in.MatchLabelKeys))
|
||||
out.MismatchLabelKeys = *(*[]string)(unsafe.Pointer(&in.MismatchLabelKeys))
|
||||
return nil
|
||||
}
|
||||
|
||||
@ -8055,6 +8161,26 @@ func Convert_core_SessionAffinityConfig_To_v1_SessionAffinityConfig(in *core.Ses
|
||||
return autoConvert_core_SessionAffinityConfig_To_v1_SessionAffinityConfig(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1_SleepAction_To_core_SleepAction(in *v1.SleepAction, out *core.SleepAction, s conversion.Scope) error {
|
||||
out.Seconds = in.Seconds
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v1_SleepAction_To_core_SleepAction is an autogenerated conversion function.
|
||||
func Convert_v1_SleepAction_To_core_SleepAction(in *v1.SleepAction, out *core.SleepAction, s conversion.Scope) error {
|
||||
return autoConvert_v1_SleepAction_To_core_SleepAction(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_core_SleepAction_To_v1_SleepAction(in *core.SleepAction, out *v1.SleepAction, s conversion.Scope) error {
|
||||
out.Seconds = in.Seconds
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_core_SleepAction_To_v1_SleepAction is an autogenerated conversion function.
|
||||
func Convert_core_SleepAction_To_v1_SleepAction(in *core.SleepAction, out *v1.SleepAction, s conversion.Scope) error {
|
||||
return autoConvert_core_SleepAction_To_v1_SleepAction(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1_StorageOSPersistentVolumeSource_To_core_StorageOSPersistentVolumeSource(in *v1.StorageOSPersistentVolumeSource, out *core.StorageOSPersistentVolumeSource, s conversion.Scope) error {
|
||||
out.VolumeName = in.VolumeName
|
||||
out.VolumeNamespace = in.VolumeNamespace
|
||||
@ -8436,6 +8562,7 @@ func autoConvert_v1_VolumeProjection_To_core_VolumeProjection(in *v1.VolumeProje
|
||||
} else {
|
||||
out.ServiceAccountToken = nil
|
||||
}
|
||||
out.ClusterTrustBundle = (*core.ClusterTrustBundleProjection)(unsafe.Pointer(in.ClusterTrustBundle))
|
||||
return nil
|
||||
}
|
||||
|
||||
@ -8457,6 +8584,7 @@ func autoConvert_core_VolumeProjection_To_v1_VolumeProjection(in *core.VolumePro
|
||||
} else {
|
||||
out.ServiceAccountToken = nil
|
||||
}
|
||||
out.ClusterTrustBundle = (*v1.ClusterTrustBundleProjection)(unsafe.Pointer(in.ClusterTrustBundle))
|
||||
return nil
|
||||
}
|
||||
|
||||
@ -8465,6 +8593,28 @@ func Convert_core_VolumeProjection_To_v1_VolumeProjection(in *core.VolumeProject
|
||||
return autoConvert_core_VolumeProjection_To_v1_VolumeProjection(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1_VolumeResourceRequirements_To_core_VolumeResourceRequirements(in *v1.VolumeResourceRequirements, out *core.VolumeResourceRequirements, s conversion.Scope) error {
|
||||
out.Limits = *(*core.ResourceList)(unsafe.Pointer(&in.Limits))
|
||||
out.Requests = *(*core.ResourceList)(unsafe.Pointer(&in.Requests))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v1_VolumeResourceRequirements_To_core_VolumeResourceRequirements is an autogenerated conversion function.
|
||||
func Convert_v1_VolumeResourceRequirements_To_core_VolumeResourceRequirements(in *v1.VolumeResourceRequirements, out *core.VolumeResourceRequirements, s conversion.Scope) error {
|
||||
return autoConvert_v1_VolumeResourceRequirements_To_core_VolumeResourceRequirements(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_core_VolumeResourceRequirements_To_v1_VolumeResourceRequirements(in *core.VolumeResourceRequirements, out *v1.VolumeResourceRequirements, s conversion.Scope) error {
|
||||
out.Limits = *(*v1.ResourceList)(unsafe.Pointer(&in.Limits))
|
||||
out.Requests = *(*v1.ResourceList)(unsafe.Pointer(&in.Requests))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_core_VolumeResourceRequirements_To_v1_VolumeResourceRequirements is an autogenerated conversion function.
|
||||
func Convert_core_VolumeResourceRequirements_To_v1_VolumeResourceRequirements(in *core.VolumeResourceRequirements, out *v1.VolumeResourceRequirements, s conversion.Scope) error {
|
||||
return autoConvert_core_VolumeResourceRequirements_To_v1_VolumeResourceRequirements(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1_VolumeSource_To_core_VolumeSource(in *v1.VolumeSource, out *core.VolumeSource, s conversion.Scope) error {
|
||||
out.HostPath = (*core.HostPathVolumeSource)(unsafe.Pointer(in.HostPath))
|
||||
out.EmptyDir = (*core.EmptyDirVolumeSource)(unsafe.Pointer(in.EmptyDir))
|
||||
|
132
vendor/k8s.io/kubernetes/pkg/apis/core/validation/names.go
generated
vendored
Normal file
132
vendor/k8s.io/kubernetes/pkg/apis/core/validation/names.go
generated
vendored
Normal file
@ -0,0 +1,132 @@
|
||||
/*
|
||||
Copyright 2023 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.
|
||||
*/
|
||||
|
||||
package validation
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
apimachineryvalidation "k8s.io/apimachinery/pkg/api/validation"
|
||||
"k8s.io/apimachinery/pkg/util/validation"
|
||||
"k8s.io/apimachinery/pkg/util/validation/field"
|
||||
)
|
||||
|
||||
// ValidateSignerName checks that signerName is syntactically valid.
|
||||
//
|
||||
// ensure signerName is of the form domain.com/something and up to 571 characters.
|
||||
// This length and format is specified to accommodate signerNames like:
|
||||
// <fqdn>/<resource-namespace>.<resource-name>.
|
||||
// The max length of a FQDN is 253 characters (DNS1123Subdomain max length)
|
||||
// The max length of a namespace name is 63 characters (DNS1123Label max length)
|
||||
// The max length of a resource name is 253 characters (DNS1123Subdomain max length)
|
||||
// We then add an additional 2 characters to account for the one '.' and one '/'.
|
||||
func ValidateSignerName(fldPath *field.Path, signerName string) field.ErrorList {
|
||||
var el field.ErrorList
|
||||
if len(signerName) == 0 {
|
||||
el = append(el, field.Required(fldPath, ""))
|
||||
return el
|
||||
}
|
||||
|
||||
segments := strings.Split(signerName, "/")
|
||||
// validate that there is one '/' in the signerName.
|
||||
// we do this after validating the domain segment to provide more info to the user.
|
||||
if len(segments) != 2 {
|
||||
el = append(el, field.Invalid(fldPath, signerName, "must be a fully qualified domain and path of the form 'example.com/signer-name'"))
|
||||
// return early here as we should not continue attempting to validate a missing or malformed path segment
|
||||
// (i.e. one containing multiple or zero `/`)
|
||||
return el
|
||||
}
|
||||
|
||||
// validate that segments[0] is less than 253 characters altogether
|
||||
maxDomainSegmentLength := validation.DNS1123SubdomainMaxLength
|
||||
if len(segments[0]) > maxDomainSegmentLength {
|
||||
el = append(el, field.TooLong(fldPath, segments[0], maxDomainSegmentLength))
|
||||
}
|
||||
// validate that segments[0] consists of valid DNS1123 labels separated by '.'
|
||||
domainLabels := strings.Split(segments[0], ".")
|
||||
for _, lbl := range domainLabels {
|
||||
// use IsDNS1123Label as we want to ensure the max length of any single label in the domain
|
||||
// is 63 characters
|
||||
if errs := validation.IsDNS1123Label(lbl); len(errs) > 0 {
|
||||
for _, err := range errs {
|
||||
el = append(el, field.Invalid(fldPath, segments[0], fmt.Sprintf("validating label %q: %s", lbl, err)))
|
||||
}
|
||||
// if we encounter any errors whilst parsing the domain segment, break from
|
||||
// validation as any further error messages will be duplicates, and non-distinguishable
|
||||
// from each other, confusing users.
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
// validate that there is at least one '.' in segments[0]
|
||||
if len(domainLabels) < 2 {
|
||||
el = append(el, field.Invalid(fldPath, segments[0], "should be a domain with at least two segments separated by dots"))
|
||||
}
|
||||
|
||||
// validate that segments[1] consists of valid DNS1123 subdomains separated by '.'.
|
||||
pathLabels := strings.Split(segments[1], ".")
|
||||
for _, lbl := range pathLabels {
|
||||
// use IsDNS1123Subdomain because it enforces a length restriction of 253 characters
|
||||
// which is required in order to fit a full resource name into a single 'label'
|
||||
if errs := validation.IsDNS1123Subdomain(lbl); len(errs) > 0 {
|
||||
for _, err := range errs {
|
||||
el = append(el, field.Invalid(fldPath, segments[1], fmt.Sprintf("validating label %q: %s", lbl, err)))
|
||||
}
|
||||
// if we encounter any errors whilst parsing the path segment, break from
|
||||
// validation as any further error messages will be duplicates, and non-distinguishable
|
||||
// from each other, confusing users.
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
// ensure that segments[1] can accommodate a dns label + dns subdomain + '.'
|
||||
maxPathSegmentLength := validation.DNS1123SubdomainMaxLength + validation.DNS1123LabelMaxLength + 1
|
||||
maxSignerNameLength := maxDomainSegmentLength + maxPathSegmentLength + 1
|
||||
if len(signerName) > maxSignerNameLength {
|
||||
el = append(el, field.TooLong(fldPath, signerName, maxSignerNameLength))
|
||||
}
|
||||
|
||||
return el
|
||||
}
|
||||
|
||||
// ValidateClusterTrustBundleName checks that a ClusterTrustBundle name conforms
|
||||
// to the rules documented on the type.
|
||||
func ValidateClusterTrustBundleName(signerName string) func(name string, prefix bool) []string {
|
||||
return func(name string, isPrefix bool) []string {
|
||||
if signerName == "" {
|
||||
if strings.Contains(name, ":") {
|
||||
return []string{"ClusterTrustBundle without signer name must not have \":\" in its name"}
|
||||
}
|
||||
return apimachineryvalidation.NameIsDNSSubdomain(name, isPrefix)
|
||||
}
|
||||
|
||||
requiredPrefix := strings.ReplaceAll(signerName, "/", ":") + ":"
|
||||
if !strings.HasPrefix(name, requiredPrefix) {
|
||||
return []string{fmt.Sprintf("ClusterTrustBundle for signerName %s must be named with prefix %s", signerName, requiredPrefix)}
|
||||
}
|
||||
return apimachineryvalidation.NameIsDNSSubdomain(strings.TrimPrefix(name, requiredPrefix), isPrefix)
|
||||
}
|
||||
}
|
||||
|
||||
func extractSignerNameFromClusterTrustBundleName(name string) (string, bool) {
|
||||
if splitPoint := strings.LastIndex(name, ":"); splitPoint != -1 {
|
||||
// This looks like it refers to a signerName trustbundle.
|
||||
return strings.ReplaceAll(name[:splitPoint], ":", "/"), true
|
||||
} else {
|
||||
return "", false
|
||||
}
|
||||
}
|
965
vendor/k8s.io/kubernetes/pkg/apis/core/validation/validation.go
generated
vendored
965
vendor/k8s.io/kubernetes/pkg/apis/core/validation/validation.go
generated
vendored
File diff suppressed because it is too large
Load Diff
143
vendor/k8s.io/kubernetes/pkg/apis/core/zz_generated.deepcopy.go
generated
vendored
143
vendor/k8s.io/kubernetes/pkg/apis/core/zz_generated.deepcopy.go
generated
vendored
@ -466,6 +466,42 @@ func (in *ClientIPConfig) DeepCopy() *ClientIPConfig {
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *ClusterTrustBundleProjection) DeepCopyInto(out *ClusterTrustBundleProjection) {
|
||||
*out = *in
|
||||
if in.Name != nil {
|
||||
in, out := &in.Name, &out.Name
|
||||
*out = new(string)
|
||||
**out = **in
|
||||
}
|
||||
if in.SignerName != nil {
|
||||
in, out := &in.SignerName, &out.SignerName
|
||||
*out = new(string)
|
||||
**out = **in
|
||||
}
|
||||
if in.LabelSelector != nil {
|
||||
in, out := &in.LabelSelector, &out.LabelSelector
|
||||
*out = new(v1.LabelSelector)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
if in.Optional != nil {
|
||||
in, out := &in.Optional, &out.Optional
|
||||
*out = new(bool)
|
||||
**out = **in
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterTrustBundleProjection.
|
||||
func (in *ClusterTrustBundleProjection) DeepCopy() *ClusterTrustBundleProjection {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(ClusterTrustBundleProjection)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *ComponentCondition) DeepCopyInto(out *ComponentCondition) {
|
||||
*out = *in
|
||||
@ -2045,6 +2081,11 @@ func (in *LifecycleHandler) DeepCopyInto(out *LifecycleHandler) {
|
||||
*out = new(TCPSocketAction)
|
||||
**out = **in
|
||||
}
|
||||
if in.Sleep != nil {
|
||||
in, out := &in.Sleep, &out.Sleep
|
||||
*out = new(SleepAction)
|
||||
**out = **in
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
@ -2230,6 +2271,11 @@ func (in *List) DeepCopyObject() runtime.Object {
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *LoadBalancerIngress) DeepCopyInto(out *LoadBalancerIngress) {
|
||||
*out = *in
|
||||
if in.IPMode != nil {
|
||||
in, out := &in.IPMode, &out.IPMode
|
||||
*out = new(LoadBalancerIPMode)
|
||||
**out = **in
|
||||
}
|
||||
if in.Ports != nil {
|
||||
in, out := &in.Ports, &out.Ports
|
||||
*out = make([]PortStatus, len(*in))
|
||||
@ -2310,6 +2356,22 @@ func (in *LocalVolumeSource) DeepCopy() *LocalVolumeSource {
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *ModifyVolumeStatus) DeepCopyInto(out *ModifyVolumeStatus) {
|
||||
*out = *in
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ModifyVolumeStatus.
|
||||
func (in *ModifyVolumeStatus) DeepCopy() *ModifyVolumeStatus {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(ModifyVolumeStatus)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *NFSVolumeSource) DeepCopyInto(out *NFSVolumeSource) {
|
||||
*out = *in
|
||||
@ -3058,6 +3120,11 @@ func (in *PersistentVolumeClaimSpec) DeepCopyInto(out *PersistentVolumeClaimSpec
|
||||
*out = new(TypedObjectReference)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
if in.VolumeAttributesClassName != nil {
|
||||
in, out := &in.VolumeAttributesClassName, &out.VolumeAttributesClassName
|
||||
*out = new(string)
|
||||
**out = **in
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
@ -3107,6 +3174,16 @@ func (in *PersistentVolumeClaimStatus) DeepCopyInto(out *PersistentVolumeClaimSt
|
||||
(*out)[key] = val
|
||||
}
|
||||
}
|
||||
if in.CurrentVolumeAttributesClassName != nil {
|
||||
in, out := &in.CurrentVolumeAttributesClassName, &out.CurrentVolumeAttributesClassName
|
||||
*out = new(string)
|
||||
**out = **in
|
||||
}
|
||||
if in.ModifyVolumeStatus != nil {
|
||||
in, out := &in.ModifyVolumeStatus, &out.ModifyVolumeStatus
|
||||
*out = new(ModifyVolumeStatus)
|
||||
**out = **in
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
@ -3349,6 +3426,11 @@ func (in *PersistentVolumeSpec) DeepCopyInto(out *PersistentVolumeSpec) {
|
||||
*out = new(VolumeNodeAffinity)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
if in.VolumeAttributesClassName != nil {
|
||||
in, out := &in.VolumeAttributesClassName, &out.VolumeAttributesClassName
|
||||
*out = new(string)
|
||||
**out = **in
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
@ -3474,6 +3556,16 @@ func (in *PodAffinityTerm) DeepCopyInto(out *PodAffinityTerm) {
|
||||
*out = new(v1.LabelSelector)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
if in.MatchLabelKeys != nil {
|
||||
in, out := &in.MatchLabelKeys, &out.MatchLabelKeys
|
||||
*out = make([]string, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
if in.MismatchLabelKeys != nil {
|
||||
in, out := &in.MismatchLabelKeys, &out.MismatchLabelKeys
|
||||
*out = make([]string, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
@ -5666,6 +5758,22 @@ func (in *SessionAffinityConfig) DeepCopy() *SessionAffinityConfig {
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *SleepAction) DeepCopyInto(out *SleepAction) {
|
||||
*out = *in
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SleepAction.
|
||||
func (in *SleepAction) DeepCopy() *SleepAction {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(SleepAction)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *StorageOSPersistentVolumeSource) DeepCopyInto(out *StorageOSPersistentVolumeSource) {
|
||||
*out = *in
|
||||
@ -6012,6 +6120,11 @@ func (in *VolumeProjection) DeepCopyInto(out *VolumeProjection) {
|
||||
*out = new(ServiceAccountTokenProjection)
|
||||
**out = **in
|
||||
}
|
||||
if in.ClusterTrustBundle != nil {
|
||||
in, out := &in.ClusterTrustBundle, &out.ClusterTrustBundle
|
||||
*out = new(ClusterTrustBundleProjection)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
@ -6025,6 +6138,36 @@ func (in *VolumeProjection) DeepCopy() *VolumeProjection {
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *VolumeResourceRequirements) DeepCopyInto(out *VolumeResourceRequirements) {
|
||||
*out = *in
|
||||
if in.Limits != nil {
|
||||
in, out := &in.Limits, &out.Limits
|
||||
*out = make(ResourceList, len(*in))
|
||||
for key, val := range *in {
|
||||
(*out)[key] = val.DeepCopy()
|
||||
}
|
||||
}
|
||||
if in.Requests != nil {
|
||||
in, out := &in.Requests, &out.Requests
|
||||
*out = make(ResourceList, len(*in))
|
||||
for key, val := range *in {
|
||||
(*out)[key] = val.DeepCopy()
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeResourceRequirements.
|
||||
func (in *VolumeResourceRequirements) DeepCopy() *VolumeResourceRequirements {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(VolumeResourceRequirements)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *VolumeSource) DeepCopyInto(out *VolumeSource) {
|
||||
*out = *in
|
||||
|
4
vendor/k8s.io/kubernetes/pkg/apis/networking/register.go
generated
vendored
4
vendor/k8s.io/kubernetes/pkg/apis/networking/register.go
generated
vendored
@ -52,10 +52,10 @@ func addKnownTypes(scheme *runtime.Scheme) error {
|
||||
&IngressList{},
|
||||
&IngressClass{},
|
||||
&IngressClassList{},
|
||||
&ClusterCIDR{},
|
||||
&ClusterCIDRList{},
|
||||
&IPAddress{},
|
||||
&IPAddressList{},
|
||||
&ServiceCIDR{},
|
||||
&ServiceCIDRList{},
|
||||
)
|
||||
return nil
|
||||
}
|
||||
|
119
vendor/k8s.io/kubernetes/pkg/apis/networking/types.go
generated
vendored
119
vendor/k8s.io/kubernetes/pkg/apis/networking/types.go
generated
vendored
@ -18,7 +18,6 @@ package networking
|
||||
|
||||
import (
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/types"
|
||||
"k8s.io/apimachinery/pkg/util/intstr"
|
||||
api "k8s.io/kubernetes/pkg/apis/core"
|
||||
)
|
||||
@ -599,71 +598,6 @@ type ServiceBackendPort struct {
|
||||
// +genclient:nonNamespaced
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// ClusterCIDR represents a single configuration for per-Node Pod CIDR
|
||||
// allocations when the MultiCIDRRangeAllocator is enabled (see the config for
|
||||
// kube-controller-manager). A cluster may have any number of ClusterCIDR
|
||||
// resources, all of which will be considered when allocating a CIDR for a
|
||||
// Node. A ClusterCIDR is eligible to be used for a given Node when the node
|
||||
// selector matches the node in question and has free CIDRs to allocate. In
|
||||
// case of multiple matching ClusterCIDR resources, the allocator will attempt
|
||||
// to break ties using internal heuristics, but any ClusterCIDR whose node
|
||||
// selector matches the Node may be used.
|
||||
type ClusterCIDR struct {
|
||||
metav1.TypeMeta
|
||||
|
||||
metav1.ObjectMeta
|
||||
|
||||
Spec ClusterCIDRSpec
|
||||
}
|
||||
|
||||
// ClusterCIDRSpec defines the desired state of ClusterCIDR.
|
||||
type ClusterCIDRSpec struct {
|
||||
// nodeSelector defines which nodes the config is applicable to.
|
||||
// An empty or nil nodeSelector selects all nodes.
|
||||
// This field is immutable.
|
||||
// +optional
|
||||
NodeSelector *api.NodeSelector
|
||||
|
||||
// perNodeHostBits defines the number of host bits to be configured per node.
|
||||
// A subnet mask determines how much of the address is used for network bits
|
||||
// and host bits. For example an IPv4 address of 192.168.0.0/24, splits the
|
||||
// address into 24 bits for the network portion and 8 bits for the host portion.
|
||||
// To allocate 256 IPs, set this field to 8 (a /24 mask for IPv4 or a /120 for IPv6).
|
||||
// Minimum value is 4 (16 IPs).
|
||||
// This field is immutable.
|
||||
// +required
|
||||
PerNodeHostBits int32
|
||||
|
||||
// ipv4 defines an IPv4 IP block in CIDR notation(e.g. "10.0.0.0/8").
|
||||
// At least one of ipv4 and ipv6 must be specified.
|
||||
// This field is immutable.
|
||||
// +optional
|
||||
IPv4 string
|
||||
|
||||
// ipv6 defines an IPv6 IP block in CIDR notation(e.g. "2001:db8::/64").
|
||||
// At least one of ipv4 and ipv6 must be specified.
|
||||
// This field is immutable.
|
||||
// +optional
|
||||
IPv6 string
|
||||
}
|
||||
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// ClusterCIDRList contains a list of ClusterCIDRs.
|
||||
type ClusterCIDRList struct {
|
||||
metav1.TypeMeta
|
||||
|
||||
// +optional
|
||||
metav1.ListMeta
|
||||
|
||||
// items is the list of ClusterCIDRs.
|
||||
Items []ClusterCIDR
|
||||
}
|
||||
|
||||
// +genclient
|
||||
// +genclient:nonNamespaced
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// IPAddress represents a single IP of a single IP Family. The object is designed to be used by APIs
|
||||
// that operate on IP addresses. The object is used by the Service core API for allocation of IP addresses.
|
||||
// An IP address can be represented in different formats, to guarantee the uniqueness of the IP,
|
||||
@ -695,9 +629,6 @@ type ParentReference struct {
|
||||
Namespace string
|
||||
// Name is the name of the object being referenced.
|
||||
Name string
|
||||
// UID is the uid of the object being referenced.
|
||||
// +optional
|
||||
UID types.UID
|
||||
}
|
||||
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
@ -711,3 +642,53 @@ type IPAddressList struct {
|
||||
// Items is the list of IPAddress
|
||||
Items []IPAddress
|
||||
}
|
||||
|
||||
// +genclient
|
||||
// +genclient:nonNamespaced
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// ServiceCIDR defines a range of IP addresses using CIDR format (e.g. 192.168.0.0/24 or 2001:db2::/64).
|
||||
// This range is used to allocate ClusterIPs to Service objects.
|
||||
type ServiceCIDR struct {
|
||||
metav1.TypeMeta
|
||||
// Standard object's metadata.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
|
||||
// +optional
|
||||
metav1.ObjectMeta
|
||||
// spec is the desired state of the ServiceCIDR.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
|
||||
// +optional
|
||||
Spec ServiceCIDRSpec
|
||||
// status represents the current state of the ServiceCIDR.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
|
||||
// +optional
|
||||
Status ServiceCIDRStatus
|
||||
}
|
||||
|
||||
type ServiceCIDRSpec struct {
|
||||
// CIDRs defines the IP blocks in CIDR notation (e.g. "192.168.0.0/24" or "2001:db8::/64")
|
||||
// from which to assign service cluster IPs. Max of two CIDRs is allowed, one of each IP family.
|
||||
// This field is immutable.
|
||||
// +optional
|
||||
CIDRs []string
|
||||
}
|
||||
|
||||
// ServiceCIDRStatus describes the current state of the ServiceCIDR.
|
||||
type ServiceCIDRStatus struct {
|
||||
// conditions holds an array of metav1.Condition that describe the state of the ServiceCIDR.
|
||||
Conditions []metav1.Condition
|
||||
}
|
||||
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
// +k8s:prerelease-lifecycle-gen:introduced=1.27
|
||||
|
||||
// ServiceCIDRList contains a list of ServiceCIDR objects.
|
||||
type ServiceCIDRList struct {
|
||||
metav1.TypeMeta
|
||||
// Standard object's metadata.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
|
||||
// +optional
|
||||
metav1.ListMeta
|
||||
// items is the list of ServiceCIDRs.
|
||||
Items []ServiceCIDR
|
||||
}
|
||||
|
186
vendor/k8s.io/kubernetes/pkg/apis/networking/zz_generated.deepcopy.go
generated
vendored
186
vendor/k8s.io/kubernetes/pkg/apis/networking/zz_generated.deepcopy.go
generated
vendored
@ -28,87 +28,6 @@ import (
|
||||
core "k8s.io/kubernetes/pkg/apis/core"
|
||||
)
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *ClusterCIDR) DeepCopyInto(out *ClusterCIDR) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
||||
in.Spec.DeepCopyInto(&out.Spec)
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterCIDR.
|
||||
func (in *ClusterCIDR) DeepCopy() *ClusterCIDR {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(ClusterCIDR)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *ClusterCIDR) DeepCopyObject() runtime.Object {
|
||||
if c := in.DeepCopy(); c != nil {
|
||||
return c
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *ClusterCIDRList) DeepCopyInto(out *ClusterCIDRList) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ListMeta.DeepCopyInto(&out.ListMeta)
|
||||
if in.Items != nil {
|
||||
in, out := &in.Items, &out.Items
|
||||
*out = make([]ClusterCIDR, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterCIDRList.
|
||||
func (in *ClusterCIDRList) DeepCopy() *ClusterCIDRList {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(ClusterCIDRList)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *ClusterCIDRList) DeepCopyObject() runtime.Object {
|
||||
if c := in.DeepCopy(); c != nil {
|
||||
return c
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *ClusterCIDRSpec) DeepCopyInto(out *ClusterCIDRSpec) {
|
||||
*out = *in
|
||||
if in.NodeSelector != nil {
|
||||
in, out := &in.NodeSelector, &out.NodeSelector
|
||||
*out = new(core.NodeSelector)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterCIDRSpec.
|
||||
func (in *ClusterCIDRSpec) DeepCopy() *ClusterCIDRSpec {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(ClusterCIDRSpec)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *HTTPIngressPath) DeepCopyInto(out *HTTPIngressPath) {
|
||||
*out = *in
|
||||
@ -904,3 +823,108 @@ func (in *ServiceBackendPort) DeepCopy() *ServiceBackendPort {
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *ServiceCIDR) DeepCopyInto(out *ServiceCIDR) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
||||
in.Spec.DeepCopyInto(&out.Spec)
|
||||
in.Status.DeepCopyInto(&out.Status)
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceCIDR.
|
||||
func (in *ServiceCIDR) DeepCopy() *ServiceCIDR {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(ServiceCIDR)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *ServiceCIDR) DeepCopyObject() runtime.Object {
|
||||
if c := in.DeepCopy(); c != nil {
|
||||
return c
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *ServiceCIDRList) DeepCopyInto(out *ServiceCIDRList) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ListMeta.DeepCopyInto(&out.ListMeta)
|
||||
if in.Items != nil {
|
||||
in, out := &in.Items, &out.Items
|
||||
*out = make([]ServiceCIDR, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceCIDRList.
|
||||
func (in *ServiceCIDRList) DeepCopy() *ServiceCIDRList {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(ServiceCIDRList)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *ServiceCIDRList) DeepCopyObject() runtime.Object {
|
||||
if c := in.DeepCopy(); c != nil {
|
||||
return c
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *ServiceCIDRSpec) DeepCopyInto(out *ServiceCIDRSpec) {
|
||||
*out = *in
|
||||
if in.CIDRs != nil {
|
||||
in, out := &in.CIDRs, &out.CIDRs
|
||||
*out = make([]string, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceCIDRSpec.
|
||||
func (in *ServiceCIDRSpec) DeepCopy() *ServiceCIDRSpec {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(ServiceCIDRSpec)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *ServiceCIDRStatus) DeepCopyInto(out *ServiceCIDRStatus) {
|
||||
*out = *in
|
||||
if in.Conditions != nil {
|
||||
in, out := &in.Conditions, &out.Conditions
|
||||
*out = make([]v1.Condition, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceCIDRStatus.
|
||||
func (in *ServiceCIDRStatus) DeepCopy() *ServiceCIDRStatus {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(ServiceCIDRStatus)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
Reference in New Issue
Block a user