-
Notifications
You must be signed in to change notification settings - Fork 642
Add support for IP Family Policy and IP Families #4076
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
01913ec
8900ba8
f8d3112
0bdcb71
82a0cd6
b0c8385
6eecd0b
c39bc04
08bff2a
dbd60a1
f3784b3
1249fe7
1cec5eb
4c4ec0c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -20,8 +20,12 @@ type SchemalessObject map[string]any | |||||||||||
| // DeepCopy creates a new SchemalessObject by copying the receiver. | ||||||||||||
| func (in SchemalessObject) DeepCopy() SchemalessObject { | ||||||||||||
| return runtime.DeepCopyJSON(in) | ||||||||||||
|
|
||||||||||||
| } | ||||||||||||
|
|
||||||||||||
| // +kubebuilder:validation:Enum=IPv4;IPv6;foo | ||||||||||||
| type IPFamily string | ||||||||||||
|
|
||||||||||||
| type ServiceSpec struct { | ||||||||||||
| // +optional | ||||||||||||
| Metadata *Metadata `json:"metadata,omitempty"` | ||||||||||||
|
|
@@ -50,6 +54,9 @@ type ServiceSpec struct { | |||||||||||
| // +kubebuilder:validation:Enum=SingleStack;PreferDualStack;RequireDualStack | ||||||||||||
| IPFamilyPolicy string `json:"ipFamilyPolicy,omitempty"` | ||||||||||||
|
|
||||||||||||
| // +optional | ||||||||||||
| IPFamilies []IPFamily `json:"ipFamilies,omitempty"` | ||||||||||||
|
||||||||||||
| // +optional | |
| IPFamilies []IPFamily `json:"ipFamilies,omitempty"` | |
| // +optional | |
| // +kubebuilder:validation:items:Enum={IPv4,IPv6} | |
| IPFamilies []corev1.IPFamily `json:"ipFamilies,omitempty"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes it does - thanks - refactoring
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❓ I think we can avoid the type conversions in the controller if we use the upstream type here. Similar regarding pointer. Does this generate the same YAML?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes it does - thanks - refactoring