mirror of
https://github.com/kubernetes/client-go.git
synced 2026-06-13 20:56:36 +00:00
Compare commits
1 Commits
v0.35.6
...
v0.35.0-al
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0ee46383f1 |
@@ -40,7 +40,7 @@ type DeploymentStatusApplyConfiguration struct {
|
||||
// Total number of terminating pods targeted by this deployment. Terminating pods have a non-null
|
||||
// .metadata.deletionTimestamp and have not yet reached the Failed or Succeeded .status.phase.
|
||||
//
|
||||
// This is a beta field and requires enabling DeploymentReplicaSetTerminatingReplicas feature (enabled by default).
|
||||
// This is an alpha field. Enable DeploymentReplicaSetTerminatingReplicas to be able to use this field.
|
||||
TerminatingReplicas *int32 `json:"terminatingReplicas,omitempty"`
|
||||
// Represents the latest available observations of a deployment's current state.
|
||||
Conditions []DeploymentConditionApplyConfiguration `json:"conditions,omitempty"`
|
||||
|
||||
@@ -35,7 +35,7 @@ type ReplicaSetStatusApplyConfiguration struct {
|
||||
// The number of terminating pods for this replica set. Terminating pods have a non-null .metadata.deletionTimestamp
|
||||
// and have not yet reached the Failed or Succeeded .status.phase.
|
||||
//
|
||||
// This is a beta field and requires enabling DeploymentReplicaSetTerminatingReplicas feature (enabled by default).
|
||||
// This is an alpha field. Enable DeploymentReplicaSetTerminatingReplicas to be able to use this field.
|
||||
TerminatingReplicas *int32 `json:"terminatingReplicas,omitempty"`
|
||||
// ObservedGeneration reflects the generation of the most recently observed ReplicaSet.
|
||||
ObservedGeneration *int64 `json:"observedGeneration,omitempty"`
|
||||
|
||||
@@ -40,7 +40,7 @@ type DeploymentStatusApplyConfiguration struct {
|
||||
// Total number of terminating pods targeted by this deployment. Terminating pods have a non-null
|
||||
// .metadata.deletionTimestamp and have not yet reached the Failed or Succeeded .status.phase.
|
||||
//
|
||||
// This is a beta field and requires enabling DeploymentReplicaSetTerminatingReplicas feature (enabled by default).
|
||||
// This is an alpha field. Enable DeploymentReplicaSetTerminatingReplicas to be able to use this field.
|
||||
TerminatingReplicas *int32 `json:"terminatingReplicas,omitempty"`
|
||||
// Represents the latest available observations of a deployment's current state.
|
||||
Conditions []DeploymentConditionApplyConfiguration `json:"conditions,omitempty"`
|
||||
|
||||
@@ -40,7 +40,7 @@ type DeploymentStatusApplyConfiguration struct {
|
||||
// Total number of terminating pods targeted by this deployment. Terminating pods have a non-null
|
||||
// .metadata.deletionTimestamp and have not yet reached the Failed or Succeeded .status.phase.
|
||||
//
|
||||
// This is a beta field and requires enabling DeploymentReplicaSetTerminatingReplicas feature (enabled by default).
|
||||
// This is an alpha field. Enable DeploymentReplicaSetTerminatingReplicas to be able to use this field.
|
||||
TerminatingReplicas *int32 `json:"terminatingReplicas,omitempty"`
|
||||
// Represents the latest available observations of a deployment's current state.
|
||||
Conditions []DeploymentConditionApplyConfiguration `json:"conditions,omitempty"`
|
||||
|
||||
@@ -35,7 +35,7 @@ type ReplicaSetStatusApplyConfiguration struct {
|
||||
// The number of terminating pods for this replica set. Terminating pods have a non-null .metadata.deletionTimestamp
|
||||
// and have not yet reached the Failed or Succeeded .status.phase.
|
||||
//
|
||||
// This is a beta field and requires enabling DeploymentReplicaSetTerminatingReplicas feature (enabled by default).
|
||||
// This is an alpha field. Enable DeploymentReplicaSetTerminatingReplicas to be able to use this field.
|
||||
TerminatingReplicas *int32 `json:"terminatingReplicas,omitempty"`
|
||||
// ObservedGeneration reflects the generation of the most recently observed ReplicaSet.
|
||||
ObservedGeneration *int64 `json:"observedGeneration,omitempty"`
|
||||
|
||||
@@ -159,6 +159,9 @@ type JobSpecApplyConfiguration struct {
|
||||
// by RFC 1123. All characters trailing the first "/" must be valid HTTP Path
|
||||
// characters as defined by RFC 3986. The value cannot exceed 63 characters.
|
||||
// This field is immutable.
|
||||
//
|
||||
// This field is beta-level. The job controller accepts setting the field
|
||||
// when the feature gate JobManagedBy is enabled (enabled by default).
|
||||
ManagedBy *string `json:"managedBy,omitempty"`
|
||||
}
|
||||
|
||||
|
||||
@@ -16,10 +16,10 @@ limitations under the License.
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1beta1
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
certificatesv1beta1 "k8s.io/api/certificates/v1beta1"
|
||||
certificatesv1alpha1 "k8s.io/api/certificates/v1alpha1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
||||
@@ -51,7 +51,7 @@ func PodCertificateRequest(name, namespace string) *PodCertificateRequestApplyCo
|
||||
b.WithName(name)
|
||||
b.WithNamespace(namespace)
|
||||
b.WithKind("PodCertificateRequest")
|
||||
b.WithAPIVersion("certificates.k8s.io/v1beta1")
|
||||
b.WithAPIVersion("certificates.k8s.io/v1alpha1")
|
||||
return b
|
||||
}
|
||||
|
||||
@@ -62,9 +62,9 @@ func PodCertificateRequest(name, namespace string) *PodCertificateRequestApplyCo
|
||||
// ExtractPodCertificateRequestFrom 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 ExtractPodCertificateRequestFrom(podCertificateRequest *certificatesv1beta1.PodCertificateRequest, fieldManager string, subresource string) (*PodCertificateRequestApplyConfiguration, error) {
|
||||
func ExtractPodCertificateRequestFrom(podCertificateRequest *certificatesv1alpha1.PodCertificateRequest, fieldManager string, subresource string) (*PodCertificateRequestApplyConfiguration, error) {
|
||||
b := &PodCertificateRequestApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(podCertificateRequest, internal.Parser().Type("io.k8s.api.certificates.v1beta1.PodCertificateRequest"), fieldManager, b, subresource)
|
||||
err := managedfields.ExtractInto(podCertificateRequest, internal.Parser().Type("io.k8s.api.certificates.v1alpha1.PodCertificateRequest"), fieldManager, b, subresource)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -72,7 +72,7 @@ func ExtractPodCertificateRequestFrom(podCertificateRequest *certificatesv1beta1
|
||||
b.WithNamespace(podCertificateRequest.Namespace)
|
||||
|
||||
b.WithKind("PodCertificateRequest")
|
||||
b.WithAPIVersion("certificates.k8s.io/v1beta1")
|
||||
b.WithAPIVersion("certificates.k8s.io/v1alpha1")
|
||||
return b, nil
|
||||
}
|
||||
|
||||
@@ -86,13 +86,13 @@ func ExtractPodCertificateRequestFrom(podCertificateRequest *certificatesv1beta1
|
||||
// ExtractPodCertificateRequest 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 ExtractPodCertificateRequest(podCertificateRequest *certificatesv1beta1.PodCertificateRequest, fieldManager string) (*PodCertificateRequestApplyConfiguration, error) {
|
||||
func ExtractPodCertificateRequest(podCertificateRequest *certificatesv1alpha1.PodCertificateRequest, fieldManager string) (*PodCertificateRequestApplyConfiguration, error) {
|
||||
return ExtractPodCertificateRequestFrom(podCertificateRequest, fieldManager, "")
|
||||
}
|
||||
|
||||
// ExtractPodCertificateRequestStatus extracts the applied configuration owned by fieldManager from
|
||||
// podCertificateRequest for the status subresource.
|
||||
func ExtractPodCertificateRequestStatus(podCertificateRequest *certificatesv1beta1.PodCertificateRequest, fieldManager string) (*PodCertificateRequestApplyConfiguration, error) {
|
||||
func ExtractPodCertificateRequestStatus(podCertificateRequest *certificatesv1alpha1.PodCertificateRequest, fieldManager string) (*PodCertificateRequestApplyConfiguration, error) {
|
||||
return ExtractPodCertificateRequestFrom(podCertificateRequest, fieldManager, "status")
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ limitations under the License.
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1beta1
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
@@ -96,17 +96,6 @@ type PodCertificateRequestSpecApplyConfiguration struct {
|
||||
// [ED25519 Specification](https://ed25519.cr.yp.to/) (as implemented by
|
||||
// the golang library crypto/ed25519.Sign).
|
||||
ProofOfPossession []byte `json:"proofOfPossession,omitempty"`
|
||||
// unverifiedUserAnnotations allow pod authors to pass additional information to
|
||||
// the signer implementation. Kubernetes does not restrict or validate this
|
||||
// metadata in any way.
|
||||
//
|
||||
// Entries are subject to the same validation as object metadata annotations,
|
||||
// with the addition that all keys must be domain-prefixed. No restrictions
|
||||
// are placed on values, except an overall size limitation on the entire field.
|
||||
//
|
||||
// Signers should document the keys and values they support. Signers should
|
||||
// deny requests that contain keys they do not recognize.
|
||||
UnverifiedUserAnnotations map[string]string `json:"unverifiedUserAnnotations,omitempty"`
|
||||
}
|
||||
|
||||
// PodCertificateRequestSpecApplyConfiguration constructs a declarative configuration of the PodCertificateRequestSpec type for use with
|
||||
@@ -198,17 +187,3 @@ func (b *PodCertificateRequestSpecApplyConfiguration) WithProofOfPossession(valu
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithUnverifiedUserAnnotations puts the entries into the UnverifiedUserAnnotations 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 UnverifiedUserAnnotations field,
|
||||
// overwriting an existing map entries in UnverifiedUserAnnotations field with the same key.
|
||||
func (b *PodCertificateRequestSpecApplyConfiguration) WithUnverifiedUserAnnotations(entries map[string]string) *PodCertificateRequestSpecApplyConfiguration {
|
||||
if b.UnverifiedUserAnnotations == nil && len(entries) > 0 {
|
||||
b.UnverifiedUserAnnotations = make(map[string]string, len(entries))
|
||||
}
|
||||
for k, v := range entries {
|
||||
b.UnverifiedUserAnnotations[k] = v
|
||||
}
|
||||
return b
|
||||
}
|
||||
@@ -16,7 +16,7 @@ limitations under the License.
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1beta1
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
@@ -68,8 +68,6 @@ type NodeStatusApplyConfiguration struct {
|
||||
RuntimeHandlers []NodeRuntimeHandlerApplyConfiguration `json:"runtimeHandlers,omitempty"`
|
||||
// Features describes the set of features implemented by the CRI implementation.
|
||||
Features *NodeFeaturesApplyConfiguration `json:"features,omitempty"`
|
||||
// DeclaredFeatures represents the features related to feature gates that are declared by the node.
|
||||
DeclaredFeatures []string `json:"declaredFeatures,omitempty"`
|
||||
}
|
||||
|
||||
// NodeStatusApplyConfiguration constructs a declarative configuration of the NodeStatus type for use with
|
||||
@@ -208,13 +206,3 @@ func (b *NodeStatusApplyConfiguration) WithFeatures(value *NodeFeaturesApplyConf
|
||||
b.Features = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithDeclaredFeatures adds the given value to the DeclaredFeatures 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 DeclaredFeatures field.
|
||||
func (b *NodeStatusApplyConfiguration) WithDeclaredFeatures(values ...string) *NodeStatusApplyConfiguration {
|
||||
for i := range values {
|
||||
b.DeclaredFeatures = append(b.DeclaredFeatures, values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
@@ -58,7 +58,6 @@ type PersistentVolumeSpecApplyConfiguration struct {
|
||||
VolumeMode *corev1.PersistentVolumeMode `json:"volumeMode,omitempty"`
|
||||
// nodeAffinity defines constraints that limit what nodes this volume can be accessed from.
|
||||
// This field influences the scheduling of pods that use this volume.
|
||||
// This field is mutable if MutablePVNodeAffinity feature gate is enabled.
|
||||
NodeAffinity *VolumeNodeAffinityApplyConfiguration `json:"nodeAffinity,omitempty"`
|
||||
// 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
|
||||
|
||||
@@ -75,20 +75,6 @@ type PodCertificateProjectionApplyConfiguration struct {
|
||||
// and leaf certificate are consistent, because it is possible to read the
|
||||
// files mid-rotation.
|
||||
CertificateChainPath *string `json:"certificateChainPath,omitempty"`
|
||||
// userAnnotations allow pod authors to pass additional information to
|
||||
// the signer implementation. Kubernetes does not restrict or validate this
|
||||
// metadata in any way.
|
||||
//
|
||||
// These values are copied verbatim into the `spec.unverifiedUserAnnotations` field of
|
||||
// the PodCertificateRequest objects that Kubelet creates.
|
||||
//
|
||||
// Entries are subject to the same validation as object metadata annotations,
|
||||
// with the addition that all keys must be domain-prefixed. No restrictions
|
||||
// are placed on values, except an overall size limitation on the entire field.
|
||||
//
|
||||
// Signers should document the keys and values they support. Signers should
|
||||
// deny requests that contain keys they do not recognize.
|
||||
UserAnnotations map[string]string `json:"userAnnotations,omitempty"`
|
||||
}
|
||||
|
||||
// PodCertificateProjectionApplyConfiguration constructs a declarative configuration of the PodCertificateProjection type for use with
|
||||
@@ -144,17 +130,3 @@ func (b *PodCertificateProjectionApplyConfiguration) WithCertificateChainPath(va
|
||||
b.CertificateChainPath = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithUserAnnotations puts the entries into the UserAnnotations 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 UserAnnotations field,
|
||||
// overwriting an existing map entries in UserAnnotations field with the same key.
|
||||
func (b *PodCertificateProjectionApplyConfiguration) WithUserAnnotations(entries map[string]string) *PodCertificateProjectionApplyConfiguration {
|
||||
if b.UserAnnotations == nil && len(entries) > 0 {
|
||||
b.UserAnnotations = make(map[string]string, len(entries))
|
||||
}
|
||||
for k, v := range entries {
|
||||
b.UserAnnotations[k] = v
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
@@ -273,14 +273,6 @@ type PodSpecApplyConfiguration struct {
|
||||
// This field must be a valid DNS subdomain as defined in RFC 1123 and contain at most 64 characters.
|
||||
// Requires the HostnameOverride feature gate to be enabled.
|
||||
HostnameOverride *string `json:"hostnameOverride,omitempty"`
|
||||
// WorkloadRef provides a reference to the Workload object that this Pod belongs to.
|
||||
// This field is used by the scheduler to identify the PodGroup and apply the
|
||||
// correct group scheduling policies. The Workload object referenced
|
||||
// by this field may not exist at the time the Pod is created.
|
||||
// This field is immutable, but a Workload object with the same name
|
||||
// may be recreated with different policies. Doing this during pod scheduling
|
||||
// may result in the placement not conforming to the expected policies.
|
||||
WorkloadRef *WorkloadReferenceApplyConfiguration `json:"workloadRef,omitempty"`
|
||||
}
|
||||
|
||||
// PodSpecApplyConfiguration constructs a declarative configuration of the PodSpec type for use with
|
||||
@@ -677,11 +669,3 @@ func (b *PodSpecApplyConfiguration) WithHostnameOverride(value string) *PodSpecA
|
||||
b.HostnameOverride = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithWorkloadRef sets the WorkloadRef 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 WorkloadRef field is set to the value of the last call.
|
||||
func (b *PodSpecApplyConfiguration) WithWorkloadRef(value *WorkloadReferenceApplyConfiguration) *PodSpecApplyConfiguration {
|
||||
b.WorkloadRef = value
|
||||
return b
|
||||
}
|
||||
|
||||
@@ -131,14 +131,6 @@ type PodStatusApplyConfiguration struct {
|
||||
ResourceClaimStatuses []PodResourceClaimStatusApplyConfiguration `json:"resourceClaimStatuses,omitempty"`
|
||||
// Status of extended resource claim backed by DRA.
|
||||
ExtendedResourceClaimStatus *PodExtendedResourceClaimStatusApplyConfiguration `json:"extendedResourceClaimStatus,omitempty"`
|
||||
// AllocatedResources is the total requests allocated for this pod by the node.
|
||||
// If pod-level requests are not set, this will be the total requests aggregated
|
||||
// across containers in the pod.
|
||||
AllocatedResources *corev1.ResourceList `json:"allocatedResources,omitempty"`
|
||||
// Resources represents the compute resource requests and limits that have been
|
||||
// applied at the pod level if pod-level requests or limits are set in
|
||||
// PodSpec.Resources
|
||||
Resources *ResourceRequirementsApplyConfiguration `json:"resources,omitempty"`
|
||||
}
|
||||
|
||||
// PodStatusApplyConfiguration constructs a declarative configuration of the PodStatus type for use with
|
||||
@@ -325,19 +317,3 @@ func (b *PodStatusApplyConfiguration) WithExtendedResourceClaimStatus(value *Pod
|
||||
b.ExtendedResourceClaimStatus = value
|
||||
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 *PodStatusApplyConfiguration) WithAllocatedResources(value corev1.ResourceList) *PodStatusApplyConfiguration {
|
||||
b.AllocatedResources = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithResources sets the Resources 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 Resources field is set to the value of the last call.
|
||||
func (b *PodStatusApplyConfiguration) WithResources(value *ResourceRequirementsApplyConfiguration) *PodStatusApplyConfiguration {
|
||||
b.Resources = value
|
||||
return b
|
||||
}
|
||||
|
||||
@@ -32,10 +32,9 @@ type TolerationApplyConfiguration struct {
|
||||
// If the key is empty, operator must be Exists; this combination means to match all values and all keys.
|
||||
Key *string `json:"key,omitempty"`
|
||||
// Operator represents a key's relationship to the value.
|
||||
// Valid operators are Exists, Equal, Lt, and Gt. Defaults to Equal.
|
||||
// Valid operators are Exists and Equal. Defaults to Equal.
|
||||
// Exists is equivalent to wildcard for value, so that a pod can
|
||||
// tolerate all taints of a particular category.
|
||||
// Lt and Gt perform numeric comparisons (requires feature gate TaintTolerationComparisonOperators).
|
||||
Operator *corev1.TolerationOperator `json:"operator,omitempty"`
|
||||
// Value is the taint value the toleration matches to.
|
||||
// If the operator is Exists, the value should be empty, otherwise just a regular string.
|
||||
|
||||
@@ -1,74 +0,0 @@
|
||||
/*
|
||||
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
|
||||
|
||||
// WorkloadReferenceApplyConfiguration represents a declarative configuration of the WorkloadReference type for use
|
||||
// with apply.
|
||||
//
|
||||
// WorkloadReference identifies the Workload object and PodGroup membership
|
||||
// that a Pod belongs to. The scheduler uses this information to apply
|
||||
// workload-aware scheduling semantics.
|
||||
type WorkloadReferenceApplyConfiguration struct {
|
||||
// Name defines the name of the Workload object this Pod belongs to.
|
||||
// Workload must be in the same namespace as the Pod.
|
||||
// If it doesn't match any existing Workload, the Pod will remain unschedulable
|
||||
// until a Workload object is created and observed by the kube-scheduler.
|
||||
// It must be a DNS subdomain.
|
||||
Name *string `json:"name,omitempty"`
|
||||
// PodGroup is the name of the PodGroup within the Workload that this Pod
|
||||
// belongs to. If it doesn't match any existing PodGroup within the Workload,
|
||||
// the Pod will remain unschedulable until the Workload object is recreated
|
||||
// and observed by the kube-scheduler. It must be a DNS label.
|
||||
PodGroup *string `json:"podGroup,omitempty"`
|
||||
// PodGroupReplicaKey specifies the replica key of the PodGroup to which this
|
||||
// Pod belongs. It is used to distinguish pods belonging to different replicas
|
||||
// of the same pod group. The pod group policy is applied separately to each replica.
|
||||
// When set, it must be a DNS label.
|
||||
PodGroupReplicaKey *string `json:"podGroupReplicaKey,omitempty"`
|
||||
}
|
||||
|
||||
// WorkloadReferenceApplyConfiguration constructs a declarative configuration of the WorkloadReference type for use with
|
||||
// apply.
|
||||
func WorkloadReference() *WorkloadReferenceApplyConfiguration {
|
||||
return &WorkloadReferenceApplyConfiguration{}
|
||||
}
|
||||
|
||||
// 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 *WorkloadReferenceApplyConfiguration) WithName(value string) *WorkloadReferenceApplyConfiguration {
|
||||
b.Name = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithPodGroup sets the PodGroup 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 PodGroup field is set to the value of the last call.
|
||||
func (b *WorkloadReferenceApplyConfiguration) WithPodGroup(value string) *WorkloadReferenceApplyConfiguration {
|
||||
b.PodGroup = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithPodGroupReplicaKey sets the PodGroupReplicaKey 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 PodGroupReplicaKey field is set to the value of the last call.
|
||||
func (b *WorkloadReferenceApplyConfiguration) WithPodGroupReplicaKey(value string) *WorkloadReferenceApplyConfiguration {
|
||||
b.PodGroupReplicaKey = &value
|
||||
return b
|
||||
}
|
||||
@@ -28,6 +28,8 @@ type EndpointHintsApplyConfiguration struct {
|
||||
ForZones []ForZoneApplyConfiguration `json:"forZones,omitempty"`
|
||||
// forNodes indicates the node(s) this endpoint should be consumed by when
|
||||
// using topology aware routing. May contain a maximum of 8 entries.
|
||||
// This is an Alpha feature and is only used when the PreferSameTrafficDistribution
|
||||
// feature gate is enabled.
|
||||
ForNodes []ForNodeApplyConfiguration `json:"forNodes,omitempty"`
|
||||
}
|
||||
|
||||
|
||||
@@ -28,6 +28,8 @@ type EndpointHintsApplyConfiguration struct {
|
||||
ForZones []ForZoneApplyConfiguration `json:"forZones,omitempty"`
|
||||
// forNodes indicates the node(s) this endpoint should be consumed by when
|
||||
// using topology aware routing. May contain a maximum of 8 entries.
|
||||
// This is an Alpha feature and is only used when the PreferSameTrafficDistribution
|
||||
// feature gate is enabled.
|
||||
ForNodes []ForNodeApplyConfiguration `json:"forNodes,omitempty"`
|
||||
}
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ type DeploymentStatusApplyConfiguration struct {
|
||||
// Total number of terminating pods targeted by this deployment. Terminating pods have a non-null
|
||||
// .metadata.deletionTimestamp and have not yet reached the Failed or Succeeded .status.phase.
|
||||
//
|
||||
// This is a beta field and requires enabling DeploymentReplicaSetTerminatingReplicas feature (enabled by default).
|
||||
// This is an alpha field. Enable DeploymentReplicaSetTerminatingReplicas to be able to use this field.
|
||||
TerminatingReplicas *int32 `json:"terminatingReplicas,omitempty"`
|
||||
// Represents the latest available observations of a deployment's current state.
|
||||
Conditions []DeploymentConditionApplyConfiguration `json:"conditions,omitempty"`
|
||||
|
||||
@@ -35,7 +35,7 @@ type ReplicaSetStatusApplyConfiguration struct {
|
||||
// The number of terminating pods for this replica set. Terminating pods have a non-null .metadata.deletionTimestamp
|
||||
// and have not yet reached the Failed or Succeeded .status.phase.
|
||||
//
|
||||
// This is a beta field and requires enabling DeploymentReplicaSetTerminatingReplicas feature (enabled by default).
|
||||
// This is an alpha field. Enable DeploymentReplicaSetTerminatingReplicas to be able to use this field.
|
||||
TerminatingReplicas *int32 `json:"terminatingReplicas,omitempty"`
|
||||
// ObservedGeneration reflects the generation of the most recently observed ReplicaSet.
|
||||
ObservedGeneration *int64 `json:"observedGeneration,omitempty"`
|
||||
|
||||
@@ -4458,6 +4458,91 @@ var schemaYAML = typed.YAMLObject(`types:
|
||||
type:
|
||||
scalar: string
|
||||
default: ""
|
||||
- name: io.k8s.api.certificates.v1alpha1.PodCertificateRequest
|
||||
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.certificates.v1alpha1.PodCertificateRequestSpec
|
||||
default: {}
|
||||
- name: status
|
||||
type:
|
||||
namedType: io.k8s.api.certificates.v1alpha1.PodCertificateRequestStatus
|
||||
default: {}
|
||||
- name: io.k8s.api.certificates.v1alpha1.PodCertificateRequestSpec
|
||||
map:
|
||||
fields:
|
||||
- name: maxExpirationSeconds
|
||||
type:
|
||||
scalar: numeric
|
||||
default: 86400
|
||||
- name: nodeName
|
||||
type:
|
||||
scalar: string
|
||||
default: ""
|
||||
- name: nodeUID
|
||||
type:
|
||||
scalar: string
|
||||
default: ""
|
||||
- name: pkixPublicKey
|
||||
type:
|
||||
scalar: string
|
||||
- name: podName
|
||||
type:
|
||||
scalar: string
|
||||
default: ""
|
||||
- name: podUID
|
||||
type:
|
||||
scalar: string
|
||||
default: ""
|
||||
- name: proofOfPossession
|
||||
type:
|
||||
scalar: string
|
||||
- name: serviceAccountName
|
||||
type:
|
||||
scalar: string
|
||||
default: ""
|
||||
- name: serviceAccountUID
|
||||
type:
|
||||
scalar: string
|
||||
default: ""
|
||||
- name: signerName
|
||||
type:
|
||||
scalar: string
|
||||
default: ""
|
||||
- name: io.k8s.api.certificates.v1alpha1.PodCertificateRequestStatus
|
||||
map:
|
||||
fields:
|
||||
- name: beginRefreshAt
|
||||
type:
|
||||
namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time
|
||||
- name: certificateChain
|
||||
type:
|
||||
scalar: string
|
||||
- name: conditions
|
||||
type:
|
||||
list:
|
||||
elementType:
|
||||
namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Condition
|
||||
elementRelationship: associative
|
||||
keys:
|
||||
- type
|
||||
- name: notAfter
|
||||
type:
|
||||
namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time
|
||||
- name: notBefore
|
||||
type:
|
||||
namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time
|
||||
- name: io.k8s.api.certificates.v1beta1.CertificateSigningRequest
|
||||
map:
|
||||
fields:
|
||||
@@ -4581,96 +4666,6 @@ var schemaYAML = typed.YAMLObject(`types:
|
||||
type:
|
||||
scalar: string
|
||||
default: ""
|
||||
- name: io.k8s.api.certificates.v1beta1.PodCertificateRequest
|
||||
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.certificates.v1beta1.PodCertificateRequestSpec
|
||||
default: {}
|
||||
- name: status
|
||||
type:
|
||||
namedType: io.k8s.api.certificates.v1beta1.PodCertificateRequestStatus
|
||||
default: {}
|
||||
- name: io.k8s.api.certificates.v1beta1.PodCertificateRequestSpec
|
||||
map:
|
||||
fields:
|
||||
- name: maxExpirationSeconds
|
||||
type:
|
||||
scalar: numeric
|
||||
default: 86400
|
||||
- name: nodeName
|
||||
type:
|
||||
scalar: string
|
||||
default: ""
|
||||
- name: nodeUID
|
||||
type:
|
||||
scalar: string
|
||||
default: ""
|
||||
- name: pkixPublicKey
|
||||
type:
|
||||
scalar: string
|
||||
- name: podName
|
||||
type:
|
||||
scalar: string
|
||||
default: ""
|
||||
- name: podUID
|
||||
type:
|
||||
scalar: string
|
||||
default: ""
|
||||
- name: proofOfPossession
|
||||
type:
|
||||
scalar: string
|
||||
- name: serviceAccountName
|
||||
type:
|
||||
scalar: string
|
||||
default: ""
|
||||
- name: serviceAccountUID
|
||||
type:
|
||||
scalar: string
|
||||
default: ""
|
||||
- name: signerName
|
||||
type:
|
||||
scalar: string
|
||||
default: ""
|
||||
- name: unverifiedUserAnnotations
|
||||
type:
|
||||
map:
|
||||
elementType:
|
||||
scalar: string
|
||||
- name: io.k8s.api.certificates.v1beta1.PodCertificateRequestStatus
|
||||
map:
|
||||
fields:
|
||||
- name: beginRefreshAt
|
||||
type:
|
||||
namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time
|
||||
- name: certificateChain
|
||||
type:
|
||||
scalar: string
|
||||
- name: conditions
|
||||
type:
|
||||
list:
|
||||
elementType:
|
||||
namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Condition
|
||||
elementRelationship: associative
|
||||
keys:
|
||||
- type
|
||||
- name: notAfter
|
||||
type:
|
||||
namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time
|
||||
- name: notBefore
|
||||
type:
|
||||
namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time
|
||||
- name: io.k8s.api.coordination.v1.Lease
|
||||
map:
|
||||
fields:
|
||||
@@ -6770,12 +6765,6 @@ var schemaYAML = typed.YAMLObject(`types:
|
||||
type:
|
||||
namedType: io.k8s.api.core.v1.NodeDaemonEndpoints
|
||||
default: {}
|
||||
- name: declaredFeatures
|
||||
type:
|
||||
list:
|
||||
elementType:
|
||||
scalar: string
|
||||
elementRelationship: atomic
|
||||
- name: features
|
||||
type:
|
||||
namedType: io.k8s.api.core.v1.NodeFeatures
|
||||
@@ -7293,11 +7282,6 @@ var schemaYAML = typed.YAMLObject(`types:
|
||||
- name: signerName
|
||||
type:
|
||||
scalar: string
|
||||
- name: userAnnotations
|
||||
type:
|
||||
map:
|
||||
elementType:
|
||||
scalar: string
|
||||
- name: io.k8s.api.core.v1.PodCondition
|
||||
map:
|
||||
fields:
|
||||
@@ -7649,17 +7633,9 @@ var schemaYAML = typed.YAMLObject(`types:
|
||||
elementRelationship: associative
|
||||
keys:
|
||||
- name
|
||||
- name: workloadRef
|
||||
type:
|
||||
namedType: io.k8s.api.core.v1.WorkloadReference
|
||||
- name: io.k8s.api.core.v1.PodStatus
|
||||
map:
|
||||
fields:
|
||||
- name: allocatedResources
|
||||
type:
|
||||
map:
|
||||
elementType:
|
||||
namedType: io.k8s.apimachinery.pkg.api.resource.Quantity
|
||||
- name: conditions
|
||||
type:
|
||||
list:
|
||||
@@ -7738,9 +7714,6 @@ var schemaYAML = typed.YAMLObject(`types:
|
||||
elementRelationship: associative
|
||||
keys:
|
||||
- name
|
||||
- name: resources
|
||||
type:
|
||||
namedType: io.k8s.api.core.v1.ResourceRequirements
|
||||
- name: startTime
|
||||
type:
|
||||
namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time
|
||||
@@ -9034,20 +9007,6 @@ var schemaYAML = typed.YAMLObject(`types:
|
||||
- name: runAsUserName
|
||||
type:
|
||||
scalar: string
|
||||
- name: io.k8s.api.core.v1.WorkloadReference
|
||||
map:
|
||||
fields:
|
||||
- name: name
|
||||
type:
|
||||
scalar: string
|
||||
default: ""
|
||||
- name: podGroup
|
||||
type:
|
||||
scalar: string
|
||||
default: ""
|
||||
- name: podGroupReplicaKey
|
||||
type:
|
||||
scalar: string
|
||||
- name: io.k8s.api.discovery.v1.Endpoint
|
||||
map:
|
||||
fields:
|
||||
@@ -13517,6 +13476,19 @@ var schemaYAML = typed.YAMLObject(`types:
|
||||
elementType:
|
||||
namedType: io.k8s.api.resource.v1.CounterSet
|
||||
elementRelationship: atomic
|
||||
- name: io.k8s.api.resource.v1alpha3.CELDeviceSelector
|
||||
map:
|
||||
fields:
|
||||
- name: expression
|
||||
type:
|
||||
scalar: string
|
||||
default: ""
|
||||
- name: io.k8s.api.resource.v1alpha3.DeviceSelector
|
||||
map:
|
||||
fields:
|
||||
- name: cel
|
||||
type:
|
||||
namedType: io.k8s.api.resource.v1alpha3.CELDeviceSelector
|
||||
- name: io.k8s.api.resource.v1alpha3.DeviceTaint
|
||||
map:
|
||||
fields:
|
||||
@@ -13551,10 +13523,6 @@ var schemaYAML = typed.YAMLObject(`types:
|
||||
type:
|
||||
namedType: io.k8s.api.resource.v1alpha3.DeviceTaintRuleSpec
|
||||
default: {}
|
||||
- name: status
|
||||
type:
|
||||
namedType: io.k8s.api.resource.v1alpha3.DeviceTaintRuleStatus
|
||||
default: {}
|
||||
- name: io.k8s.api.resource.v1alpha3.DeviceTaintRuleSpec
|
||||
map:
|
||||
fields:
|
||||
@@ -13565,29 +13533,27 @@ var schemaYAML = typed.YAMLObject(`types:
|
||||
type:
|
||||
namedType: io.k8s.api.resource.v1alpha3.DeviceTaint
|
||||
default: {}
|
||||
- name: io.k8s.api.resource.v1alpha3.DeviceTaintRuleStatus
|
||||
map:
|
||||
fields:
|
||||
- name: conditions
|
||||
type:
|
||||
list:
|
||||
elementType:
|
||||
namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Condition
|
||||
elementRelationship: associative
|
||||
keys:
|
||||
- type
|
||||
- name: io.k8s.api.resource.v1alpha3.DeviceTaintSelector
|
||||
map:
|
||||
fields:
|
||||
- name: device
|
||||
type:
|
||||
scalar: string
|
||||
- name: deviceClassName
|
||||
type:
|
||||
scalar: string
|
||||
- name: driver
|
||||
type:
|
||||
scalar: string
|
||||
- name: pool
|
||||
type:
|
||||
scalar: string
|
||||
- name: selectors
|
||||
type:
|
||||
list:
|
||||
elementType:
|
||||
namedType: io.k8s.api.resource.v1alpha3.DeviceSelector
|
||||
elementRelationship: atomic
|
||||
- name: io.k8s.api.resource.v1beta1.AllocatedDeviceStatus
|
||||
map:
|
||||
fields:
|
||||
@@ -14968,45 +14934,6 @@ var schemaYAML = typed.YAMLObject(`types:
|
||||
type:
|
||||
scalar: numeric
|
||||
default: 0
|
||||
- name: io.k8s.api.scheduling.v1alpha1.BasicSchedulingPolicy
|
||||
map:
|
||||
elementType:
|
||||
scalar: untyped
|
||||
list:
|
||||
elementType:
|
||||
namedType: __untyped_atomic_
|
||||
elementRelationship: atomic
|
||||
map:
|
||||
elementType:
|
||||
namedType: __untyped_deduced_
|
||||
elementRelationship: separable
|
||||
- name: io.k8s.api.scheduling.v1alpha1.GangSchedulingPolicy
|
||||
map:
|
||||
fields:
|
||||
- name: minCount
|
||||
type:
|
||||
scalar: numeric
|
||||
default: 0
|
||||
- name: io.k8s.api.scheduling.v1alpha1.PodGroup
|
||||
map:
|
||||
fields:
|
||||
- name: name
|
||||
type:
|
||||
scalar: string
|
||||
default: ""
|
||||
- name: policy
|
||||
type:
|
||||
namedType: io.k8s.api.scheduling.v1alpha1.PodGroupPolicy
|
||||
default: {}
|
||||
- name: io.k8s.api.scheduling.v1alpha1.PodGroupPolicy
|
||||
map:
|
||||
fields:
|
||||
- name: basic
|
||||
type:
|
||||
namedType: io.k8s.api.scheduling.v1alpha1.BasicSchedulingPolicy
|
||||
- name: gang
|
||||
type:
|
||||
namedType: io.k8s.api.scheduling.v1alpha1.GangSchedulingPolicy
|
||||
- name: io.k8s.api.scheduling.v1alpha1.PriorityClass
|
||||
map:
|
||||
fields:
|
||||
@@ -15033,51 +14960,6 @@ var schemaYAML = typed.YAMLObject(`types:
|
||||
type:
|
||||
scalar: numeric
|
||||
default: 0
|
||||
- name: io.k8s.api.scheduling.v1alpha1.TypedLocalObjectReference
|
||||
map:
|
||||
fields:
|
||||
- name: apiGroup
|
||||
type:
|
||||
scalar: string
|
||||
- name: kind
|
||||
type:
|
||||
scalar: string
|
||||
default: ""
|
||||
- name: name
|
||||
type:
|
||||
scalar: string
|
||||
default: ""
|
||||
- name: io.k8s.api.scheduling.v1alpha1.Workload
|
||||
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.scheduling.v1alpha1.WorkloadSpec
|
||||
default: {}
|
||||
- name: io.k8s.api.scheduling.v1alpha1.WorkloadSpec
|
||||
map:
|
||||
fields:
|
||||
- name: controllerRef
|
||||
type:
|
||||
namedType: io.k8s.api.scheduling.v1alpha1.TypedLocalObjectReference
|
||||
- name: podGroups
|
||||
type:
|
||||
list:
|
||||
elementType:
|
||||
namedType: io.k8s.api.scheduling.v1alpha1.PodGroup
|
||||
elementRelationship: associative
|
||||
keys:
|
||||
- name
|
||||
- name: io.k8s.api.scheduling.v1beta1.PriorityClass
|
||||
map:
|
||||
fields:
|
||||
@@ -15142,9 +15024,6 @@ var schemaYAML = typed.YAMLObject(`types:
|
||||
- name: seLinuxMount
|
||||
type:
|
||||
scalar: boolean
|
||||
- name: serviceAccountTokenInSecrets
|
||||
type:
|
||||
scalar: boolean
|
||||
- name: storageCapacity
|
||||
type:
|
||||
scalar: boolean
|
||||
@@ -15551,9 +15430,6 @@ var schemaYAML = typed.YAMLObject(`types:
|
||||
- name: seLinuxMount
|
||||
type:
|
||||
scalar: boolean
|
||||
- name: serviceAccountTokenInSecrets
|
||||
type:
|
||||
scalar: boolean
|
||||
- name: storageCapacity
|
||||
type:
|
||||
scalar: boolean
|
||||
@@ -15799,7 +15675,39 @@ var schemaYAML = typed.YAMLObject(`types:
|
||||
- name: count
|
||||
type:
|
||||
scalar: numeric
|
||||
- name: io.k8s.api.storagemigration.v1beta1.StorageVersionMigration
|
||||
- name: io.k8s.api.storagemigration.v1alpha1.GroupVersionResource
|
||||
map:
|
||||
fields:
|
||||
- name: group
|
||||
type:
|
||||
scalar: string
|
||||
- name: resource
|
||||
type:
|
||||
scalar: string
|
||||
- name: version
|
||||
type:
|
||||
scalar: string
|
||||
- name: io.k8s.api.storagemigration.v1alpha1.MigrationCondition
|
||||
map:
|
||||
fields:
|
||||
- name: lastUpdateTime
|
||||
type:
|
||||
namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time
|
||||
- name: message
|
||||
type:
|
||||
scalar: string
|
||||
- name: reason
|
||||
type:
|
||||
scalar: string
|
||||
- name: status
|
||||
type:
|
||||
scalar: string
|
||||
default: ""
|
||||
- name: type
|
||||
type:
|
||||
scalar: string
|
||||
default: ""
|
||||
- name: io.k8s.api.storagemigration.v1alpha1.StorageVersionMigration
|
||||
map:
|
||||
fields:
|
||||
- name: apiVersion
|
||||
@@ -15814,27 +15722,30 @@ var schemaYAML = typed.YAMLObject(`types:
|
||||
default: {}
|
||||
- name: spec
|
||||
type:
|
||||
namedType: io.k8s.api.storagemigration.v1beta1.StorageVersionMigrationSpec
|
||||
namedType: io.k8s.api.storagemigration.v1alpha1.StorageVersionMigrationSpec
|
||||
default: {}
|
||||
- name: status
|
||||
type:
|
||||
namedType: io.k8s.api.storagemigration.v1beta1.StorageVersionMigrationStatus
|
||||
namedType: io.k8s.api.storagemigration.v1alpha1.StorageVersionMigrationStatus
|
||||
default: {}
|
||||
- name: io.k8s.api.storagemigration.v1beta1.StorageVersionMigrationSpec
|
||||
- name: io.k8s.api.storagemigration.v1alpha1.StorageVersionMigrationSpec
|
||||
map:
|
||||
fields:
|
||||
- name: continueToken
|
||||
type:
|
||||
scalar: string
|
||||
- name: resource
|
||||
type:
|
||||
namedType: io.k8s.apimachinery.pkg.apis.meta.v1.GroupResource
|
||||
namedType: io.k8s.api.storagemigration.v1alpha1.GroupVersionResource
|
||||
default: {}
|
||||
- name: io.k8s.api.storagemigration.v1beta1.StorageVersionMigrationStatus
|
||||
- name: io.k8s.api.storagemigration.v1alpha1.StorageVersionMigrationStatus
|
||||
map:
|
||||
fields:
|
||||
- name: conditions
|
||||
type:
|
||||
list:
|
||||
elementType:
|
||||
namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Condition
|
||||
namedType: io.k8s.api.storagemigration.v1alpha1.MigrationCondition
|
||||
elementRelationship: associative
|
||||
keys:
|
||||
- type
|
||||
@@ -15910,17 +15821,6 @@ var schemaYAML = typed.YAMLObject(`types:
|
||||
elementType:
|
||||
namedType: __untyped_deduced_
|
||||
elementRelationship: separable
|
||||
- name: io.k8s.apimachinery.pkg.apis.meta.v1.GroupResource
|
||||
map:
|
||||
fields:
|
||||
- name: group
|
||||
type:
|
||||
scalar: string
|
||||
default: ""
|
||||
- name: resource
|
||||
type:
|
||||
scalar: string
|
||||
default: ""
|
||||
- name: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector
|
||||
map:
|
||||
fields:
|
||||
|
||||
@@ -1,51 +0,0 @@
|
||||
/*
|
||||
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
|
||||
|
||||
// GroupResourceApplyConfiguration represents a declarative configuration of the GroupResource type for use
|
||||
// with apply.
|
||||
//
|
||||
// GroupResource specifies a Group and a Resource, but does not force a version. This is useful for identifying
|
||||
// concepts during lookup stages without having partially valid types
|
||||
type GroupResourceApplyConfiguration struct {
|
||||
Group *string `json:"group,omitempty"`
|
||||
Resource *string `json:"resource,omitempty"`
|
||||
}
|
||||
|
||||
// GroupResourceApplyConfiguration constructs a declarative configuration of the GroupResource type for use with
|
||||
// apply.
|
||||
func GroupResource() *GroupResourceApplyConfiguration {
|
||||
return &GroupResourceApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithGroup sets the Group 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 Group field is set to the value of the last call.
|
||||
func (b *GroupResourceApplyConfiguration) WithGroup(value string) *GroupResourceApplyConfiguration {
|
||||
b.Group = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// 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 *GroupResourceApplyConfiguration) WithResource(value string) *GroupResourceApplyConfiguration {
|
||||
b.Resource = &value
|
||||
return b
|
||||
}
|
||||
@@ -23,7 +23,7 @@ package v1
|
||||
//
|
||||
// CounterSet defines a named set of counters
|
||||
// that are available to be used by devices defined in the
|
||||
// ResourcePool.
|
||||
// ResourceSlice.
|
||||
//
|
||||
// The counters are not allocatable by themselves, but
|
||||
// can be referenced by devices. When a device is allocated,
|
||||
@@ -36,7 +36,7 @@ type CounterSetApplyConfiguration struct {
|
||||
// Counters defines the set of counters for this CounterSet
|
||||
// The name of each counter must be unique in that set and must be a DNS label.
|
||||
//
|
||||
// The maximum number of counters is 32.
|
||||
// The maximum number of counters in all sets is 32.
|
||||
Counters map[string]CounterApplyConfiguration `json:"counters,omitempty"`
|
||||
}
|
||||
|
||||
|
||||
@@ -48,8 +48,10 @@ type DeviceApplyConfiguration struct {
|
||||
//
|
||||
// There can only be a single entry per counterSet.
|
||||
//
|
||||
// The maximum number of device counter consumptions per
|
||||
// device is 2.
|
||||
// The total number of device counter consumption entries
|
||||
// must be <= 32. In addition, the total number in the
|
||||
// entire ResourceSlice must be <= 1024 (for example,
|
||||
// 64 devices with 16 counters each).
|
||||
ConsumesCounters []DeviceCounterConsumptionApplyConfiguration `json:"consumesCounters,omitempty"`
|
||||
// NodeName identifies the node where the device is available.
|
||||
//
|
||||
@@ -70,9 +72,7 @@ type DeviceApplyConfiguration struct {
|
||||
AllNodes *bool `json:"allNodes,omitempty"`
|
||||
// If specified, these are the driver-defined taints.
|
||||
//
|
||||
// The maximum number of taints is 16. If taints are set for
|
||||
// any device in a ResourceSlice, then the maximum number of
|
||||
// allowed devices per ResourceSlice is 64 instead of 128.
|
||||
// The maximum number of taints is 4.
|
||||
//
|
||||
// This is an alpha field and requires enabling the DRADeviceTaints
|
||||
// feature gate.
|
||||
|
||||
@@ -29,7 +29,10 @@ type DeviceCounterConsumptionApplyConfiguration struct {
|
||||
CounterSet *string `json:"counterSet,omitempty"`
|
||||
// Counters defines the counters that will be consumed by the device.
|
||||
//
|
||||
// The maximum number of counters is 32.
|
||||
// The maximum number counters in a device is 32.
|
||||
// In addition, the maximum number of all counters
|
||||
// in all devices is 1024 (for example, 64 devices with
|
||||
// 16 counters each).
|
||||
Counters map[string]CounterApplyConfiguration `json:"counters,omitempty"`
|
||||
}
|
||||
|
||||
|
||||
@@ -38,10 +38,8 @@ type DeviceTaintApplyConfiguration struct {
|
||||
Value *string `json:"value,omitempty"`
|
||||
// The effect of the taint on claims that do not tolerate the taint
|
||||
// and through such claims on the pods using them.
|
||||
//
|
||||
// Valid effects are None, NoSchedule and NoExecute. PreferNoSchedule as used for
|
||||
// nodes is not valid here. More effects may get added in the future.
|
||||
// Consumers must treat unknown effects like None.
|
||||
// Valid effects are NoSchedule and NoExecute. PreferNoSchedule as used for
|
||||
// nodes is not valid here.
|
||||
Effect *resourcev1.DeviceTaintEffect `json:"effect,omitempty"`
|
||||
// TimeAdded represents the time at which the taint was added.
|
||||
// Added automatically during create or update if not set.
|
||||
|
||||
@@ -62,9 +62,7 @@ type ResourceSliceSpecApplyConfiguration struct {
|
||||
AllNodes *bool `json:"allNodes,omitempty"`
|
||||
// Devices lists some or all of the devices in this pool.
|
||||
//
|
||||
// Must not have more than 128 entries. If any device uses taints or consumes counters the limit is 64.
|
||||
//
|
||||
// Only one of Devices and SharedCounters can be set in a ResourceSlice.
|
||||
// Must not have more than 128 entries.
|
||||
Devices []DeviceApplyConfiguration `json:"devices,omitempty"`
|
||||
// PerDeviceNodeSelection defines whether the access from nodes to
|
||||
// resources in the pool is set on the ResourceSlice level or on each
|
||||
@@ -76,11 +74,9 @@ type ResourceSliceSpecApplyConfiguration struct {
|
||||
// SharedCounters defines a list of counter sets, each of which
|
||||
// has a name and a list of counters available.
|
||||
//
|
||||
// The names of the counter sets must be unique in the ResourcePool.
|
||||
// The names of the SharedCounters must be unique in the ResourceSlice.
|
||||
//
|
||||
// Only one of Devices and SharedCounters can be set in a ResourceSlice.
|
||||
//
|
||||
// The maximum number of counter sets is 8.
|
||||
// The maximum number of counters in all sets is 32.
|
||||
SharedCounters []CounterSetApplyConfiguration `json:"sharedCounters,omitempty"`
|
||||
}
|
||||
|
||||
|
||||
91
applyconfigurations/resource/v1alpha3/celdeviceselector.go
Normal file
91
applyconfigurations/resource/v1alpha3/celdeviceselector.go
Normal file
@@ -0,0 +1,91 @@
|
||||
/*
|
||||
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 v1alpha3
|
||||
|
||||
// CELDeviceSelectorApplyConfiguration represents a declarative configuration of the CELDeviceSelector type for use
|
||||
// with apply.
|
||||
//
|
||||
// CELDeviceSelector contains a CEL expression for selecting a device.
|
||||
type CELDeviceSelectorApplyConfiguration struct {
|
||||
// Expression is a CEL expression which evaluates a single device. It
|
||||
// must evaluate to true when the device under consideration satisfies
|
||||
// the desired criteria, and false when it does not. Any other result
|
||||
// is an error and causes allocation of devices to abort.
|
||||
//
|
||||
// The expression's input is an object named "device", which carries
|
||||
// the following properties:
|
||||
// - driver (string): the name of the driver which defines this device.
|
||||
// - attributes (map[string]object): the device's attributes, grouped by prefix
|
||||
// (e.g. device.attributes["dra.example.com"] evaluates to an object with all
|
||||
// of the attributes which were prefixed by "dra.example.com".
|
||||
// - capacity (map[string]object): the device's capacities, grouped by prefix.
|
||||
//
|
||||
// Example: Consider a device with driver="dra.example.com", which exposes
|
||||
// two attributes named "model" and "ext.example.com/family" and which
|
||||
// exposes one capacity named "modules". This input to this expression
|
||||
// would have the following fields:
|
||||
//
|
||||
// device.driver
|
||||
// device.attributes["dra.example.com"].model
|
||||
// device.attributes["ext.example.com"].family
|
||||
// device.capacity["dra.example.com"].modules
|
||||
//
|
||||
// The device.driver field can be used to check for a specific driver,
|
||||
// either as a high-level precondition (i.e. you only want to consider
|
||||
// devices from this driver) or as part of a multi-clause expression
|
||||
// that is meant to consider devices from different drivers.
|
||||
//
|
||||
// The value type of each attribute is defined by the device
|
||||
// definition, and users who write these expressions must consult the
|
||||
// documentation for their specific drivers. The value type of each
|
||||
// capacity is Quantity.
|
||||
//
|
||||
// If an unknown prefix is used as a lookup in either device.attributes
|
||||
// or device.capacity, an empty map will be returned. Any reference to
|
||||
// an unknown field will cause an evaluation error and allocation to
|
||||
// abort.
|
||||
//
|
||||
// A robust expression should check for the existence of attributes
|
||||
// before referencing them.
|
||||
//
|
||||
// For ease of use, the cel.bind() function is enabled, and can be used
|
||||
// to simplify expressions that access multiple attributes with the
|
||||
// same domain. For example:
|
||||
//
|
||||
// cel.bind(dra, device.attributes["dra.example.com"], dra.someBool && dra.anotherBool)
|
||||
//
|
||||
// The length of the expression must be smaller or equal to 10 Ki. The
|
||||
// cost of evaluating it is also limited based on the estimated number
|
||||
// of logical steps.
|
||||
Expression *string `json:"expression,omitempty"`
|
||||
}
|
||||
|
||||
// CELDeviceSelectorApplyConfiguration constructs a declarative configuration of the CELDeviceSelector type for use with
|
||||
// apply.
|
||||
func CELDeviceSelector() *CELDeviceSelectorApplyConfiguration {
|
||||
return &CELDeviceSelectorApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithExpression sets the Expression 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 Expression field is set to the value of the last call.
|
||||
func (b *CELDeviceSelectorApplyConfiguration) WithExpression(value string) *CELDeviceSelectorApplyConfiguration {
|
||||
b.Expression = &value
|
||||
return b
|
||||
}
|
||||
42
applyconfigurations/resource/v1alpha3/deviceselector.go
Normal file
42
applyconfigurations/resource/v1alpha3/deviceselector.go
Normal file
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
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 v1alpha3
|
||||
|
||||
// DeviceSelectorApplyConfiguration represents a declarative configuration of the DeviceSelector type for use
|
||||
// with apply.
|
||||
//
|
||||
// DeviceSelector must have exactly one field set.
|
||||
type DeviceSelectorApplyConfiguration struct {
|
||||
// CEL contains a CEL expression for selecting a device.
|
||||
CEL *CELDeviceSelectorApplyConfiguration `json:"cel,omitempty"`
|
||||
}
|
||||
|
||||
// DeviceSelectorApplyConfiguration constructs a declarative configuration of the DeviceSelector type for use with
|
||||
// apply.
|
||||
func DeviceSelector() *DeviceSelectorApplyConfiguration {
|
||||
return &DeviceSelectorApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithCEL sets the CEL 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 CEL field is set to the value of the last call.
|
||||
func (b *DeviceSelectorApplyConfiguration) WithCEL(value *CELDeviceSelectorApplyConfiguration) *DeviceSelectorApplyConfiguration {
|
||||
b.CEL = value
|
||||
return b
|
||||
}
|
||||
@@ -38,10 +38,8 @@ type DeviceTaintApplyConfiguration struct {
|
||||
Value *string `json:"value,omitempty"`
|
||||
// The effect of the taint on claims that do not tolerate the taint
|
||||
// and through such claims on the pods using them.
|
||||
//
|
||||
// Valid effects are None, NoSchedule and NoExecute. PreferNoSchedule as used for
|
||||
// nodes is not valid here. More effects may get added in the future.
|
||||
// Consumers must treat unknown effects like None.
|
||||
// Valid effects are NoSchedule and NoExecute. PreferNoSchedule as used for
|
||||
// nodes is not valid here.
|
||||
Effect *resourcev1alpha3.DeviceTaintEffect `json:"effect,omitempty"`
|
||||
// TimeAdded represents the time at which the taint was added.
|
||||
// Added automatically during create or update if not set.
|
||||
|
||||
@@ -41,8 +41,6 @@ type DeviceTaintRuleApplyConfiguration struct {
|
||||
//
|
||||
// Changing the spec automatically increments the metadata.generation number.
|
||||
Spec *DeviceTaintRuleSpecApplyConfiguration `json:"spec,omitempty"`
|
||||
// Status provides information about what was requested in the spec.
|
||||
Status *DeviceTaintRuleStatusApplyConfiguration `json:"status,omitempty"`
|
||||
}
|
||||
|
||||
// DeviceTaintRule constructs a declarative configuration of the DeviceTaintRule type for use with
|
||||
@@ -89,12 +87,6 @@ func ExtractDeviceTaintRule(deviceTaintRule *resourcev1alpha3.DeviceTaintRule, f
|
||||
return ExtractDeviceTaintRuleFrom(deviceTaintRule, fieldManager, "")
|
||||
}
|
||||
|
||||
// ExtractDeviceTaintRuleStatus extracts the applied configuration owned by fieldManager from
|
||||
// deviceTaintRule for the status subresource.
|
||||
func ExtractDeviceTaintRuleStatus(deviceTaintRule *resourcev1alpha3.DeviceTaintRule, fieldManager string) (*DeviceTaintRuleApplyConfiguration, error) {
|
||||
return ExtractDeviceTaintRuleFrom(deviceTaintRule, fieldManager, "status")
|
||||
}
|
||||
|
||||
func (b DeviceTaintRuleApplyConfiguration) IsApplyConfiguration() {}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
@@ -263,14 +255,6 @@ func (b *DeviceTaintRuleApplyConfiguration) WithSpec(value *DeviceTaintRuleSpecA
|
||||
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 *DeviceTaintRuleApplyConfiguration) WithStatus(value *DeviceTaintRuleStatusApplyConfiguration) *DeviceTaintRuleApplyConfiguration {
|
||||
b.Status = value
|
||||
return b
|
||||
}
|
||||
|
||||
// GetKind retrieves the value of the Kind field in the declarative configuration.
|
||||
func (b *DeviceTaintRuleApplyConfiguration) GetKind() *string {
|
||||
return b.TypeMetaApplyConfiguration.Kind
|
||||
|
||||
@@ -24,7 +24,7 @@ package v1alpha3
|
||||
// DeviceTaintRuleSpec specifies the selector and one taint.
|
||||
type DeviceTaintRuleSpecApplyConfiguration struct {
|
||||
// DeviceSelector defines which device(s) the taint is applied to.
|
||||
// All selector criteria must be satisfied for a device to
|
||||
// All selector criteria must be satified for a device to
|
||||
// match. The empty selector matches all devices. Without
|
||||
// a selector, no devices are matches.
|
||||
DeviceSelector *DeviceTaintSelectorApplyConfiguration `json:"deviceSelector,omitempty"`
|
||||
|
||||
@@ -1,70 +0,0 @@
|
||||
/*
|
||||
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 v1alpha3
|
||||
|
||||
import (
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
// DeviceTaintRuleStatusApplyConfiguration represents a declarative configuration of the DeviceTaintRuleStatus type for use
|
||||
// with apply.
|
||||
//
|
||||
// DeviceTaintRuleStatus provides information about an on-going pod eviction.
|
||||
type DeviceTaintRuleStatusApplyConfiguration struct {
|
||||
// Conditions provide information about the state of the DeviceTaintRule
|
||||
// and the cluster at some point in time,
|
||||
// in a machine-readable and human-readable format.
|
||||
//
|
||||
// The following condition is currently defined as part of this API, more may
|
||||
// get added:
|
||||
// - Type: EvictionInProgress
|
||||
// - Status: True if there are currently pods which need to be evicted, False otherwise
|
||||
// (includes the effects which don't cause eviction).
|
||||
// - Reason: not specified, may change
|
||||
// - Message: includes information about number of pending pods and already evicted pods
|
||||
// in a human-readable format, updated periodically, may change
|
||||
//
|
||||
// For `effect: None`, the condition above gets set once for each change to
|
||||
// the spec, with the message containing information about what would happen
|
||||
// if the effect was `NoExecute`. This feedback can be used to decide whether
|
||||
// changing the effect to `NoExecute` will work as intended. It only gets
|
||||
// set once to avoid having to constantly update the status.
|
||||
//
|
||||
// Must have 8 or fewer entries.
|
||||
Conditions []v1.ConditionApplyConfiguration `json:"conditions,omitempty"`
|
||||
}
|
||||
|
||||
// DeviceTaintRuleStatusApplyConfiguration constructs a declarative configuration of the DeviceTaintRuleStatus type for use with
|
||||
// apply.
|
||||
func DeviceTaintRuleStatus() *DeviceTaintRuleStatusApplyConfiguration {
|
||||
return &DeviceTaintRuleStatusApplyConfiguration{}
|
||||
}
|
||||
|
||||
// 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 *DeviceTaintRuleStatusApplyConfiguration) WithConditions(values ...*v1.ConditionApplyConfiguration) *DeviceTaintRuleStatusApplyConfiguration {
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithConditions")
|
||||
}
|
||||
b.Conditions = append(b.Conditions, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
@@ -25,6 +25,10 @@ package v1alpha3
|
||||
// The empty selector matches all devices. Without a selector, no devices
|
||||
// are matched.
|
||||
type DeviceTaintSelectorApplyConfiguration struct {
|
||||
// If DeviceClassName is set, the selectors defined there must be
|
||||
// satisfied by a device to be selected. This field corresponds
|
||||
// to class.metadata.name.
|
||||
DeviceClassName *string `json:"deviceClassName,omitempty"`
|
||||
// If driver is set, only devices from that driver are selected.
|
||||
// This fields corresponds to slice.spec.driver.
|
||||
Driver *string `json:"driver,omitempty"`
|
||||
@@ -43,6 +47,10 @@ type DeviceTaintSelectorApplyConfiguration struct {
|
||||
// Setting also driver and pool may be required to avoid ambiguity,
|
||||
// but is not required.
|
||||
Device *string `json:"device,omitempty"`
|
||||
// Selectors contains the same selection criteria as a ResourceClaim.
|
||||
// Currently, CEL expressions are supported. All of these selectors
|
||||
// must be satisfied.
|
||||
Selectors []DeviceSelectorApplyConfiguration `json:"selectors,omitempty"`
|
||||
}
|
||||
|
||||
// DeviceTaintSelectorApplyConfiguration constructs a declarative configuration of the DeviceTaintSelector type for use with
|
||||
@@ -51,6 +59,14 @@ func DeviceTaintSelector() *DeviceTaintSelectorApplyConfiguration {
|
||||
return &DeviceTaintSelectorApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithDeviceClassName sets the DeviceClassName 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 DeviceClassName field is set to the value of the last call.
|
||||
func (b *DeviceTaintSelectorApplyConfiguration) WithDeviceClassName(value string) *DeviceTaintSelectorApplyConfiguration {
|
||||
b.DeviceClassName = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithDriver sets the Driver 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 Driver field is set to the value of the last call.
|
||||
@@ -74,3 +90,16 @@ func (b *DeviceTaintSelectorApplyConfiguration) WithDevice(value string) *Device
|
||||
b.Device = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithSelectors adds the given value to the Selectors 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 Selectors field.
|
||||
func (b *DeviceTaintSelectorApplyConfiguration) WithSelectors(values ...*DeviceSelectorApplyConfiguration) *DeviceTaintSelectorApplyConfiguration {
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithSelectors")
|
||||
}
|
||||
b.Selectors = append(b.Selectors, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
@@ -44,8 +44,10 @@ type BasicDeviceApplyConfiguration struct {
|
||||
//
|
||||
// There can only be a single entry per counterSet.
|
||||
//
|
||||
// The maximum number of device counter consumptions per
|
||||
// device is 2.
|
||||
// The total number of device counter consumption entries
|
||||
// must be <= 32. In addition, the total number in the
|
||||
// entire ResourceSlice must be <= 1024 (for example,
|
||||
// 64 devices with 16 counters each).
|
||||
ConsumesCounters []DeviceCounterConsumptionApplyConfiguration `json:"consumesCounters,omitempty"`
|
||||
// NodeName identifies the node where the device is available.
|
||||
//
|
||||
@@ -66,9 +68,7 @@ type BasicDeviceApplyConfiguration struct {
|
||||
AllNodes *bool `json:"allNodes,omitempty"`
|
||||
// If specified, these are the driver-defined taints.
|
||||
//
|
||||
// The maximum number of taints is 16. If taints are set for
|
||||
// any device in a ResourceSlice, then the maximum number of
|
||||
// allowed devices per ResourceSlice is 64 instead of 128.
|
||||
// The maximum number of taints is 4.
|
||||
//
|
||||
// This is an alpha field and requires enabling the DRADeviceTaints
|
||||
// feature gate.
|
||||
|
||||
@@ -23,7 +23,7 @@ package v1beta1
|
||||
//
|
||||
// CounterSet defines a named set of counters
|
||||
// that are available to be used by devices defined in the
|
||||
// ResourcePool.
|
||||
// ResourceSlice.
|
||||
//
|
||||
// The counters are not allocatable by themselves, but
|
||||
// can be referenced by devices. When a device is allocated,
|
||||
|
||||
@@ -29,7 +29,10 @@ type DeviceCounterConsumptionApplyConfiguration struct {
|
||||
CounterSet *string `json:"counterSet,omitempty"`
|
||||
// Counters defines the counters that will be consumed by the device.
|
||||
//
|
||||
// The maximum number of counters is 32.
|
||||
// The maximum number counters in a device is 32.
|
||||
// In addition, the maximum number of all counters
|
||||
// in all devices is 1024 (for example, 64 devices with
|
||||
// 16 counters each).
|
||||
Counters map[string]CounterApplyConfiguration `json:"counters,omitempty"`
|
||||
}
|
||||
|
||||
|
||||
@@ -38,10 +38,8 @@ type DeviceTaintApplyConfiguration struct {
|
||||
Value *string `json:"value,omitempty"`
|
||||
// The effect of the taint on claims that do not tolerate the taint
|
||||
// and through such claims on the pods using them.
|
||||
//
|
||||
// Valid effects are None, NoSchedule and NoExecute. PreferNoSchedule as used for
|
||||
// nodes is not valid here. More effects may get added in the future.
|
||||
// Consumers must treat unknown effects like None.
|
||||
// Valid effects are NoSchedule and NoExecute. PreferNoSchedule as used for
|
||||
// nodes is not valid here.
|
||||
Effect *resourcev1beta1.DeviceTaintEffect `json:"effect,omitempty"`
|
||||
// TimeAdded represents the time at which the taint was added.
|
||||
// Added automatically during create or update if not set.
|
||||
|
||||
@@ -62,9 +62,7 @@ type ResourceSliceSpecApplyConfiguration struct {
|
||||
AllNodes *bool `json:"allNodes,omitempty"`
|
||||
// Devices lists some or all of the devices in this pool.
|
||||
//
|
||||
// Must not have more than 128 entries. If any device uses taints or consumes counters the limit is 64.
|
||||
//
|
||||
// Only one of Devices and SharedCounters can be set in a ResourceSlice.
|
||||
// Must not have more than 128 entries.
|
||||
Devices []DeviceApplyConfiguration `json:"devices,omitempty"`
|
||||
// PerDeviceNodeSelection defines whether the access from nodes to
|
||||
// resources in the pool is set on the ResourceSlice level or on each
|
||||
@@ -76,11 +74,9 @@ type ResourceSliceSpecApplyConfiguration struct {
|
||||
// SharedCounters defines a list of counter sets, each of which
|
||||
// has a name and a list of counters available.
|
||||
//
|
||||
// The names of the counter sets must be unique in the ResourcePool.
|
||||
// The names of the SharedCounters must be unique in the ResourceSlice.
|
||||
//
|
||||
// Only one of Devices and SharedCounters can be set in a ResourceSlice.
|
||||
//
|
||||
// The maximum number of counter sets is 8.
|
||||
// The maximum number of SharedCounters is 32.
|
||||
SharedCounters []CounterSetApplyConfiguration `json:"sharedCounters,omitempty"`
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ package v1beta2
|
||||
//
|
||||
// CounterSet defines a named set of counters
|
||||
// that are available to be used by devices defined in the
|
||||
// ResourcePool.
|
||||
// ResourceSlice.
|
||||
//
|
||||
// The counters are not allocatable by themselves, but
|
||||
// can be referenced by devices. When a device is allocated,
|
||||
@@ -36,7 +36,7 @@ type CounterSetApplyConfiguration struct {
|
||||
// Counters defines the set of counters for this CounterSet
|
||||
// The name of each counter must be unique in that set and must be a DNS label.
|
||||
//
|
||||
// The maximum number of counters is 32.
|
||||
// The maximum number of counters in all sets is 32.
|
||||
Counters map[string]CounterApplyConfiguration `json:"counters,omitempty"`
|
||||
}
|
||||
|
||||
|
||||
@@ -48,8 +48,10 @@ type DeviceApplyConfiguration struct {
|
||||
//
|
||||
// There can only be a single entry per counterSet.
|
||||
//
|
||||
// The maximum number of device counter consumptions per
|
||||
// device is 2.
|
||||
// The total number of device counter consumption entries
|
||||
// must be <= 32. In addition, the total number in the
|
||||
// entire ResourceSlice must be <= 1024 (for example,
|
||||
// 64 devices with 16 counters each).
|
||||
ConsumesCounters []DeviceCounterConsumptionApplyConfiguration `json:"consumesCounters,omitempty"`
|
||||
// NodeName identifies the node where the device is available.
|
||||
//
|
||||
@@ -70,9 +72,7 @@ type DeviceApplyConfiguration struct {
|
||||
AllNodes *bool `json:"allNodes,omitempty"`
|
||||
// If specified, these are the driver-defined taints.
|
||||
//
|
||||
// The maximum number of taints is 16. If taints are set for
|
||||
// any device in a ResourceSlice, then the maximum number of
|
||||
// allowed devices per ResourceSlice is 64 instead of 128.
|
||||
// The maximum number of taints is 4.
|
||||
//
|
||||
// This is an alpha field and requires enabling the DRADeviceTaints
|
||||
// feature gate.
|
||||
|
||||
@@ -29,7 +29,10 @@ type DeviceCounterConsumptionApplyConfiguration struct {
|
||||
CounterSet *string `json:"counterSet,omitempty"`
|
||||
// Counters defines the counters that will be consumed by the device.
|
||||
//
|
||||
// The maximum number of counters is 32.
|
||||
// The maximum number counters in a device is 32.
|
||||
// In addition, the maximum number of all counters
|
||||
// in all devices is 1024 (for example, 64 devices with
|
||||
// 16 counters each).
|
||||
Counters map[string]CounterApplyConfiguration `json:"counters,omitempty"`
|
||||
}
|
||||
|
||||
|
||||
@@ -38,10 +38,8 @@ type DeviceTaintApplyConfiguration struct {
|
||||
Value *string `json:"value,omitempty"`
|
||||
// The effect of the taint on claims that do not tolerate the taint
|
||||
// and through such claims on the pods using them.
|
||||
//
|
||||
// Valid effects are None, NoSchedule and NoExecute. PreferNoSchedule as used for
|
||||
// nodes is not valid here. More effects may get added in the future.
|
||||
// Consumers must treat unknown effects like None.
|
||||
// Valid effects are NoSchedule and NoExecute. PreferNoSchedule as used for
|
||||
// nodes is not valid here.
|
||||
Effect *resourcev1beta2.DeviceTaintEffect `json:"effect,omitempty"`
|
||||
// TimeAdded represents the time at which the taint was added.
|
||||
// Added automatically during create or update if not set.
|
||||
|
||||
@@ -62,9 +62,7 @@ type ResourceSliceSpecApplyConfiguration struct {
|
||||
AllNodes *bool `json:"allNodes,omitempty"`
|
||||
// Devices lists some or all of the devices in this pool.
|
||||
//
|
||||
// Must not have more than 128 entries. If any device uses taints or consumes counters the limit is 64.
|
||||
//
|
||||
// Only one of Devices and SharedCounters can be set in a ResourceSlice.
|
||||
// Must not have more than 128 entries.
|
||||
Devices []DeviceApplyConfiguration `json:"devices,omitempty"`
|
||||
// PerDeviceNodeSelection defines whether the access from nodes to
|
||||
// resources in the pool is set on the ResourceSlice level or on each
|
||||
@@ -76,11 +74,9 @@ type ResourceSliceSpecApplyConfiguration struct {
|
||||
// SharedCounters defines a list of counter sets, each of which
|
||||
// has a name and a list of counters available.
|
||||
//
|
||||
// The names of the counter sets must be unique in the ResourcePool.
|
||||
// The names of the SharedCounters must be unique in the ResourceSlice.
|
||||
//
|
||||
// Only one of Devices and SharedCounters can be set in a ResourceSlice.
|
||||
//
|
||||
// The maximum number of counter sets is 8.
|
||||
// The maximum number of counters in all sets is 32.
|
||||
SharedCounters []CounterSetApplyConfiguration `json:"sharedCounters,omitempty"`
|
||||
}
|
||||
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
/*
|
||||
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 v1alpha1
|
||||
|
||||
// GangSchedulingPolicyApplyConfiguration represents a declarative configuration of the GangSchedulingPolicy type for use
|
||||
// with apply.
|
||||
//
|
||||
// GangSchedulingPolicy defines the parameters for gang scheduling.
|
||||
type GangSchedulingPolicyApplyConfiguration struct {
|
||||
// MinCount is the minimum number of pods that must be schedulable or scheduled
|
||||
// at the same time for the scheduler to admit the entire group.
|
||||
// It must be a positive integer.
|
||||
MinCount *int32 `json:"minCount,omitempty"`
|
||||
}
|
||||
|
||||
// GangSchedulingPolicyApplyConfiguration constructs a declarative configuration of the GangSchedulingPolicy type for use with
|
||||
// apply.
|
||||
func GangSchedulingPolicy() *GangSchedulingPolicyApplyConfiguration {
|
||||
return &GangSchedulingPolicyApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithMinCount sets the MinCount 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 MinCount field is set to the value of the last call.
|
||||
func (b *GangSchedulingPolicyApplyConfiguration) WithMinCount(value int32) *GangSchedulingPolicyApplyConfiguration {
|
||||
b.MinCount = &value
|
||||
return b
|
||||
}
|
||||
@@ -1,53 +0,0 @@
|
||||
/*
|
||||
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 v1alpha1
|
||||
|
||||
// PodGroupApplyConfiguration represents a declarative configuration of the PodGroup type for use
|
||||
// with apply.
|
||||
//
|
||||
// PodGroup represents a set of pods with a common scheduling policy.
|
||||
type PodGroupApplyConfiguration struct {
|
||||
// Name is a unique identifier for the PodGroup within the Workload.
|
||||
// It must be a DNS label. This field is immutable.
|
||||
Name *string `json:"name,omitempty"`
|
||||
// Policy defines the scheduling policy for this PodGroup.
|
||||
Policy *PodGroupPolicyApplyConfiguration `json:"policy,omitempty"`
|
||||
}
|
||||
|
||||
// PodGroupApplyConfiguration constructs a declarative configuration of the PodGroup type for use with
|
||||
// apply.
|
||||
func PodGroup() *PodGroupApplyConfiguration {
|
||||
return &PodGroupApplyConfiguration{}
|
||||
}
|
||||
|
||||
// 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 *PodGroupApplyConfiguration) WithName(value string) *PodGroupApplyConfiguration {
|
||||
b.Name = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithPolicy sets the Policy 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 Policy field is set to the value of the last call.
|
||||
func (b *PodGroupApplyConfiguration) WithPolicy(value *PodGroupPolicyApplyConfiguration) *PodGroupApplyConfiguration {
|
||||
b.Policy = value
|
||||
return b
|
||||
}
|
||||
@@ -1,58 +0,0 @@
|
||||
/*
|
||||
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 v1alpha1
|
||||
|
||||
import (
|
||||
schedulingv1alpha1 "k8s.io/api/scheduling/v1alpha1"
|
||||
)
|
||||
|
||||
// PodGroupPolicyApplyConfiguration represents a declarative configuration of the PodGroupPolicy type for use
|
||||
// with apply.
|
||||
//
|
||||
// PodGroupPolicy defines the scheduling configuration for a PodGroup.
|
||||
type PodGroupPolicyApplyConfiguration struct {
|
||||
// Basic specifies that the pods in this group should be scheduled using
|
||||
// standard Kubernetes scheduling behavior.
|
||||
Basic *schedulingv1alpha1.BasicSchedulingPolicy `json:"basic,omitempty"`
|
||||
// Gang specifies that the pods in this group should be scheduled using
|
||||
// all-or-nothing semantics.
|
||||
Gang *GangSchedulingPolicyApplyConfiguration `json:"gang,omitempty"`
|
||||
}
|
||||
|
||||
// PodGroupPolicyApplyConfiguration constructs a declarative configuration of the PodGroupPolicy type for use with
|
||||
// apply.
|
||||
func PodGroupPolicy() *PodGroupPolicyApplyConfiguration {
|
||||
return &PodGroupPolicyApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithBasic sets the Basic 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 Basic field is set to the value of the last call.
|
||||
func (b *PodGroupPolicyApplyConfiguration) WithBasic(value schedulingv1alpha1.BasicSchedulingPolicy) *PodGroupPolicyApplyConfiguration {
|
||||
b.Basic = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithGang sets the Gang 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 Gang field is set to the value of the last call.
|
||||
func (b *PodGroupPolicyApplyConfiguration) WithGang(value *GangSchedulingPolicyApplyConfiguration) *PodGroupPolicyApplyConfiguration {
|
||||
b.Gang = value
|
||||
return b
|
||||
}
|
||||
@@ -1,67 +0,0 @@
|
||||
/*
|
||||
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 v1alpha1
|
||||
|
||||
// TypedLocalObjectReferenceApplyConfiguration represents a declarative configuration of the TypedLocalObjectReference type for use
|
||||
// with apply.
|
||||
//
|
||||
// TypedLocalObjectReference allows to reference typed object inside the same namespace.
|
||||
type TypedLocalObjectReferenceApplyConfiguration struct {
|
||||
// APIGroup is the group for the resource being referenced.
|
||||
// If APIGroup is empty, the specified Kind must be in the core API group.
|
||||
// For any other third-party types, setting APIGroup is required.
|
||||
// It must be a DNS subdomain.
|
||||
APIGroup *string `json:"apiGroup,omitempty"`
|
||||
// Kind is the type of resource being referenced.
|
||||
// It must be a path segment name.
|
||||
Kind *string `json:"kind,omitempty"`
|
||||
// Name is the name of resource being referenced.
|
||||
// It must be a path segment name.
|
||||
Name *string `json:"name,omitempty"`
|
||||
}
|
||||
|
||||
// TypedLocalObjectReferenceApplyConfiguration constructs a declarative configuration of the TypedLocalObjectReference type for use with
|
||||
// apply.
|
||||
func TypedLocalObjectReference() *TypedLocalObjectReferenceApplyConfiguration {
|
||||
return &TypedLocalObjectReferenceApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithAPIGroup sets the APIGroup field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the APIGroup field is set to the value of the last call.
|
||||
func (b *TypedLocalObjectReferenceApplyConfiguration) WithAPIGroup(value string) *TypedLocalObjectReferenceApplyConfiguration {
|
||||
b.APIGroup = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// 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 *TypedLocalObjectReferenceApplyConfiguration) WithKind(value string) *TypedLocalObjectReferenceApplyConfiguration {
|
||||
b.Kind = &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 *TypedLocalObjectReferenceApplyConfiguration) WithName(value string) *TypedLocalObjectReferenceApplyConfiguration {
|
||||
b.Name = &value
|
||||
return b
|
||||
}
|
||||
@@ -1,279 +0,0 @@
|
||||
/*
|
||||
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 v1alpha1
|
||||
|
||||
import (
|
||||
schedulingv1alpha1 "k8s.io/api/scheduling/v1alpha1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
||||
internal "k8s.io/client-go/applyconfigurations/internal"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
// WorkloadApplyConfiguration represents a declarative configuration of the Workload type for use
|
||||
// with apply.
|
||||
//
|
||||
// Workload allows for expressing scheduling constraints that should be used
|
||||
// when managing lifecycle of workloads from scheduling perspective,
|
||||
// including scheduling, preemption, eviction and other phases.
|
||||
type WorkloadApplyConfiguration struct {
|
||||
v1.TypeMetaApplyConfiguration `json:",inline"`
|
||||
// Standard object's metadata.
|
||||
// Name must be a DNS subdomain.
|
||||
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
|
||||
// Spec defines the desired behavior of a Workload.
|
||||
Spec *WorkloadSpecApplyConfiguration `json:"spec,omitempty"`
|
||||
}
|
||||
|
||||
// Workload constructs a declarative configuration of the Workload type for use with
|
||||
// apply.
|
||||
func Workload(name, namespace string) *WorkloadApplyConfiguration {
|
||||
b := &WorkloadApplyConfiguration{}
|
||||
b.WithName(name)
|
||||
b.WithNamespace(namespace)
|
||||
b.WithKind("Workload")
|
||||
b.WithAPIVersion("scheduling.k8s.io/v1alpha1")
|
||||
return b
|
||||
}
|
||||
|
||||
// ExtractWorkloadFrom extracts the applied configuration owned by fieldManager from
|
||||
// workload for the specified subresource. Pass an empty string for subresource to extract
|
||||
// the main resource. Common subresources include "status", "scale", etc.
|
||||
// workload must be a unmodified Workload API object that was retrieved from the Kubernetes API.
|
||||
// ExtractWorkloadFrom 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 ExtractWorkloadFrom(workload *schedulingv1alpha1.Workload, fieldManager string, subresource string) (*WorkloadApplyConfiguration, error) {
|
||||
b := &WorkloadApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(workload, internal.Parser().Type("io.k8s.api.scheduling.v1alpha1.Workload"), fieldManager, b, subresource)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b.WithName(workload.Name)
|
||||
b.WithNamespace(workload.Namespace)
|
||||
|
||||
b.WithKind("Workload")
|
||||
b.WithAPIVersion("scheduling.k8s.io/v1alpha1")
|
||||
return b, nil
|
||||
}
|
||||
|
||||
// ExtractWorkload extracts the applied configuration owned by fieldManager from
|
||||
// workload. If no managedFields are found in workload for fieldManager, a
|
||||
// WorkloadApplyConfiguration 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.
|
||||
// workload must be a unmodified Workload API object that was retrieved from the Kubernetes API.
|
||||
// ExtractWorkload 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 ExtractWorkload(workload *schedulingv1alpha1.Workload, fieldManager string) (*WorkloadApplyConfiguration, error) {
|
||||
return ExtractWorkloadFrom(workload, fieldManager, "")
|
||||
}
|
||||
|
||||
func (b WorkloadApplyConfiguration) 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 *WorkloadApplyConfiguration) WithKind(value string) *WorkloadApplyConfiguration {
|
||||
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 *WorkloadApplyConfiguration) WithAPIVersion(value string) *WorkloadApplyConfiguration {
|
||||
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 *WorkloadApplyConfiguration) WithName(value string) *WorkloadApplyConfiguration {
|
||||
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 *WorkloadApplyConfiguration) WithGenerateName(value string) *WorkloadApplyConfiguration {
|
||||
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 *WorkloadApplyConfiguration) WithNamespace(value string) *WorkloadApplyConfiguration {
|
||||
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 *WorkloadApplyConfiguration) WithUID(value types.UID) *WorkloadApplyConfiguration {
|
||||
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 *WorkloadApplyConfiguration) WithResourceVersion(value string) *WorkloadApplyConfiguration {
|
||||
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 *WorkloadApplyConfiguration) WithGeneration(value int64) *WorkloadApplyConfiguration {
|
||||
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 *WorkloadApplyConfiguration) WithCreationTimestamp(value metav1.Time) *WorkloadApplyConfiguration {
|
||||
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 *WorkloadApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *WorkloadApplyConfiguration {
|
||||
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 *WorkloadApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *WorkloadApplyConfiguration {
|
||||
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 *WorkloadApplyConfiguration) WithLabels(entries map[string]string) *WorkloadApplyConfiguration {
|
||||
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 *WorkloadApplyConfiguration) WithAnnotations(entries map[string]string) *WorkloadApplyConfiguration {
|
||||
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 *WorkloadApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *WorkloadApplyConfiguration {
|
||||
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 *WorkloadApplyConfiguration) WithFinalizers(values ...string) *WorkloadApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
for i := range values {
|
||||
b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
func (b *WorkloadApplyConfiguration) ensureObjectMetaApplyConfigurationExists() {
|
||||
if b.ObjectMetaApplyConfiguration == nil {
|
||||
b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{}
|
||||
}
|
||||
}
|
||||
|
||||
// WithSpec sets the Spec field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Spec field is set to the value of the last call.
|
||||
func (b *WorkloadApplyConfiguration) WithSpec(value *WorkloadSpecApplyConfiguration) *WorkloadApplyConfiguration {
|
||||
b.Spec = value
|
||||
return b
|
||||
}
|
||||
|
||||
// GetKind retrieves the value of the Kind field in the declarative configuration.
|
||||
func (b *WorkloadApplyConfiguration) GetKind() *string {
|
||||
return b.TypeMetaApplyConfiguration.Kind
|
||||
}
|
||||
|
||||
// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration.
|
||||
func (b *WorkloadApplyConfiguration) GetAPIVersion() *string {
|
||||
return b.TypeMetaApplyConfiguration.APIVersion
|
||||
}
|
||||
|
||||
// GetName retrieves the value of the Name field in the declarative configuration.
|
||||
func (b *WorkloadApplyConfiguration) GetName() *string {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
return b.ObjectMetaApplyConfiguration.Name
|
||||
}
|
||||
|
||||
// GetNamespace retrieves the value of the Namespace field in the declarative configuration.
|
||||
func (b *WorkloadApplyConfiguration) GetNamespace() *string {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
return b.ObjectMetaApplyConfiguration.Namespace
|
||||
}
|
||||
@@ -1,61 +0,0 @@
|
||||
/*
|
||||
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 v1alpha1
|
||||
|
||||
// WorkloadSpecApplyConfiguration represents a declarative configuration of the WorkloadSpec type for use
|
||||
// with apply.
|
||||
//
|
||||
// WorkloadSpec defines the desired state of a Workload.
|
||||
type WorkloadSpecApplyConfiguration struct {
|
||||
// ControllerRef is an optional reference to the controlling object, such as a
|
||||
// Deployment or Job. This field is intended for use by tools like CLIs
|
||||
// to provide a link back to the original workload definition.
|
||||
// When set, it cannot be changed.
|
||||
ControllerRef *TypedLocalObjectReferenceApplyConfiguration `json:"controllerRef,omitempty"`
|
||||
// PodGroups is the list of pod groups that make up the Workload.
|
||||
// The maximum number of pod groups is 8. This field is immutable.
|
||||
PodGroups []PodGroupApplyConfiguration `json:"podGroups,omitempty"`
|
||||
}
|
||||
|
||||
// WorkloadSpecApplyConfiguration constructs a declarative configuration of the WorkloadSpec type for use with
|
||||
// apply.
|
||||
func WorkloadSpec() *WorkloadSpecApplyConfiguration {
|
||||
return &WorkloadSpecApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithControllerRef sets the ControllerRef 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 ControllerRef field is set to the value of the last call.
|
||||
func (b *WorkloadSpecApplyConfiguration) WithControllerRef(value *TypedLocalObjectReferenceApplyConfiguration) *WorkloadSpecApplyConfiguration {
|
||||
b.ControllerRef = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithPodGroups adds the given value to the PodGroups 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 PodGroups field.
|
||||
func (b *WorkloadSpecApplyConfiguration) WithPodGroups(values ...*PodGroupApplyConfiguration) *WorkloadSpecApplyConfiguration {
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithPodGroups")
|
||||
}
|
||||
b.PodGroups = append(b.PodGroups, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
@@ -158,26 +158,6 @@ type CSIDriverSpecApplyConfiguration struct {
|
||||
//
|
||||
// This field is mutable.
|
||||
NodeAllocatableUpdatePeriodSeconds *int64 `json:"nodeAllocatableUpdatePeriodSeconds,omitempty"`
|
||||
// serviceAccountTokenInSecrets is an opt-in for CSI drivers to indicate that
|
||||
// service account tokens should be passed via the Secrets field in NodePublishVolumeRequest
|
||||
// instead of the VolumeContext field. The CSI specification provides a dedicated Secrets
|
||||
// field for sensitive information like tokens, which is the appropriate mechanism for
|
||||
// handling credentials. This addresses security concerns where sensitive tokens were being
|
||||
// logged as part of volume context.
|
||||
//
|
||||
// When "true", kubelet will pass the tokens only in the Secrets field with the key
|
||||
// "csi.storage.k8s.io/serviceAccount.tokens". The CSI driver must be updated to read
|
||||
// tokens from the Secrets field instead of VolumeContext.
|
||||
//
|
||||
// When "false" or not set, kubelet will pass the tokens in VolumeContext with the key
|
||||
// "csi.storage.k8s.io/serviceAccount.tokens" (existing behavior). This maintains backward
|
||||
// compatibility with existing CSI drivers.
|
||||
//
|
||||
// This field can only be set when TokenRequests is configured. The API server will reject
|
||||
// CSIDriver specs that set this field without TokenRequests.
|
||||
//
|
||||
// Default behavior if unset is to pass tokens in the VolumeContext field.
|
||||
ServiceAccountTokenInSecrets *bool `json:"serviceAccountTokenInSecrets,omitempty"`
|
||||
}
|
||||
|
||||
// CSIDriverSpecApplyConfiguration constructs a declarative configuration of the CSIDriverSpec type for use with
|
||||
@@ -264,11 +244,3 @@ func (b *CSIDriverSpecApplyConfiguration) WithNodeAllocatableUpdatePeriodSeconds
|
||||
b.NodeAllocatableUpdatePeriodSeconds = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithServiceAccountTokenInSecrets sets the ServiceAccountTokenInSecrets 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 ServiceAccountTokenInSecrets field is set to the value of the last call.
|
||||
func (b *CSIDriverSpecApplyConfiguration) WithServiceAccountTokenInSecrets(value bool) *CSIDriverSpecApplyConfiguration {
|
||||
b.ServiceAccountTokenInSecrets = &value
|
||||
return b
|
||||
}
|
||||
|
||||
@@ -158,26 +158,6 @@ type CSIDriverSpecApplyConfiguration struct {
|
||||
//
|
||||
// This field is mutable.
|
||||
NodeAllocatableUpdatePeriodSeconds *int64 `json:"nodeAllocatableUpdatePeriodSeconds,omitempty"`
|
||||
// serviceAccountTokenInSecrets is an opt-in for CSI drivers to indicate that
|
||||
// service account tokens should be passed via the Secrets field in NodePublishVolumeRequest
|
||||
// instead of the VolumeContext field. The CSI specification provides a dedicated Secrets
|
||||
// field for sensitive information like tokens, which is the appropriate mechanism for
|
||||
// handling credentials. This addresses security concerns where sensitive tokens were being
|
||||
// logged as part of volume context.
|
||||
//
|
||||
// When "true", kubelet will pass the tokens only in the Secrets field with the key
|
||||
// "csi.storage.k8s.io/serviceAccount.tokens". The CSI driver must be updated to read
|
||||
// tokens from the Secrets field instead of VolumeContext.
|
||||
//
|
||||
// When "false" or not set, kubelet will pass the tokens in VolumeContext with the key
|
||||
// "csi.storage.k8s.io/serviceAccount.tokens" (existing behavior). This maintains backward
|
||||
// compatibility with existing CSI drivers.
|
||||
//
|
||||
// This field can only be set when TokenRequests is configured. The API server will reject
|
||||
// CSIDriver specs that set this field without TokenRequests.
|
||||
//
|
||||
// Default behavior if unset is to pass tokens in the VolumeContext field.
|
||||
ServiceAccountTokenInSecrets *bool `json:"serviceAccountTokenInSecrets,omitempty"`
|
||||
}
|
||||
|
||||
// CSIDriverSpecApplyConfiguration constructs a declarative configuration of the CSIDriverSpec type for use with
|
||||
@@ -264,11 +244,3 @@ func (b *CSIDriverSpecApplyConfiguration) WithNodeAllocatableUpdatePeriodSeconds
|
||||
b.NodeAllocatableUpdatePeriodSeconds = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithServiceAccountTokenInSecrets sets the ServiceAccountTokenInSecrets 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 ServiceAccountTokenInSecrets field is set to the value of the last call.
|
||||
func (b *CSIDriverSpecApplyConfiguration) WithServiceAccountTokenInSecrets(value bool) *CSIDriverSpecApplyConfiguration {
|
||||
b.ServiceAccountTokenInSecrets = &value
|
||||
return b
|
||||
}
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
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 v1alpha1
|
||||
|
||||
// GroupVersionResourceApplyConfiguration represents a declarative configuration of the GroupVersionResource type for use
|
||||
// with apply.
|
||||
//
|
||||
// The names of the group, the version, and the resource.
|
||||
type GroupVersionResourceApplyConfiguration struct {
|
||||
// The name of the group.
|
||||
Group *string `json:"group,omitempty"`
|
||||
// The name of the version.
|
||||
Version *string `json:"version,omitempty"`
|
||||
// The name of the resource.
|
||||
Resource *string `json:"resource,omitempty"`
|
||||
}
|
||||
|
||||
// GroupVersionResourceApplyConfiguration constructs a declarative configuration of the GroupVersionResource type for use with
|
||||
// apply.
|
||||
func GroupVersionResource() *GroupVersionResourceApplyConfiguration {
|
||||
return &GroupVersionResourceApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithGroup sets the Group 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 Group field is set to the value of the last call.
|
||||
func (b *GroupVersionResourceApplyConfiguration) WithGroup(value string) *GroupVersionResourceApplyConfiguration {
|
||||
b.Group = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithVersion sets the Version 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 Version field is set to the value of the last call.
|
||||
func (b *GroupVersionResourceApplyConfiguration) WithVersion(value string) *GroupVersionResourceApplyConfiguration {
|
||||
b.Version = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// 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 *GroupVersionResourceApplyConfiguration) WithResource(value string) *GroupVersionResourceApplyConfiguration {
|
||||
b.Resource = &value
|
||||
return b
|
||||
}
|
||||
@@ -0,0 +1,88 @@
|
||||
/*
|
||||
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 v1alpha1
|
||||
|
||||
import (
|
||||
v1 "k8s.io/api/core/v1"
|
||||
storagemigrationv1alpha1 "k8s.io/api/storagemigration/v1alpha1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
)
|
||||
|
||||
// MigrationConditionApplyConfiguration represents a declarative configuration of the MigrationCondition type for use
|
||||
// with apply.
|
||||
//
|
||||
// Describes the state of a migration at a certain point.
|
||||
type MigrationConditionApplyConfiguration struct {
|
||||
// Type of the condition.
|
||||
Type *storagemigrationv1alpha1.MigrationConditionType `json:"type,omitempty"`
|
||||
// Status of the condition, one of True, False, Unknown.
|
||||
Status *v1.ConditionStatus `json:"status,omitempty"`
|
||||
// The last time this condition was updated.
|
||||
LastUpdateTime *metav1.Time `json:"lastUpdateTime,omitempty"`
|
||||
// The reason for the condition's last transition.
|
||||
Reason *string `json:"reason,omitempty"`
|
||||
// A human readable message indicating details about the transition.
|
||||
Message *string `json:"message,omitempty"`
|
||||
}
|
||||
|
||||
// MigrationConditionApplyConfiguration constructs a declarative configuration of the MigrationCondition type for use with
|
||||
// apply.
|
||||
func MigrationCondition() *MigrationConditionApplyConfiguration {
|
||||
return &MigrationConditionApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithType sets the Type field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Type field is set to the value of the last call.
|
||||
func (b *MigrationConditionApplyConfiguration) WithType(value storagemigrationv1alpha1.MigrationConditionType) *MigrationConditionApplyConfiguration {
|
||||
b.Type = &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 *MigrationConditionApplyConfiguration) WithStatus(value v1.ConditionStatus) *MigrationConditionApplyConfiguration {
|
||||
b.Status = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithLastUpdateTime sets the LastUpdateTime 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 LastUpdateTime field is set to the value of the last call.
|
||||
func (b *MigrationConditionApplyConfiguration) WithLastUpdateTime(value metav1.Time) *MigrationConditionApplyConfiguration {
|
||||
b.LastUpdateTime = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithReason sets the Reason 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 Reason field is set to the value of the last call.
|
||||
func (b *MigrationConditionApplyConfiguration) WithReason(value string) *MigrationConditionApplyConfiguration {
|
||||
b.Reason = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithMessage sets the Message 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 Message field is set to the value of the last call.
|
||||
func (b *MigrationConditionApplyConfiguration) WithMessage(value string) *MigrationConditionApplyConfiguration {
|
||||
b.Message = &value
|
||||
return b
|
||||
}
|
||||
@@ -16,10 +16,10 @@ limitations under the License.
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1beta1
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
storagemigrationv1beta1 "k8s.io/api/storagemigration/v1beta1"
|
||||
storagemigrationv1alpha1 "k8s.io/api/storagemigration/v1alpha1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
||||
@@ -49,7 +49,7 @@ func StorageVersionMigration(name string) *StorageVersionMigrationApplyConfigura
|
||||
b := &StorageVersionMigrationApplyConfiguration{}
|
||||
b.WithName(name)
|
||||
b.WithKind("StorageVersionMigration")
|
||||
b.WithAPIVersion("storagemigration.k8s.io/v1beta1")
|
||||
b.WithAPIVersion("storagemigration.k8s.io/v1alpha1")
|
||||
return b
|
||||
}
|
||||
|
||||
@@ -60,16 +60,16 @@ func StorageVersionMigration(name string) *StorageVersionMigrationApplyConfigura
|
||||
// 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 *storagemigrationv1beta1.StorageVersionMigration, fieldManager string, subresource string) (*StorageVersionMigrationApplyConfiguration, error) {
|
||||
func ExtractStorageVersionMigrationFrom(storageVersionMigration *storagemigrationv1alpha1.StorageVersionMigration, fieldManager string, subresource string) (*StorageVersionMigrationApplyConfiguration, error) {
|
||||
b := &StorageVersionMigrationApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(storageVersionMigration, internal.Parser().Type("io.k8s.api.storagemigration.v1beta1.StorageVersionMigration"), fieldManager, b, subresource)
|
||||
err := managedfields.ExtractInto(storageVersionMigration, internal.Parser().Type("io.k8s.api.storagemigration.v1alpha1.StorageVersionMigration"), fieldManager, b, subresource)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b.WithName(storageVersionMigration.Name)
|
||||
|
||||
b.WithKind("StorageVersionMigration")
|
||||
b.WithAPIVersion("storagemigration.k8s.io/v1beta1")
|
||||
b.WithAPIVersion("storagemigration.k8s.io/v1alpha1")
|
||||
return b, nil
|
||||
}
|
||||
|
||||
@@ -83,13 +83,13 @@ func ExtractStorageVersionMigrationFrom(storageVersionMigration *storagemigratio
|
||||
// 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 *storagemigrationv1beta1.StorageVersionMigration, fieldManager string) (*StorageVersionMigrationApplyConfiguration, error) {
|
||||
func ExtractStorageVersionMigration(storageVersionMigration *storagemigrationv1alpha1.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 *storagemigrationv1beta1.StorageVersionMigration, fieldManager string) (*StorageVersionMigrationApplyConfiguration, error) {
|
||||
func ExtractStorageVersionMigrationStatus(storageVersionMigration *storagemigrationv1alpha1.StorageVersionMigration, fieldManager string) (*StorageVersionMigrationApplyConfiguration, error) {
|
||||
return ExtractStorageVersionMigrationFrom(storageVersionMigration, fieldManager, "status")
|
||||
}
|
||||
|
||||
@@ -16,11 +16,7 @@ limitations under the License.
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
package v1alpha1
|
||||
|
||||
// StorageVersionMigrationSpecApplyConfiguration represents a declarative configuration of the StorageVersionMigrationSpec type for use
|
||||
// with apply.
|
||||
@@ -30,7 +26,12 @@ type StorageVersionMigrationSpecApplyConfiguration struct {
|
||||
// The resource that is being migrated. The migrator sends requests to
|
||||
// the endpoint serving the resource.
|
||||
// Immutable.
|
||||
Resource *v1.GroupResourceApplyConfiguration `json:"resource,omitempty"`
|
||||
Resource *GroupVersionResourceApplyConfiguration `json:"resource,omitempty"`
|
||||
// The token used in the list options to get the next chunk of objects
|
||||
// to migrate. When the .status.conditions indicates the migration is
|
||||
// "Running", users can use this token to check the progress of the
|
||||
// migration.
|
||||
ContinueToken *string `json:"continueToken,omitempty"`
|
||||
}
|
||||
|
||||
// StorageVersionMigrationSpecApplyConfiguration constructs a declarative configuration of the StorageVersionMigrationSpec type for use with
|
||||
@@ -42,7 +43,15 @@ func StorageVersionMigrationSpec() *StorageVersionMigrationSpecApplyConfiguratio
|
||||
// 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 *v1.GroupResourceApplyConfiguration) *StorageVersionMigrationSpecApplyConfiguration {
|
||||
func (b *StorageVersionMigrationSpecApplyConfiguration) WithResource(value *GroupVersionResourceApplyConfiguration) *StorageVersionMigrationSpecApplyConfiguration {
|
||||
b.Resource = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithContinueToken sets the ContinueToken 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 ContinueToken field is set to the value of the last call.
|
||||
func (b *StorageVersionMigrationSpecApplyConfiguration) WithContinueToken(value string) *StorageVersionMigrationSpecApplyConfiguration {
|
||||
b.ContinueToken = &value
|
||||
return b
|
||||
}
|
||||
@@ -16,11 +16,7 @@ limitations under the License.
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
package v1alpha1
|
||||
|
||||
// StorageVersionMigrationStatusApplyConfiguration represents a declarative configuration of the StorageVersionMigrationStatus type for use
|
||||
// with apply.
|
||||
@@ -28,7 +24,7 @@ import (
|
||||
// Status of the storage version migration.
|
||||
type StorageVersionMigrationStatusApplyConfiguration struct {
|
||||
// The latest available observations of the migration's current state.
|
||||
Conditions []v1.ConditionApplyConfiguration `json:"conditions,omitempty"`
|
||||
Conditions []MigrationConditionApplyConfiguration `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.
|
||||
@@ -44,7 +40,7 @@ func StorageVersionMigrationStatus() *StorageVersionMigrationStatusApplyConfigur
|
||||
// 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 ...*v1.ConditionApplyConfiguration) *StorageVersionMigrationStatusApplyConfiguration {
|
||||
func (b *StorageVersionMigrationStatusApplyConfiguration) WithConditions(values ...*MigrationConditionApplyConfiguration) *StorageVersionMigrationStatusApplyConfiguration {
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithConditions")
|
||||
@@ -69,7 +69,7 @@ import (
|
||||
storagev1 "k8s.io/api/storage/v1"
|
||||
storagev1alpha1 "k8s.io/api/storage/v1alpha1"
|
||||
storagev1beta1 "k8s.io/api/storage/v1beta1"
|
||||
storagemigrationv1beta1 "k8s.io/api/storagemigration/v1beta1"
|
||||
storagemigrationv1alpha1 "k8s.io/api/storagemigration/v1alpha1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
@@ -126,7 +126,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"
|
||||
applyconfigurationsstoragemigrationv1beta1 "k8s.io/client-go/applyconfigurations/storagemigration/v1beta1"
|
||||
applyconfigurationsstoragemigrationv1alpha1 "k8s.io/client-go/applyconfigurations/storagemigration/v1alpha1"
|
||||
)
|
||||
|
||||
// ForKind returns an apply configuration type for the given GroupVersionKind, or nil if no
|
||||
@@ -630,6 +630,12 @@ func ForKind(kind schema.GroupVersionKind) interface{} {
|
||||
return &applyconfigurationscertificatesv1alpha1.ClusterTrustBundleApplyConfiguration{}
|
||||
case certificatesv1alpha1.SchemeGroupVersion.WithKind("ClusterTrustBundleSpec"):
|
||||
return &applyconfigurationscertificatesv1alpha1.ClusterTrustBundleSpecApplyConfiguration{}
|
||||
case certificatesv1alpha1.SchemeGroupVersion.WithKind("PodCertificateRequest"):
|
||||
return &applyconfigurationscertificatesv1alpha1.PodCertificateRequestApplyConfiguration{}
|
||||
case certificatesv1alpha1.SchemeGroupVersion.WithKind("PodCertificateRequestSpec"):
|
||||
return &applyconfigurationscertificatesv1alpha1.PodCertificateRequestSpecApplyConfiguration{}
|
||||
case certificatesv1alpha1.SchemeGroupVersion.WithKind("PodCertificateRequestStatus"):
|
||||
return &applyconfigurationscertificatesv1alpha1.PodCertificateRequestStatusApplyConfiguration{}
|
||||
|
||||
// Group=certificates.k8s.io, Version=v1beta1
|
||||
case certificatesv1beta1.SchemeGroupVersion.WithKind("CertificateSigningRequest"):
|
||||
@@ -644,12 +650,6 @@ func ForKind(kind schema.GroupVersionKind) interface{} {
|
||||
return &applyconfigurationscertificatesv1beta1.ClusterTrustBundleApplyConfiguration{}
|
||||
case certificatesv1beta1.SchemeGroupVersion.WithKind("ClusterTrustBundleSpec"):
|
||||
return &applyconfigurationscertificatesv1beta1.ClusterTrustBundleSpecApplyConfiguration{}
|
||||
case certificatesv1beta1.SchemeGroupVersion.WithKind("PodCertificateRequest"):
|
||||
return &applyconfigurationscertificatesv1beta1.PodCertificateRequestApplyConfiguration{}
|
||||
case certificatesv1beta1.SchemeGroupVersion.WithKind("PodCertificateRequestSpec"):
|
||||
return &applyconfigurationscertificatesv1beta1.PodCertificateRequestSpecApplyConfiguration{}
|
||||
case certificatesv1beta1.SchemeGroupVersion.WithKind("PodCertificateRequestStatus"):
|
||||
return &applyconfigurationscertificatesv1beta1.PodCertificateRequestStatusApplyConfiguration{}
|
||||
|
||||
// Group=coordination.k8s.io, Version=v1
|
||||
case coordinationv1.SchemeGroupVersion.WithKind("Lease"):
|
||||
@@ -1084,8 +1084,6 @@ func ForKind(kind schema.GroupVersionKind) interface{} {
|
||||
return &applyconfigurationscorev1.WeightedPodAffinityTermApplyConfiguration{}
|
||||
case corev1.SchemeGroupVersion.WithKind("WindowsSecurityContextOptions"):
|
||||
return &applyconfigurationscorev1.WindowsSecurityContextOptionsApplyConfiguration{}
|
||||
case corev1.SchemeGroupVersion.WithKind("WorkloadReference"):
|
||||
return &applyconfigurationscorev1.WorkloadReferenceApplyConfiguration{}
|
||||
|
||||
// Group=discovery.k8s.io, Version=v1
|
||||
case discoveryv1.SchemeGroupVersion.WithKind("Endpoint"):
|
||||
@@ -1408,8 +1406,6 @@ func ForKind(kind schema.GroupVersionKind) interface{} {
|
||||
return &applyconfigurationsmetav1.ConditionApplyConfiguration{}
|
||||
case metav1.SchemeGroupVersion.WithKind("DeleteOptions"):
|
||||
return &applyconfigurationsmetav1.DeleteOptionsApplyConfiguration{}
|
||||
case metav1.SchemeGroupVersion.WithKind("GroupResource"):
|
||||
return &applyconfigurationsmetav1.GroupResourceApplyConfiguration{}
|
||||
case metav1.SchemeGroupVersion.WithKind("LabelSelector"):
|
||||
return &applyconfigurationsmetav1.LabelSelectorApplyConfiguration{}
|
||||
case metav1.SchemeGroupVersion.WithKind("LabelSelectorRequirement"):
|
||||
@@ -1712,14 +1708,16 @@ func ForKind(kind schema.GroupVersionKind) interface{} {
|
||||
return &applyconfigurationsresourcev1.ResourceSliceSpecApplyConfiguration{}
|
||||
|
||||
// Group=resource.k8s.io, Version=v1alpha3
|
||||
case v1alpha3.SchemeGroupVersion.WithKind("CELDeviceSelector"):
|
||||
return &resourcev1alpha3.CELDeviceSelectorApplyConfiguration{}
|
||||
case v1alpha3.SchemeGroupVersion.WithKind("DeviceSelector"):
|
||||
return &resourcev1alpha3.DeviceSelectorApplyConfiguration{}
|
||||
case v1alpha3.SchemeGroupVersion.WithKind("DeviceTaint"):
|
||||
return &resourcev1alpha3.DeviceTaintApplyConfiguration{}
|
||||
case v1alpha3.SchemeGroupVersion.WithKind("DeviceTaintRule"):
|
||||
return &resourcev1alpha3.DeviceTaintRuleApplyConfiguration{}
|
||||
case v1alpha3.SchemeGroupVersion.WithKind("DeviceTaintRuleSpec"):
|
||||
return &resourcev1alpha3.DeviceTaintRuleSpecApplyConfiguration{}
|
||||
case v1alpha3.SchemeGroupVersion.WithKind("DeviceTaintRuleStatus"):
|
||||
return &resourcev1alpha3.DeviceTaintRuleStatusApplyConfiguration{}
|
||||
case v1alpha3.SchemeGroupVersion.WithKind("DeviceTaintSelector"):
|
||||
return &resourcev1alpha3.DeviceTaintSelectorApplyConfiguration{}
|
||||
|
||||
@@ -1888,20 +1886,8 @@ func ForKind(kind schema.GroupVersionKind) interface{} {
|
||||
return &applyconfigurationsschedulingv1.PriorityClassApplyConfiguration{}
|
||||
|
||||
// Group=scheduling.k8s.io, Version=v1alpha1
|
||||
case schedulingv1alpha1.SchemeGroupVersion.WithKind("GangSchedulingPolicy"):
|
||||
return &applyconfigurationsschedulingv1alpha1.GangSchedulingPolicyApplyConfiguration{}
|
||||
case schedulingv1alpha1.SchemeGroupVersion.WithKind("PodGroup"):
|
||||
return &applyconfigurationsschedulingv1alpha1.PodGroupApplyConfiguration{}
|
||||
case schedulingv1alpha1.SchemeGroupVersion.WithKind("PodGroupPolicy"):
|
||||
return &applyconfigurationsschedulingv1alpha1.PodGroupPolicyApplyConfiguration{}
|
||||
case schedulingv1alpha1.SchemeGroupVersion.WithKind("PriorityClass"):
|
||||
return &applyconfigurationsschedulingv1alpha1.PriorityClassApplyConfiguration{}
|
||||
case schedulingv1alpha1.SchemeGroupVersion.WithKind("TypedLocalObjectReference"):
|
||||
return &applyconfigurationsschedulingv1alpha1.TypedLocalObjectReferenceApplyConfiguration{}
|
||||
case schedulingv1alpha1.SchemeGroupVersion.WithKind("Workload"):
|
||||
return &applyconfigurationsschedulingv1alpha1.WorkloadApplyConfiguration{}
|
||||
case schedulingv1alpha1.SchemeGroupVersion.WithKind("WorkloadSpec"):
|
||||
return &applyconfigurationsschedulingv1alpha1.WorkloadSpecApplyConfiguration{}
|
||||
|
||||
// Group=scheduling.k8s.io, Version=v1beta1
|
||||
case schedulingv1beta1.SchemeGroupVersion.WithKind("PriorityClass"):
|
||||
@@ -1987,13 +1973,17 @@ func ForKind(kind schema.GroupVersionKind) interface{} {
|
||||
case storagev1beta1.SchemeGroupVersion.WithKind("VolumeNodeResources"):
|
||||
return &applyconfigurationsstoragev1beta1.VolumeNodeResourcesApplyConfiguration{}
|
||||
|
||||
// Group=storagemigration.k8s.io, Version=v1beta1
|
||||
case storagemigrationv1beta1.SchemeGroupVersion.WithKind("StorageVersionMigration"):
|
||||
return &applyconfigurationsstoragemigrationv1beta1.StorageVersionMigrationApplyConfiguration{}
|
||||
case storagemigrationv1beta1.SchemeGroupVersion.WithKind("StorageVersionMigrationSpec"):
|
||||
return &applyconfigurationsstoragemigrationv1beta1.StorageVersionMigrationSpecApplyConfiguration{}
|
||||
case storagemigrationv1beta1.SchemeGroupVersion.WithKind("StorageVersionMigrationStatus"):
|
||||
return &applyconfigurationsstoragemigrationv1beta1.StorageVersionMigrationStatusApplyConfiguration{}
|
||||
// Group=storagemigration.k8s.io, Version=v1alpha1
|
||||
case storagemigrationv1alpha1.SchemeGroupVersion.WithKind("GroupVersionResource"):
|
||||
return &applyconfigurationsstoragemigrationv1alpha1.GroupVersionResourceApplyConfiguration{}
|
||||
case storagemigrationv1alpha1.SchemeGroupVersion.WithKind("MigrationCondition"):
|
||||
return &applyconfigurationsstoragemigrationv1alpha1.MigrationConditionApplyConfiguration{}
|
||||
case storagemigrationv1alpha1.SchemeGroupVersion.WithKind("StorageVersionMigration"):
|
||||
return &applyconfigurationsstoragemigrationv1alpha1.StorageVersionMigrationApplyConfiguration{}
|
||||
case storagemigrationv1alpha1.SchemeGroupVersion.WithKind("StorageVersionMigrationSpec"):
|
||||
return &applyconfigurationsstoragemigrationv1alpha1.StorageVersionMigrationSpecApplyConfiguration{}
|
||||
case storagemigrationv1alpha1.SchemeGroupVersion.WithKind("StorageVersionMigrationStatus"):
|
||||
return &applyconfigurationsstoragemigrationv1alpha1.StorageVersionMigrationStatusApplyConfiguration{}
|
||||
|
||||
}
|
||||
return nil
|
||||
|
||||
@@ -63,9 +63,8 @@ const (
|
||||
// Aggregated discovery content-type (v2beta1). NOTE: content-type parameters
|
||||
// MUST be ordered (g, v, as) for server in "Accept" header (BUT we are resilient
|
||||
// to ordering when comparing returned values in "Content-Type" header).
|
||||
AcceptV2Beta1 = runtime.ContentTypeJSON + ";" + "g=apidiscovery.k8s.io;v=v2beta1;as=APIGroupDiscoveryList"
|
||||
AcceptV2 = runtime.ContentTypeJSON + ";" + "g=apidiscovery.k8s.io;v=v2;as=APIGroupDiscoveryList"
|
||||
AcceptV2NoPeer = runtime.ContentTypeJSON + ";" + "g=apidiscovery.k8s.io;v=v2;as=APIGroupDiscoveryList;profile=nopeer"
|
||||
AcceptV2Beta1 = runtime.ContentTypeJSON + ";" + "g=apidiscovery.k8s.io;v=v2beta1;as=APIGroupDiscoveryList"
|
||||
AcceptV2 = runtime.ContentTypeJSON + ";" + "g=apidiscovery.k8s.io;v=v2;as=APIGroupDiscoveryList"
|
||||
// Prioritize aggregated discovery by placing first in the order of discovery accept types.
|
||||
acceptDiscoveryFormats = AcceptV2 + "," + AcceptV2Beta1 + "," + AcceptV1
|
||||
)
|
||||
@@ -169,11 +168,6 @@ type DiscoveryClient struct {
|
||||
LegacyPrefix string
|
||||
// Forces the client to request only "unaggregated" (legacy) discovery.
|
||||
UseLegacyDiscovery bool
|
||||
// NoPeerDiscovery will request the "nopeer" profile of aggregated discovery.
|
||||
// This allows a client to get just the discovery documents served by the single apiserver
|
||||
// that it is talking to. This is useful for clients that need to understand the state
|
||||
// of a single apiserver, for example, to validate that the apiserver is ready to serve traffic.
|
||||
NoPeerDiscovery bool
|
||||
}
|
||||
|
||||
var _ AggregatedDiscoveryInterface = &DiscoveryClient{}
|
||||
@@ -247,7 +241,10 @@ func (d *DiscoveryClient) downloadLegacy() (
|
||||
map[schema.GroupVersion]*metav1.APIResourceList,
|
||||
map[schema.GroupVersion]error,
|
||||
error) {
|
||||
accept := selectDiscoveryAcceptHeader(d.UseLegacyDiscovery, d.NoPeerDiscovery)
|
||||
accept := acceptDiscoveryFormats
|
||||
if d.UseLegacyDiscovery {
|
||||
accept = AcceptV1
|
||||
}
|
||||
var responseContentType string
|
||||
body, err := d.restClient.Get().
|
||||
AbsPath("/api").
|
||||
@@ -310,7 +307,10 @@ func (d *DiscoveryClient) downloadAPIs() (
|
||||
map[schema.GroupVersion]*metav1.APIResourceList,
|
||||
map[schema.GroupVersion]error,
|
||||
error) {
|
||||
accept := selectDiscoveryAcceptHeader(d.UseLegacyDiscovery, d.NoPeerDiscovery)
|
||||
accept := acceptDiscoveryFormats
|
||||
if d.UseLegacyDiscovery {
|
||||
accept = AcceptV1
|
||||
}
|
||||
var responseContentType string
|
||||
body, err := d.restClient.Get().
|
||||
AbsPath("/apis").
|
||||
@@ -351,16 +351,6 @@ func (d *DiscoveryClient) downloadAPIs() (
|
||||
return apiGroupList, resourcesByGV, failedGVs, nil
|
||||
}
|
||||
|
||||
func selectDiscoveryAcceptHeader(useLegacy, nopeer bool) string {
|
||||
if useLegacy {
|
||||
return AcceptV1
|
||||
}
|
||||
if nopeer {
|
||||
return AcceptV2NoPeer + "," + acceptDiscoveryFormats
|
||||
}
|
||||
return acceptDiscoveryFormats
|
||||
}
|
||||
|
||||
// ContentTypeIsGVK checks of the content-type string is both
|
||||
// "application/json" and matches the provided GVK. An error
|
||||
// is returned if the content type string is malformed.
|
||||
|
||||
@@ -18,7 +18,6 @@ package dynamicinformer_test
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
@@ -69,12 +68,6 @@ func TestWatchListSemanticsSimple(t *testing.T) {
|
||||
clientfeaturestesting.SetFeatureDuringTest(t, clientfeatures.WatchListClient, true)
|
||||
|
||||
server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) {
|
||||
if _, ok := req.URL.Query()["watch"]; !ok {
|
||||
t.Errorf("expected a watch request, params: %v", req.URL.Query())
|
||||
http.Error(w, fmt.Errorf("unexpected request").Error(), http.StatusInternalServerError)
|
||||
return
|
||||
}
|
||||
|
||||
obj := &appsv1.Deployment{
|
||||
TypeMeta: metav1.TypeMeta{
|
||||
APIVersion: "apps/v1",
|
||||
|
||||
@@ -21,7 +21,6 @@ import (
|
||||
"sync/atomic"
|
||||
|
||||
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
|
||||
"k8s.io/apimachinery/pkg/util/version"
|
||||
)
|
||||
|
||||
// NOTE: types Feature, FeatureSpec, prerelease (and its values)
|
||||
@@ -50,14 +49,8 @@ type FeatureSpec struct {
|
||||
LockToDefault bool
|
||||
// PreRelease indicates the maturity level of the feature
|
||||
PreRelease prerelease
|
||||
// Version indicates the earliest version from which this FeatureSpec is valid.
|
||||
// If multiple FeatureSpecs exist for a Feature, the one with the highest version that is less
|
||||
// than or equal to the effective version of the component is used.
|
||||
Version *version.Version
|
||||
}
|
||||
|
||||
type VersionedSpecs []FeatureSpec
|
||||
|
||||
// Gates indicates whether a given feature is enabled or not.
|
||||
type Gates interface {
|
||||
// Enabled returns true if the key is enabled.
|
||||
@@ -73,15 +66,6 @@ type Registry interface {
|
||||
Add(map[Feature]FeatureSpec) error
|
||||
}
|
||||
|
||||
// VersionedRegistry represents an external versioned feature gates registry.
|
||||
type VersionedRegistry interface {
|
||||
// AddVersioned adds existing versioned feature gates to the provided registry.
|
||||
//
|
||||
// As of today, this method is used by AddVersionedFeaturesToExistingFeatureGates and
|
||||
// ReplaceFeatureGates to take control of the features exposed by this library.
|
||||
AddVersioned(in map[Feature]VersionedSpecs) error
|
||||
}
|
||||
|
||||
// FeatureGates returns the feature gates exposed by this library.
|
||||
//
|
||||
// By default, only the default features gates will be returned.
|
||||
@@ -101,15 +85,7 @@ func FeatureGates() Gates {
|
||||
// Usually this function is combined with ReplaceFeatureGates to take control of the
|
||||
// features exposed by this library.
|
||||
func AddFeaturesToExistingFeatureGates(registry Registry) error {
|
||||
return registry.Add(unversionedFeatureGates(defaultVersionedKubernetesFeatureGates))
|
||||
}
|
||||
|
||||
// AddFeaturesToExistingFeatureGates adds the default versioned feature gates to the provided registry.
|
||||
// Usually this function is combined with ReplaceFeatureGates to take control of the
|
||||
// features exposed by this library.
|
||||
// Generally only used by k/k.
|
||||
func AddVersionedFeaturesToExistingFeatureGates(registry VersionedRegistry) error {
|
||||
return registry.AddVersioned(defaultVersionedKubernetesFeatureGates)
|
||||
return registry.Add(defaultKubernetesFeatureGates)
|
||||
}
|
||||
|
||||
// ReplaceFeatureGates overwrites the default implementation of the feature gates
|
||||
@@ -145,23 +121,8 @@ func replaceFeatureGatesWithWarningIndicator(newFeatureGates Gates) bool {
|
||||
return shouldProduceWarning
|
||||
}
|
||||
|
||||
// unversionedFeatureGates takes the latest entry from the VersionedSpecs of each feature, and clears out the version information,
|
||||
// so that the result can be used with an unversioned feature gate.
|
||||
func unversionedFeatureGates(featureGates map[Feature]VersionedSpecs) map[Feature]FeatureSpec {
|
||||
unversioned := map[Feature]FeatureSpec{}
|
||||
for feature, specs := range featureGates {
|
||||
if len(specs) == 0 {
|
||||
continue
|
||||
}
|
||||
latestSpec := specs[len(specs)-1]
|
||||
latestSpec.Version = nil // Clear version information.
|
||||
unversioned[feature] = latestSpec
|
||||
}
|
||||
return unversioned
|
||||
}
|
||||
|
||||
func init() {
|
||||
envVarGates := newEnvVarFeatureGates(unversionedFeatureGates(defaultVersionedKubernetesFeatureGates))
|
||||
envVarGates := newEnvVarFeatureGates(defaultKubernetesFeatureGates)
|
||||
|
||||
wrappedFeatureGates := &featureGatesWrapper{envVarGates}
|
||||
featureGates.Store(wrappedFeatureGates)
|
||||
|
||||
@@ -17,67 +17,17 @@ limitations under the License.
|
||||
package features
|
||||
|
||||
import (
|
||||
"reflect"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
"k8s.io/apimachinery/pkg/util/version"
|
||||
)
|
||||
|
||||
// TestAddFeaturesToExistingFeatureGates ensures that
|
||||
// the defaultVersionedKubernetesFeatureGates are added to a test feature gates registry.
|
||||
// the defaultKubernetesFeatureGates are added to a test feature gates registry.
|
||||
func TestAddFeaturesToExistingFeatureGates(t *testing.T) {
|
||||
fakeFeatureGates := &fakeRegistry{}
|
||||
require.NoError(t, AddFeaturesToExistingFeatureGates(fakeFeatureGates))
|
||||
require.Equal(t, unversionedFeatureGates(defaultVersionedKubernetesFeatureGates), fakeFeatureGates.specs)
|
||||
}
|
||||
|
||||
// TestAddVersionedFeaturesToExistingFeatureGates ensures that
|
||||
// the defaultVersionedKubernetesFeatureGates are added to a versioned test feature gates registry.
|
||||
func TestAddVersionedFeaturesToExistingFeatureGates(t *testing.T) {
|
||||
fakeFeatureGates := &fakeVersionedRegistry{}
|
||||
require.NoError(t, AddVersionedFeaturesToExistingFeatureGates(fakeFeatureGates))
|
||||
require.Equal(t, defaultVersionedKubernetesFeatureGates, fakeFeatureGates.specs)
|
||||
}
|
||||
|
||||
func TestUnversionedFeatureGates(t *testing.T) {
|
||||
testCases := []struct {
|
||||
name string
|
||||
featureGates map[Feature]VersionedSpecs
|
||||
expected map[Feature]FeatureSpec
|
||||
}{
|
||||
{
|
||||
name: "multiple features",
|
||||
featureGates: map[Feature]VersionedSpecs{
|
||||
"AlphaFeature": {
|
||||
{Version: version.MustParse("1.30"), Default: false, PreRelease: Alpha},
|
||||
},
|
||||
"BetaFeature": {
|
||||
{Version: version.MustParse("1.28"), Default: false, PreRelease: Alpha},
|
||||
{Version: version.MustParse("1.30"), Default: true, PreRelease: Beta},
|
||||
},
|
||||
"GAFeature": {
|
||||
{Version: version.MustParse("1.25"), Default: false, PreRelease: Alpha},
|
||||
{Version: version.MustParse("1.27"), Default: true, PreRelease: Beta},
|
||||
{Version: version.MustParse("1.29"), Default: true, PreRelease: GA, LockToDefault: true},
|
||||
},
|
||||
},
|
||||
expected: map[Feature]FeatureSpec{
|
||||
"AlphaFeature": {Default: false, PreRelease: Alpha},
|
||||
"BetaFeature": {Default: true, PreRelease: Beta},
|
||||
"GAFeature": {Default: true, PreRelease: GA, LockToDefault: true},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
for _, tc := range testCases {
|
||||
t.Run(tc.name, func(t *testing.T) {
|
||||
actual := unversionedFeatureGates(tc.featureGates)
|
||||
if !reflect.DeepEqual(actual, tc.expected) {
|
||||
t.Errorf("unversionedFeatureGates() = %v, want %v", actual, tc.expected)
|
||||
}
|
||||
})
|
||||
}
|
||||
require.Equal(t, defaultKubernetesFeatureGates, fakeFeatureGates.specs)
|
||||
}
|
||||
|
||||
func TestReplaceFeatureGatesWithWarningIndicator(t *testing.T) {
|
||||
@@ -97,12 +47,3 @@ func (f *fakeRegistry) Add(specs map[Feature]FeatureSpec) error {
|
||||
f.specs = specs
|
||||
return nil
|
||||
}
|
||||
|
||||
type fakeVersionedRegistry struct {
|
||||
specs map[Feature]VersionedSpecs
|
||||
}
|
||||
|
||||
func (f *fakeVersionedRegistry) AddVersioned(specs map[Feature]VersionedSpecs) error {
|
||||
f.specs = specs
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -16,10 +16,6 @@ limitations under the License.
|
||||
|
||||
package features
|
||||
|
||||
import (
|
||||
"k8s.io/apimachinery/pkg/util/version"
|
||||
)
|
||||
|
||||
// Every feature gate should have an entry here following this template:
|
||||
//
|
||||
// // owner: @username
|
||||
@@ -58,48 +54,30 @@ const (
|
||||
// Refactor informers to deliver watch stream events in order instead of out of order.
|
||||
InOrderInformers Feature = "InOrderInformers"
|
||||
|
||||
// owner: @yue9944882
|
||||
// beta: v1.35
|
||||
//
|
||||
// Allow InOrderInformer to process incoming events in batches to expedite the process rate.
|
||||
InOrderInformersBatchProcess Feature = "InOrderInformersBatchProcess"
|
||||
|
||||
// owner: @enj, @michaelasp
|
||||
// owner: @nilekhc
|
||||
// alpha: v1.30
|
||||
// GA: v1.35
|
||||
InformerResourceVersion Feature = "InformerResourceVersion"
|
||||
|
||||
// owner: @p0lyn0mial
|
||||
// beta: v1.30
|
||||
//
|
||||
// Allow the client to get a stream of individual items instead of chunking from the server.
|
||||
//
|
||||
// NOTE:
|
||||
// The feature is disabled in Beta by default because
|
||||
// it will only be turned on for selected control plane component(s).
|
||||
WatchListClient Feature = "WatchListClient"
|
||||
)
|
||||
|
||||
// defaultVersionedKubernetesFeatureGates consists of all known Kubernetes-specific feature keys.
|
||||
// defaultKubernetesFeatureGates consists of all known Kubernetes-specific feature keys.
|
||||
//
|
||||
// To add a new feature, define a key for it above and add it here.
|
||||
// After registering with the binary, the features are, by default, controllable using environment variables.
|
||||
// For more details, please see envVarFeatureGates implementation.
|
||||
var defaultVersionedKubernetesFeatureGates = map[Feature]VersionedSpecs{
|
||||
ClientsAllowCBOR: {
|
||||
{Version: version.MustParse("1.32"), Default: false, PreRelease: Alpha},
|
||||
},
|
||||
ClientsPreferCBOR: {
|
||||
{Version: version.MustParse("1.32"), Default: false, PreRelease: Alpha},
|
||||
},
|
||||
InOrderInformers: {
|
||||
{Version: version.MustParse("1.33"), Default: true, PreRelease: Beta},
|
||||
},
|
||||
InOrderInformersBatchProcess: {
|
||||
{Version: version.MustParse("1.35"), Default: true, PreRelease: Beta},
|
||||
},
|
||||
InformerResourceVersion: {
|
||||
{Version: version.MustParse("1.30"), Default: false, PreRelease: Alpha},
|
||||
{Version: version.MustParse("1.35"), Default: true, PreRelease: GA},
|
||||
},
|
||||
WatchListClient: {
|
||||
{Version: version.MustParse("1.30"), Default: false, PreRelease: Beta},
|
||||
{Version: version.MustParse("1.35"), Default: true, PreRelease: Beta},
|
||||
},
|
||||
var defaultKubernetesFeatureGates = map[Feature]FeatureSpec{
|
||||
ClientsAllowCBOR: {Default: false, PreRelease: Alpha},
|
||||
ClientsPreferCBOR: {Default: false, PreRelease: Alpha},
|
||||
InOrderInformers: {Default: true, PreRelease: Beta},
|
||||
InformerResourceVersion: {Default: false, PreRelease: Alpha},
|
||||
WatchListClient: {Default: false, PreRelease: Beta},
|
||||
}
|
||||
|
||||
@@ -77,7 +77,6 @@ func setFeatureDuringTestInternal(tb testing.TB, feature clientfeatures.Feature,
|
||||
overriddenFeaturesLock.Lock()
|
||||
defer overriddenFeaturesLock.Unlock()
|
||||
delete(overriddenFeatures, feature)
|
||||
// if default is not set
|
||||
if err := featureGates.Set(feature, originalFeatureValue); err != nil {
|
||||
tb.Errorf("failed restoring client-go feature: %v to its original value: %v, err: %v", feature, originalFeatureValue, err)
|
||||
}
|
||||
|
||||
21
go.mod
21
go.mod
@@ -18,17 +18,17 @@ require (
|
||||
github.com/spf13/pflag v1.0.9
|
||||
github.com/stretchr/testify v1.11.1
|
||||
go.uber.org/goleak v1.3.0
|
||||
golang.org/x/net v0.47.0
|
||||
golang.org/x/net v0.43.0
|
||||
golang.org/x/oauth2 v0.30.0
|
||||
golang.org/x/term v0.37.0
|
||||
golang.org/x/term v0.34.0
|
||||
golang.org/x/time v0.9.0
|
||||
google.golang.org/protobuf v1.36.8
|
||||
gopkg.in/evanphx/json-patch.v4 v4.13.0
|
||||
k8s.io/api v0.35.6
|
||||
k8s.io/apimachinery v0.35.6
|
||||
k8s.io/api v0.35.0-alpha.2
|
||||
k8s.io/apimachinery v0.35.0-alpha.2
|
||||
k8s.io/klog/v2 v2.130.1
|
||||
k8s.io/kube-openapi v0.0.0-20250910181357-589584f1c912
|
||||
k8s.io/utils v0.0.0-20251002143259-bc988d571ff4
|
||||
k8s.io/utils v0.0.0-20250604170112-4c0f3b243397
|
||||
sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730
|
||||
sigs.k8s.io/randfill v1.0.0
|
||||
sigs.k8s.io/structured-merge-diff/v6 v6.3.0
|
||||
@@ -36,7 +36,6 @@ require (
|
||||
)
|
||||
|
||||
require (
|
||||
github.com/Masterminds/semver/v3 v3.4.0 // indirect
|
||||
github.com/davecgh/go-spew v1.1.1 // indirect
|
||||
github.com/emicklei/go-restful/v3 v3.12.2 // indirect
|
||||
github.com/fxamacker/cbor/v2 v2.9.0 // indirect
|
||||
@@ -44,21 +43,21 @@ require (
|
||||
github.com/go-openapi/jsonreference v0.20.2 // indirect
|
||||
github.com/go-openapi/swag v0.23.0 // indirect
|
||||
github.com/google/btree v1.1.3 // indirect
|
||||
github.com/google/pprof v0.0.0-20250403155104-27863c87afa6 // indirect
|
||||
github.com/google/pprof v0.0.0-20241029153458-d1b30febd7db // indirect
|
||||
github.com/josharian/intern v1.0.0 // indirect
|
||||
github.com/json-iterator/go v1.1.12 // indirect
|
||||
github.com/mailru/easyjson v0.7.7 // indirect
|
||||
github.com/moby/spdystream v0.5.1 // indirect
|
||||
github.com/moby/spdystream v0.5.0 // indirect
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
|
||||
github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee // indirect
|
||||
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect
|
||||
github.com/pmezard/go-difflib v1.0.0 // indirect
|
||||
github.com/stretchr/objx v0.5.2 // indirect
|
||||
github.com/x448/float16 v0.8.4 // indirect
|
||||
go.yaml.in/yaml/v2 v2.4.3 // indirect
|
||||
go.yaml.in/yaml/v2 v2.4.2 // indirect
|
||||
go.yaml.in/yaml/v3 v3.0.4 // indirect
|
||||
golang.org/x/sys v0.38.0 // indirect
|
||||
golang.org/x/text v0.31.0 // indirect
|
||||
golang.org/x/sys v0.35.0 // indirect
|
||||
golang.org/x/text v0.28.0 // indirect
|
||||
gopkg.in/inf.v0 v0.9.1 // indirect
|
||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||
)
|
||||
|
||||
62
go.sum
62
go.sum
@@ -1,5 +1,3 @@
|
||||
github.com/Masterminds/semver/v3 v3.4.0 h1:Zog+i5UMtVoCU8oKka5P7i9q9HgrJeGzI9SA1Xbatp0=
|
||||
github.com/Masterminds/semver/v3 v3.4.0/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM=
|
||||
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio=
|
||||
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs=
|
||||
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
|
||||
@@ -29,8 +27,8 @@ github.com/google/gnostic-models v0.7.0/go.mod h1:whL5G0m6dmc5cPxKc5bdKdEN3UjI7O
|
||||
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
|
||||
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
|
||||
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
|
||||
github.com/google/pprof v0.0.0-20250403155104-27863c87afa6 h1:BHT72Gu3keYf3ZEu2J0b1vyeLSOYI8bm5wbJM/8yDe8=
|
||||
github.com/google/pprof v0.0.0-20250403155104-27863c87afa6/go.mod h1:boTsfXsheKC2y+lKOCMpSfarhxDeIzfZG1jqGcPl3cA=
|
||||
github.com/google/pprof v0.0.0-20241029153458-d1b30febd7db h1:097atOisP2aRj7vFgYQBbFN4U4JNXUNYpxael3UzMyo=
|
||||
github.com/google/pprof v0.0.0-20241029153458-d1b30febd7db/go.mod h1:vavhavw2zAxS5dIdcRluK6cSGGPlZynqzFM8NdvU144=
|
||||
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
|
||||
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674 h1:JeSE6pjso5THxAzdVpqr6/geYxZytqFMBCOtn/ujyeo=
|
||||
@@ -50,8 +48,8 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
|
||||
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
|
||||
github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0=
|
||||
github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc=
|
||||
github.com/moby/spdystream v0.5.1 h1:9sNYeYZUcci9R6/w7KDaFWEWeV4LStVG78Mpyq/Zm/Y=
|
||||
github.com/moby/spdystream v0.5.1/go.mod h1:xBAYlnt/ay+11ShkdFKNAG7LsyK/tmNBVvVOwrfMgdI=
|
||||
github.com/moby/spdystream v0.5.0 h1:7r0J1Si3QO/kjRitvSLVVFUjxMEb/YLj6S9FF62JBCU=
|
||||
github.com/moby/spdystream v0.5.0/go.mod h1:xBAYlnt/ay+11ShkdFKNAG7LsyK/tmNBVvVOwrfMgdI=
|
||||
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
||||
@@ -62,16 +60,16 @@ github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq
|
||||
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
|
||||
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f h1:y5//uYreIhSUg3J1GEMiLbxo1LJaP8RfCpH6pymGZus=
|
||||
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw=
|
||||
github.com/onsi/ginkgo/v2 v2.27.2 h1:LzwLj0b89qtIy6SSASkzlNvX6WktqurSHwkk2ipF/Ns=
|
||||
github.com/onsi/ginkgo/v2 v2.27.2/go.mod h1:ArE1D/XhNXBXCBkKOLkbsb2c81dQHCRcF5zwn/ykDRo=
|
||||
github.com/onsi/gomega v1.38.2 h1:eZCjf2xjZAqe+LeWvKb5weQ+NcPwX84kqJ0cZNxok2A=
|
||||
github.com/onsi/gomega v1.38.2/go.mod h1:W2MJcYxRGV63b418Ai34Ud0hEdTVXq9NW9+Sx6uXf3k=
|
||||
github.com/onsi/ginkgo/v2 v2.21.0 h1:7rg/4f3rB88pb5obDgNZrNHrQ4e6WpjonchcpuBRnZM=
|
||||
github.com/onsi/ginkgo/v2 v2.21.0/go.mod h1:7Du3c42kxCUegi0IImZ1wUQzMBVecgIHjR1C+NkhLQo=
|
||||
github.com/onsi/gomega v1.35.1 h1:Cwbd75ZBPxFSuZ6T+rN/WCb/gOc6YgFBXLlZLhC7Ds4=
|
||||
github.com/onsi/gomega v1.35.1/go.mod h1:PvZbdDc8J6XJEpDK4HCuRBm8a6Fzp9/DmhC9C7yFlog=
|
||||
github.com/peterbourgon/diskv v2.0.1+incompatible h1:UBdAOUP5p4RWqPBg048CAvpKN+vxiaj6gdUUzhl4XmI=
|
||||
github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU=
|
||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ=
|
||||
github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc=
|
||||
github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII=
|
||||
github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o=
|
||||
github.com/spf13/pflag v1.0.9 h1:9exaQaMOCwffKiiiYk6/BndUBv+iRViNW+4lEMi0PvY=
|
||||
github.com/spf13/pflag v1.0.9/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
|
||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
@@ -89,28 +87,24 @@ github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM=
|
||||
github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg=
|
||||
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
|
||||
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
|
||||
go.yaml.in/yaml/v2 v2.4.3 h1:6gvOSjQoTB3vt1l+CU+tSyi/HOjfOjRLJ4YwYZGwRO0=
|
||||
go.yaml.in/yaml/v2 v2.4.3/go.mod h1:zSxWcmIDjOzPXpjlTTbAsKokqkDNAVtZO0WOMiT90s8=
|
||||
go.yaml.in/yaml/v2 v2.4.2 h1:DzmwEr2rDGHl7lsFgAHxmNz/1NlQ7xLIrlN2h5d1eGI=
|
||||
go.yaml.in/yaml/v2 v2.4.2/go.mod h1:081UH+NErpNdqlCXm3TtEran0rJZGxAYx9hb/ELlsPU=
|
||||
go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc=
|
||||
go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg=
|
||||
golang.org/x/mod v0.29.0 h1:HV8lRxZC4l2cr3Zq1LvtOsi/ThTgWnUk/y64QSs8GwA=
|
||||
golang.org/x/mod v0.29.0/go.mod h1:NyhrlYXJ2H4eJiRy/WDBO6HMqZQ6q9nk4JzS3NuCK+w=
|
||||
golang.org/x/net v0.47.0 h1:Mx+4dIFzqraBXUugkia1OOvlD6LemFo1ALMHjrXDOhY=
|
||||
golang.org/x/net v0.47.0/go.mod h1:/jNxtkgq5yWUGYkaZGqo27cfGZ1c5Nen03aYrrKpVRU=
|
||||
golang.org/x/net v0.43.0 h1:lat02VYK2j4aLzMzecihNvTlJNQUq316m2Mr9rnM6YE=
|
||||
golang.org/x/net v0.43.0/go.mod h1:vhO1fvI4dGsIjh73sWfUVjj3N7CA9WkKJNQm2svM6Jg=
|
||||
golang.org/x/oauth2 v0.30.0 h1:dnDm7JmhM45NNpd8FDDeLhK6FwqbOf4MLCM9zb1BOHI=
|
||||
golang.org/x/oauth2 v0.30.0/go.mod h1:B++QgG3ZKulg6sRPGD/mqlHQs5rB3Ml9erfeDY7xKlU=
|
||||
golang.org/x/sync v0.18.0 h1:kr88TuHDroi+UVf+0hZnirlk8o8T+4MrK6mr60WkH/I=
|
||||
golang.org/x/sync v0.18.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI=
|
||||
golang.org/x/sys v0.38.0 h1:3yZWxaJjBmCWXqhN1qh02AkOnCQ1poK6oF+a7xWL6Gc=
|
||||
golang.org/x/sys v0.38.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
|
||||
golang.org/x/term v0.37.0 h1:8EGAD0qCmHYZg6J17DvsMy9/wJ7/D/4pV/wfnld5lTU=
|
||||
golang.org/x/term v0.37.0/go.mod h1:5pB4lxRNYYVZuTLmy8oR2BH8dflOR+IbTYFD8fi3254=
|
||||
golang.org/x/text v0.31.0 h1:aC8ghyu4JhP8VojJ2lEHBnochRno1sgL6nEi9WGFGMM=
|
||||
golang.org/x/text v0.31.0/go.mod h1:tKRAlv61yKIjGGHX/4tP1LTbc13YSec1pxVEWXzfoeM=
|
||||
golang.org/x/sys v0.35.0 h1:vz1N37gP5bs89s7He8XuIYXpyY0+QlsKmzipCbUtyxI=
|
||||
golang.org/x/sys v0.35.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
|
||||
golang.org/x/term v0.34.0 h1:O/2T7POpk0ZZ7MAzMeWFSg6S5IpWd/RXDlM9hgM3DR4=
|
||||
golang.org/x/term v0.34.0/go.mod h1:5jC53AEywhIVebHgPVeg0mj8OD3VO9OzclacVrqpaAw=
|
||||
golang.org/x/text v0.28.0 h1:rhazDwis8INMIwQ4tpjLDzUhx6RlXqZNPEM0huQojng=
|
||||
golang.org/x/text v0.28.0/go.mod h1:U8nCwOR8jO/marOQ0QbDiOngZVEBB7MAiitBuMjXiNU=
|
||||
golang.org/x/time v0.9.0 h1:EsRrnYcQiGH+5FfbgvV4AP7qEZstoyrHB0DzarOQ4ZY=
|
||||
golang.org/x/time v0.9.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM=
|
||||
golang.org/x/tools v0.38.0 h1:Hx2Xv8hISq8Lm16jvBZ2VQf+RLmbd7wVUsALibYI/IQ=
|
||||
golang.org/x/tools v0.38.0/go.mod h1:yEsQ/d/YK8cjh0L6rZlY8tgtlKiBNTL14pGDJPJpYQs=
|
||||
golang.org/x/tools v0.36.0 h1:kWS0uv/zsvHEle1LbV5LE8QujrxB3wfQyxHfhOk0Qkg=
|
||||
golang.org/x/tools v0.36.0/go.mod h1:WBDiHKJK8YgLHlcQPYQzNCkUxUypCaa5ZegCVutKm+s=
|
||||
google.golang.org/protobuf v1.36.8 h1:xHScyCOEuuwZEc6UtSOvPbAT4zRh0xcNRYekJwfqyMc=
|
||||
google.golang.org/protobuf v1.36.8/go.mod h1:fuxRtAxBytpl4zzqUh6/eyUujkJdNiuEkXntxiD/uRU=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
@@ -123,16 +117,16 @@ gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw=
|
||||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
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.35.6 h1:phPzP79F3kcONsD2TzmDiITNCV6/1Z5U3CCEcjtsXzI=
|
||||
k8s.io/api v0.35.6/go.mod h1:GWKUaIp24fuDFigAgnhr9EJOKDqspnwPjYlpDca5B4U=
|
||||
k8s.io/apimachinery v0.35.6 h1:ASSpfmmsOArKb2Hsu8gGlIcbIcEMVTboI3FfsfYuQ8k=
|
||||
k8s.io/apimachinery v0.35.6/go.mod h1:NNi1taPOpep0jOj+oRha3mBJPqvi0hGdaV8TCqGQ+cc=
|
||||
k8s.io/api v0.35.0-alpha.2 h1:Y6A4tHFmYCKnX08/vUYI8KhGHHP0f2b/G8IMoMKH4zs=
|
||||
k8s.io/api v0.35.0-alpha.2/go.mod h1:47glLzjz7JNnd7lpY1LICgS8o4MUwLpcvdNB+2WZp18=
|
||||
k8s.io/apimachinery v0.35.0-alpha.2 h1:K4D4c2UF7A5fImwIO5wWK8n4JcHC0dhQX+l72nMm+4E=
|
||||
k8s.io/apimachinery v0.35.0-alpha.2/go.mod h1:wE5nOmI8k5gdg4Nuo6Csst6CE+WgeB7ZNhh7K5lLUbs=
|
||||
k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk=
|
||||
k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE=
|
||||
k8s.io/kube-openapi v0.0.0-20250910181357-589584f1c912 h1:Y3gxNAuB0OBLImH611+UDZcmKS3g6CthxToOb37KgwE=
|
||||
k8s.io/kube-openapi v0.0.0-20250910181357-589584f1c912/go.mod h1:kdmbQkyfwUagLfXIad1y2TdrjPFWp2Q89B3qkRwf/pQ=
|
||||
k8s.io/utils v0.0.0-20251002143259-bc988d571ff4 h1:SjGebBtkBqHFOli+05xYbK8YF1Dzkbzn+gDM4X9T4Ck=
|
||||
k8s.io/utils v0.0.0-20251002143259-bc988d571ff4/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
|
||||
k8s.io/utils v0.0.0-20250604170112-4c0f3b243397 h1:hwvWFiBzdWw1FhfY1FooPn3kzWuJ8tmbZBHi4zVsl1Y=
|
||||
k8s.io/utils v0.0.0-20250604170112-4c0f3b243397/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
|
||||
sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 h1:IpInykpT6ceI+QxKBbEflcR5EXP7sU1kvOlxwZh5txg=
|
||||
sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730/go.mod h1:mdzfpAEoE6DHQEN0uh9ZbOCuHbLK5wOm7dK4ctXE9Tg=
|
||||
sigs.k8s.io/randfill v1.0.0 h1:JfjMILfT8A6RbawdsK2JXGBR5AQVfd+9TbzrlneTyrU=
|
||||
|
||||
@@ -26,6 +26,8 @@ import (
|
||||
type Interface interface {
|
||||
// ClusterTrustBundles returns a ClusterTrustBundleInformer.
|
||||
ClusterTrustBundles() ClusterTrustBundleInformer
|
||||
// PodCertificateRequests returns a PodCertificateRequestInformer.
|
||||
PodCertificateRequests() PodCertificateRequestInformer
|
||||
}
|
||||
|
||||
type version struct {
|
||||
@@ -43,3 +45,8 @@ func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakList
|
||||
func (v *version) ClusterTrustBundles() ClusterTrustBundleInformer {
|
||||
return &clusterTrustBundleInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}
|
||||
}
|
||||
|
||||
// PodCertificateRequests returns a PodCertificateRequestInformer.
|
||||
func (v *version) PodCertificateRequests() PodCertificateRequestInformer {
|
||||
return &podCertificateRequestInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
|
||||
}
|
||||
|
||||
@@ -16,19 +16,19 @@ limitations under the License.
|
||||
|
||||
// Code generated by informer-gen. DO NOT EDIT.
|
||||
|
||||
package v1beta1
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
context "context"
|
||||
time "time"
|
||||
|
||||
apicertificatesv1beta1 "k8s.io/api/certificates/v1beta1"
|
||||
apicertificatesv1alpha1 "k8s.io/api/certificates/v1alpha1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
|
||||
kubernetes "k8s.io/client-go/kubernetes"
|
||||
certificatesv1beta1 "k8s.io/client-go/listers/certificates/v1beta1"
|
||||
certificatesv1alpha1 "k8s.io/client-go/listers/certificates/v1alpha1"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
||||
@@ -36,7 +36,7 @@ import (
|
||||
// PodCertificateRequests.
|
||||
type PodCertificateRequestInformer interface {
|
||||
Informer() cache.SharedIndexInformer
|
||||
Lister() certificatesv1beta1.PodCertificateRequestLister
|
||||
Lister() certificatesv1alpha1.PodCertificateRequestLister
|
||||
}
|
||||
|
||||
type podCertificateRequestInformer struct {
|
||||
@@ -62,28 +62,28 @@ func NewFilteredPodCertificateRequestInformer(client kubernetes.Interface, names
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.CertificatesV1beta1().PodCertificateRequests(namespace).List(context.Background(), options)
|
||||
return client.CertificatesV1alpha1().PodCertificateRequests(namespace).List(context.Background(), options)
|
||||
},
|
||||
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.CertificatesV1beta1().PodCertificateRequests(namespace).Watch(context.Background(), options)
|
||||
return client.CertificatesV1alpha1().PodCertificateRequests(namespace).Watch(context.Background(), options)
|
||||
},
|
||||
ListWithContextFunc: func(ctx context.Context, options v1.ListOptions) (runtime.Object, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.CertificatesV1beta1().PodCertificateRequests(namespace).List(ctx, options)
|
||||
return client.CertificatesV1alpha1().PodCertificateRequests(namespace).List(ctx, options)
|
||||
},
|
||||
WatchFuncWithContext: func(ctx context.Context, options v1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.CertificatesV1beta1().PodCertificateRequests(namespace).Watch(ctx, options)
|
||||
return client.CertificatesV1alpha1().PodCertificateRequests(namespace).Watch(ctx, options)
|
||||
},
|
||||
}, client),
|
||||
&apicertificatesv1beta1.PodCertificateRequest{},
|
||||
&apicertificatesv1alpha1.PodCertificateRequest{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
)
|
||||
@@ -94,9 +94,9 @@ func (f *podCertificateRequestInformer) defaultInformer(client kubernetes.Interf
|
||||
}
|
||||
|
||||
func (f *podCertificateRequestInformer) Informer() cache.SharedIndexInformer {
|
||||
return f.factory.InformerFor(&apicertificatesv1beta1.PodCertificateRequest{}, f.defaultInformer)
|
||||
return f.factory.InformerFor(&apicertificatesv1alpha1.PodCertificateRequest{}, f.defaultInformer)
|
||||
}
|
||||
|
||||
func (f *podCertificateRequestInformer) Lister() certificatesv1beta1.PodCertificateRequestLister {
|
||||
return certificatesv1beta1.NewPodCertificateRequestLister(f.Informer().GetIndexer())
|
||||
func (f *podCertificateRequestInformer) Lister() certificatesv1alpha1.PodCertificateRequestLister {
|
||||
return certificatesv1alpha1.NewPodCertificateRequestLister(f.Informer().GetIndexer())
|
||||
}
|
||||
@@ -28,8 +28,6 @@ type Interface interface {
|
||||
CertificateSigningRequests() CertificateSigningRequestInformer
|
||||
// ClusterTrustBundles returns a ClusterTrustBundleInformer.
|
||||
ClusterTrustBundles() ClusterTrustBundleInformer
|
||||
// PodCertificateRequests returns a PodCertificateRequestInformer.
|
||||
PodCertificateRequests() PodCertificateRequestInformer
|
||||
}
|
||||
|
||||
type version struct {
|
||||
@@ -52,8 +50,3 @@ func (v *version) CertificateSigningRequests() CertificateSigningRequestInformer
|
||||
func (v *version) ClusterTrustBundles() ClusterTrustBundleInformer {
|
||||
return &clusterTrustBundleInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}
|
||||
}
|
||||
|
||||
// PodCertificateRequests returns a PodCertificateRequestInformer.
|
||||
func (v *version) PodCertificateRequests() PodCertificateRequestInformer {
|
||||
return &podCertificateRequestInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@ import (
|
||||
storagev1 "k8s.io/api/storage/v1"
|
||||
storagev1alpha1 "k8s.io/api/storage/v1alpha1"
|
||||
storagev1beta1 "k8s.io/api/storage/v1beta1"
|
||||
storagemigrationv1beta1 "k8s.io/api/storagemigration/v1beta1"
|
||||
storagemigrationv1alpha1 "k8s.io/api/storagemigration/v1alpha1"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
)
|
||||
@@ -200,14 +200,14 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource
|
||||
// Group=certificates.k8s.io, Version=v1alpha1
|
||||
case certificatesv1alpha1.SchemeGroupVersion.WithResource("clustertrustbundles"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Certificates().V1alpha1().ClusterTrustBundles().Informer()}, nil
|
||||
case certificatesv1alpha1.SchemeGroupVersion.WithResource("podcertificaterequests"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Certificates().V1alpha1().PodCertificateRequests().Informer()}, nil
|
||||
|
||||
// Group=certificates.k8s.io, Version=v1beta1
|
||||
case certificatesv1beta1.SchemeGroupVersion.WithResource("certificatesigningrequests"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Certificates().V1beta1().CertificateSigningRequests().Informer()}, nil
|
||||
case certificatesv1beta1.SchemeGroupVersion.WithResource("clustertrustbundles"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Certificates().V1beta1().ClusterTrustBundles().Informer()}, nil
|
||||
case certificatesv1beta1.SchemeGroupVersion.WithResource("podcertificaterequests"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Certificates().V1beta1().PodCertificateRequests().Informer()}, nil
|
||||
|
||||
// Group=coordination.k8s.io, Version=v1
|
||||
case coordinationv1.SchemeGroupVersion.WithResource("leases"):
|
||||
@@ -426,8 +426,6 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource
|
||||
// Group=scheduling.k8s.io, Version=v1alpha1
|
||||
case schedulingv1alpha1.SchemeGroupVersion.WithResource("priorityclasses"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Scheduling().V1alpha1().PriorityClasses().Informer()}, nil
|
||||
case schedulingv1alpha1.SchemeGroupVersion.WithResource("workloads"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Scheduling().V1alpha1().Workloads().Informer()}, nil
|
||||
|
||||
// Group=scheduling.k8s.io, Version=v1beta1
|
||||
case schedulingv1beta1.SchemeGroupVersion.WithResource("priorityclasses"):
|
||||
@@ -469,9 +467,9 @@ 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=v1beta1
|
||||
case storagemigrationv1beta1.SchemeGroupVersion.WithResource("storageversionmigrations"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Storagemigration().V1beta1().StorageVersionMigrations().Informer()}, nil
|
||||
// Group=storagemigration.k8s.io, Version=v1alpha1
|
||||
case storagemigrationv1alpha1.SchemeGroupVersion.WithResource("storageversionmigrations"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Storagemigration().V1alpha1().StorageVersionMigrations().Informer()}, nil
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -26,8 +26,6 @@ import (
|
||||
type Interface interface {
|
||||
// PriorityClasses returns a PriorityClassInformer.
|
||||
PriorityClasses() PriorityClassInformer
|
||||
// Workloads returns a WorkloadInformer.
|
||||
Workloads() WorkloadInformer
|
||||
}
|
||||
|
||||
type version struct {
|
||||
@@ -45,8 +43,3 @@ func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakList
|
||||
func (v *version) PriorityClasses() PriorityClassInformer {
|
||||
return &priorityClassInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}
|
||||
}
|
||||
|
||||
// Workloads returns a WorkloadInformer.
|
||||
func (v *version) Workloads() WorkloadInformer {
|
||||
return &workloadInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
|
||||
}
|
||||
|
||||
@@ -1,102 +0,0 @@
|
||||
/*
|
||||
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 v1alpha1
|
||||
|
||||
import (
|
||||
context "context"
|
||||
time "time"
|
||||
|
||||
apischedulingv1alpha1 "k8s.io/api/scheduling/v1alpha1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
|
||||
kubernetes "k8s.io/client-go/kubernetes"
|
||||
schedulingv1alpha1 "k8s.io/client-go/listers/scheduling/v1alpha1"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
||||
// WorkloadInformer provides access to a shared informer and lister for
|
||||
// Workloads.
|
||||
type WorkloadInformer interface {
|
||||
Informer() cache.SharedIndexInformer
|
||||
Lister() schedulingv1alpha1.WorkloadLister
|
||||
}
|
||||
|
||||
type workloadInformer struct {
|
||||
factory internalinterfaces.SharedInformerFactory
|
||||
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
||||
namespace string
|
||||
}
|
||||
|
||||
// NewWorkloadInformer constructs a new informer for Workload 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 NewWorkloadInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
|
||||
return NewFilteredWorkloadInformer(client, namespace, resyncPeriod, indexers, nil)
|
||||
}
|
||||
|
||||
// NewFilteredWorkloadInformer constructs a new informer for Workload 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 NewFilteredWorkloadInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
|
||||
return cache.NewSharedIndexInformer(
|
||||
cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{
|
||||
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.SchedulingV1alpha1().Workloads(namespace).List(context.Background(), options)
|
||||
},
|
||||
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.SchedulingV1alpha1().Workloads(namespace).Watch(context.Background(), options)
|
||||
},
|
||||
ListWithContextFunc: func(ctx context.Context, options v1.ListOptions) (runtime.Object, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.SchedulingV1alpha1().Workloads(namespace).List(ctx, options)
|
||||
},
|
||||
WatchFuncWithContext: func(ctx context.Context, options v1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.SchedulingV1alpha1().Workloads(namespace).Watch(ctx, options)
|
||||
},
|
||||
}, client),
|
||||
&apischedulingv1alpha1.Workload{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
)
|
||||
}
|
||||
|
||||
func (f *workloadInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||
return NewFilteredWorkloadInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
|
||||
}
|
||||
|
||||
func (f *workloadInformer) Informer() cache.SharedIndexInformer {
|
||||
return f.factory.InformerFor(&apischedulingv1alpha1.Workload{}, f.defaultInformer)
|
||||
}
|
||||
|
||||
func (f *workloadInformer) Lister() schedulingv1alpha1.WorkloadLister {
|
||||
return schedulingv1alpha1.NewWorkloadLister(f.Informer().GetIndexer())
|
||||
}
|
||||
@@ -20,13 +20,13 @@ package storagemigration
|
||||
|
||||
import (
|
||||
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
|
||||
v1beta1 "k8s.io/client-go/informers/storagemigration/v1beta1"
|
||||
v1alpha1 "k8s.io/client-go/informers/storagemigration/v1alpha1"
|
||||
)
|
||||
|
||||
// Interface provides access to each of this group's versions.
|
||||
type Interface interface {
|
||||
// V1beta1 provides access to shared informers for resources in V1beta1.
|
||||
V1beta1() v1beta1.Interface
|
||||
// V1alpha1 provides access to shared informers for resources in V1alpha1.
|
||||
V1alpha1() v1alpha1.Interface
|
||||
}
|
||||
|
||||
type group struct {
|
||||
@@ -40,7 +40,7 @@ func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakList
|
||||
return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
|
||||
}
|
||||
|
||||
// V1beta1 returns a new v1beta1.Interface.
|
||||
func (g *group) V1beta1() v1beta1.Interface {
|
||||
return v1beta1.New(g.factory, g.namespace, g.tweakListOptions)
|
||||
// V1alpha1 returns a new v1alpha1.Interface.
|
||||
func (g *group) V1alpha1() v1alpha1.Interface {
|
||||
return v1alpha1.New(g.factory, g.namespace, g.tweakListOptions)
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ limitations under the License.
|
||||
|
||||
// Code generated by informer-gen. DO NOT EDIT.
|
||||
|
||||
package v1beta1
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
|
||||
@@ -16,19 +16,19 @@ limitations under the License.
|
||||
|
||||
// Code generated by informer-gen. DO NOT EDIT.
|
||||
|
||||
package v1beta1
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
context "context"
|
||||
time "time"
|
||||
|
||||
apistoragemigrationv1beta1 "k8s.io/api/storagemigration/v1beta1"
|
||||
apistoragemigrationv1alpha1 "k8s.io/api/storagemigration/v1alpha1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
|
||||
kubernetes "k8s.io/client-go/kubernetes"
|
||||
storagemigrationv1beta1 "k8s.io/client-go/listers/storagemigration/v1beta1"
|
||||
storagemigrationv1alpha1 "k8s.io/client-go/listers/storagemigration/v1alpha1"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
||||
@@ -36,7 +36,7 @@ import (
|
||||
// StorageVersionMigrations.
|
||||
type StorageVersionMigrationInformer interface {
|
||||
Informer() cache.SharedIndexInformer
|
||||
Lister() storagemigrationv1beta1.StorageVersionMigrationLister
|
||||
Lister() storagemigrationv1alpha1.StorageVersionMigrationLister
|
||||
}
|
||||
|
||||
type storageVersionMigrationInformer struct {
|
||||
@@ -61,28 +61,28 @@ func NewFilteredStorageVersionMigrationInformer(client kubernetes.Interface, res
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.StoragemigrationV1beta1().StorageVersionMigrations().List(context.Background(), options)
|
||||
return client.StoragemigrationV1alpha1().StorageVersionMigrations().List(context.Background(), options)
|
||||
},
|
||||
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.StoragemigrationV1beta1().StorageVersionMigrations().Watch(context.Background(), options)
|
||||
return client.StoragemigrationV1alpha1().StorageVersionMigrations().Watch(context.Background(), options)
|
||||
},
|
||||
ListWithContextFunc: func(ctx context.Context, options v1.ListOptions) (runtime.Object, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.StoragemigrationV1beta1().StorageVersionMigrations().List(ctx, options)
|
||||
return client.StoragemigrationV1alpha1().StorageVersionMigrations().List(ctx, options)
|
||||
},
|
||||
WatchFuncWithContext: func(ctx context.Context, options v1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.StoragemigrationV1beta1().StorageVersionMigrations().Watch(ctx, options)
|
||||
return client.StoragemigrationV1alpha1().StorageVersionMigrations().Watch(ctx, options)
|
||||
},
|
||||
}, client),
|
||||
&apistoragemigrationv1beta1.StorageVersionMigration{},
|
||||
&apistoragemigrationv1alpha1.StorageVersionMigration{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
)
|
||||
@@ -93,9 +93,9 @@ func (f *storageVersionMigrationInformer) defaultInformer(client kubernetes.Inte
|
||||
}
|
||||
|
||||
func (f *storageVersionMigrationInformer) Informer() cache.SharedIndexInformer {
|
||||
return f.factory.InformerFor(&apistoragemigrationv1beta1.StorageVersionMigration{}, f.defaultInformer)
|
||||
return f.factory.InformerFor(&apistoragemigrationv1alpha1.StorageVersionMigration{}, f.defaultInformer)
|
||||
}
|
||||
|
||||
func (f *storageVersionMigrationInformer) Lister() storagemigrationv1beta1.StorageVersionMigrationLister {
|
||||
return storagemigrationv1beta1.NewStorageVersionMigrationLister(f.Informer().GetIndexer())
|
||||
func (f *storageVersionMigrationInformer) Lister() storagemigrationv1alpha1.StorageVersionMigrationLister {
|
||||
return storagemigrationv1alpha1.NewStorageVersionMigrationLister(f.Informer().GetIndexer())
|
||||
}
|
||||
@@ -77,7 +77,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"
|
||||
storagemigrationv1beta1 "k8s.io/client-go/kubernetes/typed/storagemigration/v1beta1"
|
||||
storagemigrationv1alpha1 "k8s.io/client-go/kubernetes/typed/storagemigration/v1alpha1"
|
||||
rest "k8s.io/client-go/rest"
|
||||
flowcontrol "k8s.io/client-go/util/flowcontrol"
|
||||
)
|
||||
@@ -138,7 +138,7 @@ type Interface interface {
|
||||
StorageV1beta1() storagev1beta1.StorageV1beta1Interface
|
||||
StorageV1() storagev1.StorageV1Interface
|
||||
StorageV1alpha1() storagev1alpha1.StorageV1alpha1Interface
|
||||
StoragemigrationV1beta1() storagemigrationv1beta1.StoragemigrationV1beta1Interface
|
||||
StoragemigrationV1alpha1() storagemigrationv1alpha1.StoragemigrationV1alpha1Interface
|
||||
}
|
||||
|
||||
// Clientset contains the clients for groups.
|
||||
@@ -198,7 +198,7 @@ type Clientset struct {
|
||||
storageV1beta1 *storagev1beta1.StorageV1beta1Client
|
||||
storageV1 *storagev1.StorageV1Client
|
||||
storageV1alpha1 *storagev1alpha1.StorageV1alpha1Client
|
||||
storagemigrationV1beta1 *storagemigrationv1beta1.StoragemigrationV1beta1Client
|
||||
storagemigrationV1alpha1 *storagemigrationv1alpha1.StoragemigrationV1alpha1Client
|
||||
}
|
||||
|
||||
// AdmissionregistrationV1 retrieves the AdmissionregistrationV1Client
|
||||
@@ -471,9 +471,9 @@ func (c *Clientset) StorageV1alpha1() storagev1alpha1.StorageV1alpha1Interface {
|
||||
return c.storageV1alpha1
|
||||
}
|
||||
|
||||
// StoragemigrationV1beta1 retrieves the StoragemigrationV1beta1Client
|
||||
func (c *Clientset) StoragemigrationV1beta1() storagemigrationv1beta1.StoragemigrationV1beta1Interface {
|
||||
return c.storagemigrationV1beta1
|
||||
// StoragemigrationV1alpha1 retrieves the StoragemigrationV1alpha1Client
|
||||
func (c *Clientset) StoragemigrationV1alpha1() storagemigrationv1alpha1.StoragemigrationV1alpha1Interface {
|
||||
return c.storagemigrationV1alpha1
|
||||
}
|
||||
|
||||
// Discovery retrieves the DiscoveryClient
|
||||
@@ -736,7 +736,7 @@ func NewForConfigAndClient(c *rest.Config, httpClient *http.Client) (*Clientset,
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
cs.storagemigrationV1beta1, err = storagemigrationv1beta1.NewForConfigAndClient(&configShallowCopy, httpClient)
|
||||
cs.storagemigrationV1alpha1, err = storagemigrationv1alpha1.NewForConfigAndClient(&configShallowCopy, httpClient)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -815,7 +815,7 @@ func New(c rest.Interface) *Clientset {
|
||||
cs.storageV1beta1 = storagev1beta1.New(c)
|
||||
cs.storageV1 = storagev1.New(c)
|
||||
cs.storageV1alpha1 = storagev1alpha1.New(c)
|
||||
cs.storagemigrationV1beta1 = storagemigrationv1beta1.New(c)
|
||||
cs.storagemigrationV1alpha1 = storagemigrationv1alpha1.New(c)
|
||||
|
||||
cs.DiscoveryClient = discovery.NewDiscoveryClient(c)
|
||||
return &cs
|
||||
|
||||
@@ -134,8 +134,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"
|
||||
storagemigrationv1beta1 "k8s.io/client-go/kubernetes/typed/storagemigration/v1beta1"
|
||||
fakestoragemigrationv1beta1 "k8s.io/client-go/kubernetes/typed/storagemigration/v1beta1/fake"
|
||||
storagemigrationv1alpha1 "k8s.io/client-go/kubernetes/typed/storagemigration/v1alpha1"
|
||||
fakestoragemigrationv1alpha1 "k8s.io/client-go/kubernetes/typed/storagemigration/v1alpha1/fake"
|
||||
"k8s.io/client-go/testing"
|
||||
)
|
||||
|
||||
@@ -143,6 +143,10 @@ import (
|
||||
// It's backed by a very simple object tracker that processes creates, updates and deletions as-is,
|
||||
// without applying any field management, validations and/or defaults. It shouldn't be considered a replacement
|
||||
// for a real clientset and is mostly useful in simple unit tests.
|
||||
//
|
||||
// Deprecated: NewClientset replaces this with support for field management, which significantly improves
|
||||
// server side apply testing. NewClientset is only available when apply configurations are generated (e.g.
|
||||
// via --with-applyconfig).
|
||||
func NewSimpleClientset(objects ...runtime.Object) *Clientset {
|
||||
o := testing.NewObjectTracker(scheme, codecs.UniversalDecoder())
|
||||
for _, obj := range objects {
|
||||
@@ -203,10 +207,6 @@ func (c *Clientset) IsWatchListSemanticsUnSupported() bool {
|
||||
// It's backed by a very simple object tracker that processes creates, updates and deletions as-is,
|
||||
// without applying any validations and/or defaults. It shouldn't be considered a replacement
|
||||
// for a real clientset and is mostly useful in simple unit tests.
|
||||
//
|
||||
// Compared to NewSimpleClientset, the Clientset returned here supports field tracking and thus
|
||||
// server-side apply. Beware though that support in that for CRDs is missing
|
||||
// (https://github.com/kubernetes/kubernetes/issues/126850).
|
||||
func NewClientset(objects ...runtime.Object) *Clientset {
|
||||
o := testing.NewFieldManagedObjectTracker(
|
||||
scheme,
|
||||
@@ -514,7 +514,7 @@ func (c *Clientset) StorageV1alpha1() storagev1alpha1.StorageV1alpha1Interface {
|
||||
return &fakestoragev1alpha1.FakeStorageV1alpha1{Fake: &c.Fake}
|
||||
}
|
||||
|
||||
// StoragemigrationV1beta1 retrieves the StoragemigrationV1beta1Client
|
||||
func (c *Clientset) StoragemigrationV1beta1() storagemigrationv1beta1.StoragemigrationV1beta1Interface {
|
||||
return &fakestoragemigrationv1beta1.FakeStoragemigrationV1beta1{Fake: &c.Fake}
|
||||
// StoragemigrationV1alpha1 retrieves the StoragemigrationV1alpha1Client
|
||||
func (c *Clientset) StoragemigrationV1alpha1() storagemigrationv1alpha1.StoragemigrationV1alpha1Interface {
|
||||
return &fakestoragemigrationv1alpha1.FakeStoragemigrationV1alpha1{Fake: &c.Fake}
|
||||
}
|
||||
|
||||
@@ -73,7 +73,7 @@ import (
|
||||
storagev1 "k8s.io/api/storage/v1"
|
||||
storagev1alpha1 "k8s.io/api/storage/v1alpha1"
|
||||
storagev1beta1 "k8s.io/api/storage/v1beta1"
|
||||
storagemigrationv1beta1 "k8s.io/api/storagemigration/v1beta1"
|
||||
storagemigrationv1alpha1 "k8s.io/api/storagemigration/v1alpha1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
@@ -139,7 +139,7 @@ var localSchemeBuilder = runtime.SchemeBuilder{
|
||||
storagev1beta1.AddToScheme,
|
||||
storagev1.AddToScheme,
|
||||
storagev1alpha1.AddToScheme,
|
||||
storagemigrationv1beta1.AddToScheme,
|
||||
storagemigrationv1alpha1.AddToScheme,
|
||||
}
|
||||
|
||||
// AddToScheme adds all types of this clientset into the given scheme. This allows composition
|
||||
|
||||
@@ -73,7 +73,7 @@ import (
|
||||
storagev1 "k8s.io/api/storage/v1"
|
||||
storagev1alpha1 "k8s.io/api/storage/v1alpha1"
|
||||
storagev1beta1 "k8s.io/api/storage/v1beta1"
|
||||
storagemigrationv1beta1 "k8s.io/api/storagemigration/v1beta1"
|
||||
storagemigrationv1alpha1 "k8s.io/api/storagemigration/v1alpha1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
@@ -139,7 +139,7 @@ var localSchemeBuilder = runtime.SchemeBuilder{
|
||||
storagev1beta1.AddToScheme,
|
||||
storagev1.AddToScheme,
|
||||
storagev1alpha1.AddToScheme,
|
||||
storagemigrationv1beta1.AddToScheme,
|
||||
storagemigrationv1alpha1.AddToScheme,
|
||||
}
|
||||
|
||||
// AddToScheme adds all types of this clientset into the given scheme. This allows composition
|
||||
|
||||
@@ -29,6 +29,7 @@ import (
|
||||
type CertificatesV1alpha1Interface interface {
|
||||
RESTClient() rest.Interface
|
||||
ClusterTrustBundlesGetter
|
||||
PodCertificateRequestsGetter
|
||||
}
|
||||
|
||||
// CertificatesV1alpha1Client is used to interact with features provided by the certificates.k8s.io group.
|
||||
@@ -40,6 +41,10 @@ func (c *CertificatesV1alpha1Client) ClusterTrustBundles() ClusterTrustBundleInt
|
||||
return newClusterTrustBundles(c)
|
||||
}
|
||||
|
||||
func (c *CertificatesV1alpha1Client) PodCertificateRequests(namespace string) PodCertificateRequestInterface {
|
||||
return newPodCertificateRequests(c, namespace)
|
||||
}
|
||||
|
||||
// NewForConfig creates a new CertificatesV1alpha1Client for the given config.
|
||||
// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient),
|
||||
// where httpClient was generated with rest.HTTPClientFor(c).
|
||||
|
||||
@@ -32,6 +32,10 @@ func (c *FakeCertificatesV1alpha1) ClusterTrustBundles() v1alpha1.ClusterTrustBu
|
||||
return newFakeClusterTrustBundles(c)
|
||||
}
|
||||
|
||||
func (c *FakeCertificatesV1alpha1) PodCertificateRequests(namespace string) v1alpha1.PodCertificateRequestInterface {
|
||||
return newFakePodCertificateRequests(c, namespace)
|
||||
}
|
||||
|
||||
// RESTClient returns a RESTClient that is used to communicate
|
||||
// with API server by this client implementation.
|
||||
func (c *FakeCertificatesV1alpha1) RESTClient() rest.Interface {
|
||||
|
||||
@@ -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 (
|
||||
v1alpha1 "k8s.io/api/certificates/v1alpha1"
|
||||
certificatesv1alpha1 "k8s.io/client-go/applyconfigurations/certificates/v1alpha1"
|
||||
gentype "k8s.io/client-go/gentype"
|
||||
typedcertificatesv1alpha1 "k8s.io/client-go/kubernetes/typed/certificates/v1alpha1"
|
||||
)
|
||||
|
||||
// fakePodCertificateRequests implements PodCertificateRequestInterface
|
||||
type fakePodCertificateRequests struct {
|
||||
*gentype.FakeClientWithListAndApply[*v1alpha1.PodCertificateRequest, *v1alpha1.PodCertificateRequestList, *certificatesv1alpha1.PodCertificateRequestApplyConfiguration]
|
||||
Fake *FakeCertificatesV1alpha1
|
||||
}
|
||||
|
||||
func newFakePodCertificateRequests(fake *FakeCertificatesV1alpha1, namespace string) typedcertificatesv1alpha1.PodCertificateRequestInterface {
|
||||
return &fakePodCertificateRequests{
|
||||
gentype.NewFakeClientWithListAndApply[*v1alpha1.PodCertificateRequest, *v1alpha1.PodCertificateRequestList, *certificatesv1alpha1.PodCertificateRequestApplyConfiguration](
|
||||
fake.Fake,
|
||||
namespace,
|
||||
v1alpha1.SchemeGroupVersion.WithResource("podcertificaterequests"),
|
||||
v1alpha1.SchemeGroupVersion.WithKind("PodCertificateRequest"),
|
||||
func() *v1alpha1.PodCertificateRequest { return &v1alpha1.PodCertificateRequest{} },
|
||||
func() *v1alpha1.PodCertificateRequestList { return &v1alpha1.PodCertificateRequestList{} },
|
||||
func(dst, src *v1alpha1.PodCertificateRequestList) { dst.ListMeta = src.ListMeta },
|
||||
func(list *v1alpha1.PodCertificateRequestList) []*v1alpha1.PodCertificateRequest {
|
||||
return gentype.ToPointerSlice(list.Items)
|
||||
},
|
||||
func(list *v1alpha1.PodCertificateRequestList, items []*v1alpha1.PodCertificateRequest) {
|
||||
list.Items = gentype.FromPointerSlice(items)
|
||||
},
|
||||
),
|
||||
fake,
|
||||
}
|
||||
}
|
||||
@@ -19,3 +19,5 @@ limitations under the License.
|
||||
package v1alpha1
|
||||
|
||||
type ClusterTrustBundleExpansion interface{}
|
||||
|
||||
type PodCertificateRequestExpansion interface{}
|
||||
|
||||
@@ -16,16 +16,16 @@ limitations under the License.
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v1beta1
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
context "context"
|
||||
|
||||
certificatesv1beta1 "k8s.io/api/certificates/v1beta1"
|
||||
certificatesv1alpha1 "k8s.io/api/certificates/v1alpha1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
applyconfigurationscertificatesv1beta1 "k8s.io/client-go/applyconfigurations/certificates/v1beta1"
|
||||
applyconfigurationscertificatesv1alpha1 "k8s.io/client-go/applyconfigurations/certificates/v1alpha1"
|
||||
gentype "k8s.io/client-go/gentype"
|
||||
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||
)
|
||||
@@ -38,40 +38,42 @@ type PodCertificateRequestsGetter interface {
|
||||
|
||||
// PodCertificateRequestInterface has methods to work with PodCertificateRequest resources.
|
||||
type PodCertificateRequestInterface interface {
|
||||
Create(ctx context.Context, podCertificateRequest *certificatesv1beta1.PodCertificateRequest, opts v1.CreateOptions) (*certificatesv1beta1.PodCertificateRequest, error)
|
||||
Update(ctx context.Context, podCertificateRequest *certificatesv1beta1.PodCertificateRequest, opts v1.UpdateOptions) (*certificatesv1beta1.PodCertificateRequest, error)
|
||||
Create(ctx context.Context, podCertificateRequest *certificatesv1alpha1.PodCertificateRequest, opts v1.CreateOptions) (*certificatesv1alpha1.PodCertificateRequest, error)
|
||||
Update(ctx context.Context, podCertificateRequest *certificatesv1alpha1.PodCertificateRequest, opts v1.UpdateOptions) (*certificatesv1alpha1.PodCertificateRequest, error)
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
UpdateStatus(ctx context.Context, podCertificateRequest *certificatesv1beta1.PodCertificateRequest, opts v1.UpdateOptions) (*certificatesv1beta1.PodCertificateRequest, error)
|
||||
UpdateStatus(ctx context.Context, podCertificateRequest *certificatesv1alpha1.PodCertificateRequest, opts v1.UpdateOptions) (*certificatesv1alpha1.PodCertificateRequest, error)
|
||||
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
|
||||
Get(ctx context.Context, name string, opts v1.GetOptions) (*certificatesv1beta1.PodCertificateRequest, error)
|
||||
List(ctx context.Context, opts v1.ListOptions) (*certificatesv1beta1.PodCertificateRequestList, error)
|
||||
Get(ctx context.Context, name string, opts v1.GetOptions) (*certificatesv1alpha1.PodCertificateRequest, error)
|
||||
List(ctx context.Context, opts v1.ListOptions) (*certificatesv1alpha1.PodCertificateRequestList, error)
|
||||
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
|
||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *certificatesv1beta1.PodCertificateRequest, err error)
|
||||
Apply(ctx context.Context, podCertificateRequest *applyconfigurationscertificatesv1beta1.PodCertificateRequestApplyConfiguration, opts v1.ApplyOptions) (result *certificatesv1beta1.PodCertificateRequest, err error)
|
||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *certificatesv1alpha1.PodCertificateRequest, err error)
|
||||
Apply(ctx context.Context, podCertificateRequest *applyconfigurationscertificatesv1alpha1.PodCertificateRequestApplyConfiguration, opts v1.ApplyOptions) (result *certificatesv1alpha1.PodCertificateRequest, err error)
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus().
|
||||
ApplyStatus(ctx context.Context, podCertificateRequest *applyconfigurationscertificatesv1beta1.PodCertificateRequestApplyConfiguration, opts v1.ApplyOptions) (result *certificatesv1beta1.PodCertificateRequest, err error)
|
||||
ApplyStatus(ctx context.Context, podCertificateRequest *applyconfigurationscertificatesv1alpha1.PodCertificateRequestApplyConfiguration, opts v1.ApplyOptions) (result *certificatesv1alpha1.PodCertificateRequest, err error)
|
||||
PodCertificateRequestExpansion
|
||||
}
|
||||
|
||||
// podCertificateRequests implements PodCertificateRequestInterface
|
||||
type podCertificateRequests struct {
|
||||
*gentype.ClientWithListAndApply[*certificatesv1beta1.PodCertificateRequest, *certificatesv1beta1.PodCertificateRequestList, *applyconfigurationscertificatesv1beta1.PodCertificateRequestApplyConfiguration]
|
||||
*gentype.ClientWithListAndApply[*certificatesv1alpha1.PodCertificateRequest, *certificatesv1alpha1.PodCertificateRequestList, *applyconfigurationscertificatesv1alpha1.PodCertificateRequestApplyConfiguration]
|
||||
}
|
||||
|
||||
// newPodCertificateRequests returns a PodCertificateRequests
|
||||
func newPodCertificateRequests(c *CertificatesV1beta1Client, namespace string) *podCertificateRequests {
|
||||
func newPodCertificateRequests(c *CertificatesV1alpha1Client, namespace string) *podCertificateRequests {
|
||||
return &podCertificateRequests{
|
||||
gentype.NewClientWithListAndApply[*certificatesv1beta1.PodCertificateRequest, *certificatesv1beta1.PodCertificateRequestList, *applyconfigurationscertificatesv1beta1.PodCertificateRequestApplyConfiguration](
|
||||
gentype.NewClientWithListAndApply[*certificatesv1alpha1.PodCertificateRequest, *certificatesv1alpha1.PodCertificateRequestList, *applyconfigurationscertificatesv1alpha1.PodCertificateRequestApplyConfiguration](
|
||||
"podcertificaterequests",
|
||||
c.RESTClient(),
|
||||
scheme.ParameterCodec,
|
||||
namespace,
|
||||
func() *certificatesv1beta1.PodCertificateRequest { return &certificatesv1beta1.PodCertificateRequest{} },
|
||||
func() *certificatesv1beta1.PodCertificateRequestList {
|
||||
return &certificatesv1beta1.PodCertificateRequestList{}
|
||||
func() *certificatesv1alpha1.PodCertificateRequest {
|
||||
return &certificatesv1alpha1.PodCertificateRequest{}
|
||||
},
|
||||
gentype.PrefersProtobuf[*certificatesv1beta1.PodCertificateRequest](),
|
||||
func() *certificatesv1alpha1.PodCertificateRequestList {
|
||||
return &certificatesv1alpha1.PodCertificateRequestList{}
|
||||
},
|
||||
gentype.PrefersProtobuf[*certificatesv1alpha1.PodCertificateRequest](),
|
||||
),
|
||||
}
|
||||
}
|
||||
@@ -30,7 +30,6 @@ type CertificatesV1beta1Interface interface {
|
||||
RESTClient() rest.Interface
|
||||
CertificateSigningRequestsGetter
|
||||
ClusterTrustBundlesGetter
|
||||
PodCertificateRequestsGetter
|
||||
}
|
||||
|
||||
// CertificatesV1beta1Client is used to interact with features provided by the certificates.k8s.io group.
|
||||
@@ -46,10 +45,6 @@ func (c *CertificatesV1beta1Client) ClusterTrustBundles() ClusterTrustBundleInte
|
||||
return newClusterTrustBundles(c)
|
||||
}
|
||||
|
||||
func (c *CertificatesV1beta1Client) PodCertificateRequests(namespace string) PodCertificateRequestInterface {
|
||||
return newPodCertificateRequests(c, namespace)
|
||||
}
|
||||
|
||||
// NewForConfig creates a new CertificatesV1beta1Client for the given config.
|
||||
// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient),
|
||||
// where httpClient was generated with rest.HTTPClientFor(c).
|
||||
|
||||
@@ -36,10 +36,6 @@ func (c *FakeCertificatesV1beta1) ClusterTrustBundles() v1beta1.ClusterTrustBund
|
||||
return newFakeClusterTrustBundles(c)
|
||||
}
|
||||
|
||||
func (c *FakeCertificatesV1beta1) PodCertificateRequests(namespace string) v1beta1.PodCertificateRequestInterface {
|
||||
return newFakePodCertificateRequests(c, namespace)
|
||||
}
|
||||
|
||||
// RESTClient returns a RESTClient that is used to communicate
|
||||
// with API server by this client implementation.
|
||||
func (c *FakeCertificatesV1beta1) RESTClient() rest.Interface {
|
||||
|
||||
@@ -1,53 +0,0 @@
|
||||
/*
|
||||
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 (
|
||||
v1beta1 "k8s.io/api/certificates/v1beta1"
|
||||
certificatesv1beta1 "k8s.io/client-go/applyconfigurations/certificates/v1beta1"
|
||||
gentype "k8s.io/client-go/gentype"
|
||||
typedcertificatesv1beta1 "k8s.io/client-go/kubernetes/typed/certificates/v1beta1"
|
||||
)
|
||||
|
||||
// fakePodCertificateRequests implements PodCertificateRequestInterface
|
||||
type fakePodCertificateRequests struct {
|
||||
*gentype.FakeClientWithListAndApply[*v1beta1.PodCertificateRequest, *v1beta1.PodCertificateRequestList, *certificatesv1beta1.PodCertificateRequestApplyConfiguration]
|
||||
Fake *FakeCertificatesV1beta1
|
||||
}
|
||||
|
||||
func newFakePodCertificateRequests(fake *FakeCertificatesV1beta1, namespace string) typedcertificatesv1beta1.PodCertificateRequestInterface {
|
||||
return &fakePodCertificateRequests{
|
||||
gentype.NewFakeClientWithListAndApply[*v1beta1.PodCertificateRequest, *v1beta1.PodCertificateRequestList, *certificatesv1beta1.PodCertificateRequestApplyConfiguration](
|
||||
fake.Fake,
|
||||
namespace,
|
||||
v1beta1.SchemeGroupVersion.WithResource("podcertificaterequests"),
|
||||
v1beta1.SchemeGroupVersion.WithKind("PodCertificateRequest"),
|
||||
func() *v1beta1.PodCertificateRequest { return &v1beta1.PodCertificateRequest{} },
|
||||
func() *v1beta1.PodCertificateRequestList { return &v1beta1.PodCertificateRequestList{} },
|
||||
func(dst, src *v1beta1.PodCertificateRequestList) { dst.ListMeta = src.ListMeta },
|
||||
func(list *v1beta1.PodCertificateRequestList) []*v1beta1.PodCertificateRequest {
|
||||
return gentype.ToPointerSlice(list.Items)
|
||||
},
|
||||
func(list *v1beta1.PodCertificateRequestList, items []*v1beta1.PodCertificateRequest) {
|
||||
list.Items = gentype.FromPointerSlice(items)
|
||||
},
|
||||
),
|
||||
fake,
|
||||
}
|
||||
}
|
||||
@@ -19,5 +19,3 @@ limitations under the License.
|
||||
package v1beta1
|
||||
|
||||
type ClusterTrustBundleExpansion interface{}
|
||||
|
||||
type PodCertificateRequestExpansion interface{}
|
||||
|
||||
@@ -40,8 +40,6 @@ type DeviceTaintRulesGetter interface {
|
||||
type DeviceTaintRuleInterface interface {
|
||||
Create(ctx context.Context, deviceTaintRule *resourcev1alpha3.DeviceTaintRule, opts v1.CreateOptions) (*resourcev1alpha3.DeviceTaintRule, error)
|
||||
Update(ctx context.Context, deviceTaintRule *resourcev1alpha3.DeviceTaintRule, opts v1.UpdateOptions) (*resourcev1alpha3.DeviceTaintRule, error)
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
UpdateStatus(ctx context.Context, deviceTaintRule *resourcev1alpha3.DeviceTaintRule, opts v1.UpdateOptions) (*resourcev1alpha3.DeviceTaintRule, error)
|
||||
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
|
||||
Get(ctx context.Context, name string, opts v1.GetOptions) (*resourcev1alpha3.DeviceTaintRule, error)
|
||||
@@ -49,8 +47,6 @@ type DeviceTaintRuleInterface interface {
|
||||
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
|
||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *resourcev1alpha3.DeviceTaintRule, err error)
|
||||
Apply(ctx context.Context, deviceTaintRule *applyconfigurationsresourcev1alpha3.DeviceTaintRuleApplyConfiguration, opts v1.ApplyOptions) (result *resourcev1alpha3.DeviceTaintRule, err error)
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus().
|
||||
ApplyStatus(ctx context.Context, deviceTaintRule *applyconfigurationsresourcev1alpha3.DeviceTaintRuleApplyConfiguration, opts v1.ApplyOptions) (result *resourcev1alpha3.DeviceTaintRule, err error)
|
||||
DeviceTaintRuleExpansion
|
||||
}
|
||||
|
||||
|
||||
@@ -32,10 +32,6 @@ func (c *FakeSchedulingV1alpha1) PriorityClasses() v1alpha1.PriorityClassInterfa
|
||||
return newFakePriorityClasses(c)
|
||||
}
|
||||
|
||||
func (c *FakeSchedulingV1alpha1) Workloads(namespace string) v1alpha1.WorkloadInterface {
|
||||
return newFakeWorkloads(c, namespace)
|
||||
}
|
||||
|
||||
// RESTClient returns a RESTClient that is used to communicate
|
||||
// with API server by this client implementation.
|
||||
func (c *FakeSchedulingV1alpha1) RESTClient() rest.Interface {
|
||||
|
||||
@@ -1,51 +0,0 @@
|
||||
/*
|
||||
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 (
|
||||
v1alpha1 "k8s.io/api/scheduling/v1alpha1"
|
||||
schedulingv1alpha1 "k8s.io/client-go/applyconfigurations/scheduling/v1alpha1"
|
||||
gentype "k8s.io/client-go/gentype"
|
||||
typedschedulingv1alpha1 "k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1"
|
||||
)
|
||||
|
||||
// fakeWorkloads implements WorkloadInterface
|
||||
type fakeWorkloads struct {
|
||||
*gentype.FakeClientWithListAndApply[*v1alpha1.Workload, *v1alpha1.WorkloadList, *schedulingv1alpha1.WorkloadApplyConfiguration]
|
||||
Fake *FakeSchedulingV1alpha1
|
||||
}
|
||||
|
||||
func newFakeWorkloads(fake *FakeSchedulingV1alpha1, namespace string) typedschedulingv1alpha1.WorkloadInterface {
|
||||
return &fakeWorkloads{
|
||||
gentype.NewFakeClientWithListAndApply[*v1alpha1.Workload, *v1alpha1.WorkloadList, *schedulingv1alpha1.WorkloadApplyConfiguration](
|
||||
fake.Fake,
|
||||
namespace,
|
||||
v1alpha1.SchemeGroupVersion.WithResource("workloads"),
|
||||
v1alpha1.SchemeGroupVersion.WithKind("Workload"),
|
||||
func() *v1alpha1.Workload { return &v1alpha1.Workload{} },
|
||||
func() *v1alpha1.WorkloadList { return &v1alpha1.WorkloadList{} },
|
||||
func(dst, src *v1alpha1.WorkloadList) { dst.ListMeta = src.ListMeta },
|
||||
func(list *v1alpha1.WorkloadList) []*v1alpha1.Workload { return gentype.ToPointerSlice(list.Items) },
|
||||
func(list *v1alpha1.WorkloadList, items []*v1alpha1.Workload) {
|
||||
list.Items = gentype.FromPointerSlice(items)
|
||||
},
|
||||
),
|
||||
fake,
|
||||
}
|
||||
}
|
||||
@@ -19,5 +19,3 @@ limitations under the License.
|
||||
package v1alpha1
|
||||
|
||||
type PriorityClassExpansion interface{}
|
||||
|
||||
type WorkloadExpansion interface{}
|
||||
|
||||
@@ -29,7 +29,6 @@ import (
|
||||
type SchedulingV1alpha1Interface interface {
|
||||
RESTClient() rest.Interface
|
||||
PriorityClassesGetter
|
||||
WorkloadsGetter
|
||||
}
|
||||
|
||||
// SchedulingV1alpha1Client is used to interact with features provided by the scheduling.k8s.io group.
|
||||
@@ -41,10 +40,6 @@ func (c *SchedulingV1alpha1Client) PriorityClasses() PriorityClassInterface {
|
||||
return newPriorityClasses(c)
|
||||
}
|
||||
|
||||
func (c *SchedulingV1alpha1Client) Workloads(namespace string) WorkloadInterface {
|
||||
return newWorkloads(c, namespace)
|
||||
}
|
||||
|
||||
// NewForConfig creates a new SchedulingV1alpha1Client for the given config.
|
||||
// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient),
|
||||
// where httpClient was generated with rest.HTTPClientFor(c).
|
||||
|
||||
@@ -1,71 +0,0 @@
|
||||
/*
|
||||
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 v1alpha1
|
||||
|
||||
import (
|
||||
context "context"
|
||||
|
||||
schedulingv1alpha1 "k8s.io/api/scheduling/v1alpha1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
applyconfigurationsschedulingv1alpha1 "k8s.io/client-go/applyconfigurations/scheduling/v1alpha1"
|
||||
gentype "k8s.io/client-go/gentype"
|
||||
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||
)
|
||||
|
||||
// WorkloadsGetter has a method to return a WorkloadInterface.
|
||||
// A group's client should implement this interface.
|
||||
type WorkloadsGetter interface {
|
||||
Workloads(namespace string) WorkloadInterface
|
||||
}
|
||||
|
||||
// WorkloadInterface has methods to work with Workload resources.
|
||||
type WorkloadInterface interface {
|
||||
Create(ctx context.Context, workload *schedulingv1alpha1.Workload, opts v1.CreateOptions) (*schedulingv1alpha1.Workload, error)
|
||||
Update(ctx context.Context, workload *schedulingv1alpha1.Workload, opts v1.UpdateOptions) (*schedulingv1alpha1.Workload, error)
|
||||
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
|
||||
Get(ctx context.Context, name string, opts v1.GetOptions) (*schedulingv1alpha1.Workload, error)
|
||||
List(ctx context.Context, opts v1.ListOptions) (*schedulingv1alpha1.WorkloadList, error)
|
||||
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
|
||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *schedulingv1alpha1.Workload, err error)
|
||||
Apply(ctx context.Context, workload *applyconfigurationsschedulingv1alpha1.WorkloadApplyConfiguration, opts v1.ApplyOptions) (result *schedulingv1alpha1.Workload, err error)
|
||||
WorkloadExpansion
|
||||
}
|
||||
|
||||
// workloads implements WorkloadInterface
|
||||
type workloads struct {
|
||||
*gentype.ClientWithListAndApply[*schedulingv1alpha1.Workload, *schedulingv1alpha1.WorkloadList, *applyconfigurationsschedulingv1alpha1.WorkloadApplyConfiguration]
|
||||
}
|
||||
|
||||
// newWorkloads returns a Workloads
|
||||
func newWorkloads(c *SchedulingV1alpha1Client, namespace string) *workloads {
|
||||
return &workloads{
|
||||
gentype.NewClientWithListAndApply[*schedulingv1alpha1.Workload, *schedulingv1alpha1.WorkloadList, *applyconfigurationsschedulingv1alpha1.WorkloadApplyConfiguration](
|
||||
"workloads",
|
||||
c.RESTClient(),
|
||||
scheme.ParameterCodec,
|
||||
namespace,
|
||||
func() *schedulingv1alpha1.Workload { return &schedulingv1alpha1.Workload{} },
|
||||
func() *schedulingv1alpha1.WorkloadList { return &schedulingv1alpha1.WorkloadList{} },
|
||||
gentype.PrefersProtobuf[*schedulingv1alpha1.Workload](),
|
||||
),
|
||||
}
|
||||
}
|
||||
@@ -17,4 +17,4 @@ limitations under the License.
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
// This package has the automatically generated typed clients.
|
||||
package v1beta1
|
||||
package v1alpha1
|
||||
@@ -19,22 +19,22 @@ limitations under the License.
|
||||
package fake
|
||||
|
||||
import (
|
||||
v1beta1 "k8s.io/client-go/kubernetes/typed/storagemigration/v1beta1"
|
||||
v1alpha1 "k8s.io/client-go/kubernetes/typed/storagemigration/v1alpha1"
|
||||
rest "k8s.io/client-go/rest"
|
||||
testing "k8s.io/client-go/testing"
|
||||
)
|
||||
|
||||
type FakeStoragemigrationV1beta1 struct {
|
||||
type FakeStoragemigrationV1alpha1 struct {
|
||||
*testing.Fake
|
||||
}
|
||||
|
||||
func (c *FakeStoragemigrationV1beta1) StorageVersionMigrations() v1beta1.StorageVersionMigrationInterface {
|
||||
func (c *FakeStoragemigrationV1alpha1) StorageVersionMigrations() v1alpha1.StorageVersionMigrationInterface {
|
||||
return newFakeStorageVersionMigrations(c)
|
||||
}
|
||||
|
||||
// RESTClient returns a RESTClient that is used to communicate
|
||||
// with API server by this client implementation.
|
||||
func (c *FakeStoragemigrationV1beta1) RESTClient() rest.Interface {
|
||||
func (c *FakeStoragemigrationV1alpha1) 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 (
|
||||
v1alpha1 "k8s.io/api/storagemigration/v1alpha1"
|
||||
storagemigrationv1alpha1 "k8s.io/client-go/applyconfigurations/storagemigration/v1alpha1"
|
||||
gentype "k8s.io/client-go/gentype"
|
||||
typedstoragemigrationv1alpha1 "k8s.io/client-go/kubernetes/typed/storagemigration/v1alpha1"
|
||||
)
|
||||
|
||||
// fakeStorageVersionMigrations implements StorageVersionMigrationInterface
|
||||
type fakeStorageVersionMigrations struct {
|
||||
*gentype.FakeClientWithListAndApply[*v1alpha1.StorageVersionMigration, *v1alpha1.StorageVersionMigrationList, *storagemigrationv1alpha1.StorageVersionMigrationApplyConfiguration]
|
||||
Fake *FakeStoragemigrationV1alpha1
|
||||
}
|
||||
|
||||
func newFakeStorageVersionMigrations(fake *FakeStoragemigrationV1alpha1) typedstoragemigrationv1alpha1.StorageVersionMigrationInterface {
|
||||
return &fakeStorageVersionMigrations{
|
||||
gentype.NewFakeClientWithListAndApply[*v1alpha1.StorageVersionMigration, *v1alpha1.StorageVersionMigrationList, *storagemigrationv1alpha1.StorageVersionMigrationApplyConfiguration](
|
||||
fake.Fake,
|
||||
"",
|
||||
v1alpha1.SchemeGroupVersion.WithResource("storageversionmigrations"),
|
||||
v1alpha1.SchemeGroupVersion.WithKind("StorageVersionMigration"),
|
||||
func() *v1alpha1.StorageVersionMigration { return &v1alpha1.StorageVersionMigration{} },
|
||||
func() *v1alpha1.StorageVersionMigrationList { return &v1alpha1.StorageVersionMigrationList{} },
|
||||
func(dst, src *v1alpha1.StorageVersionMigrationList) { dst.ListMeta = src.ListMeta },
|
||||
func(list *v1alpha1.StorageVersionMigrationList) []*v1alpha1.StorageVersionMigration {
|
||||
return gentype.ToPointerSlice(list.Items)
|
||||
},
|
||||
func(list *v1alpha1.StorageVersionMigrationList, items []*v1alpha1.StorageVersionMigration) {
|
||||
list.Items = gentype.FromPointerSlice(items)
|
||||
},
|
||||
),
|
||||
fake,
|
||||
}
|
||||
}
|
||||
@@ -16,6 +16,6 @@ limitations under the License.
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v1beta1
|
||||
package v1alpha1
|
||||
|
||||
type StorageVersionMigrationExpansion interface{}
|
||||
@@ -16,34 +16,34 @@ limitations under the License.
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v1beta1
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
http "net/http"
|
||||
|
||||
storagemigrationv1beta1 "k8s.io/api/storagemigration/v1beta1"
|
||||
storagemigrationv1alpha1 "k8s.io/api/storagemigration/v1alpha1"
|
||||
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||
rest "k8s.io/client-go/rest"
|
||||
)
|
||||
|
||||
type StoragemigrationV1beta1Interface interface {
|
||||
type StoragemigrationV1alpha1Interface interface {
|
||||
RESTClient() rest.Interface
|
||||
StorageVersionMigrationsGetter
|
||||
}
|
||||
|
||||
// StoragemigrationV1beta1Client is used to interact with features provided by the storagemigration.k8s.io group.
|
||||
type StoragemigrationV1beta1Client struct {
|
||||
// StoragemigrationV1alpha1Client is used to interact with features provided by the storagemigration.k8s.io group.
|
||||
type StoragemigrationV1alpha1Client struct {
|
||||
restClient rest.Interface
|
||||
}
|
||||
|
||||
func (c *StoragemigrationV1beta1Client) StorageVersionMigrations() StorageVersionMigrationInterface {
|
||||
func (c *StoragemigrationV1alpha1Client) StorageVersionMigrations() StorageVersionMigrationInterface {
|
||||
return newStorageVersionMigrations(c)
|
||||
}
|
||||
|
||||
// NewForConfig creates a new StoragemigrationV1beta1Client for the given config.
|
||||
// NewForConfig creates a new StoragemigrationV1alpha1Client for the given config.
|
||||
// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient),
|
||||
// where httpClient was generated with rest.HTTPClientFor(c).
|
||||
func NewForConfig(c *rest.Config) (*StoragemigrationV1beta1Client, error) {
|
||||
func NewForConfig(c *rest.Config) (*StoragemigrationV1alpha1Client, error) {
|
||||
config := *c
|
||||
setConfigDefaults(&config)
|
||||
httpClient, err := rest.HTTPClientFor(&config)
|
||||
@@ -53,21 +53,21 @@ func NewForConfig(c *rest.Config) (*StoragemigrationV1beta1Client, error) {
|
||||
return NewForConfigAndClient(&config, httpClient)
|
||||
}
|
||||
|
||||
// NewForConfigAndClient creates a new StoragemigrationV1beta1Client for the given config and http client.
|
||||
// NewForConfigAndClient creates a new StoragemigrationV1alpha1Client 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) (*StoragemigrationV1beta1Client, error) {
|
||||
func NewForConfigAndClient(c *rest.Config, h *http.Client) (*StoragemigrationV1alpha1Client, error) {
|
||||
config := *c
|
||||
setConfigDefaults(&config)
|
||||
client, err := rest.RESTClientForConfigAndClient(&config, h)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &StoragemigrationV1beta1Client{client}, nil
|
||||
return &StoragemigrationV1alpha1Client{client}, nil
|
||||
}
|
||||
|
||||
// NewForConfigOrDie creates a new StoragemigrationV1beta1Client for the given config and
|
||||
// NewForConfigOrDie creates a new StoragemigrationV1alpha1Client for the given config and
|
||||
// panics if there is an error in the config.
|
||||
func NewForConfigOrDie(c *rest.Config) *StoragemigrationV1beta1Client {
|
||||
func NewForConfigOrDie(c *rest.Config) *StoragemigrationV1alpha1Client {
|
||||
client, err := NewForConfig(c)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
@@ -75,13 +75,13 @@ func NewForConfigOrDie(c *rest.Config) *StoragemigrationV1beta1Client {
|
||||
return client
|
||||
}
|
||||
|
||||
// New creates a new StoragemigrationV1beta1Client for the given RESTClient.
|
||||
func New(c rest.Interface) *StoragemigrationV1beta1Client {
|
||||
return &StoragemigrationV1beta1Client{c}
|
||||
// New creates a new StoragemigrationV1alpha1Client for the given RESTClient.
|
||||
func New(c rest.Interface) *StoragemigrationV1alpha1Client {
|
||||
return &StoragemigrationV1alpha1Client{c}
|
||||
}
|
||||
|
||||
func setConfigDefaults(config *rest.Config) {
|
||||
gv := storagemigrationv1beta1.SchemeGroupVersion
|
||||
gv := storagemigrationv1alpha1.SchemeGroupVersion
|
||||
config.GroupVersion = &gv
|
||||
config.APIPath = "/apis"
|
||||
config.NegotiatedSerializer = rest.CodecFactoryForGeneratedClient(scheme.Scheme, scheme.Codecs).WithoutConversion()
|
||||
@@ -93,7 +93,7 @@ func setConfigDefaults(config *rest.Config) {
|
||||
|
||||
// RESTClient returns a RESTClient that is used to communicate
|
||||
// with API server by this client implementation.
|
||||
func (c *StoragemigrationV1beta1Client) RESTClient() rest.Interface {
|
||||
func (c *StoragemigrationV1alpha1Client) RESTClient() rest.Interface {
|
||||
if c == nil {
|
||||
return nil
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user