AGENT-909: Restructure gencrypto package
The agent installer is implementing a new auth type and could reuse the existing functionality of generating the public/private keys and JWT tokens. This change restructures the existing code for agent installer to be able to import it.
List all the issues related to this PR
- [ ] New Feature
- [x] Enhancement
- [ ] Bug fix
- [ ] Tests
- [ ] Documentation
- [ ] CI/CD
What environments does this code impact?
- [ ] Automation (CI, tools, etc)
- [ ] Cloud
- [ ] Operator Managed Deployments
- [x] None
How was this code tested?
- [ ] assisted-test-infra environment
- [x] dev-scripts environment
- [ ] Reviewer's test appreciated
- [x] Waiting for CI to do a full test run
- [ ] Manual (Elaborate on how it was tested)
- [ ] No tests needed
Checklist
- [x] Title and description added to both, commit and PR.
- [x] Relevant issues have been associated (see CONTRIBUTING guide)
- [x] This change does not require a documentation update (docstring,
docs, README, etc) - [x] Does this change include unit-tests (note that code changes require unit-tests)
Reviewers Checklist
- Are the title and description (in both PR and commit) meaningful and clear?
- Is there a bug required (and linked) for this change?
- Should this PR be backported?
@pawanpinjarkar: This pull request references AGENT-909 which is a valid jira issue.
Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "4.16.0" version, but no target version was set.
In response to this:
The agent installer is implementing a new auth type and could reuse the existing functionality of generating the public/private keys and JWT tokens. This change restructures the existing code for agent installer to be able to import it.
List all the issues related to this PR
- [ ] New Feature
- [x] Enhancement
- [ ] Bug fix
- [ ] Tests
- [ ] Documentation
- [ ] CI/CD
What environments does this code impact?
- [ ] Automation (CI, tools, etc)
- [ ] Cloud
- [ ] Operator Managed Deployments
- [x] None
How was this code tested?
- [ ] assisted-test-infra environment
- [x] dev-scripts environment
- [ ] Reviewer's test appreciated
- [x] Waiting for CI to do a full test run
- [ ] Manual (Elaborate on how it was tested)
- [ ] No tests needed
Checklist
- [x] Title and description added to both, commit and PR.
- [x] Relevant issues have been associated (see CONTRIBUTING guide)
- [x] This change does not require a documentation update (docstring,
docs, README, etc)- [x] Does this change include unit-tests (note that code changes require unit-tests)
Reviewers Checklist
- Are the title and description (in both PR and commit) meaningful and clear?
- Is there a bug required (and linked) for this change?
- Should this PR be backported?
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 openshift-eng/jira-lifecycle-plugin repository.
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
[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: pawanpinjarkar Once this PR has been reviewed and has the lgtm label, please assign javipolo for approval. For more information see the Kubernetes Code Review Process.
The full list of commands accepted by this bot can be found here.
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment
/cc @carbonin
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 68.27%. Comparing base (
4577ef6) to head (752c749). Report is 3 commits behind head on master.
Additional details and impacted files
@@ Coverage Diff @@
## master #6272 +/- ##
==========================================
- Coverage 68.28% 68.27% -0.02%
==========================================
Files 241 241
Lines 35855 35855
==========================================
- Hits 24484 24479 -5
- Misses 9211 9213 +2
- Partials 2160 2163 +3
| Files | Coverage Δ | |
|---|---|---|
| internal/bminventory/inventory.go | 71.29% <ø> (ø) |
|
| internal/bminventory/inventory_v2_handlers.go | 56.60% <ø> (ø) |
|
| internal/cluster/auth.go | 78.12% <ø> (ø) |
|
| internal/common/db.go | 7.14% <ø> (ø) |
|
| ...nternal/controller/controllers/agent_controller.go | 74.54% <ø> (ø) |
|
| internal/controller/controllers/agent_reclaimer.go | 96.92% <ø> (ø) |
|
| ...oller/controllers/agentserviceconfig_controller.go | 85.20% <ø> (ø) |
|
| ...oller/controllers/clusterdeployments_controller.go | 71.93% <ø> (ø) |
|
| internal/controller/controllers/common.go | 79.50% <ø> (ø) |
|
| ...rnal/controller/controllers/infraenv_controller.go | 64.13% <ø> (ø) |
|
| ... and 4 more |
@pawanpinjarkar: all tests passed!
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.
Moving the code in pkg is not useful for installer because it can only access api, models and client packages.
@carbonin As continue of our talk, I think it would be best placing this pkg in a separate repository inside openshift-assisted. WDYT ?
Yes, I think breaking it out into its own repo would be best so we don't have to deal with more local modules and so that it can be easily shared with the installer folks.
PR needs rebase.
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.
@carbonin I have created - https://issues.redhat.com/browse/MGMT-17779 to address this