Skip to content

Commit 1e1dad4

Browse files
Merge pull request #103467 from thockin/svc-alloc-lb-nodeports-bug
Fix small bug with AllocateLoadBalancerNodePorts Kubernetes-commit: 7bfd0b05035a5792696b2f290b512172782a9c37
2 parents 8ad172a + 9aa829f commit 1e1dad4

File tree

3 files changed

+17
-11
lines changed

3 files changed

+17
-11
lines changed

core/v1/generated.proto

Lines changed: 8 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

core/v1/types.go

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4294,11 +4294,14 @@ type ServiceSpec struct {
42944294
IPFamilyPolicy *IPFamilyPolicyType `json:"ipFamilyPolicy,omitempty" protobuf:"bytes,17,opt,name=ipFamilyPolicy,casttype=IPFamilyPolicyType"`
42954295

42964296
// allocateLoadBalancerNodePorts defines if NodePorts will be automatically
4297-
// allocated for services with type LoadBalancer. Default is "true". It may be
4298-
// set to "false" if the cluster load-balancer does not rely on NodePorts.
4299-
// allocateLoadBalancerNodePorts may only be set for services with type LoadBalancer
4300-
// and will be cleared if the type is changed to any other type.
4301-
// This field is alpha-level and is only honored by servers that enable the ServiceLBNodePortControl feature.
4297+
// allocated for services with type LoadBalancer. Default is "true". It
4298+
// may be set to "false" if the cluster load-balancer does not rely on
4299+
// NodePorts. If the caller requests specific NodePorts (by specifying a
4300+
// value), those requests will be respected, regardless of this field.
4301+
// This field may only be set for services with type LoadBalancer and will
4302+
// be cleared if the type is changed to any other type.
4303+
// This field is beta-level and is only honored by servers that enable the ServiceLBNodePortControl feature.
4304+
// +featureGate=ServiceLBNodePortControl
43024305
// +optional
43034306
AllocateLoadBalancerNodePorts *bool `json:"allocateLoadBalancerNodePorts,omitempty" protobuf:"bytes,20,opt,name=allocateLoadBalancerNodePorts"`
43044307

core/v1/types_swagger_doc_generated.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2247,7 +2247,7 @@ var map_ServiceSpec = map[string]string{
22472247
"sessionAffinityConfig": "sessionAffinityConfig contains the configurations of session affinity.",
22482248
"ipFamilies": "IPFamilies is a list of IP families (e.g. IPv4, IPv6) assigned to this service, and is gated by the \"IPv6DualStack\" feature gate. This field is usually assigned automatically based on cluster configuration and the ipFamilyPolicy field. If this field is specified manually, the requested family is available in the cluster, and ipFamilyPolicy allows it, it will be used; otherwise creation of the service will fail. This field is conditionally mutable: it allows for adding or removing a secondary IP family, but it does not allow changing the primary IP family of the Service. Valid values are \"IPv4\" and \"IPv6\". This field only applies to Services of types ClusterIP, NodePort, and LoadBalancer, and does apply to \"headless\" services. This field will be wiped when updating a Service to type ExternalName.\n\nThis field may hold a maximum of two entries (dual-stack families, in either order). These families must correspond to the values of the clusterIPs field, if specified. Both clusterIPs and ipFamilies are governed by the ipFamilyPolicy field.",
22492249
"ipFamilyPolicy": "IPFamilyPolicy represents the dual-stack-ness requested or required by this Service, and is gated by the \"IPv6DualStack\" feature gate. If there is no value provided, then this field will be set to SingleStack. Services can be \"SingleStack\" (a single IP family), \"PreferDualStack\" (two IP families on dual-stack configured clusters or a single IP family on single-stack clusters), or \"RequireDualStack\" (two IP families on dual-stack configured clusters, otherwise fail). The ipFamilies and clusterIPs fields depend on the value of this field. This field will be wiped when updating a service to type ExternalName.",
2250-
"allocateLoadBalancerNodePorts": "allocateLoadBalancerNodePorts defines if NodePorts will be automatically allocated for services with type LoadBalancer. Default is \"true\". It may be set to \"false\" if the cluster load-balancer does not rely on NodePorts. allocateLoadBalancerNodePorts may only be set for services with type LoadBalancer and will be cleared if the type is changed to any other type. This field is alpha-level and is only honored by servers that enable the ServiceLBNodePortControl feature.",
2250+
"allocateLoadBalancerNodePorts": "allocateLoadBalancerNodePorts defines if NodePorts will be automatically allocated for services with type LoadBalancer. Default is \"true\". It may be set to \"false\" if the cluster load-balancer does not rely on NodePorts. If the caller requests specific NodePorts (by specifying a value), those requests will be respected, regardless of this field. This field may only be set for services with type LoadBalancer and will be cleared if the type is changed to any other type. This field is beta-level and is only honored by servers that enable the ServiceLBNodePortControl feature.",
22512251
"loadBalancerClass": "loadBalancerClass is the class of the load balancer implementation this Service belongs to. If specified, the value of this field must be a label-style identifier, with an optional prefix, e.g. \"internal-vip\" or \"example.com/internal-vip\". Unprefixed names are reserved for end-users. This field can only be set when the Service type is 'LoadBalancer'. If not set, the default load balancer implementation is used, today this is typically done through the cloud provider integration, but should apply for any default implementation. If set, it is assumed that a load balancer implementation is watching for Services with a matching class. Any default load balancer implementation (e.g. cloud providers) should ignore Services that set this field. This field can only be set when creating or updating a Service to type 'LoadBalancer'. Once set, it can not be changed. This field will be wiped when a service is updated to a non 'LoadBalancer' type.",
22522252
"internalTrafficPolicy": "InternalTrafficPolicy specifies if the cluster internal traffic should be routed to all endpoints or node-local endpoints only. \"Cluster\" routes internal traffic to a Service to all endpoints. \"Local\" routes traffic to node-local endpoints only, traffic is dropped if no node-local endpoints are ready. The default value is \"Cluster\".",
22532253
}

0 commit comments

Comments
 (0)