Skip to content
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

Network interface provider ID binding #823

Merged
merged 1 commit into from
Aug 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions api/networking/v1alpha1/networkinterface_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ import (

// NetworkInterfaceSpec defines the desired state of NetworkInterface
type NetworkInterfaceSpec struct {
// ProviderID is the provider-internal ID of the network interface.
ProviderID string `json:"providerID,omitempty"`
// NetworkRef is the Network this NetworkInterface is connected to
NetworkRef corev1.LocalObjectReference `json:"networkRef"`
// MachineRef is the Machine this NetworkInterface is used by
Expand Down Expand Up @@ -71,8 +73,6 @@ type NetworkInterfaceStatus struct {
// LastStateTransitionTime is the last time the State transitioned from one value to another.
LastStateTransitionTime *metav1.Time `json:"lastStateTransitionTime,omitempty"`

// ProviderID is the provider-internal ID of the network interface.
ProviderID string `json:"providerID,omitempty"`
// IPs represent the effective IP addresses of the NetworkInterface.
IPs []commonv1alpha1.IP `json:"ips,omitempty"`
// Prefixes represent the prefixes routed to the NetworkInterface.
Expand Down
6 changes: 3 additions & 3 deletions client-go/applyconfigurations/internal/internal.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.

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

14 changes: 7 additions & 7 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.

36 changes: 4 additions & 32 deletions config/apiserver/rbac/machinepool_role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -109,37 +109,15 @@ rules:
- get
- list
- watch
- apiGroups:
- networking.api.onmetal.de
resources:
- loadbalancerroutings
verbs:
- get
- list
- watch
- apiGroups:
- networking.api.onmetal.de
resources:
- loadbalancers
verbs:
- get
- list
- watch
- apiGroups:
- networking.api.onmetal.de
resources:
- natgateways
verbs:
- get
- list
- watch
- apiGroups:
- networking.api.onmetal.de
resources:
- networkinterfaces
verbs:
- get
- list
- patch
- update
- watch
- apiGroups:
- networking.api.onmetal.de
Expand All @@ -149,19 +127,13 @@ rules:
- get
- list
- watch
- apiGroups:
- networking.api.onmetal.de
resources:
- virtualips
verbs:
- get
- list
- watch
- apiGroups:
- storage.api.onmetal.de
resources:
- volumes
verbs:
- get
- list
- patch
- update
- watch
36 changes: 4 additions & 32 deletions config/machinepoollet-broker/poollet-rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -109,37 +109,15 @@ rules:
- get
- list
- watch
- apiGroups:
- networking.api.onmetal.de
resources:
- loadbalancerroutings
verbs:
- get
- list
- watch
- apiGroups:
- networking.api.onmetal.de
resources:
- loadbalancers
verbs:
- get
- list
- watch
- apiGroups:
- networking.api.onmetal.de
resources:
- natgateways
verbs:
- get
- list
- watch
- apiGroups:
- networking.api.onmetal.de
resources:
- networkinterfaces
verbs:
- get
- list
- patch
- update
- watch
- apiGroups:
- networking.api.onmetal.de
Expand All @@ -149,19 +127,13 @@ rules:
- get
- list
- watch
- apiGroups:
- networking.api.onmetal.de
resources:
- virtualips
verbs:
- get
- list
- watch
- apiGroups:
- storage.api.onmetal.de
resources:
- volumes
verbs:
- get
- list
- patch
- update
- watch
4 changes: 4 additions & 0 deletions docs/api-reference/compute.md
Original file line number Diff line number Diff line change
Expand Up @@ -960,7 +960,9 @@ MachinePoolDaemonEndpoints
<td>
<code>capacity</code><br/>
<em>
<a href="../core/#core.api.onmetal.de/v1alpha1.ResourceList">
github.com/onmetal/onmetal-api/api/core/v1alpha1.ResourceList
</a>
</em>
</td>
<td>
Expand All @@ -971,7 +973,9 @@ github.com/onmetal/onmetal-api/api/core/v1alpha1.ResourceList
<td>
<code>allocatable</code><br/>
<em>
<a href="../core/#core.api.onmetal.de/v1alpha1.ResourceList">
github.com/onmetal/onmetal-api/api/core/v1alpha1.ResourceList
</a>
</em>
</td>
<td>
Expand Down
15 changes: 15 additions & 0 deletions docs/api-reference/core.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,21 @@ ResourceQuotaStatus
</tr>
</tbody>
</table>
<h3 id="core.api.onmetal.de/v1alpha1.ClassType">ClassType
(<code>string</code> alias)</h3>
<div>
</div>
<table>
<thead>
<tr>
<th>Value</th>
<th>Description</th>
</tr>
</thead>
<tbody><tr><td><p>&#34;machine&#34;</p></td>
<td></td>
</tr></tbody>
</table>
<h3 id="core.api.onmetal.de/v1alpha1.ObjectSelector">ObjectSelector
</h3>
<div>
Expand Down
44 changes: 33 additions & 11 deletions docs/api-reference/networking.md
Original file line number Diff line number Diff line change
Expand Up @@ -546,6 +546,17 @@ NetworkInterfaceSpec
<table>
<tr>
<td>
<code>providerID</code><br/>
<em>
string
</em>
</td>
<td>
<p>ProviderID is the provider-internal ID of the network interface.</p>
</td>
</tr>
<tr>
<td>
<code>networkRef</code><br/>
<em>
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.27/#localobjectreference-v1-core">
Expand Down Expand Up @@ -1486,6 +1497,17 @@ Has to be a power of 2. If empty, 2048 (DefaultPortsPerNetworkInterface) is the
<tbody>
<tr>
<td>
<code>providerID</code><br/>
<em>
string
</em>
</td>
<td>
<p>ProviderID is the provider-internal ID of the network interface.</p>
</td>
</tr>
<tr>
<td>
<code>networkRef</code><br/>
<em>
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.27/#localobjectreference-v1-core">
Expand Down Expand Up @@ -1636,17 +1658,6 @@ Kubernetes meta/v1.Time
</tr>
<tr>
<td>
<code>providerID</code><br/>
<em>
string
</em>
</td>
<td>
<p>ProviderID is the provider-internal ID of the network interface.</p>
</td>
</tr>
<tr>
<td>
<code>ips</code><br/>
<em>
<a href="../common/#common.api.onmetal.de/v1alpha1.IP">
Expand Down Expand Up @@ -1728,6 +1739,17 @@ NetworkInterfaceSpec
<table>
<tr>
<td>
<code>providerID</code><br/>
<em>
string
</em>
</td>
<td>
<p>ProviderID is the provider-internal ID of the network interface.</p>
</td>
</tr>
<tr>
<td>
<code>networkRef</code><br/>
<em>
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.27/#localobjectreference-v1-core">
Expand Down
8 changes: 4 additions & 4 deletions gen/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -88001,6 +88001,10 @@
"$ref": "#/definitions/com.github.onmetal.onmetal-api.api.networking.v1alpha1.PrefixSource"
}
},
"providerID": {
"description": "ProviderID is the provider-internal ID of the network interface.",
"type": "string"
},
"virtualIP": {
"description": "VirtualIP specifies the virtual ip that should be assigned to this NetworkInterface.",
"$ref": "#/definitions/com.github.onmetal.onmetal-api.api.networking.v1alpha1.VirtualIPSource"
Expand Down Expand Up @@ -88029,10 +88033,6 @@
"$ref": "#/definitions/com.github.onmetal.onmetal-api.api.common.v1alpha1.IPPrefix"
}
},
"providerID": {
"description": "ProviderID is the provider-internal ID of the network interface.",
"type": "string"
},
"state": {
"description": "State is the NetworkInterfaceState of the NetworkInterface.",
"type": "string"
Expand Down
Loading