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