Skip to content

Commit 44eb577

Browse files
authored
Merge pull request #104 from MrFreezeex/add-ipfamily
apis: add ipFamilies field
2 parents b2223d7 + 9022f1b commit 44eb577

File tree

3 files changed

+18
-0
lines changed

3 files changed

+18
-0
lines changed

config/crd/multicluster.x-k8s.io_serviceimports.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,15 @@ spec:
7272
- ports
7373
- type
7474
properties:
75+
ipFamilies:
76+
description: IPFamilies identifies all the IPFamilies assigned for this ServiceImport.
77+
type: array
78+
maxItems: 2
79+
items:
80+
description: |-
81+
IPFamily represents the IP Family (IPv4 or IPv6). This type is used
82+
to express the family of an IP expressed by a type (e.g. service.spec.ipFamilies).
83+
type: string
7584
ips:
7685
description: ip will be used as the VIP for this service when type is ClusterSetIP.
7786
type: array

pkg/apis/v1alpha1/serviceimport.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,10 @@ type ServiceImportSpec struct {
8484
// sessionAffinityConfig contains session affinity configuration.
8585
// +optional
8686
SessionAffinityConfig *v1.SessionAffinityConfig `json:"sessionAffinityConfig,omitempty"`
87+
// IPFamilies identifies all the IPFamilies assigned for this ServiceImport.
88+
// +kubebuilder:validation:MaxItems:=2
89+
// +optional
90+
IPFamilies []v1.IPFamily `json:"ipFamilies,omitempty"`
8791
}
8892

8993
// ServicePort represents the port on which the service is exposed

pkg/apis/v1alpha1/zz_generated.deepcopy.go

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

0 commit comments

Comments
 (0)