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

Add VLAN ID to hardware interface spec #642

Merged
merged 11 commits into from
Sep 16, 2022
Merged

Conversation

jacobweinstock
Copy link
Member

@jacobweinstock jacobweinstock commented Sep 14, 2022

Description

This adds vlan id to interfaces in the hardware spec.

FYI, hidden inside of all this generated code, linting, and dependency version updates is the reason for this PR. The small addition of vlan id to the hardware interface struct. Look here: /pkg/apis/core/v1alpha1/hardware_types.go.

Also, important to note that this PR updates the Go version from 1.17 to 1.18, this was required to get the make targets for generating code functioning properly for me.

Why is this needed

Needed to enabled trunk port support across the stack. See proposal tinkerbell/proposals#60

Fixes: #

How Has This Been Tested?

How are existing users impacted? What migration steps/scripts do we need?

Checklist:

I have:

  • updated the documentation and/or roadmap (if required)
  • added unit or e2e tests
  • provided instructions on how to upgrade

Previous version was very old, only a release candidate,
and was failing to run the `make check-generated` and
`make generated` targets on linux.

The changes to the generated files are all formatting based.
No actual or functional changes were made.

Signed-off-by: Jacob Weinstock <[email protected]>
This will help in enabling trunk vlan support
in across the Tinkerbell stack. See proposal 0030 in
https://github.com/tinkerbell/proposals

Signed-off-by: Jacob Weinstock <[email protected]>
The version was a bit out dated and was having issues with Go 1.19.
Updated and fixed all linting errors.

Signed-off-by: Jacob Weinstock <[email protected]>
Signed-off-by: Jacob Weinstock <[email protected]>
Signed-off-by: Jacob Weinstock <[email protected]>
@codecov
Copy link

codecov bot commented Sep 15, 2022

Codecov Report

Merging #642 (8ee1037) into main (eeb2a45) will decrease coverage by 0.00%.
The diff coverage is 16.66%.

❗ Current head 8ee1037 differs from pull request most recent head 8effbb8. Consider uploading reports for the commit 8effbb8 to get more accurate results

@@            Coverage Diff             @@
##             main     #642      +/-   ##
==========================================
- Coverage   45.07%   45.06%   -0.01%     
==========================================
  Files          62       62              
  Lines        3554     3557       +3     
==========================================
+ Hits         1602     1603       +1     
- Misses       1870     1872       +2     
  Partials       82       82              
Impacted Files Coverage Δ
cmd/tink-cli/cmd/delete/delete.go 85.71% <ø> (ø)
cmd/tink-cli/cmd/hardware/push.go 0.00% <0.00%> (ø)
cmd/tink-cli/cmd/template/create.go 0.00% <0.00%> (ø)
cmd/tink-cli/cmd/template/update.go 0.00% <0.00%> (ø)
cmd/tink-worker/worker/worker.go 0.00% <0.00%> (ø)
db/workflow.go 32.69% <0.00%> (ø)
pkg/apis/core/v1alpha1/hardware_types.go 100.00% <ø> (ø)
pkg/apis/core/v1alpha1/workflow_data_types.go 100.00% <ø> (ø)
server/dbserver_hardware.go 2.45% <0.00%> (ø)
server/dbserver_template.go 37.27% <0.00%> (ø)
... and 5 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Signed-off-by: Jacob Weinstock <[email protected]>
Signed-off-by: Jacob Weinstock <[email protected]>
Signed-off-by: Jacob Weinstock <[email protected]>
@jacobweinstock jacobweinstock added the kind/feature Categorizes issue or PR as related to a new feature. label Sep 15, 2022
This allows a default value of "" to be used
instead of 0 when the VLANID type is int. As 0
is a valid vlan id, we dont want that to be the default
as it would make it impossible for the VLANID to be "unset"
and therefore not added to DHCP requests, etc.

Signed-off-by: Jacob Weinstock <[email protected]>
@jacobweinstock jacobweinstock added the ready-to-merge Signal to Mergify to merge the PR. label Sep 16, 2022
@mergify mergify bot merged commit e3975fb into tinkerbell:main Sep 16, 2022
@jacobweinstock jacobweinstock deleted the vlan branch September 16, 2022 17:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. ready-to-merge Signal to Mergify to merge the PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants