Skip to content

Commit 9b3a4bb

Browse files
committed
api: update Service.Spec.IPFamily docs
1 parent 570cdb8 commit 9b3a4bb

File tree

5 files changed

+47
-23
lines changed

5 files changed

+47
-23
lines changed

api/openapi-spec/swagger.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/apis/core/types.go

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3517,13 +3517,21 @@ type ServiceSpec struct {
35173517
// +optional
35183518
PublishNotReadyAddresses bool
35193519

3520-
// ipFamily specifies whether this Service has a preference for a particular IP family (e.g. IPv4 vs.
3521-
// IPv6). If a specific IP family is requested, the clusterIP field will be allocated from that family, if it is
3522-
// available in the cluster. If no IP family is requested, the cluster's primary IP family will be used.
3523-
// Other IP fields (loadBalancerIP, loadBalancerSourceRanges, externalIPs) and controllers which
3524-
// allocate external load-balancers should use the same IP family. Endpoints for this Service will be of
3525-
// this family. This field is immutable after creation. Assigning a ServiceIPFamily not available in the
3526-
// cluster (e.g. IPv6 in IPv4 only cluster) is an error condition and will fail during clusterIP assignment.
3520+
// ipFamily specifies whether this Service has a preference for a particular IP family (e.g.
3521+
// IPv4 vs. IPv6) when the IPv6DualStack feature gate is enabled. In a dual-stack cluster,
3522+
// you can specify ipFamily when creating a ClusterIP Service to determine whether the
3523+
// controller will allocate an IPv4 or IPv6 IP for it, and you can specify ipFamily when
3524+
// creating a headless Service to determine whether it will have IPv4 or IPv6 Endpoints. In
3525+
// either case, if you do not specify an ipFamily explicitly, it will default to the
3526+
// cluster's primary IP family.
3527+
// This field is part of an alpha feature, and you should not make any assumptions about its
3528+
// semantics other than those described above. In particular, you should not assume that it
3529+
// can (or cannot) be changed after creation time; that it can only have the values "IPv4"
3530+
// and "IPv6"; or that its current value on a given Service correctly reflects the current
3531+
// state of that Service. (For ClusterIP Services, look at clusterIP to see if the Service
3532+
// is IPv4 or IPv6. For headless Services, look at the endpoints, which may be dual-stack in
3533+
// the future. For ExternalName Services, ipFamily has no meaning, but it may be set to an
3534+
// irrelevant value anyway.)
35273535
// +optional
35283536
IPFamily *IPFamily
35293537

staging/src/k8s.io/api/core/v1/generated.proto

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

staging/src/k8s.io/api/core/v1/types.go

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3985,13 +3985,21 @@ type ServiceSpec struct {
39853985
// +optional
39863986
SessionAffinityConfig *SessionAffinityConfig `json:"sessionAffinityConfig,omitempty" protobuf:"bytes,14,opt,name=sessionAffinityConfig"`
39873987

3988-
// ipFamily specifies whether this Service has a preference for a particular IP family (e.g. IPv4 vs.
3989-
// IPv6). If a specific IP family is requested, the clusterIP field will be allocated from that family, if it is
3990-
// available in the cluster. If no IP family is requested, the cluster's primary IP family will be used.
3991-
// Other IP fields (loadBalancerIP, loadBalancerSourceRanges, externalIPs) and controllers which
3992-
// allocate external load-balancers should use the same IP family. Endpoints for this Service will be of
3993-
// this family. This field is immutable after creation. Assigning a ServiceIPFamily not available in the
3994-
// cluster (e.g. IPv6 in IPv4 only cluster) is an error condition and will fail during clusterIP assignment.
3988+
// ipFamily specifies whether this Service has a preference for a particular IP family (e.g.
3989+
// IPv4 vs. IPv6) when the IPv6DualStack feature gate is enabled. In a dual-stack cluster,
3990+
// you can specify ipFamily when creating a ClusterIP Service to determine whether the
3991+
// controller will allocate an IPv4 or IPv6 IP for it, and you can specify ipFamily when
3992+
// creating a headless Service to determine whether it will have IPv4 or IPv6 Endpoints. In
3993+
// either case, if you do not specify an ipFamily explicitly, it will default to the
3994+
// cluster's primary IP family.
3995+
// This field is part of an alpha feature, and you should not make any assumptions about its
3996+
// semantics other than those described above. In particular, you should not assume that it
3997+
// can (or cannot) be changed after creation time; that it can only have the values "IPv4"
3998+
// and "IPv6"; or that its current value on a given Service correctly reflects the current
3999+
// state of that Service. (For ClusterIP Services, look at clusterIP to see if the Service
4000+
// is IPv4 or IPv6. For headless Services, look at the endpoints, which may be dual-stack in
4001+
// the future. For ExternalName Services, ipFamily has no meaning, but it may be set to an
4002+
// irrelevant value anyway.)
39954003
// +optional
39964004
IPFamily *IPFamily `json:"ipFamily,omitempty" protobuf:"bytes,15,opt,name=ipFamily,Configcasttype=IPFamily"`
39974005

staging/src/k8s.io/api/core/v1/types_swagger_doc_generated.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)