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

WIP: Builtin workflow features #1000

Draft
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

jacobweinstock
Copy link
Member

@jacobweinstock jacobweinstock commented Sep 19, 2024

Description

This is still a work in progress. This adds the fields in the Workflow spec to trigger handling of setting hardware allowPxe field and getting machines into a netbooting state.

Current Workflow spec:

apiVersion: tinkerbell.org/v1alpha1
kind: Workflow
metadata:
  name: example1
  namespace: tink-system
spec:
  hardwareMap:
    device_1: 01:02:03:04:05:06
  templateRef: myTemplate
  hardwareRef: example1

New Workflow spec:

apiVersion: tinkerbell.org/v1alpha1
kind: Workflow
metadata:
  name: example1
  namespace: tink-system
spec:
  hardwareMap:
    device_1: 01:02:03:04:05:06
  templateRef: myTemplate
  hardwareRef: example1
  bootOpts:
    toggleAllowNetboot: true
    oneTimeNetboot: true

Why is this needed

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

Add spec field and functionality for
setting the allowPXE field in hardware.

Add spec field and functionality for
creating a job.bmc.tinkerbell.org object to
get the Hardware into a netboot state.

Signed-off-by: Jacob Weinstock <[email protected]>
Use status' to make sure creation and
deletion work properly.

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

codecov bot commented Sep 19, 2024

Codecov Report

Attention: Patch coverage is 43.53741% with 83 lines in your changes missing coverage. Please review.

Project coverage is 28.86%. Comparing base (9631f39) to head (6bea9cc).

Files with missing lines Patch % Lines
internal/deprecated/workflow/reconciler.go 52.06% 51 Missing and 7 partials ⚠️
api/v1alpha1/workflow_types.go 0.00% 4 Missing ⚠️
internal/server/kubernetes_api_workflow.go 0.00% 4 Missing ⚠️
cmd/tink-controller-v1alpha2/main.go 0.00% 3 Missing ⚠️
cmd/tink-controller/main.go 0.00% 3 Missing ⚠️
cmd/tink-server/main.go 0.00% 3 Missing ⚠️
cmd/tink-worker/cmd/root.go 0.00% 2 Missing ⚠️
cmd/virtual-worker/cmd/root.go 0.00% 2 Missing ⚠️
internal/cli/agent.go 0.00% 2 Missing ⚠️
cmd/virtual-worker/worker/container_manager.go 0.00% 1 Missing ⚠️
... and 1 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1000      +/-   ##
==========================================
+ Coverage   28.04%   28.86%   +0.81%     
==========================================
  Files          70       70              
  Lines        3484     3607     +123     
==========================================
+ Hits          977     1041      +64     
- Misses       2445     2497      +52     
- Partials       62       69       +7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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

related to tinkerbell/roadmap#33

Add tests for handleOneTimeNetboot and handleHardwareAllowPXE.

Signed-off-by: Jacob Weinstock <[email protected]>
Hopefully improved the understandability
of the field some.

Signed-off-by: Jacob Weinstock <[email protected]>
Update rbac.

Signed-off-by: Jacob Weinstock <[email protected]>
Upgrades and removed unused dep.

Signed-off-by: Jacob Weinstock <[email protected]>
Signed-off-by: Jacob Weinstock <[email protected]>
Pin apk packages in all Dockerfiles.

Signed-off-by: Jacob Weinstock <[email protected]>
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.

1 participant