-
Notifications
You must be signed in to change notification settings - Fork 1
Network Virtualization Endpoints (NVEs) #123
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
Open
nikatza
wants to merge
4
commits into
main
Choose a base branch
from
feat/vteps
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
6291bf4
Sort device port speeds and correctly calculate GBs on Cisco NX-OS (#…
felix-kaestner e7ff266
Bump go dependencies
nikatza 88865f8
feat: Network Virtualization Endpoints (NVEs)
nikatza ee9ef65
Fix govet lint error: shadowing declaration
nikatza File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,84 @@ | ||
| // SPDX-FileCopyrightText: 2025 SAP SE or an SAP affiliate company and IronCore contributors | ||
| // SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| package v1alpha1 | ||
|
|
||
| import ( | ||
| metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | ||
|
|
||
| v1alpha1 "github.com/ironcore-dev/network-operator/api/core/v1alpha1" | ||
| ) | ||
|
|
||
| // +kubebuilder:rbac:groups=nx.cisco.networking.metal.ironcore.dev,resources=nveconfigs,verbs=get;list;watch | ||
|
|
||
| // NVEConfig defines the Cisco-specific configuration of a Network Virtualization Object | ||
| type NVEConfigSpec struct { | ||
| // AdvertiseVirtualMAC controls if the NVE should advertise a virtual MAC address | ||
| // +optional | ||
| // +kubebuilder:default=false | ||
| AdvertiseVirtualMAC bool `json:"advertiseVirtualMAC,omitempty"` | ||
|
|
||
| // HoldDownTime defines the duration for which the switch suppresses the advertisement of the NVE loopback address. | ||
| // +optional | ||
| // +kubebuilder:validation:Minimum=1 | ||
| // +kubebuilder:validation:Maximum=1500 | ||
| // +kubebuilder:default=180 | ||
| HoldDownTime uint16 `json:"holdDownTime,omitempty"` | ||
|
|
||
| // InfraVLANs specifies VLANs used by all SVI interfaces for uplink and vPC peer-links in VXLAN as infra-VLANs. | ||
| // The total number of VLANs configured must not exceed 512. | ||
| // Elements in the list must not overlap with each other. | ||
| // +optional | ||
| // +kubebuilder:validation:MaxItems=10 | ||
| InfraVLANs []VLANListItem `json:"infraVLANs,omitempty"` | ||
| } | ||
|
|
||
| // VLANListItem represents a single VLAN ID or a range start-end. If ID is set, rangeMin and rangeMax must be absent. If ID is absent, both rangeMin | ||
| // and rangeMax must be set. | ||
| // +kubebuilder:validation:XValidation:rule="!has(self.rangeMax) || self.rangeMax > self.rangeMin",message="rangeMax must be greater than rangeMin" | ||
| // +kubebuilder:validation:XValidation:rule="has(self.id) || (has(self.rangeMin) && has(self.rangeMax))",message="either ID or both rangeMin and rangeMax must be set" | ||
| // +kubebuilder:validation:XValidation:rule="!has(self.id) || (!has(self.rangeMin) && !has(self.rangeMax))",message="rangeMin and rangeMax must be omitted when ID is set" | ||
| type VLANListItem struct { | ||
| // +optional | ||
| // +kubebuilder:validation:Minimum=1 | ||
| // +kubebuilder:validation:Maximum=3967 | ||
| ID uint16 `json:"id,omitempty"` | ||
| // +optional | ||
| // +kubebuilder:validation:Minimum=1 | ||
| // +kubebuilder:validation:Maximum=3967 | ||
| RangeMin uint16 `json:"rangeMin,omitempty"` | ||
| // +optional | ||
| // +kubebuilder:validation:Minimum=1 | ||
| // +kubebuilder:validation:Maximum=3967 | ||
| RangeMax uint16 `json:"rangeMax,omitempty"` | ||
| } | ||
|
|
||
| // +kubebuilder:object:root=true | ||
| // +kubebuilder:resource:path=nveconfigs | ||
| // +kubebuilder:resource:singular=nveconfig | ||
|
|
||
| // NVEConfig is the Schema for the NVE API | ||
| type NVEConfig struct { | ||
| metav1.TypeMeta `json:",inline"` | ||
| metav1.ObjectMeta `json:"metadata,omitempty,omitzero"` | ||
|
|
||
| // spec defines the desired state of NVE | ||
| // +required | ||
| Spec NVEConfigSpec `json:"spec"` | ||
| } | ||
|
|
||
| // +kubebuilder:object:root=true | ||
|
|
||
| // NVEList contains a list of NVE | ||
| type NVEConfigList struct { | ||
| metav1.TypeMeta `json:",inline"` | ||
| metav1.ListMeta `json:"metadata,omitempty"` | ||
| Items []NVEConfig `json:"items"` | ||
| } | ||
|
|
||
| // init registers the NVEConfig type with the core v1alpha1 scheme and sets | ||
| // itself as a dependency for the NVE core type. | ||
| func init() { | ||
| v1alpha1.RegisterNVEDependency(GroupVersion.WithKind("NVEConfig")) | ||
| SchemeBuilder.Register(&NVEConfig{}, &NVEConfigList{}) | ||
| } | ||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.