Skip to content

Commit

Permalink
Remove IPs and VirtualIPs from Machine NIC status (#1201)
Browse files Browse the repository at this point in the history
Remove unused status fields in `.status.networkinterfaces[*].{ips,virtualips}` of the `Machine` type.
  • Loading branch information
afritzler authored Dec 18, 2024
1 parent b8f5701 commit e65034f
Show file tree
Hide file tree
Showing 18 changed files with 3,702 additions and 1,307 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ jobs:
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: v1.61
version: v1.62
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -365,8 +365,8 @@ GEN_CRD_API_REFERENCE_DOCS_VERSION ?= v0.3.0
ADDLICENSE_VERSION ?= v1.1.1
PROTOC_GEN_GOGO_VERSION ?= v1.3.2
GOIMPORTS_VERSION ?= v0.26.0
GOLANGCI_LINT_VERSION ?= v1.61.0
OPENAPI_EXTRACTOR_VERSION ?= v0.1.4
GOLANGCI_LINT_VERSION ?= v1.62.2
OPENAPI_EXTRACTOR_VERSION ?= v0.1.9

KUSTOMIZE_INSTALL_SCRIPT ?= "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh"
.PHONY: kustomize
Expand Down
4 changes: 0 additions & 4 deletions api/compute/v1alpha1/machine_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,6 @@ type NetworkInterfaceStatus struct {
Name string `json:"name"`
// Handle is the MachinePool internal handle of the NetworkInterface.
Handle string `json:"handle,omitempty"`
// IPs are the ips allocated for the network interface.
IPs []commonv1alpha1.IP `json:"ips,omitempty"`
// VirtualIP is the virtual ip allocated for the network interface.
VirtualIP *commonv1alpha1.IP `json:"virtualIP,omitempty"`
// State represents the attachment state of a NetworkInterface.
State NetworkInterfaceState `json:"state,omitempty"`
// networkInterfaceRef is the reference to the networkinterface attached to the machine
Expand Down
11 changes: 0 additions & 11 deletions api/compute/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 0 additions & 9 deletions client-go/applyconfigurations/internal/internal.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions client-go/openapi/api_violations.report
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ API rule violation: list_type_missing,github.com/ironcore-dev/ironcore/api/compu
API rule violation: list_type_missing,github.com/ironcore-dev/ironcore/api/compute/v1alpha1,MachineSpec,Volumes
API rule violation: list_type_missing,github.com/ironcore-dev/ironcore/api/compute/v1alpha1,MachineStatus,NetworkInterfaces
API rule violation: list_type_missing,github.com/ironcore-dev/ironcore/api/compute/v1alpha1,MachineStatus,Volumes
API rule violation: list_type_missing,github.com/ironcore-dev/ironcore/api/compute/v1alpha1,NetworkInterfaceStatus,IPs
API rule violation: list_type_missing,github.com/ironcore-dev/ironcore/api/core/v1alpha1,ResourceScopeSelector,MatchExpressions
API rule violation: list_type_missing,github.com/ironcore-dev/ironcore/api/core/v1alpha1,ResourceScopeSelectorRequirement,Values
API rule violation: list_type_missing,github.com/ironcore-dev/ironcore/api/ipam/v1alpha1,PrefixStatus,Used
Expand Down Expand Up @@ -47,7 +46,6 @@ API rule violation: list_type_missing,github.com/ironcore-dev/ironcore/api/stora
API rule violation: list_type_missing,github.com/ironcore-dev/ironcore/api/storage/v1alpha1,VolumeSpec,Tolerations
API rule violation: list_type_missing,github.com/ironcore-dev/ironcore/api/storage/v1alpha1,VolumeStatus,Conditions
API rule violation: names_match,github.com/ironcore-dev/ironcore/api/compute/v1alpha1,MachineSpec,ImagePullSecretRef
API rule violation: names_match,github.com/ironcore-dev/ironcore/api/compute/v1alpha1,NetworkInterfaceStatus,IPs
API rule violation: names_match,github.com/ironcore-dev/ironcore/api/networking/v1alpha1,LoadBalancerSpec,IPs
API rule violation: names_match,github.com/ironcore-dev/ironcore/api/networking/v1alpha1,LoadBalancerStatus,IPs
API rule violation: names_match,github.com/ironcore-dev/ironcore/api/networking/v1alpha1,NATGatewayStatus,IPs
Expand Down
21 changes: 1 addition & 20 deletions client-go/openapi/zz_generated.openapi.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

42 changes: 21 additions & 21 deletions docs/api-reference/compute.md
Original file line number Diff line number Diff line change
Expand Up @@ -1414,41 +1414,28 @@ string
</tr>
<tr>
<td>
<code>ips</code><br/>
<em>
<a href="../common/#common.ironcore.dev/v1alpha1.IP">
[]github.com/ironcore-dev/ironcore/api/common/v1alpha1.IP
</a>
</em>
</td>
<td>
<p>IPs are the ips allocated for the network interface.</p>
</td>
</tr>
<tr>
<td>
<code>virtualIP</code><br/>
<code>state</code><br/>
<em>
<a href="../common/#common.ironcore.dev/v1alpha1.IP">
github.com/ironcore-dev/ironcore/api/common/v1alpha1.IP
<a href="#compute.ironcore.dev/v1alpha1.NetworkInterfaceState">
NetworkInterfaceState
</a>
</em>
</td>
<td>
<p>VirtualIP is the virtual ip allocated for the network interface.</p>
<p>State represents the attachment state of a NetworkInterface.</p>
</td>
</tr>
<tr>
<td>
<code>state</code><br/>
<code>networkInterfaceRef</code><br/>
<em>
<a href="#compute.ironcore.dev/v1alpha1.NetworkInterfaceState">
NetworkInterfaceState
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.27/#localobjectreference-v1-core">
Kubernetes core/v1.LocalObjectReference
</a>
</em>
</td>
<td>
<p>State represents the attachment state of a NetworkInterface.</p>
<p>networkInterfaceRef is the reference to the networkinterface attached to the machine</p>
</td>
</tr>
<tr>
Expand Down Expand Up @@ -1692,6 +1679,19 @@ Kubernetes meta/v1.Time
<p>LastStateTransitionTime is the last time the State transitioned.</p>
</td>
</tr>
<tr>
<td>
<code>volumeRef</code><br/>
<em>
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.27/#localobjectreference-v1-core">
Kubernetes core/v1.LocalObjectReference
</a>
</em>
</td>
<td>
<p>VolumeRef reference to the claimed Volume</p>
</td>
</tr>
</tbody>
</table>
<hr/>
Expand Down
Loading

0 comments on commit e65034f

Please sign in to comment.