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

Implement provider options #154

Merged

Conversation

jacobweinstock
Copy link
Member

@jacobweinstock jacobweinstock commented Sep 19, 2023

Description

This implements the provider options now available in the connection crd for machine and task controllers. Also, updated dependencies for controller-runtime and kubernetes client libraries.

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

Moving the provider options under connection
allows the options to be available to both the
machine and task controllers.

Signed-off-by: Jacob Weinstock <jakobweinstock@gmail.com>
@codecov
Copy link

codecov bot commented Sep 19, 2023

Codecov Report

Merging #154 (4023da7) into main (a9b033b) will increase coverage by 1.35%.
Report is 10 commits behind head on main.
The diff coverage is 67.66%.

❗ Current head 4023da7 differs from pull request most recent head a5ed4b5. Consider uploading reports for the commit a5ed4b5 to get more accurate results

@@            Coverage Diff             @@
##             main     #154      +/-   ##
==========================================
+ Coverage   61.82%   63.17%   +1.35%     
==========================================
  Files           4        5       +1     
  Lines         351      478     +127     
==========================================
+ Hits          217      302      +85     
- Misses        100      137      +37     
- Partials       34       39       +5     
Files Coverage Δ
controller/job.go 53.96% <ø> (ø)
controller/kube.go 95.65% <95.65%> (ø)
controller/task.go 67.93% <87.50%> (ø)
controller/machine.go 78.88% <88.88%> (ø)
controller/client.go 48.14% <48.14%> (ø)

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

This is optional as it is not required
when using the RPC provider.

Signed-off-by: Jacob Weinstock <jakobweinstock@gmail.com>
This makes the provider opts in the CRD operational
via the bmclib client.

Rename pkg; controllers -> controller: this is the
preferred practive in Go.

Added a requeue interval.

Signed-off-by: Jacob Weinstock <jakobweinstock@gmail.com>
Implements provider options defined in
the connection of a task CR.

Signed-off-by: Jacob Weinstock <jakobweinstock@gmail.com>
controller-gen doesn't format the
imports like goimports does so the CI
run of goimports will fail. This provides
a make goal to run the go fmt and goimports.

Signed-off-by: Jacob Weinstock <jakobweinstock@gmail.com>
This will exercise the provider option logic.

Signed-off-by: Jacob Weinstock <jakobweinstock@gmail.com>
Signed-off-by: Jacob Weinstock <jakobweinstock@gmail.com>
Signed-off-by: Jacob Weinstock <jakobweinstock@gmail.com>
Signed-off-by: Jacob Weinstock <jakobweinstock@gmail.com>
Signed-off-by: Jacob Weinstock <jakobweinstock@gmail.com>
Signed-off-by: Jacob Weinstock <jakobweinstock@gmail.com>
main.go Outdated Show resolved Hide resolved
@jacobweinstock jacobweinstock marked this pull request as ready for review September 20, 2023 17:41
controller/machine.go Outdated Show resolved Hide resolved
controller/machine.go Outdated Show resolved Hide resolved
main.go Outdated Show resolved Hide resolved
Signed-off-by: Jacob Weinstock <jakobweinstock@gmail.com>
Signed-off-by: Jacob Weinstock <jakobweinstock@gmail.com>
This allows for the fields to not be
included when nil is various applications.

Signed-off-by: Jacob Weinstock <jakobweinstock@gmail.com>
Signed-off-by: Jacob Weinstock <jakobweinstock@gmail.com>
@jacobweinstock jacobweinstock added the ready-to-merge Mergify: Ready for Merging label Sep 29, 2023
Signed-off-by: Jacob Weinstock <jakobweinstock@gmail.com>
@jacobweinstock
Copy link
Member Author

@Mergifyio queue

@mergify
Copy link
Contributor

mergify bot commented Sep 29, 2023

queue

🛑 The pull request has been removed from the queue default

The pull request can't be updated.

You can take a look at Queue: Embarked in merge queue check runs for more details.

In case of a failure due to a flaky test, you should first retrigger the CI.
Then, re-embark the pull request into the merge queue by posting the comment
@mergifyio refresh on the pull request.

@jacobweinstock
Copy link
Member Author

@Mergifyio refresh

@mergify
Copy link
Contributor

mergify bot commented Sep 29, 2023

refresh

✅ Pull request refreshed

@jacobweinstock
Copy link
Member Author

@Mergifyio queue

@mergify
Copy link
Contributor

mergify bot commented Sep 29, 2023

queue

🛑 The pull request has been removed from the queue default

The pull request can't be updated.

You can take a look at Queue: Embarked in merge queue check runs for more details.

In case of a failure due to a flaky test, you should first retrigger the CI.
Then, re-embark the pull request into the merge queue by posting the comment
@mergifyio refresh on the pull request.

@jacobweinstock
Copy link
Member Author

@Mergifyio refresh

@mergify
Copy link
Contributor

mergify bot commented Sep 29, 2023

refresh

✅ Pull request refreshed

@jacobweinstock
Copy link
Member Author

@Mergifyio unqueue

@mergify
Copy link
Contributor

mergify bot commented Sep 29, 2023

unqueue

☑️ The pull request is not queued

@jacobweinstock
Copy link
Member Author

@Mergifyio queue

@mergify
Copy link
Contributor

mergify bot commented Sep 29, 2023

queue

🛑 The pull request has been removed from the queue default

The pull request can't be updated.

You can take a look at Queue: Embarked in merge queue check runs for more details.

In case of a failure due to a flaky test, you should first retrigger the CI.
Then, re-embark the pull request into the merge queue by posting the comment
@mergifyio refresh on the pull request.

@jacobweinstock jacobweinstock merged commit 8cfe37e into tinkerbell:main Sep 29, 2023
5 of 6 checks passed
@jacobweinstock jacobweinstock deleted the provider-opts-implementation branch September 29, 2023 17:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-merge Mergify: Ready for Merging
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants