Skip to content

Commit faff3c5

Browse files
authored
Merge pull request kubernetes#91527 from danwinship/ipfamily-api-docs
api: update Service.Spec.IPFamily docs
2 parents 8ec5747 + 9b3a4bb commit faff3c5

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
@@ -3524,13 +3524,21 @@ type ServiceSpec struct {
35243524
// +optional
35253525
PublishNotReadyAddresses bool
35263526

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

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
@@ -3993,13 +3993,21 @@ type ServiceSpec struct {
39933993
// +optional
39943994
SessionAffinityConfig *SessionAffinityConfig `json:"sessionAffinityConfig,omitempty" protobuf:"bytes,14,opt,name=sessionAffinityConfig"`
39953995

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.)
40034011
// +optional
40044012
IPFamily *IPFamily `json:"ipFamily,omitempty" protobuf:"bytes,15,opt,name=ipFamily,Configcasttype=IPFamily"`
40054013

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)