Skip to content

Commit 2f03442

Browse files
committed
address review comments
1 parent 39cc4d4 commit 2f03442

File tree

7 files changed

+196
-68
lines changed

7 files changed

+196
-68
lines changed

api/networking/v1alpha1/virtualip_types.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
1010
)
1111

12-
// VirtualIPSpec defines the desired state of VirtualIP
12+
// VirtualIPSpec defines the desired state of a VirtualIP
1313
type VirtualIPSpec struct {
1414
// Type is the type of VirtualIP.
1515
Type VirtualIPType `json:"type"`
@@ -66,7 +66,7 @@ type VirtualIPList struct {
6666
}
6767

6868
type EphemeralVirtualIPSpec struct {
69-
// VirtualIPSpec defines the desired state of VirtualIP
69+
// VirtualIPSpec defines the desired state of a VirtualIP
7070
VirtualIPSpec `json:",inline"`
7171
// ReclaimPolicy is the ReclaimPolicyType of virtualIP
7272
ReclaimPolicy ReclaimPolicyType `json:"reclaimPolicy,omitempty"`

client-go/openapi/zz_generated.openapi.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.

docs/api-reference/networking.md

Lines changed: 84 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -979,6 +979,52 @@ VirtualIPTemplateSpec
979979
</tr>
980980
</tbody>
981981
</table>
982+
<h3 id="networking.ironcore.dev/v1alpha1.EphemeralVirtualIPSpec">EphemeralVirtualIPSpec
983+
</h3>
984+
<p>
985+
(<em>Appears on:</em><a href="#networking.ironcore.dev/v1alpha1.VirtualIPTemplateSpec">VirtualIPTemplateSpec</a>)
986+
</p>
987+
<div>
988+
</div>
989+
<table>
990+
<thead>
991+
<tr>
992+
<th>Field</th>
993+
<th>Description</th>
994+
</tr>
995+
</thead>
996+
<tbody>
997+
<tr>
998+
<td>
999+
<code>VirtualIPSpec</code><br/>
1000+
<em>
1001+
<a href="#networking.ironcore.dev/v1alpha1.VirtualIPSpec">
1002+
VirtualIPSpec
1003+
</a>
1004+
</em>
1005+
</td>
1006+
<td>
1007+
<p>
1008+
(Members of <code>VirtualIPSpec</code> are embedded into this type.)
1009+
</p>
1010+
<p>VirtualIPSpec defines the desired state of a VirtualIP</p>
1011+
</td>
1012+
</tr>
1013+
<tr>
1014+
<td>
1015+
<code>reclaimPolicy</code><br/>
1016+
<em>
1017+
<a href="#networking.ironcore.dev/v1alpha1.ReclaimPolicyType">
1018+
ReclaimPolicyType
1019+
</a>
1020+
</em>
1021+
</td>
1022+
<td>
1023+
<p>ReclaimPolicy is the ReclaimPolicyType of virtualIP</p>
1024+
</td>
1025+
</tr>
1026+
</tbody>
1027+
</table>
9821028
<h3 id="networking.ironcore.dev/v1alpha1.IPBlock">IPBlock
9831029
</h3>
9841030
<p>
@@ -2801,6 +2847,29 @@ EphemeralPrefixSource
28012847
</tr>
28022848
</tbody>
28032849
</table>
2850+
<h3 id="networking.ironcore.dev/v1alpha1.ReclaimPolicyType">ReclaimPolicyType
2851+
(<code>string</code> alias)</h3>
2852+
<p>
2853+
(<em>Appears on:</em><a href="#networking.ironcore.dev/v1alpha1.EphemeralVirtualIPSpec">EphemeralVirtualIPSpec</a>)
2854+
</p>
2855+
<div>
2856+
<p>ReclaimPolicyType is the ironcore ReclaimPolicy of a VirtualIP.</p>
2857+
</div>
2858+
<table>
2859+
<thead>
2860+
<tr>
2861+
<th>Value</th>
2862+
<th>Description</th>
2863+
</tr>
2864+
</thead>
2865+
<tbody><tr><td><p>&#34;Delete&#34;</p></td>
2866+
<td><p>ReclaimPolicyTypeDelete is used for any VirtualIP that is deleted when the claim of VirtualIP is released.</p>
2867+
</td>
2868+
</tr><tr><td><p>&#34;Retain&#34;</p></td>
2869+
<td><p>ReclaimPolicyTypeRetain is used for any VirtualIP that is retained when the claim of VirtualIP is released.</p>
2870+
</td>
2871+
</tr></tbody>
2872+
</table>
28042873
<h3 id="networking.ironcore.dev/v1alpha1.VirtualIPSource">VirtualIPSource
28052874
</h3>
28062875
<p>
@@ -2849,10 +2918,10 @@ VirtualIP.</p>
28492918
<h3 id="networking.ironcore.dev/v1alpha1.VirtualIPSpec">VirtualIPSpec
28502919
</h3>
28512920
<p>
2852-
(<em>Appears on:</em><a href="#networking.ironcore.dev/v1alpha1.VirtualIP">VirtualIP</a>, <a href="#networking.ironcore.dev/v1alpha1.VirtualIPTemplateSpec">VirtualIPTemplateSpec</a>)
2921+
(<em>Appears on:</em><a href="#networking.ironcore.dev/v1alpha1.VirtualIP">VirtualIP</a>, <a href="#networking.ironcore.dev/v1alpha1.EphemeralVirtualIPSpec">EphemeralVirtualIPSpec</a>)
28532922
</p>
28542923
<div>
2855-
<p>VirtualIPSpec defines the desired state of VirtualIP</p>
2924+
<p>VirtualIPSpec defines the desired state of a VirtualIP</p>
28562925
</div>
28572926
<table>
28582927
<thead>
@@ -2968,8 +3037,8 @@ Refer to the Kubernetes API documentation for the fields of the
29683037
<td>
29693038
<code>spec</code><br/>
29703039
<em>
2971-
<a href="#networking.ironcore.dev/v1alpha1.VirtualIPSpec">
2972-
VirtualIPSpec
3040+
<a href="#networking.ironcore.dev/v1alpha1.EphemeralVirtualIPSpec">
3041+
EphemeralVirtualIPSpec
29733042
</a>
29743043
</em>
29753044
</td>
@@ -2979,41 +3048,31 @@ VirtualIPSpec
29793048
<table>
29803049
<tr>
29813050
<td>
2982-
<code>type</code><br/>
2983-
<em>
2984-
<a href="#networking.ironcore.dev/v1alpha1.VirtualIPType">
2985-
VirtualIPType
2986-
</a>
2987-
</em>
2988-
</td>
2989-
<td>
2990-
<p>Type is the type of VirtualIP.</p>
2991-
</td>
2992-
</tr>
2993-
<tr>
2994-
<td>
2995-
<code>ipFamily</code><br/>
3051+
<code>VirtualIPSpec</code><br/>
29963052
<em>
2997-
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.27/#ipfamily-v1-core">
2998-
Kubernetes core/v1.IPFamily
3053+
<a href="#networking.ironcore.dev/v1alpha1.VirtualIPSpec">
3054+
VirtualIPSpec
29993055
</a>
30003056
</em>
30013057
</td>
30023058
<td>
3003-
<p>IPFamily is the ip family of the VirtualIP.</p>
3059+
<p>
3060+
(Members of <code>VirtualIPSpec</code> are embedded into this type.)
3061+
</p>
3062+
<p>VirtualIPSpec defines the desired state of a VirtualIP</p>
30043063
</td>
30053064
</tr>
30063065
<tr>
30073066
<td>
3008-
<code>targetRef</code><br/>
3067+
<code>reclaimPolicy</code><br/>
30093068
<em>
3010-
<a href="../common/#common.ironcore.dev/v1alpha1.LocalUIDReference">
3011-
github.com/ironcore-dev/ironcore/api/common/v1alpha1.LocalUIDReference
3069+
<a href="#networking.ironcore.dev/v1alpha1.ReclaimPolicyType">
3070+
ReclaimPolicyType
30123071
</a>
30133072
</em>
30143073
</td>
30153074
<td>
3016-
<p>TargetRef references the target for this VirtualIP (currently only NetworkInterface).</p>
3075+
<p>ReclaimPolicy is the ReclaimPolicyType of virtualIP</p>
30173076
</td>
30183077
</tr>
30193078
</table>

gen/swagger.json

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67048,6 +67048,36 @@
6704867048
}
6704967049
}
6705067050
},
67051+
"com.github.ironcore-dev.ironcore.api.networking.v1alpha1.EphemeralVirtualIPSpec": {
67052+
"type": "object",
67053+
"required": [
67054+
"type",
67055+
"ipFamily"
67056+
],
67057+
"properties": {
67058+
"ipFamily": {
67059+
"description": "IPFamily is the ip family of the VirtualIP.\n\nPossible enum values:\n - `\"\"` indicates that this IP is unknown protocol\n - `\"IPv4\"` indicates that this IP is IPv4 protocol\n - `\"IPv6\"` indicates that this IP is IPv6 protocol",
67060+
"type": "string",
67061+
"enum": [
67062+
"",
67063+
"IPv4",
67064+
"IPv6"
67065+
]
67066+
},
67067+
"reclaimPolicy": {
67068+
"description": "ReclaimPolicy is the ReclaimPolicyType of virtualIP",
67069+
"type": "string"
67070+
},
67071+
"targetRef": {
67072+
"description": "TargetRef references the target for this VirtualIP (currently only NetworkInterface).",
67073+
"$ref": "#/definitions/com.github.ironcore-dev.ironcore.api.common.v1alpha1.LocalUIDReference"
67074+
},
67075+
"type": {
67076+
"description": "Type is the type of VirtualIP.",
67077+
"type": "string"
67078+
}
67079+
}
67080+
},
6705167081
"com.github.ironcore-dev.ironcore.api.networking.v1alpha1.IPBlock": {
6705267082
"description": "IPBlock specifies an ip block with optional exceptions.",
6705367083
"type": "object",
@@ -68183,7 +68213,7 @@
6818368213
}
6818468214
},
6818568215
"com.github.ironcore-dev.ironcore.api.networking.v1alpha1.VirtualIPSpec": {
68186-
"description": "VirtualIPSpec defines the desired state of VirtualIP",
68216+
"description": "VirtualIPSpec defines the desired state of a VirtualIP",
6818768217
"type": "object",
6818868218
"required": [
6818968219
"type",
@@ -68227,7 +68257,7 @@
6822768257
"$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta"
6822868258
},
6822968259
"spec": {
68230-
"$ref": "#/definitions/com.github.ironcore-dev.ironcore.api.networking.v1alpha1.VirtualIPSpec"
68260+
"$ref": "#/definitions/com.github.ironcore-dev.ironcore.api.networking.v1alpha1.EphemeralVirtualIPSpec"
6823168261
}
6823268262
}
6823368263
},

gen/v3/apis__compute.ironcore.dev__v1alpha1_openapi.json

Lines changed: 37 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -4973,6 +4973,42 @@
49734973
}
49744974
}
49754975
},
4976+
"com.github.ironcore-dev.ironcore.api.networking.v1alpha1.EphemeralVirtualIPSpec": {
4977+
"type": "object",
4978+
"required": [
4979+
"type",
4980+
"ipFamily"
4981+
],
4982+
"properties": {
4983+
"ipFamily": {
4984+
"description": "IPFamily is the ip family of the VirtualIP.\n\nPossible enum values:\n - `\"\"` indicates that this IP is unknown protocol\n - `\"IPv4\"` indicates that this IP is IPv4 protocol\n - `\"IPv6\"` indicates that this IP is IPv6 protocol",
4985+
"type": "string",
4986+
"default": "",
4987+
"enum": [
4988+
"",
4989+
"IPv4",
4990+
"IPv6"
4991+
]
4992+
},
4993+
"reclaimPolicy": {
4994+
"description": "ReclaimPolicy is the ReclaimPolicyType of virtualIP",
4995+
"type": "string"
4996+
},
4997+
"targetRef": {
4998+
"description": "TargetRef references the target for this VirtualIP (currently only NetworkInterface).",
4999+
"allOf": [
5000+
{
5001+
"$ref": "#/components/schemas/com.github.ironcore-dev.ironcore.api.common.v1alpha1.LocalUIDReference"
5002+
}
5003+
]
5004+
},
5005+
"type": {
5006+
"description": "Type is the type of VirtualIP.",
5007+
"type": "string",
5008+
"default": ""
5009+
}
5010+
}
5011+
},
49765012
"com.github.ironcore-dev.ironcore.api.networking.v1alpha1.IPSource": {
49775013
"description": "IPSource is the definition of how to obtain an IP.",
49785014
"type": "object",
@@ -5145,39 +5181,6 @@
51455181
}
51465182
}
51475183
},
5148-
"com.github.ironcore-dev.ironcore.api.networking.v1alpha1.VirtualIPSpec": {
5149-
"description": "VirtualIPSpec defines the desired state of VirtualIP",
5150-
"type": "object",
5151-
"required": [
5152-
"type",
5153-
"ipFamily"
5154-
],
5155-
"properties": {
5156-
"ipFamily": {
5157-
"description": "IPFamily is the ip family of the VirtualIP.\n\nPossible enum values:\n - `\"\"` indicates that this IP is unknown protocol\n - `\"IPv4\"` indicates that this IP is IPv4 protocol\n - `\"IPv6\"` indicates that this IP is IPv6 protocol",
5158-
"type": "string",
5159-
"default": "",
5160-
"enum": [
5161-
"",
5162-
"IPv4",
5163-
"IPv6"
5164-
]
5165-
},
5166-
"targetRef": {
5167-
"description": "TargetRef references the target for this VirtualIP (currently only NetworkInterface).",
5168-
"allOf": [
5169-
{
5170-
"$ref": "#/components/schemas/com.github.ironcore-dev.ironcore.api.common.v1alpha1.LocalUIDReference"
5171-
}
5172-
]
5173-
},
5174-
"type": {
5175-
"description": "Type is the type of VirtualIP.",
5176-
"type": "string",
5177-
"default": ""
5178-
}
5179-
}
5180-
},
51815184
"com.github.ironcore-dev.ironcore.api.networking.v1alpha1.VirtualIPTemplateSpec": {
51825185
"description": "VirtualIPTemplateSpec is the specification of a VirtualIP template.",
51835186
"type": "object",
@@ -5194,7 +5197,7 @@
51945197
"default": {},
51955198
"allOf": [
51965199
{
5197-
"$ref": "#/components/schemas/com.github.ironcore-dev.ironcore.api.networking.v1alpha1.VirtualIPSpec"
5200+
"$ref": "#/components/schemas/com.github.ironcore-dev.ironcore.api.networking.v1alpha1.EphemeralVirtualIPSpec"
51985201
}
51995202
]
52005203
}

gen/v3/apis__networking.ironcore.dev__v1alpha1_openapi.json

Lines changed: 38 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11012,6 +11012,42 @@
1101211012
}
1101311013
}
1101411014
},
11015+
"com.github.ironcore-dev.ironcore.api.networking.v1alpha1.EphemeralVirtualIPSpec": {
11016+
"type": "object",
11017+
"required": [
11018+
"type",
11019+
"ipFamily"
11020+
],
11021+
"properties": {
11022+
"ipFamily": {
11023+
"description": "IPFamily is the ip family of the VirtualIP.\n\nPossible enum values:\n - `\"\"` indicates that this IP is unknown protocol\n - `\"IPv4\"` indicates that this IP is IPv4 protocol\n - `\"IPv6\"` indicates that this IP is IPv6 protocol",
11024+
"type": "string",
11025+
"default": "",
11026+
"enum": [
11027+
"",
11028+
"IPv4",
11029+
"IPv6"
11030+
]
11031+
},
11032+
"reclaimPolicy": {
11033+
"description": "ReclaimPolicy is the ReclaimPolicyType of virtualIP",
11034+
"type": "string"
11035+
},
11036+
"targetRef": {
11037+
"description": "TargetRef references the target for this VirtualIP (currently only NetworkInterface).",
11038+
"allOf": [
11039+
{
11040+
"$ref": "#/components/schemas/com.github.ironcore-dev.ironcore.api.common.v1alpha1.LocalUIDReference"
11041+
}
11042+
]
11043+
},
11044+
"type": {
11045+
"description": "Type is the type of VirtualIP.",
11046+
"type": "string",
11047+
"default": ""
11048+
}
11049+
}
11050+
},
1101511051
"com.github.ironcore-dev.ironcore.api.networking.v1alpha1.IPBlock": {
1101611052
"description": "IPBlock specifies an ip block with optional exceptions.",
1101711053
"type": "object",
@@ -12522,7 +12558,7 @@
1252212558
}
1252312559
},
1252412560
"com.github.ironcore-dev.ironcore.api.networking.v1alpha1.VirtualIPSpec": {
12525-
"description": "VirtualIPSpec defines the desired state of VirtualIP",
12561+
"description": "VirtualIPSpec defines the desired state of a VirtualIP",
1252612562
"type": "object",
1252712563
"required": [
1252812564
"type",
@@ -12584,7 +12620,7 @@
1258412620
"default": {},
1258512621
"allOf": [
1258612622
{
12587-
"$ref": "#/components/schemas/com.github.ironcore-dev.ironcore.api.networking.v1alpha1.VirtualIPSpec"
12623+
"$ref": "#/components/schemas/com.github.ironcore-dev.ironcore.api.networking.v1alpha1.EphemeralVirtualIPSpec"
1258812624
}
1258912625
]
1259012626
}

0 commit comments

Comments
 (0)