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

feat: Provisioning for fw binaries #60

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

almaslennikov
Copy link
Collaborator

@almaslennikov almaslennikov commented Jan 17, 2025

Introduced two new CRDs: NicFirmwareSource and NicFirmwareTemplate
New controller reconciling NicFirmwareSources
firmware package with logic for provisioning firmware files on a shared storage
unit tests
change docker base image for operator to rhel to install mstflint

TBD in separate PRs:

  • support for storage classes
  • support for finalizers for NicFirmwareSource CRD

Signed-off-by: Alexander Maslennikov <amaslennikov@nvidia.com>
pkg/firmware/utils.go Fixed Show fixed Hide fixed
@coveralls
Copy link

coveralls commented Jan 17, 2025

Pull Request Test Coverage Report for Build 12869702495

Details

  • 525 of 832 (63.1%) changed or added relevant lines in 9 files are covered.
  • 2 unchanged lines in 1 file lost coverage.
  • Overall coverage increased (+0.8%) to 59.87%

Changes Missing Coverage Covered Lines Changed/Added Lines %
cmd/manager/main.go 0 8 0.0%
internal/controller/nicfirmwaresource_controller.go 60 79 75.95%
pkg/firmware/mocks/FirmwareProvisioner.go 54 74 72.97%
pkg/firmware/mocks/ProvisioningUtils.go 58 79 73.42%
pkg/firmware/utils.go 100 147 68.03%
pkg/firmware/provisioning.go 195 271 71.96%
api/v1alpha1/zz_generated.deepcopy.go 52 168 30.95%
Files with Coverage Reduction New Missed Lines %
internal/controller/nicdevice_controller.go 2 76.58%
Totals Coverage Status
Change from base Build 12667683634: 0.8%
Covered Lines: 2402
Relevant Lines: 4012

💛 - Coveralls

pkg/firmware/utils.go Fixed Show fixed Hide fixed
pkg/firmware/utils.go Dismissed Show dismissed Hide dismissed
@almaslennikov almaslennikov force-pushed the fw-provisioning branch 4 times, most recently from ce47fcc to aa7dc94 Compare January 20, 2025 14:03
Introduced two new CRDs: NicFirmwareSource and NicFirmwareTemplate
New controller reconciling NicFirmwareSources
firmware package with logic for provisioning firmware files on a shared storage
unit tests

Signed-off-by: Alexander Maslennikov <amaslennikov@nvidia.com>
// NicFirmwareSourceSpec represents a list of url sources for FW
type NicFirmwareSourceSpec struct {
// BinUrlSource represents a list of url sources for FW
BinUrlSource []string `json:"binUrlSource"`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the meaning of the bin prefix? Is it needed?
Also should we have plural? binUrlSources

mountPath: /nic-firmware
readOnly: false
# TODO change to user-specified storage class
volumes:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to make sure I understand, eventually we use a PVC with shared storage (ReadWriteMany)?
Where the PVC name will be configured?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants