mirror of
https://github.com/kubernetes/client-go.git
synced 2026-06-14 13:16:44 +00:00
Compare commits
112 Commits
v0.35.0-al
...
v0.35.6
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ad0b54ea52 | ||
|
|
8ebd9bb45e | ||
|
|
00b2f2b182 | ||
|
|
f80003c240 | ||
|
|
8b415569d9 | ||
|
|
2d83546256 | ||
|
|
56b4af2aeb | ||
|
|
891f94c690 | ||
|
|
65ffe044e5 | ||
|
|
2fe4ac239c | ||
|
|
97256a6495 | ||
|
|
46360b527e | ||
|
|
171ef8cd00 | ||
|
|
3878a6464b | ||
|
|
9cee84c27c | ||
|
|
45e0decafa | ||
|
|
990057bc99 | ||
|
|
3980f079a7 | ||
|
|
5020b674f8 | ||
|
|
6ce2c0f8c3 | ||
|
|
5c322d3acd | ||
|
|
aa76619c41 | ||
|
|
99c4257e63 | ||
|
|
cb5e00dc36 | ||
|
|
09ccc185ed | ||
|
|
0e6fc04326 | ||
|
|
c529a209c2 | ||
|
|
9b2717cec1 | ||
|
|
6a14de8219 | ||
|
|
b36e6498c1 | ||
|
|
823f3a75f4 | ||
|
|
092b2fb360 | ||
|
|
d0f0666dd2 | ||
|
|
7d09f53b04 | ||
|
|
5aa3ca7f2a | ||
|
|
afcd76c2c0 | ||
|
|
50efa83a3d | ||
|
|
205531f8d5 | ||
|
|
773743c372 | ||
|
|
15b762b95c | ||
|
|
1463bcbba2 | ||
|
|
c94930065a | ||
|
|
d5cd2dd65f | ||
|
|
6f5c1adc65 | ||
|
|
4f9edc15a7 | ||
|
|
504fb21b89 | ||
|
|
47df0318fc | ||
|
|
efdec3e7ce | ||
|
|
083e82ae0c | ||
|
|
a90a9150bc | ||
|
|
7198405576 | ||
|
|
47c3af08fa | ||
|
|
928c08fb07 | ||
|
|
63b5f59425 | ||
|
|
c207d22130 | ||
|
|
d9e3e97bc8 | ||
|
|
7aa71710ca | ||
|
|
cd96252d84 | ||
|
|
342dcaf481 | ||
|
|
91dcaf4e5c | ||
|
|
5ac9ec00af | ||
|
|
42503cca34 | ||
|
|
f8b7fe98c4 | ||
|
|
75128a8d3d | ||
|
|
4953849642 | ||
|
|
715199a180 | ||
|
|
dc0763eaa2 | ||
|
|
a5b1b112d9 | ||
|
|
ff1ce9e245 | ||
|
|
f49b36f94e | ||
|
|
659efe6ca2 | ||
|
|
002cac449e | ||
|
|
716ba150d1 | ||
|
|
d707fb729f | ||
|
|
e7ebdf6180 | ||
|
|
e8a837163e | ||
|
|
fed267b819 | ||
|
|
c1675fba6d | ||
|
|
8316c2dd5b | ||
|
|
884e76ff50 | ||
|
|
909047f6b3 | ||
|
|
6661e485ec | ||
|
|
c655edb878 | ||
|
|
5a42d726bf | ||
|
|
943d406efe | ||
|
|
92bae31190 | ||
|
|
fcb9549cdf | ||
|
|
55359a6c61 | ||
|
|
3a250ce40f | ||
|
|
f217e7096a | ||
|
|
6777feb020 | ||
|
|
9c67f4c479 | ||
|
|
69ba058bc8 | ||
|
|
8de342516c | ||
|
|
efcdcf7828 | ||
|
|
0ca6027179 | ||
|
|
1ec59ffa19 | ||
|
|
83eab51fe2 | ||
|
|
cc2ef1778d | ||
|
|
03859f4bad | ||
|
|
3502696346 | ||
|
|
d21f567e5b | ||
|
|
0d522470d7 | ||
|
|
562096cc40 | ||
|
|
1244da43b1 | ||
|
|
b6a9154664 | ||
|
|
15ed51a4ca | ||
|
|
7cf6a05732 | ||
|
|
f466f58eea | ||
|
|
638e636503 | ||
|
|
400c0a2602 | ||
|
|
00a491e0ce |
@@ -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 an alpha field. Enable DeploymentReplicaSetTerminatingReplicas to be able to use this field.
|
||||
// This is a beta field and requires enabling DeploymentReplicaSetTerminatingReplicas feature (enabled by default).
|
||||
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 an alpha field. Enable DeploymentReplicaSetTerminatingReplicas to be able to use this field.
|
||||
// This is a beta field and requires enabling DeploymentReplicaSetTerminatingReplicas feature (enabled by default).
|
||||
TerminatingReplicas *int32 `json:"terminatingReplicas,omitempty"`
|
||||
// ObservedGeneration reflects the generation of the most recently observed ReplicaSet.
|
||||
ObservedGeneration *int64 `json:"observedGeneration,omitempty"`
|
||||
|
||||
@@ -35,10 +35,10 @@ type RollingUpdateStatefulSetStrategyApplyConfiguration struct {
|
||||
// The maximum number of pods that can be unavailable during the update.
|
||||
// Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%).
|
||||
// Absolute number is calculated from percentage by rounding up. This can not be 0.
|
||||
// Defaults to 1. This field is alpha-level and is only honored by servers that enable the
|
||||
// MaxUnavailableStatefulSet feature. The field applies to all pods in the range 0 to
|
||||
// Defaults to 1. This field is beta-level and is enabled by default. The field applies to all pods in the range 0 to
|
||||
// Replicas-1. That means if there is any unavailable pod in the range 0 to Replicas-1, it
|
||||
// will be counted towards MaxUnavailable.
|
||||
// This setting might not be effective for the OrderedReady podManagementPolicy. That policy ensures pods are created and become ready one at a time.
|
||||
MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,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 an alpha field. Enable DeploymentReplicaSetTerminatingReplicas to be able to use this field.
|
||||
// This is a beta field and requires enabling DeploymentReplicaSetTerminatingReplicas feature (enabled by default).
|
||||
TerminatingReplicas *int32 `json:"terminatingReplicas,omitempty"`
|
||||
// Represents the latest available observations of a deployment's current state.
|
||||
Conditions []DeploymentConditionApplyConfiguration `json:"conditions,omitempty"`
|
||||
|
||||
@@ -35,10 +35,10 @@ type RollingUpdateStatefulSetStrategyApplyConfiguration struct {
|
||||
// maxUnavailable is the maximum number of pods that can be unavailable during the update.
|
||||
// Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%).
|
||||
// Absolute number is calculated from percentage by rounding up. This can not be 0.
|
||||
// Defaults to 1. This field is alpha-level and is only honored by servers that enable the
|
||||
// MaxUnavailableStatefulSet feature. The field applies to all pods in the range 0 to
|
||||
// Defaults to 1. This field is beta-level and is enabled by default. The field applies to all pods in the range 0 to
|
||||
// Replicas-1. That means if there is any unavailable pod in the range 0 to Replicas-1, it
|
||||
// will be counted towards MaxUnavailable.
|
||||
// This setting might not be effective for the OrderedReady podManagementPolicy. That policy ensures pods are created and become ready one at a time.
|
||||
MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,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 an alpha field. Enable DeploymentReplicaSetTerminatingReplicas to be able to use this field.
|
||||
// This is a beta field and requires enabling DeploymentReplicaSetTerminatingReplicas feature (enabled by default).
|
||||
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 an alpha field. Enable DeploymentReplicaSetTerminatingReplicas to be able to use this field.
|
||||
// This is a beta field and requires enabling DeploymentReplicaSetTerminatingReplicas feature (enabled by default).
|
||||
TerminatingReplicas *int32 `json:"terminatingReplicas,omitempty"`
|
||||
// ObservedGeneration reflects the generation of the most recently observed ReplicaSet.
|
||||
ObservedGeneration *int64 `json:"observedGeneration,omitempty"`
|
||||
|
||||
@@ -35,10 +35,10 @@ type RollingUpdateStatefulSetStrategyApplyConfiguration struct {
|
||||
// The maximum number of pods that can be unavailable during the update.
|
||||
// Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%).
|
||||
// Absolute number is calculated from percentage by rounding up. This can not be 0.
|
||||
// Defaults to 1. This field is alpha-level and is only honored by servers that enable the
|
||||
// MaxUnavailableStatefulSet feature. The field applies to all pods in the range 0 to
|
||||
// Defaults to 1. This field is beta-level and is enabled by default. The field applies to all pods in the range 0 to
|
||||
// Replicas-1. That means if there is any unavailable pod in the range 0 to Replicas-1, it
|
||||
// will be counted towards MaxUnavailable.
|
||||
// This setting might not be effective for the OrderedReady podManagementPolicy. That policy ensures pods are created and become ready one at a time.
|
||||
MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,omitempty"`
|
||||
}
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ import (
|
||||
//
|
||||
// The tolerance is applied to the metric values and prevents scaling too
|
||||
// eagerly for small metric variations. (Note that setting a tolerance requires
|
||||
// enabling the alpha HPAConfigurableTolerance feature gate.)
|
||||
// the beta HPAConfigurableTolerance feature gate to be enabled.)
|
||||
type HPAScalingRulesApplyConfiguration struct {
|
||||
// stabilizationWindowSeconds is the number of seconds for which past recommendations should be
|
||||
// considered while scaling up or scaling down.
|
||||
@@ -63,8 +63,8 @@ type HPAScalingRulesApplyConfiguration struct {
|
||||
// and scale-down and scale-up tolerances of 5% and 1% respectively, scaling will be
|
||||
// triggered when the actual consumption falls below 95Mi or exceeds 101Mi.
|
||||
//
|
||||
// This is an alpha field and requires enabling the HPAConfigurableTolerance
|
||||
// feature gate.
|
||||
// This is an beta field and requires the HPAConfigurableTolerance feature
|
||||
// gate to be enabled.
|
||||
Tolerance *resource.Quantity `json:"tolerance,omitempty"`
|
||||
}
|
||||
|
||||
|
||||
@@ -159,9 +159,6 @@ 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 v1alpha1
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
certificatesv1alpha1 "k8s.io/api/certificates/v1alpha1"
|
||||
certificatesv1beta1 "k8s.io/api/certificates/v1beta1"
|
||||
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/v1alpha1")
|
||||
b.WithAPIVersion("certificates.k8s.io/v1beta1")
|
||||
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 *certificatesv1alpha1.PodCertificateRequest, fieldManager string, subresource string) (*PodCertificateRequestApplyConfiguration, error) {
|
||||
func ExtractPodCertificateRequestFrom(podCertificateRequest *certificatesv1beta1.PodCertificateRequest, fieldManager string, subresource string) (*PodCertificateRequestApplyConfiguration, error) {
|
||||
b := &PodCertificateRequestApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(podCertificateRequest, internal.Parser().Type("io.k8s.api.certificates.v1alpha1.PodCertificateRequest"), fieldManager, b, subresource)
|
||||
err := managedfields.ExtractInto(podCertificateRequest, internal.Parser().Type("io.k8s.api.certificates.v1beta1.PodCertificateRequest"), fieldManager, b, subresource)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -72,7 +72,7 @@ func ExtractPodCertificateRequestFrom(podCertificateRequest *certificatesv1alpha
|
||||
b.WithNamespace(podCertificateRequest.Namespace)
|
||||
|
||||
b.WithKind("PodCertificateRequest")
|
||||
b.WithAPIVersion("certificates.k8s.io/v1alpha1")
|
||||
b.WithAPIVersion("certificates.k8s.io/v1beta1")
|
||||
return b, nil
|
||||
}
|
||||
|
||||
@@ -86,13 +86,13 @@ func ExtractPodCertificateRequestFrom(podCertificateRequest *certificatesv1alpha
|
||||
// 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 *certificatesv1alpha1.PodCertificateRequest, fieldManager string) (*PodCertificateRequestApplyConfiguration, error) {
|
||||
func ExtractPodCertificateRequest(podCertificateRequest *certificatesv1beta1.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 *certificatesv1alpha1.PodCertificateRequest, fieldManager string) (*PodCertificateRequestApplyConfiguration, error) {
|
||||
func ExtractPodCertificateRequestStatus(podCertificateRequest *certificatesv1beta1.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 v1alpha1
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
@@ -96,6 +96,17 @@ 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
|
||||
@@ -187,3 +198,17 @@ 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 v1alpha1
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
@@ -82,6 +82,7 @@ type ContainerApplyConfiguration struct {
|
||||
// More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
|
||||
Resources *ResourceRequirementsApplyConfiguration `json:"resources,omitempty"`
|
||||
// Resources resize policy for the container.
|
||||
// This field cannot be set on ephemeral containers.
|
||||
ResizePolicy []ContainerResizePolicyApplyConfiguration `json:"resizePolicy,omitempty"`
|
||||
// RestartPolicy defines the restart behavior of individual containers in a pod.
|
||||
// This overrides the pod-level restart policy. When this field is not specified,
|
||||
|
||||
@@ -68,6 +68,8 @@ 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
|
||||
@@ -206,3 +208,13 @@ 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,6 +58,7 @@ 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,6 +75,20 @@ 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
|
||||
@@ -130,3 +144,17 @@ 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,6 +273,14 @@ 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
|
||||
@@ -669,3 +677,11 @@ 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,6 +131,14 @@ 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
|
||||
@@ -317,3 +325,19 @@ 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,9 +32,10 @@ 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 and Equal. Defaults to Equal.
|
||||
// Valid operators are Exists, Equal, Lt, and Gt. 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.
|
||||
|
||||
74
applyconfigurations/core/v1/workloadreference.go
Normal file
74
applyconfigurations/core/v1/workloadreference.go
Normal file
@@ -0,0 +1,74 @@
|
||||
/*
|
||||
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,8 +28,6 @@ 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,8 +28,6 @@ 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 an alpha field. Enable DeploymentReplicaSetTerminatingReplicas to be able to use this field.
|
||||
// This is a beta field and requires enabling DeploymentReplicaSetTerminatingReplicas feature (enabled by default).
|
||||
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 an alpha field. Enable DeploymentReplicaSetTerminatingReplicas to be able to use this field.
|
||||
// This is a beta field and requires enabling DeploymentReplicaSetTerminatingReplicas feature (enabled by default).
|
||||
TerminatingReplicas *int32 `json:"terminatingReplicas,omitempty"`
|
||||
// ObservedGeneration reflects the generation of the most recently observed ReplicaSet.
|
||||
ObservedGeneration *int64 `json:"observedGeneration,omitempty"`
|
||||
|
||||
@@ -4458,91 +4458,6 @@ 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:
|
||||
@@ -4666,6 +4581,96 @@ 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:
|
||||
@@ -6765,6 +6770,12 @@ 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
|
||||
@@ -7282,6 +7293,11 @@ 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:
|
||||
@@ -7633,9 +7649,17 @@ 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:
|
||||
@@ -7714,6 +7738,9 @@ 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
|
||||
@@ -9007,6 +9034,20 @@ 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:
|
||||
@@ -13476,19 +13517,6 @@ 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:
|
||||
@@ -13523,6 +13551,10 @@ 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:
|
||||
@@ -13533,27 +13565,29 @@ 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:
|
||||
@@ -14934,6 +14968,45 @@ 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:
|
||||
@@ -14960,6 +15033,51 @@ 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:
|
||||
@@ -15024,6 +15142,9 @@ var schemaYAML = typed.YAMLObject(`types:
|
||||
- name: seLinuxMount
|
||||
type:
|
||||
scalar: boolean
|
||||
- name: serviceAccountTokenInSecrets
|
||||
type:
|
||||
scalar: boolean
|
||||
- name: storageCapacity
|
||||
type:
|
||||
scalar: boolean
|
||||
@@ -15430,6 +15551,9 @@ var schemaYAML = typed.YAMLObject(`types:
|
||||
- name: seLinuxMount
|
||||
type:
|
||||
scalar: boolean
|
||||
- name: serviceAccountTokenInSecrets
|
||||
type:
|
||||
scalar: boolean
|
||||
- name: storageCapacity
|
||||
type:
|
||||
scalar: boolean
|
||||
@@ -15675,39 +15799,7 @@ var schemaYAML = typed.YAMLObject(`types:
|
||||
- name: count
|
||||
type:
|
||||
scalar: numeric
|
||||
- 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
|
||||
- name: io.k8s.api.storagemigration.v1beta1.StorageVersionMigration
|
||||
map:
|
||||
fields:
|
||||
- name: apiVersion
|
||||
@@ -15722,30 +15814,27 @@ var schemaYAML = typed.YAMLObject(`types:
|
||||
default: {}
|
||||
- name: spec
|
||||
type:
|
||||
namedType: io.k8s.api.storagemigration.v1alpha1.StorageVersionMigrationSpec
|
||||
namedType: io.k8s.api.storagemigration.v1beta1.StorageVersionMigrationSpec
|
||||
default: {}
|
||||
- name: status
|
||||
type:
|
||||
namedType: io.k8s.api.storagemigration.v1alpha1.StorageVersionMigrationStatus
|
||||
namedType: io.k8s.api.storagemigration.v1beta1.StorageVersionMigrationStatus
|
||||
default: {}
|
||||
- name: io.k8s.api.storagemigration.v1alpha1.StorageVersionMigrationSpec
|
||||
- name: io.k8s.api.storagemigration.v1beta1.StorageVersionMigrationSpec
|
||||
map:
|
||||
fields:
|
||||
- name: continueToken
|
||||
type:
|
||||
scalar: string
|
||||
- name: resource
|
||||
type:
|
||||
namedType: io.k8s.api.storagemigration.v1alpha1.GroupVersionResource
|
||||
namedType: io.k8s.apimachinery.pkg.apis.meta.v1.GroupResource
|
||||
default: {}
|
||||
- name: io.k8s.api.storagemigration.v1alpha1.StorageVersionMigrationStatus
|
||||
- name: io.k8s.api.storagemigration.v1beta1.StorageVersionMigrationStatus
|
||||
map:
|
||||
fields:
|
||||
- name: conditions
|
||||
type:
|
||||
list:
|
||||
elementType:
|
||||
namedType: io.k8s.api.storagemigration.v1alpha1.MigrationCondition
|
||||
namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Condition
|
||||
elementRelationship: associative
|
||||
keys:
|
||||
- type
|
||||
@@ -15821,6 +15910,17 @@ 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:
|
||||
|
||||
51
applyconfigurations/meta/v1/groupresource.go
Normal file
51
applyconfigurations/meta/v1/groupresource.go
Normal file
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
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
|
||||
// ResourceSlice.
|
||||
// ResourcePool.
|
||||
//
|
||||
// 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 in all sets is 32.
|
||||
// The maximum number of counters is 32.
|
||||
Counters map[string]CounterApplyConfiguration `json:"counters,omitempty"`
|
||||
}
|
||||
|
||||
|
||||
@@ -48,10 +48,8 @@ type DeviceApplyConfiguration struct {
|
||||
//
|
||||
// There can only be a single entry per counterSet.
|
||||
//
|
||||
// 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).
|
||||
// The maximum number of device counter consumptions per
|
||||
// device is 2.
|
||||
ConsumesCounters []DeviceCounterConsumptionApplyConfiguration `json:"consumesCounters,omitempty"`
|
||||
// NodeName identifies the node where the device is available.
|
||||
//
|
||||
@@ -72,7 +70,9 @@ type DeviceApplyConfiguration struct {
|
||||
AllNodes *bool `json:"allNodes,omitempty"`
|
||||
// If specified, these are the driver-defined taints.
|
||||
//
|
||||
// The maximum number of taints is 4.
|
||||
// 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.
|
||||
//
|
||||
// This is an alpha field and requires enabling the DRADeviceTaints
|
||||
// feature gate.
|
||||
|
||||
@@ -29,10 +29,7 @@ type DeviceCounterConsumptionApplyConfiguration struct {
|
||||
CounterSet *string `json:"counterSet,omitempty"`
|
||||
// Counters defines the counters that will be consumed by the device.
|
||||
//
|
||||
// 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).
|
||||
// The maximum number of counters is 32.
|
||||
Counters map[string]CounterApplyConfiguration `json:"counters,omitempty"`
|
||||
}
|
||||
|
||||
|
||||
@@ -38,8 +38,10 @@ 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 NoSchedule and NoExecute. PreferNoSchedule as used for
|
||||
// nodes is not valid here.
|
||||
//
|
||||
// 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.
|
||||
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,7 +62,9 @@ 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.
|
||||
// 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.
|
||||
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
|
||||
@@ -74,9 +76,11 @@ 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 SharedCounters must be unique in the ResourceSlice.
|
||||
// The names of the counter sets must be unique in the ResourcePool.
|
||||
//
|
||||
// The maximum number of counters in all sets is 32.
|
||||
// Only one of Devices and SharedCounters can be set in a ResourceSlice.
|
||||
//
|
||||
// The maximum number of counter sets is 8.
|
||||
SharedCounters []CounterSetApplyConfiguration `json:"sharedCounters,omitempty"`
|
||||
}
|
||||
|
||||
|
||||
@@ -1,91 +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
|
||||
|
||||
// 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
|
||||
}
|
||||
@@ -1,42 +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
|
||||
|
||||
// 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,8 +38,10 @@ 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 NoSchedule and NoExecute. PreferNoSchedule as used for
|
||||
// nodes is not valid here.
|
||||
//
|
||||
// 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.
|
||||
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,6 +41,8 @@ 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
|
||||
@@ -87,6 +89,12 @@ 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
|
||||
@@ -255,6 +263,14 @@ 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 satified for a device to
|
||||
// All selector criteria must be satisfied for a device to
|
||||
// match. The empty selector matches all devices. Without
|
||||
// a selector, no devices are matches.
|
||||
DeviceSelector *DeviceTaintSelectorApplyConfiguration `json:"deviceSelector,omitempty"`
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
/*
|
||||
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,10 +25,6 @@ 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"`
|
||||
@@ -47,10 +43,6 @@ 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
|
||||
@@ -59,14 +51,6 @@ 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.
|
||||
@@ -90,16 +74,3 @@ 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,10 +44,8 @@ type BasicDeviceApplyConfiguration struct {
|
||||
//
|
||||
// There can only be a single entry per counterSet.
|
||||
//
|
||||
// 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).
|
||||
// The maximum number of device counter consumptions per
|
||||
// device is 2.
|
||||
ConsumesCounters []DeviceCounterConsumptionApplyConfiguration `json:"consumesCounters,omitempty"`
|
||||
// NodeName identifies the node where the device is available.
|
||||
//
|
||||
@@ -68,7 +66,9 @@ type BasicDeviceApplyConfiguration struct {
|
||||
AllNodes *bool `json:"allNodes,omitempty"`
|
||||
// If specified, these are the driver-defined taints.
|
||||
//
|
||||
// The maximum number of taints is 4.
|
||||
// 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.
|
||||
//
|
||||
// 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
|
||||
// ResourceSlice.
|
||||
// ResourcePool.
|
||||
//
|
||||
// The counters are not allocatable by themselves, but
|
||||
// can be referenced by devices. When a device is allocated,
|
||||
|
||||
@@ -29,10 +29,7 @@ type DeviceCounterConsumptionApplyConfiguration struct {
|
||||
CounterSet *string `json:"counterSet,omitempty"`
|
||||
// Counters defines the counters that will be consumed by the device.
|
||||
//
|
||||
// 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).
|
||||
// The maximum number of counters is 32.
|
||||
Counters map[string]CounterApplyConfiguration `json:"counters,omitempty"`
|
||||
}
|
||||
|
||||
|
||||
@@ -38,8 +38,10 @@ 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 NoSchedule and NoExecute. PreferNoSchedule as used for
|
||||
// nodes is not valid here.
|
||||
//
|
||||
// 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.
|
||||
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,7 +62,9 @@ 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.
|
||||
// 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.
|
||||
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
|
||||
@@ -74,9 +76,11 @@ 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 SharedCounters must be unique in the ResourceSlice.
|
||||
// The names of the counter sets must be unique in the ResourcePool.
|
||||
//
|
||||
// The maximum number of SharedCounters is 32.
|
||||
// Only one of Devices and SharedCounters can be set in a ResourceSlice.
|
||||
//
|
||||
// The maximum number of counter sets is 8.
|
||||
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
|
||||
// ResourceSlice.
|
||||
// ResourcePool.
|
||||
//
|
||||
// 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 in all sets is 32.
|
||||
// The maximum number of counters is 32.
|
||||
Counters map[string]CounterApplyConfiguration `json:"counters,omitempty"`
|
||||
}
|
||||
|
||||
|
||||
@@ -48,10 +48,8 @@ type DeviceApplyConfiguration struct {
|
||||
//
|
||||
// There can only be a single entry per counterSet.
|
||||
//
|
||||
// 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).
|
||||
// The maximum number of device counter consumptions per
|
||||
// device is 2.
|
||||
ConsumesCounters []DeviceCounterConsumptionApplyConfiguration `json:"consumesCounters,omitempty"`
|
||||
// NodeName identifies the node where the device is available.
|
||||
//
|
||||
@@ -72,7 +70,9 @@ type DeviceApplyConfiguration struct {
|
||||
AllNodes *bool `json:"allNodes,omitempty"`
|
||||
// If specified, these are the driver-defined taints.
|
||||
//
|
||||
// The maximum number of taints is 4.
|
||||
// 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.
|
||||
//
|
||||
// This is an alpha field and requires enabling the DRADeviceTaints
|
||||
// feature gate.
|
||||
|
||||
@@ -29,10 +29,7 @@ type DeviceCounterConsumptionApplyConfiguration struct {
|
||||
CounterSet *string `json:"counterSet,omitempty"`
|
||||
// Counters defines the counters that will be consumed by the device.
|
||||
//
|
||||
// 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).
|
||||
// The maximum number of counters is 32.
|
||||
Counters map[string]CounterApplyConfiguration `json:"counters,omitempty"`
|
||||
}
|
||||
|
||||
|
||||
@@ -38,8 +38,10 @@ 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 NoSchedule and NoExecute. PreferNoSchedule as used for
|
||||
// nodes is not valid here.
|
||||
//
|
||||
// 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.
|
||||
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,7 +62,9 @@ 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.
|
||||
// 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.
|
||||
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
|
||||
@@ -74,9 +76,11 @@ 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 SharedCounters must be unique in the ResourceSlice.
|
||||
// The names of the counter sets must be unique in the ResourcePool.
|
||||
//
|
||||
// The maximum number of counters in all sets is 32.
|
||||
// Only one of Devices and SharedCounters can be set in a ResourceSlice.
|
||||
//
|
||||
// The maximum number of counter sets is 8.
|
||||
SharedCounters []CounterSetApplyConfiguration `json:"sharedCounters,omitempty"`
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
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
|
||||
}
|
||||
53
applyconfigurations/scheduling/v1alpha1/podgroup.go
Normal file
53
applyconfigurations/scheduling/v1alpha1/podgroup.go
Normal file
@@ -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 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
|
||||
}
|
||||
58
applyconfigurations/scheduling/v1alpha1/podgrouppolicy.go
Normal file
58
applyconfigurations/scheduling/v1alpha1/podgrouppolicy.go
Normal file
@@ -0,0 +1,58 @@
|
||||
/*
|
||||
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
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
/*
|
||||
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
|
||||
}
|
||||
279
applyconfigurations/scheduling/v1alpha1/workload.go
Normal file
279
applyconfigurations/scheduling/v1alpha1/workload.go
Normal file
@@ -0,0 +1,279 @@
|
||||
/*
|
||||
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
|
||||
}
|
||||
61
applyconfigurations/scheduling/v1alpha1/workloadspec.go
Normal file
61
applyconfigurations/scheduling/v1alpha1/workloadspec.go
Normal file
@@ -0,0 +1,61 @@
|
||||
/*
|
||||
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,6 +158,26 @@ 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
|
||||
@@ -244,3 +264,11 @@ 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,6 +158,26 @@ 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
|
||||
@@ -244,3 +264,11 @@ 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
|
||||
}
|
||||
|
||||
@@ -1,62 +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
|
||||
|
||||
// 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
|
||||
}
|
||||
@@ -1,88 +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 (
|
||||
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 v1alpha1
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
storagemigrationv1alpha1 "k8s.io/api/storagemigration/v1alpha1"
|
||||
storagemigrationv1beta1 "k8s.io/api/storagemigration/v1beta1"
|
||||
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/v1alpha1")
|
||||
b.WithAPIVersion("storagemigration.k8s.io/v1beta1")
|
||||
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 *storagemigrationv1alpha1.StorageVersionMigration, fieldManager string, subresource string) (*StorageVersionMigrationApplyConfiguration, error) {
|
||||
func ExtractStorageVersionMigrationFrom(storageVersionMigration *storagemigrationv1beta1.StorageVersionMigration, fieldManager string, subresource string) (*StorageVersionMigrationApplyConfiguration, error) {
|
||||
b := &StorageVersionMigrationApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(storageVersionMigration, internal.Parser().Type("io.k8s.api.storagemigration.v1alpha1.StorageVersionMigration"), fieldManager, b, subresource)
|
||||
err := managedfields.ExtractInto(storageVersionMigration, internal.Parser().Type("io.k8s.api.storagemigration.v1beta1.StorageVersionMigration"), fieldManager, b, subresource)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b.WithName(storageVersionMigration.Name)
|
||||
|
||||
b.WithKind("StorageVersionMigration")
|
||||
b.WithAPIVersion("storagemigration.k8s.io/v1alpha1")
|
||||
b.WithAPIVersion("storagemigration.k8s.io/v1beta1")
|
||||
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 *storagemigrationv1alpha1.StorageVersionMigration, fieldManager string) (*StorageVersionMigrationApplyConfiguration, error) {
|
||||
func ExtractStorageVersionMigration(storageVersionMigration *storagemigrationv1beta1.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 *storagemigrationv1alpha1.StorageVersionMigration, fieldManager string) (*StorageVersionMigrationApplyConfiguration, error) {
|
||||
func ExtractStorageVersionMigrationStatus(storageVersionMigration *storagemigrationv1beta1.StorageVersionMigration, fieldManager string) (*StorageVersionMigrationApplyConfiguration, error) {
|
||||
return ExtractStorageVersionMigrationFrom(storageVersionMigration, fieldManager, "status")
|
||||
}
|
||||
|
||||
@@ -16,7 +16,11 @@ limitations under the License.
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
// StorageVersionMigrationSpecApplyConfiguration represents a declarative configuration of the StorageVersionMigrationSpec type for use
|
||||
// with apply.
|
||||
@@ -26,12 +30,7 @@ type StorageVersionMigrationSpecApplyConfiguration struct {
|
||||
// The resource that is being migrated. The migrator sends requests to
|
||||
// the endpoint serving the resource.
|
||||
// Immutable.
|
||||
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"`
|
||||
Resource *v1.GroupResourceApplyConfiguration `json:"resource,omitempty"`
|
||||
}
|
||||
|
||||
// StorageVersionMigrationSpecApplyConfiguration constructs a declarative configuration of the StorageVersionMigrationSpec type for use with
|
||||
@@ -43,15 +42,7 @@ 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 *GroupVersionResourceApplyConfiguration) *StorageVersionMigrationSpecApplyConfiguration {
|
||||
func (b *StorageVersionMigrationSpecApplyConfiguration) WithResource(value *v1.GroupResourceApplyConfiguration) *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,7 +16,11 @@ limitations under the License.
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
// StorageVersionMigrationStatusApplyConfiguration represents a declarative configuration of the StorageVersionMigrationStatus type for use
|
||||
// with apply.
|
||||
@@ -24,7 +28,7 @@ package v1alpha1
|
||||
// Status of the storage version migration.
|
||||
type StorageVersionMigrationStatusApplyConfiguration struct {
|
||||
// The latest available observations of the migration's current state.
|
||||
Conditions []MigrationConditionApplyConfiguration `json:"conditions,omitempty"`
|
||||
Conditions []v1.ConditionApplyConfiguration `json:"conditions,omitempty"`
|
||||
// ResourceVersion to compare with the GC cache for performing the migration.
|
||||
// This is the current resource version of given group, version and resource when
|
||||
// kube-controller-manager first observes this StorageVersionMigration resource.
|
||||
@@ -40,7 +44,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 ...*MigrationConditionApplyConfiguration) *StorageVersionMigrationStatusApplyConfiguration {
|
||||
func (b *StorageVersionMigrationStatusApplyConfiguration) WithConditions(values ...*v1.ConditionApplyConfiguration) *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"
|
||||
storagemigrationv1alpha1 "k8s.io/api/storagemigration/v1alpha1"
|
||||
storagemigrationv1beta1 "k8s.io/api/storagemigration/v1beta1"
|
||||
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"
|
||||
applyconfigurationsstoragemigrationv1alpha1 "k8s.io/client-go/applyconfigurations/storagemigration/v1alpha1"
|
||||
applyconfigurationsstoragemigrationv1beta1 "k8s.io/client-go/applyconfigurations/storagemigration/v1beta1"
|
||||
)
|
||||
|
||||
// ForKind returns an apply configuration type for the given GroupVersionKind, or nil if no
|
||||
@@ -630,12 +630,6 @@ 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"):
|
||||
@@ -650,6 +644,12 @@ 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,6 +1084,8 @@ 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"):
|
||||
@@ -1406,6 +1408,8 @@ 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"):
|
||||
@@ -1708,16 +1712,14 @@ 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{}
|
||||
|
||||
@@ -1886,8 +1888,20 @@ 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"):
|
||||
@@ -1973,17 +1987,13 @@ func ForKind(kind schema.GroupVersionKind) interface{} {
|
||||
case storagev1beta1.SchemeGroupVersion.WithKind("VolumeNodeResources"):
|
||||
return &applyconfigurationsstoragev1beta1.VolumeNodeResourcesApplyConfiguration{}
|
||||
|
||||
// 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{}
|
||||
// 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{}
|
||||
|
||||
}
|
||||
return nil
|
||||
|
||||
@@ -63,8 +63,9 @@ 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"
|
||||
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"
|
||||
// Prioritize aggregated discovery by placing first in the order of discovery accept types.
|
||||
acceptDiscoveryFormats = AcceptV2 + "," + AcceptV2Beta1 + "," + AcceptV1
|
||||
)
|
||||
@@ -168,6 +169,11 @@ 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{}
|
||||
@@ -241,10 +247,7 @@ func (d *DiscoveryClient) downloadLegacy() (
|
||||
map[schema.GroupVersion]*metav1.APIResourceList,
|
||||
map[schema.GroupVersion]error,
|
||||
error) {
|
||||
accept := acceptDiscoveryFormats
|
||||
if d.UseLegacyDiscovery {
|
||||
accept = AcceptV1
|
||||
}
|
||||
accept := selectDiscoveryAcceptHeader(d.UseLegacyDiscovery, d.NoPeerDiscovery)
|
||||
var responseContentType string
|
||||
body, err := d.restClient.Get().
|
||||
AbsPath("/api").
|
||||
@@ -307,10 +310,7 @@ func (d *DiscoveryClient) downloadAPIs() (
|
||||
map[schema.GroupVersion]*metav1.APIResourceList,
|
||||
map[schema.GroupVersion]error,
|
||||
error) {
|
||||
accept := acceptDiscoveryFormats
|
||||
if d.UseLegacyDiscovery {
|
||||
accept = AcceptV1
|
||||
}
|
||||
accept := selectDiscoveryAcceptHeader(d.UseLegacyDiscovery, d.NoPeerDiscovery)
|
||||
var responseContentType string
|
||||
body, err := d.restClient.Get().
|
||||
AbsPath("/apis").
|
||||
@@ -351,6 +351,16 @@ 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.
|
||||
|
||||
@@ -36,6 +36,7 @@ import (
|
||||
"k8s.io/apimachinery/pkg/watch"
|
||||
restclient "k8s.io/client-go/rest"
|
||||
restclientwatch "k8s.io/client-go/rest/watch"
|
||||
"k8s.io/client-go/util/watchlist"
|
||||
)
|
||||
|
||||
func getJSON(version, kind, name string) []byte {
|
||||
@@ -78,6 +79,16 @@ func getClientServer(h func(http.ResponseWriter, *http.Request)) (Interface, *ht
|
||||
return cl, srv, nil
|
||||
}
|
||||
|
||||
func TestDoesClientSupportWatchListSemantics(t *testing.T) {
|
||||
target, err := NewForConfig(&restclient.Config{})
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if watchlist.DoesClientNotSupportWatchListSemantics(target) {
|
||||
t.Fatalf("Dynamic client should support WatchList semantics")
|
||||
}
|
||||
}
|
||||
|
||||
func TestList(t *testing.T) {
|
||||
tcs := []struct {
|
||||
name string
|
||||
|
||||
@@ -148,7 +148,7 @@ func NewFilteredDynamicInformer(client dynamic.Interface, gvr schema.GroupVersio
|
||||
return &dynamicInformer{
|
||||
gvr: gvr,
|
||||
informer: cache.NewSharedIndexInformerWithOptions(
|
||||
&cache.ListWatch{
|
||||
cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{
|
||||
ListFunc: func(options metav1.ListOptions) (runtime.Object, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
@@ -173,7 +173,7 @@ func NewFilteredDynamicInformer(client dynamic.Interface, gvr schema.GroupVersio
|
||||
}
|
||||
return client.Resource(gvr).Namespace(namespace).Watch(ctx, options)
|
||||
},
|
||||
},
|
||||
}, client),
|
||||
&unstructured.Unstructured{},
|
||||
cache.SharedIndexInformerOptions{
|
||||
ResyncPeriod: resyncPeriod,
|
||||
|
||||
@@ -18,19 +18,29 @@ package dynamicinformer_test
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/google/go-cmp/cmp"
|
||||
|
||||
appsv1 "k8s.io/api/apps/v1"
|
||||
"k8s.io/apimachinery/pkg/api/equality"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||
"k8s.io/apimachinery/pkg/util/json"
|
||||
"k8s.io/apimachinery/pkg/watch"
|
||||
"k8s.io/client-go/dynamic"
|
||||
"k8s.io/client-go/dynamic/dynamicinformer"
|
||||
"k8s.io/client-go/dynamic/fake"
|
||||
clientfeatures "k8s.io/client-go/features"
|
||||
clientfeaturestesting "k8s.io/client-go/features/testing"
|
||||
"k8s.io/client-go/rest"
|
||||
"k8s.io/client-go/tools/cache"
|
||||
"net/http"
|
||||
"net/http/httptest"
|
||||
)
|
||||
|
||||
type triggerFunc func(gvr schema.GroupVersionResource, ns string, fakeClient *fake.FakeDynamicClient, testObject *unstructured.Unstructured) *unstructured.Unstructured
|
||||
@@ -55,6 +65,91 @@ func handler(rcvCh chan<- *unstructured.Unstructured) *cache.ResourceEventHandle
|
||||
}
|
||||
}
|
||||
|
||||
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",
|
||||
Kind: "Deployment",
|
||||
},
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Annotations: map[string]string{
|
||||
metav1.InitialEventsAnnotationKey: "true",
|
||||
},
|
||||
},
|
||||
}
|
||||
rawObj, err := json.Marshal(obj)
|
||||
if err != nil {
|
||||
t.Errorf("failed to marshal rawObj: %v", err)
|
||||
http.Error(w, err.Error(), http.StatusInternalServerError)
|
||||
return
|
||||
}
|
||||
|
||||
watchEvent := &metav1.WatchEvent{
|
||||
Type: string(watch.Bookmark),
|
||||
Object: runtime.RawExtension{Raw: rawObj},
|
||||
}
|
||||
rawRsp, err := json.Marshal(watchEvent)
|
||||
if err != nil {
|
||||
t.Errorf("failed to marshal watchEvent: %v", err)
|
||||
http.Error(w, err.Error(), http.StatusInternalServerError)
|
||||
return
|
||||
}
|
||||
w.Header().Set("Content-Type", "application/json")
|
||||
_, err = w.Write(rawRsp)
|
||||
if err != nil {
|
||||
t.Fatalf("failed to write response: %v", err)
|
||||
}
|
||||
}))
|
||||
defer server.Close()
|
||||
|
||||
cfg := &rest.Config{Host: server.URL}
|
||||
client, err := dynamic.NewForConfig(cfg)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
factory := dynamicinformer.NewFilteredDynamicSharedInformerFactory(client, 0, "ns", nil)
|
||||
target := factory.ForResource(schema.GroupVersionResource{Group: "apps", Version: "v1", Resource: "deployments"})
|
||||
|
||||
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
|
||||
defer cancel()
|
||||
factory.Start(ctx.Done())
|
||||
|
||||
if !cache.WaitForCacheSync(ctx.Done(), target.Informer().HasSynced) {
|
||||
t.Fatalf("failed to wait for caches to sync")
|
||||
}
|
||||
}
|
||||
|
||||
func TestUnSupportWatchListSemantics(t *testing.T) {
|
||||
clientfeaturestesting.SetFeatureDuringTest(t, clientfeatures.WatchListClient, true)
|
||||
scheme := runtime.NewScheme()
|
||||
if err := appsv1.AddToScheme(scheme); err != nil {
|
||||
t.Fatalf("failed to add corev1 to scheme: %v", err)
|
||||
}
|
||||
// The fake client doesn’t support WatchList semantics,
|
||||
// so we don’t need to prepare a response.
|
||||
fakeClient := fake.NewSimpleDynamicClient(scheme)
|
||||
factory := dynamicinformer.NewFilteredDynamicSharedInformerFactory(fakeClient, 0, "ns", nil)
|
||||
target := factory.ForResource(schema.GroupVersionResource{Group: "apps", Version: "v1", Resource: "deployments"})
|
||||
|
||||
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
|
||||
defer cancel()
|
||||
factory.Start(ctx.Done())
|
||||
|
||||
if !cache.WaitForCacheSync(ctx.Done(), target.Informer().HasSynced) {
|
||||
t.Fatalf("failed to wait for caches to sync")
|
||||
}
|
||||
}
|
||||
|
||||
func TestFilteredDynamicSharedInformerFactory(t *testing.T) {
|
||||
scenarios := []struct {
|
||||
name string
|
||||
|
||||
@@ -156,6 +156,10 @@ func (c *FakeDynamicClient) Resource(resource schema.GroupVersionResource) dynam
|
||||
return &dynamicResourceClient{client: c, resource: resource, listKind: c.gvrToListKind[resource]}
|
||||
}
|
||||
|
||||
func (c *FakeDynamicClient) IsWatchListSemanticsUnSupported() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
func (c *dynamicResourceClient) Namespace(ns string) dynamic.ResourceInterface {
|
||||
ret := *c
|
||||
ret.namespace = ns
|
||||
|
||||
@@ -29,6 +29,7 @@ import (
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||
"k8s.io/apimachinery/pkg/types"
|
||||
"k8s.io/client-go/util/watchlist"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -60,6 +61,12 @@ func newUnstructuredWithSpec(spec map[string]interface{}) *unstructured.Unstruct
|
||||
return u
|
||||
}
|
||||
|
||||
func TestDoesClientSupportWatchListSemantics(t *testing.T) {
|
||||
target := &FakeDynamicClient{}
|
||||
if !watchlist.DoesClientNotSupportWatchListSemantics(target) {
|
||||
t.Fatalf("FakeDynamicClient should NOT support WatchList semantics")
|
||||
}
|
||||
}
|
||||
func TestGet(t *testing.T) {
|
||||
scheme := runtime.NewScheme()
|
||||
|
||||
|
||||
@@ -21,6 +21,7 @@ import (
|
||||
"sync/atomic"
|
||||
|
||||
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
|
||||
"k8s.io/apimachinery/pkg/util/version"
|
||||
)
|
||||
|
||||
// NOTE: types Feature, FeatureSpec, prerelease (and its values)
|
||||
@@ -49,8 +50,14 @@ 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.
|
||||
@@ -66,6 +73,15 @@ 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.
|
||||
@@ -85,7 +101,15 @@ 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(defaultKubernetesFeatureGates)
|
||||
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)
|
||||
}
|
||||
|
||||
// ReplaceFeatureGates overwrites the default implementation of the feature gates
|
||||
@@ -121,8 +145,23 @@ 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(defaultKubernetesFeatureGates)
|
||||
envVarGates := newEnvVarFeatureGates(unversionedFeatureGates(defaultVersionedKubernetesFeatureGates))
|
||||
|
||||
wrappedFeatureGates := &featureGatesWrapper{envVarGates}
|
||||
featureGates.Store(wrappedFeatureGates)
|
||||
|
||||
@@ -17,17 +17,67 @@ limitations under the License.
|
||||
package features
|
||||
|
||||
import (
|
||||
"reflect"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
"k8s.io/apimachinery/pkg/util/version"
|
||||
)
|
||||
|
||||
// TestAddFeaturesToExistingFeatureGates ensures that
|
||||
// the defaultKubernetesFeatureGates are added to a test feature gates registry.
|
||||
// the defaultVersionedKubernetesFeatureGates are added to a test feature gates registry.
|
||||
func TestAddFeaturesToExistingFeatureGates(t *testing.T) {
|
||||
fakeFeatureGates := &fakeRegistry{}
|
||||
require.NoError(t, AddFeaturesToExistingFeatureGates(fakeFeatureGates))
|
||||
require.Equal(t, defaultKubernetesFeatureGates, fakeFeatureGates.specs)
|
||||
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)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func TestReplaceFeatureGatesWithWarningIndicator(t *testing.T) {
|
||||
@@ -47,3 +97,12 @@ 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,6 +16,10 @@ 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
|
||||
@@ -54,30 +58,48 @@ const (
|
||||
// Refactor informers to deliver watch stream events in order instead of out of order.
|
||||
InOrderInformers Feature = "InOrderInformers"
|
||||
|
||||
// owner: @nilekhc
|
||||
// owner: @yue9944882
|
||||
// beta: v1.35
|
||||
//
|
||||
// Allow InOrderInformer to process incoming events in batches to expedite the process rate.
|
||||
InOrderInformersBatchProcess Feature = "InOrderInformersBatchProcess"
|
||||
|
||||
// owner: @enj, @michaelasp
|
||||
// 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"
|
||||
)
|
||||
|
||||
// defaultKubernetesFeatureGates consists of all known Kubernetes-specific feature keys.
|
||||
// defaultVersionedKubernetesFeatureGates 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 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},
|
||||
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},
|
||||
},
|
||||
}
|
||||
|
||||
@@ -77,6 +77,7 @@ 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)
|
||||
}
|
||||
|
||||
@@ -23,9 +23,9 @@ import (
|
||||
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
rest "k8s.io/client-go/rest"
|
||||
"k8s.io/apimachinery/pkg/types"
|
||||
"k8s.io/apimachinery/pkg/watch"
|
||||
"k8s.io/client-go/rest"
|
||||
"k8s.io/client-go/util/apply"
|
||||
)
|
||||
|
||||
@@ -318,7 +318,7 @@ func (a *alsoApplier[T, C]) Apply(ctx context.Context, obj C, opts metav1.ApplyO
|
||||
return result, err
|
||||
}
|
||||
|
||||
// Apply takes the given apply declarative configuration, applies it to the status subresource and returns the applied resource.
|
||||
// ApplyStatus takes the given apply declarative configuration, applies it to the status subresource and returns the applied resource.
|
||||
func (a *alsoApplier[T, C]) ApplyStatus(ctx context.Context, obj C, opts metav1.ApplyOptions) (T, error) {
|
||||
if obj == *new(C) {
|
||||
return *new(T), fmt.Errorf("object provided to Apply must not be nil")
|
||||
|
||||
22
go.mod
22
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.43.0
|
||||
golang.org/x/net v0.47.0
|
||||
golang.org/x/oauth2 v0.30.0
|
||||
golang.org/x/term v0.34.0
|
||||
golang.org/x/term v0.37.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.0.0-20250930152327-c397f90a55bd
|
||||
k8s.io/apimachinery v0.0.0-20250929164018-5674a461e8a9
|
||||
k8s.io/api v0.35.6
|
||||
k8s.io/apimachinery v0.35.6
|
||||
k8s.io/klog/v2 v2.130.1
|
||||
k8s.io/kube-openapi v0.0.0-20250910181357-589584f1c912
|
||||
k8s.io/utils v0.0.0-20250604170112-4c0f3b243397
|
||||
k8s.io/utils v0.0.0-20251002143259-bc988d571ff4
|
||||
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,29 +36,29 @@ 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
|
||||
github.com/go-openapi/jsonpointer v0.21.0 // indirect
|
||||
github.com/go-openapi/jsonreference v0.20.2 // indirect
|
||||
github.com/go-openapi/swag v0.23.0 // indirect
|
||||
github.com/gogo/protobuf v1.3.2 // indirect
|
||||
github.com/google/btree v1.1.3 // indirect
|
||||
github.com/google/pprof v0.0.0-20241029153458-d1b30febd7db // indirect
|
||||
github.com/google/pprof v0.0.0-20250403155104-27863c87afa6 // 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.0 // indirect
|
||||
github.com/moby/spdystream v0.5.1 // 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.2 // indirect
|
||||
go.yaml.in/yaml/v2 v2.4.3 // indirect
|
||||
go.yaml.in/yaml/v3 v3.0.4 // indirect
|
||||
golang.org/x/sys v0.35.0 // indirect
|
||||
golang.org/x/text v0.28.0 // indirect
|
||||
golang.org/x/sys v0.38.0 // indirect
|
||||
golang.org/x/text v0.31.0 // indirect
|
||||
gopkg.in/inf.v0 v0.9.1 // indirect
|
||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||
)
|
||||
|
||||
93
go.sum
93
go.sum
@@ -1,3 +1,5 @@
|
||||
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=
|
||||
@@ -20,8 +22,6 @@ github.com/go-openapi/swag v0.23.0 h1:vsEVJDUo2hPJ2tu0/Xc+4noaxyEffXNIs3cOULZ+Gr
|
||||
github.com/go-openapi/swag v0.23.0/go.mod h1:esZ8ITTYEsH1V2trKHjAN8Ai7xHb8RV+YSZ577vPjgQ=
|
||||
github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI=
|
||||
github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8=
|
||||
github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
|
||||
github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
|
||||
github.com/google/btree v1.1.3 h1:CVpQJjYgC4VbzxeGVHfvZrv1ctoYCAI8vbl07Fcxlyg=
|
||||
github.com/google/btree v1.1.3/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4=
|
||||
github.com/google/gnostic-models v0.7.0 h1:qwTtogB15McXDaNqTZdzPJRHvaVJlAl+HVQnLmJEJxo=
|
||||
@@ -29,8 +29,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-20241029153458-d1b30febd7db h1:097atOisP2aRj7vFgYQBbFN4U4JNXUNYpxael3UzMyo=
|
||||
github.com/google/pprof v0.0.0-20241029153458-d1b30febd7db/go.mod h1:vavhavw2zAxS5dIdcRluK6cSGGPlZynqzFM8NdvU144=
|
||||
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/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=
|
||||
@@ -41,8 +41,6 @@ github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8Hm
|
||||
github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y=
|
||||
github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
|
||||
github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
|
||||
github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
|
||||
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
|
||||
github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
|
||||
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
|
||||
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
|
||||
@@ -52,8 +50,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.0 h1:7r0J1Si3QO/kjRitvSLVVFUjxMEb/YLj6S9FF62JBCU=
|
||||
github.com/moby/spdystream v0.5.0/go.mod h1:xBAYlnt/ay+11ShkdFKNAG7LsyK/tmNBVvVOwrfMgdI=
|
||||
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/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=
|
||||
@@ -64,16 +62,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.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/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/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.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII=
|
||||
github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o=
|
||||
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/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,53 +87,30 @@ github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu
|
||||
github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
|
||||
github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM=
|
||||
github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg=
|
||||
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
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.2 h1:DzmwEr2rDGHl7lsFgAHxmNz/1NlQ7xLIrlN2h5d1eGI=
|
||||
go.yaml.in/yaml/v2 v2.4.2/go.mod h1:081UH+NErpNdqlCXm3TtEran0rJZGxAYx9hb/ELlsPU=
|
||||
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/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc=
|
||||
go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg=
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
||||
golang.org/x/net v0.43.0 h1:lat02VYK2j4aLzMzecihNvTlJNQUq316m2Mr9rnM6YE=
|
||||
golang.org/x/net v0.43.0/go.mod h1:vhO1fvI4dGsIjh73sWfUVjj3N7CA9WkKJNQm2svM6Jg=
|
||||
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/oauth2 v0.30.0 h1:dnDm7JmhM45NNpd8FDDeLhK6FwqbOf4MLCM9zb1BOHI=
|
||||
golang.org/x/oauth2 v0.30.0/go.mod h1:B++QgG3ZKulg6sRPGD/mqlHQs5rB3Ml9erfeDY7xKlU=
|
||||
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
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.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.28.0 h1:rhazDwis8INMIwQ4tpjLDzUhx6RlXqZNPEM0huQojng=
|
||||
golang.org/x/text v0.28.0/go.mod h1:U8nCwOR8jO/marOQ0QbDiOngZVEBB7MAiitBuMjXiNU=
|
||||
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/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.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
|
||||
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
||||
golang.org/x/tools v0.36.0 h1:kWS0uv/zsvHEle1LbV5LE8QujrxB3wfQyxHfhOk0Qkg=
|
||||
golang.org/x/tools v0.36.0/go.mod h1:WBDiHKJK8YgLHlcQPYQzNCkUxUypCaa5ZegCVutKm+s=
|
||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/tools v0.38.0 h1:Hx2Xv8hISq8Lm16jvBZ2VQf+RLmbd7wVUsALibYI/IQ=
|
||||
golang.org/x/tools v0.38.0/go.mod h1:yEsQ/d/YK8cjh0L6rZlY8tgtlKiBNTL14pGDJPJpYQs=
|
||||
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=
|
||||
@@ -148,16 +123,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.0.0-20250930152327-c397f90a55bd h1:Cg2aqUh0jZZC7BD38J3K2Z6TAvKepgIvsO+e621Gz6M=
|
||||
k8s.io/api v0.0.0-20250930152327-c397f90a55bd/go.mod h1:zc2Bftemdv4WGe3gh/TWTwdUt5ERkIycxBrRQmuOjtc=
|
||||
k8s.io/apimachinery v0.0.0-20250929164018-5674a461e8a9 h1:tvHk/t27eNXdAUvzZ2Fz+BvoUpfB+tTnvmWR/ET1s2Q=
|
||||
k8s.io/apimachinery v0.0.0-20250929164018-5674a461e8a9/go.mod h1:1YSL0XujdSTcnuHOR73D16EdW+d49JOdd8TXjCo6Dhc=
|
||||
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/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-20250604170112-4c0f3b243397 h1:hwvWFiBzdWw1FhfY1FooPn3kzWuJ8tmbZBHi4zVsl1Y=
|
||||
k8s.io/utils v0.0.0-20250604170112-4c0f3b243397/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
|
||||
k8s.io/utils v0.0.0-20251002143259-bc988d571ff4 h1:SjGebBtkBqHFOli+05xYbK8YF1Dzkbzn+gDM4X9T4Ck=
|
||||
k8s.io/utils v0.0.0-20251002143259-bc988d571ff4/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=
|
||||
|
||||
@@ -56,7 +56,7 @@ func NewMutatingWebhookConfigurationInformer(client kubernetes.Interface, resync
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewFilteredMutatingWebhookConfigurationInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
|
||||
return cache.NewSharedIndexInformer(
|
||||
&cache.ListWatch{
|
||||
cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{
|
||||
ListFunc: func(options metav1.ListOptions) (runtime.Object, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
@@ -81,7 +81,7 @@ func NewFilteredMutatingWebhookConfigurationInformer(client kubernetes.Interface
|
||||
}
|
||||
return client.AdmissionregistrationV1().MutatingWebhookConfigurations().Watch(ctx, options)
|
||||
},
|
||||
},
|
||||
}, client),
|
||||
&apiadmissionregistrationv1.MutatingWebhookConfiguration{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
|
||||
@@ -56,7 +56,7 @@ func NewValidatingAdmissionPolicyInformer(client kubernetes.Interface, resyncPer
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewFilteredValidatingAdmissionPolicyInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
|
||||
return cache.NewSharedIndexInformer(
|
||||
&cache.ListWatch{
|
||||
cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{
|
||||
ListFunc: func(options metav1.ListOptions) (runtime.Object, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
@@ -81,7 +81,7 @@ func NewFilteredValidatingAdmissionPolicyInformer(client kubernetes.Interface, r
|
||||
}
|
||||
return client.AdmissionregistrationV1().ValidatingAdmissionPolicies().Watch(ctx, options)
|
||||
},
|
||||
},
|
||||
}, client),
|
||||
&apiadmissionregistrationv1.ValidatingAdmissionPolicy{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
|
||||
@@ -56,7 +56,7 @@ func NewValidatingAdmissionPolicyBindingInformer(client kubernetes.Interface, re
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewFilteredValidatingAdmissionPolicyBindingInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
|
||||
return cache.NewSharedIndexInformer(
|
||||
&cache.ListWatch{
|
||||
cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{
|
||||
ListFunc: func(options metav1.ListOptions) (runtime.Object, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
@@ -81,7 +81,7 @@ func NewFilteredValidatingAdmissionPolicyBindingInformer(client kubernetes.Inter
|
||||
}
|
||||
return client.AdmissionregistrationV1().ValidatingAdmissionPolicyBindings().Watch(ctx, options)
|
||||
},
|
||||
},
|
||||
}, client),
|
||||
&apiadmissionregistrationv1.ValidatingAdmissionPolicyBinding{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
|
||||
@@ -56,7 +56,7 @@ func NewValidatingWebhookConfigurationInformer(client kubernetes.Interface, resy
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewFilteredValidatingWebhookConfigurationInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
|
||||
return cache.NewSharedIndexInformer(
|
||||
&cache.ListWatch{
|
||||
cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{
|
||||
ListFunc: func(options metav1.ListOptions) (runtime.Object, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
@@ -81,7 +81,7 @@ func NewFilteredValidatingWebhookConfigurationInformer(client kubernetes.Interfa
|
||||
}
|
||||
return client.AdmissionregistrationV1().ValidatingWebhookConfigurations().Watch(ctx, options)
|
||||
},
|
||||
},
|
||||
}, client),
|
||||
&apiadmissionregistrationv1.ValidatingWebhookConfiguration{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
|
||||
@@ -56,7 +56,7 @@ func NewMutatingAdmissionPolicyInformer(client kubernetes.Interface, resyncPerio
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewFilteredMutatingAdmissionPolicyInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
|
||||
return cache.NewSharedIndexInformer(
|
||||
&cache.ListWatch{
|
||||
cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{
|
||||
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
@@ -81,7 +81,7 @@ func NewFilteredMutatingAdmissionPolicyInformer(client kubernetes.Interface, res
|
||||
}
|
||||
return client.AdmissionregistrationV1alpha1().MutatingAdmissionPolicies().Watch(ctx, options)
|
||||
},
|
||||
},
|
||||
}, client),
|
||||
&apiadmissionregistrationv1alpha1.MutatingAdmissionPolicy{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
|
||||
@@ -56,7 +56,7 @@ func NewMutatingAdmissionPolicyBindingInformer(client kubernetes.Interface, resy
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewFilteredMutatingAdmissionPolicyBindingInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
|
||||
return cache.NewSharedIndexInformer(
|
||||
&cache.ListWatch{
|
||||
cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{
|
||||
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
@@ -81,7 +81,7 @@ func NewFilteredMutatingAdmissionPolicyBindingInformer(client kubernetes.Interfa
|
||||
}
|
||||
return client.AdmissionregistrationV1alpha1().MutatingAdmissionPolicyBindings().Watch(ctx, options)
|
||||
},
|
||||
},
|
||||
}, client),
|
||||
&apiadmissionregistrationv1alpha1.MutatingAdmissionPolicyBinding{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
|
||||
@@ -56,7 +56,7 @@ func NewValidatingAdmissionPolicyInformer(client kubernetes.Interface, resyncPer
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewFilteredValidatingAdmissionPolicyInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
|
||||
return cache.NewSharedIndexInformer(
|
||||
&cache.ListWatch{
|
||||
cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{
|
||||
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
@@ -81,7 +81,7 @@ func NewFilteredValidatingAdmissionPolicyInformer(client kubernetes.Interface, r
|
||||
}
|
||||
return client.AdmissionregistrationV1alpha1().ValidatingAdmissionPolicies().Watch(ctx, options)
|
||||
},
|
||||
},
|
||||
}, client),
|
||||
&apiadmissionregistrationv1alpha1.ValidatingAdmissionPolicy{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
|
||||
@@ -56,7 +56,7 @@ func NewValidatingAdmissionPolicyBindingInformer(client kubernetes.Interface, re
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewFilteredValidatingAdmissionPolicyBindingInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
|
||||
return cache.NewSharedIndexInformer(
|
||||
&cache.ListWatch{
|
||||
cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{
|
||||
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
@@ -81,7 +81,7 @@ func NewFilteredValidatingAdmissionPolicyBindingInformer(client kubernetes.Inter
|
||||
}
|
||||
return client.AdmissionregistrationV1alpha1().ValidatingAdmissionPolicyBindings().Watch(ctx, options)
|
||||
},
|
||||
},
|
||||
}, client),
|
||||
&apiadmissionregistrationv1alpha1.ValidatingAdmissionPolicyBinding{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
|
||||
@@ -56,7 +56,7 @@ func NewMutatingAdmissionPolicyInformer(client kubernetes.Interface, resyncPerio
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewFilteredMutatingAdmissionPolicyInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
|
||||
return cache.NewSharedIndexInformer(
|
||||
&cache.ListWatch{
|
||||
cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{
|
||||
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
@@ -81,7 +81,7 @@ func NewFilteredMutatingAdmissionPolicyInformer(client kubernetes.Interface, res
|
||||
}
|
||||
return client.AdmissionregistrationV1beta1().MutatingAdmissionPolicies().Watch(ctx, options)
|
||||
},
|
||||
},
|
||||
}, client),
|
||||
&apiadmissionregistrationv1beta1.MutatingAdmissionPolicy{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
|
||||
@@ -56,7 +56,7 @@ func NewMutatingAdmissionPolicyBindingInformer(client kubernetes.Interface, resy
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewFilteredMutatingAdmissionPolicyBindingInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
|
||||
return cache.NewSharedIndexInformer(
|
||||
&cache.ListWatch{
|
||||
cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{
|
||||
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
@@ -81,7 +81,7 @@ func NewFilteredMutatingAdmissionPolicyBindingInformer(client kubernetes.Interfa
|
||||
}
|
||||
return client.AdmissionregistrationV1beta1().MutatingAdmissionPolicyBindings().Watch(ctx, options)
|
||||
},
|
||||
},
|
||||
}, client),
|
||||
&apiadmissionregistrationv1beta1.MutatingAdmissionPolicyBinding{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
|
||||
@@ -56,7 +56,7 @@ func NewMutatingWebhookConfigurationInformer(client kubernetes.Interface, resync
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewFilteredMutatingWebhookConfigurationInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
|
||||
return cache.NewSharedIndexInformer(
|
||||
&cache.ListWatch{
|
||||
cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{
|
||||
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
@@ -81,7 +81,7 @@ func NewFilteredMutatingWebhookConfigurationInformer(client kubernetes.Interface
|
||||
}
|
||||
return client.AdmissionregistrationV1beta1().MutatingWebhookConfigurations().Watch(ctx, options)
|
||||
},
|
||||
},
|
||||
}, client),
|
||||
&apiadmissionregistrationv1beta1.MutatingWebhookConfiguration{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
|
||||
@@ -56,7 +56,7 @@ func NewValidatingAdmissionPolicyInformer(client kubernetes.Interface, resyncPer
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewFilteredValidatingAdmissionPolicyInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
|
||||
return cache.NewSharedIndexInformer(
|
||||
&cache.ListWatch{
|
||||
cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{
|
||||
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
@@ -81,7 +81,7 @@ func NewFilteredValidatingAdmissionPolicyInformer(client kubernetes.Interface, r
|
||||
}
|
||||
return client.AdmissionregistrationV1beta1().ValidatingAdmissionPolicies().Watch(ctx, options)
|
||||
},
|
||||
},
|
||||
}, client),
|
||||
&apiadmissionregistrationv1beta1.ValidatingAdmissionPolicy{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
|
||||
@@ -56,7 +56,7 @@ func NewValidatingAdmissionPolicyBindingInformer(client kubernetes.Interface, re
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewFilteredValidatingAdmissionPolicyBindingInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
|
||||
return cache.NewSharedIndexInformer(
|
||||
&cache.ListWatch{
|
||||
cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{
|
||||
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
@@ -81,7 +81,7 @@ func NewFilteredValidatingAdmissionPolicyBindingInformer(client kubernetes.Inter
|
||||
}
|
||||
return client.AdmissionregistrationV1beta1().ValidatingAdmissionPolicyBindings().Watch(ctx, options)
|
||||
},
|
||||
},
|
||||
}, client),
|
||||
&apiadmissionregistrationv1beta1.ValidatingAdmissionPolicyBinding{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
|
||||
@@ -56,7 +56,7 @@ func NewValidatingWebhookConfigurationInformer(client kubernetes.Interface, resy
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewFilteredValidatingWebhookConfigurationInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
|
||||
return cache.NewSharedIndexInformer(
|
||||
&cache.ListWatch{
|
||||
cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{
|
||||
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
@@ -81,7 +81,7 @@ func NewFilteredValidatingWebhookConfigurationInformer(client kubernetes.Interfa
|
||||
}
|
||||
return client.AdmissionregistrationV1beta1().ValidatingWebhookConfigurations().Watch(ctx, options)
|
||||
},
|
||||
},
|
||||
}, client),
|
||||
&apiadmissionregistrationv1beta1.ValidatingWebhookConfiguration{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
|
||||
@@ -56,7 +56,7 @@ func NewStorageVersionInformer(client kubernetes.Interface, resyncPeriod time.Du
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewFilteredStorageVersionInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
|
||||
return cache.NewSharedIndexInformer(
|
||||
&cache.ListWatch{
|
||||
cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{
|
||||
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
@@ -81,7 +81,7 @@ func NewFilteredStorageVersionInformer(client kubernetes.Interface, resyncPeriod
|
||||
}
|
||||
return client.InternalV1alpha1().StorageVersions().Watch(ctx, options)
|
||||
},
|
||||
},
|
||||
}, client),
|
||||
&apiapiserverinternalv1alpha1.StorageVersion{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
|
||||
@@ -57,7 +57,7 @@ func NewControllerRevisionInformer(client kubernetes.Interface, namespace string
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewFilteredControllerRevisionInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
|
||||
return cache.NewSharedIndexInformer(
|
||||
&cache.ListWatch{
|
||||
cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{
|
||||
ListFunc: func(options metav1.ListOptions) (runtime.Object, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
@@ -82,7 +82,7 @@ func NewFilteredControllerRevisionInformer(client kubernetes.Interface, namespac
|
||||
}
|
||||
return client.AppsV1().ControllerRevisions(namespace).Watch(ctx, options)
|
||||
},
|
||||
},
|
||||
}, client),
|
||||
&apiappsv1.ControllerRevision{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
|
||||
@@ -57,7 +57,7 @@ func NewDaemonSetInformer(client kubernetes.Interface, namespace string, resyncP
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewFilteredDaemonSetInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
|
||||
return cache.NewSharedIndexInformer(
|
||||
&cache.ListWatch{
|
||||
cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{
|
||||
ListFunc: func(options metav1.ListOptions) (runtime.Object, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
@@ -82,7 +82,7 @@ func NewFilteredDaemonSetInformer(client kubernetes.Interface, namespace string,
|
||||
}
|
||||
return client.AppsV1().DaemonSets(namespace).Watch(ctx, options)
|
||||
},
|
||||
},
|
||||
}, client),
|
||||
&apiappsv1.DaemonSet{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
|
||||
@@ -57,7 +57,7 @@ func NewDeploymentInformer(client kubernetes.Interface, namespace string, resync
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewFilteredDeploymentInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
|
||||
return cache.NewSharedIndexInformer(
|
||||
&cache.ListWatch{
|
||||
cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{
|
||||
ListFunc: func(options metav1.ListOptions) (runtime.Object, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
@@ -82,7 +82,7 @@ func NewFilteredDeploymentInformer(client kubernetes.Interface, namespace string
|
||||
}
|
||||
return client.AppsV1().Deployments(namespace).Watch(ctx, options)
|
||||
},
|
||||
},
|
||||
}, client),
|
||||
&apiappsv1.Deployment{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
|
||||
@@ -57,7 +57,7 @@ func NewReplicaSetInformer(client kubernetes.Interface, namespace string, resync
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewFilteredReplicaSetInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
|
||||
return cache.NewSharedIndexInformer(
|
||||
&cache.ListWatch{
|
||||
cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{
|
||||
ListFunc: func(options metav1.ListOptions) (runtime.Object, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
@@ -82,7 +82,7 @@ func NewFilteredReplicaSetInformer(client kubernetes.Interface, namespace string
|
||||
}
|
||||
return client.AppsV1().ReplicaSets(namespace).Watch(ctx, options)
|
||||
},
|
||||
},
|
||||
}, client),
|
||||
&apiappsv1.ReplicaSet{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
|
||||
@@ -57,7 +57,7 @@ func NewStatefulSetInformer(client kubernetes.Interface, namespace string, resyn
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewFilteredStatefulSetInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
|
||||
return cache.NewSharedIndexInformer(
|
||||
&cache.ListWatch{
|
||||
cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{
|
||||
ListFunc: func(options metav1.ListOptions) (runtime.Object, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
@@ -82,7 +82,7 @@ func NewFilteredStatefulSetInformer(client kubernetes.Interface, namespace strin
|
||||
}
|
||||
return client.AppsV1().StatefulSets(namespace).Watch(ctx, options)
|
||||
},
|
||||
},
|
||||
}, client),
|
||||
&apiappsv1.StatefulSet{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
|
||||
@@ -57,7 +57,7 @@ func NewControllerRevisionInformer(client kubernetes.Interface, namespace string
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewFilteredControllerRevisionInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
|
||||
return cache.NewSharedIndexInformer(
|
||||
&cache.ListWatch{
|
||||
cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{
|
||||
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
@@ -82,7 +82,7 @@ func NewFilteredControllerRevisionInformer(client kubernetes.Interface, namespac
|
||||
}
|
||||
return client.AppsV1beta1().ControllerRevisions(namespace).Watch(ctx, options)
|
||||
},
|
||||
},
|
||||
}, client),
|
||||
&apiappsv1beta1.ControllerRevision{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
|
||||
@@ -57,7 +57,7 @@ func NewDeploymentInformer(client kubernetes.Interface, namespace string, resync
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewFilteredDeploymentInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
|
||||
return cache.NewSharedIndexInformer(
|
||||
&cache.ListWatch{
|
||||
cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{
|
||||
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
@@ -82,7 +82,7 @@ func NewFilteredDeploymentInformer(client kubernetes.Interface, namespace string
|
||||
}
|
||||
return client.AppsV1beta1().Deployments(namespace).Watch(ctx, options)
|
||||
},
|
||||
},
|
||||
}, client),
|
||||
&apiappsv1beta1.Deployment{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
|
||||
@@ -57,7 +57,7 @@ func NewStatefulSetInformer(client kubernetes.Interface, namespace string, resyn
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewFilteredStatefulSetInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
|
||||
return cache.NewSharedIndexInformer(
|
||||
&cache.ListWatch{
|
||||
cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{
|
||||
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
@@ -82,7 +82,7 @@ func NewFilteredStatefulSetInformer(client kubernetes.Interface, namespace strin
|
||||
}
|
||||
return client.AppsV1beta1().StatefulSets(namespace).Watch(ctx, options)
|
||||
},
|
||||
},
|
||||
}, client),
|
||||
&apiappsv1beta1.StatefulSet{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
|
||||
@@ -57,7 +57,7 @@ func NewControllerRevisionInformer(client kubernetes.Interface, namespace string
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewFilteredControllerRevisionInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
|
||||
return cache.NewSharedIndexInformer(
|
||||
&cache.ListWatch{
|
||||
cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{
|
||||
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
@@ -82,7 +82,7 @@ func NewFilteredControllerRevisionInformer(client kubernetes.Interface, namespac
|
||||
}
|
||||
return client.AppsV1beta2().ControllerRevisions(namespace).Watch(ctx, options)
|
||||
},
|
||||
},
|
||||
}, client),
|
||||
&apiappsv1beta2.ControllerRevision{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user