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 setting webhook data via env and cli flags: #5992

Closed
wants to merge 3 commits into from

Conversation

jacobweinstock
Copy link
Member

This enables the use of the Rufio webhook provider. The webhook provider needs a secret and a URL defined. All BMC machines will use this one secret.

As part of enabling the webhook secret to be captured by the CLI as an environment variable, all CLI flags are now accessible as env vars. The env var for each flag is the flag name but in all uppercase and the dash "-" symbol converted to an underscore "_".

Issue #, if available:

Description of changes:

Testing (if applicable):

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

This enables the use of the Rufio webhook provider.
The webhook provider needs a secret and a URL defined.
All BMC machines will use this one secret.

As part of enabling the webhook secret to be captured
by the CLI as an environment variable, all CLI flags are
now accessible as env vars. The env var for each flag is
the flag name but in all uppercase and the dash "-" symbol
converted to an underscore "_".

Signed-off-by: Jacob Weinstock <jakobweinstock@gmail.com>
@eks-distro-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from jacobweinstock by writing /assign @jacobweinstock in a comment. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@eks-distro-bot
Copy link
Collaborator

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@eks-distro-bot eks-distro-bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jun 6, 2023
@codecov
Copy link

codecov bot commented Jun 6, 2023

Codecov Report

Merging #5992 (58ef431) into main (9f2501b) will decrease coverage by 0.03%.
Report is 183 commits behind head on main.
The diff coverage is 63.07%.

@@            Coverage Diff             @@
##             main    #5992      +/-   ##
==========================================
- Coverage   73.64%   73.61%   -0.03%     
==========================================
  Files         452      452              
  Lines       38016    38046      +30     
==========================================
+ Hits        27995    28008      +13     
- Misses       8396     8412      +16     
- Partials     1625     1626       +1     
Files Changed Coverage Δ
pkg/providers/tinkerbell/create.go 68.10% <35.29%> (-4.15%) ⬇️
pkg/providers/tinkerbell/hardware/csv.go 68.18% <43.75%> (-8.75%) ⬇️
pkg/providers/tinkerbell/hardware/translate.go 88.88% <50.00%> (-11.12%) ⬇️
pkg/providers/tinkerbell/upgrade.go 48.64% <50.00%> (-0.33%) ⬇️
pkg/dependencies/factory.go 76.44% <100.00%> (+0.24%) ⬆️
pkg/providers/tinkerbell/tinkerbell.go 55.19% <100.00%> (-0.29%) ⬇️

... and 1 file with indirect coverage changes

Signed-off-by: Jacob Weinstock <jakobweinstock@gmail.com>
Signed-off-by: Jacob Weinstock <jakobweinstock@gmail.com>
@eks-distro-bot
Copy link
Collaborator

@jacobweinstock: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
eks-anywhere-e2e-validate-tinkerbell-hardware-presubmit 58ef431 link true /test eks-anywhere-e2e-validate-tinkerbell-hardware-presubmit

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

Comment on lines +51 to +53
for _, modify := range modifiers {
machine = modify(machine)
}
Copy link
Contributor

Choose a reason for hiding this comment

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

What do you think about decorating the MachineWriter instead of passing modifiers?

@jacobweinstock
Copy link
Member Author

Superseded by #6741

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do-not-merge/work-in-progress size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants