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

Introduce Crypto Policy #1827

Merged
merged 1 commit into from
Apr 5, 2022
Merged

Conversation

tiraboschi
Copy link
Member

@tiraboschi tiraboschi commented Mar 22, 2022

Introduce cluster-wide Crypto Policy

Implement cluster-wide Crypto Policy API
as described in
https://github.com/kubevirt/hyperconverged-cluster-operator/blob/main/docs/enhancements/crypto-api.md

Propagate it to CNAO which is its first
consumer. Other Kubevirt Hyperconverged components
are going to follow in future PRs.

Signed-off-by: Simone Tiraboschi stirabos@redhat.com

Reviewer Checklist

Reviewers are supposed to review the PR for every aspect below one by one. To check an item means the PR is either "OK" or "Not Applicable" in terms of that item. All items are supposed to be checked before merging a PR.

  • PR Message
  • Commit Messages
  • How to test
  • Unit Tests
  • Functional Tests
  • User Documentation
  • Developer Documentation
  • Upgrade Scenario
  • Uninstallation Scenario
  • Backward Compatibility
  • Troubleshooting Friendly

Release note:

Introduce cluster-wide Crypto Policy

@tiraboschi tiraboschi added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 22, 2022
@kubevirt-bot kubevirt-bot added dco-signoff: yes Indicates the PR's author has DCO signed all their commits. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Mar 22, 2022
@tiraboschi tiraboschi force-pushed the crypto_api branch 2 times, most recently from cffa886 to acd3f24 Compare March 22, 2022 18:43
@tiraboschi tiraboschi force-pushed the crypto_api branch 4 times, most recently from 3bac16c to 7c1b7fb Compare March 22, 2022 23:44
@coveralls
Copy link
Collaborator

coveralls commented Mar 22, 2022

Pull Request Test Coverage Report for Build 2089975217

  • 69 of 111 (62.16%) changed or added relevant lines in 3 files are covered.
  • 2 unchanged lines in 2 files lost coverage.
  • Overall coverage decreased (-0.5%) to 84.363%

Changes Missing Coverage Covered Lines Changed/Added Lines %
pkg/util/cluster.go 27 33 81.82%
controllers/hyperconverged/hyperconverged_controller.go 40 76 52.63%
Files with Coverage Reduction New Missed Lines %
controllers/hyperconverged/hyperconverged_controller.go 1 81.78%
controllers/operands/operandHandler.go 1 88.44%
Totals Coverage Status
Change from base Build 2089505448: -0.5%
Covered Lines: 4246
Relevant Lines: 5033

💛 - Coveralls

@hco-bot
Copy link
Collaborator

hco-bot commented Mar 23, 2022

hco-e2e-image-index-gcp lane succeeded.
/override ci/prow/hco-e2e-image-index-aws
hco-e2e-image-index-gcp lane succeeded.
/override ci/prow/hco-e2e-image-index-azure
hco-e2e-image-index-sno-azure lane succeeded.
/override ci/prow/hco-e2e-image-index-sno-aws
okd-hco-e2e-upgrade-index-gcp lane succeeded.
/override ci/prow/okd-hco-e2e-upgrade-index-aws
okd-hco-e2e-image-index-gcp lane succeeded.
/override ci/prow/okd-hco-e2e-image-index-aws

@kubevirt-bot
Copy link
Contributor

@hco-bot: Overrode contexts on behalf of hco-bot: ci/prow/hco-e2e-image-index-aws, ci/prow/hco-e2e-image-index-azure, ci/prow/hco-e2e-image-index-sno-aws, ci/prow/okd-hco-e2e-image-index-aws, ci/prow/okd-hco-e2e-upgrade-index-aws

In response to this:

hco-e2e-image-index-gcp lane succeeded.
/override ci/prow/hco-e2e-image-index-aws
hco-e2e-image-index-gcp lane succeeded.
/override ci/prow/hco-e2e-image-index-azure
hco-e2e-image-index-sno-azure lane succeeded.
/override ci/prow/hco-e2e-image-index-sno-aws
okd-hco-e2e-upgrade-index-gcp lane succeeded.
/override ci/prow/okd-hco-e2e-upgrade-index-aws
okd-hco-e2e-image-index-gcp lane succeeded.
/override ci/prow/okd-hco-e2e-image-index-aws

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.

@tiraboschi tiraboschi force-pushed the crypto_api branch 2 times, most recently from 5a20034 to 91d25d5 Compare March 23, 2022 08:17
@hco-bot
Copy link
Collaborator

hco-bot commented Mar 23, 2022

hco-e2e-upgrade-index-azure lane succeeded.
/override ci/prow/hco-e2e-upgrade-index-aws

@kubevirt-bot
Copy link
Contributor

@hco-bot: Overrode contexts on behalf of hco-bot: ci/prow/hco-e2e-upgrade-index-aws

In response to this:

hco-e2e-upgrade-index-azure lane succeeded.
/override ci/prow/hco-e2e-upgrade-index-aws

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.

@hco-bot
Copy link
Collaborator

hco-bot commented Mar 23, 2022

okd-hco-e2e-upgrade-index-gcp lane succeeded.
/override ci/prow/okd-hco-e2e-upgrade-index-aws

@kubevirt-bot
Copy link
Contributor

@hco-bot: Overrode contexts on behalf of hco-bot: ci/prow/okd-hco-e2e-upgrade-index-aws

In response to this:

okd-hco-e2e-upgrade-index-gcp lane succeeded.
/override ci/prow/okd-hco-e2e-upgrade-index-aws

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.

@tiraboschi tiraboschi force-pushed the crypto_api branch 2 times, most recently from f5a3484 to 75df0df Compare March 23, 2022 15:26
@tiraboschi tiraboschi changed the title WIP: Introduce Crypto Policy Introduce Crypto Policy Mar 23, 2022
@tiraboschi tiraboschi removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. labels Mar 23, 2022
@kubevirt-bot kubevirt-bot added the release-note Denotes a PR that will be considered when it comes time to generate release notes. label Mar 23, 2022
@tiraboschi
Copy link
Member Author

/retest

@kubevirt-bot kubevirt-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 1, 2022
@kubevirt-bot kubevirt-bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 4, 2022
Comment on lines 274 to 286

apiServerCRTriggered, err := isTriggeredByApiServerCR(request)
if err != nil {
return reconcile.Result{}, err
}
if apiServerCRTriggered {
logger.Info("Triggered by ApiServer CR, refreshing it")
err = hcoutil.GetClusterInfo().RefreshAPIServerCR(hcoRequest.Ctx, r.client)
if err != nil {
return reconcile.Result{}, err
}
}

Copy link
Collaborator

Choose a reason for hiding this comment

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

SonarCloud warns about a code smell here (too complex function). Please consider to refactor.

Copy link
Member Author

Choose a reason for hiding this comment

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

done

@hco-bot
Copy link
Collaborator

hco-bot commented Apr 4, 2022

hco-e2e-image-index-aws lane succeeded.
/override ci/prow/hco-e2e-image-index-azure
hco-e2e-image-index-aws lane succeeded.
/override ci/prow/hco-e2e-image-index-gcp
okd-hco-e2e-image-index-gcp lane succeeded.
/override ci/prow/okd-hco-e2e-image-index-aws

@kubevirt-bot
Copy link
Contributor

@hco-bot: Overrode contexts on behalf of hco-bot: ci/prow/hco-e2e-image-index-azure, ci/prow/hco-e2e-image-index-gcp, ci/prow/okd-hco-e2e-image-index-aws

In response to this:

hco-e2e-image-index-aws lane succeeded.
/override ci/prow/hco-e2e-image-index-azure
hco-e2e-image-index-aws lane succeeded.
/override ci/prow/hco-e2e-image-index-gcp
okd-hco-e2e-image-index-gcp lane succeeded.
/override ci/prow/okd-hco-e2e-image-index-aws

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.

Implement cluster-wide Crypto Policy API
as described in
https://github.com/kubevirt/hyperconverged-cluster-operator/blob/main/docs/enhancements/crypto-api.md

Propagate it to CNAO which is its first
consumer. Other Kubevirt Hyperconverged components
are going to follow in future PRs.

Signed-off-by: Simone Tiraboschi <stirabos@redhat.com>
@sonarcloud
Copy link

sonarcloud bot commented Apr 4, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@tiraboschi
Copy link
Member Author

/retest

1 similar comment
@tiraboschi
Copy link
Member Author

/retest

@hco-bot
Copy link
Collaborator

hco-bot commented Apr 4, 2022

hco-e2e-upgrade-index-sno-azure lane succeeded.
/override ci/prow/hco-e2e-upgrade-index-sno-aws
hco-e2e-image-index-sno-aws lane succeeded.
/override ci/prow/hco-e2e-image-index-sno-azure

@kubevirt-bot
Copy link
Contributor

@hco-bot: Overrode contexts on behalf of hco-bot: ci/prow/hco-e2e-image-index-sno-azure, ci/prow/hco-e2e-upgrade-index-sno-aws

In response to this:

hco-e2e-upgrade-index-sno-azure lane succeeded.
/override ci/prow/hco-e2e-upgrade-index-sno-aws
hco-e2e-image-index-sno-aws lane succeeded.
/override ci/prow/hco-e2e-image-index-sno-azure

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.

@hco-bot
Copy link
Collaborator

hco-bot commented Apr 4, 2022

hco-e2e-upgrade-index-azure lane succeeded.
/override ci/prow/hco-e2e-upgrade-index-aws
hco-e2e-image-index-azure, hco-e2e-image-index-gcp lanes succeeded.
/override ci/prow/hco-e2e-image-index-aws

@kubevirt-bot
Copy link
Contributor

@hco-bot: Overrode contexts on behalf of hco-bot: ci/prow/hco-e2e-image-index-aws, ci/prow/hco-e2e-upgrade-index-aws

In response to this:

hco-e2e-upgrade-index-azure lane succeeded.
/override ci/prow/hco-e2e-upgrade-index-aws
hco-e2e-image-index-azure, hco-e2e-image-index-gcp lanes succeeded.
/override ci/prow/hco-e2e-image-index-aws

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.

@tiraboschi
Copy link
Member Author

/retest

@openshift-ci
Copy link

openshift-ci bot commented Apr 5, 2022

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

Test name Commit Details Required Rerun command
ci/prow/hco-e2e-upgrade-index-aws 57f5207 link true /test hco-e2e-upgrade-index-aws
ci/prow/hco-e2e-image-index-sno-azure 57f5207 link false /test hco-e2e-image-index-sno-azure
ci/prow/hco-e2e-upgrade-index-sno-aws 57f5207 link false /test hco-e2e-upgrade-index-sno-aws
ci/prow/hco-e2e-image-index-aws 57f5207 link true /test hco-e2e-image-index-aws
ci/prow/hco-e2e-upgrade-prev-index-azure 57f5207 link true /test hco-e2e-upgrade-prev-index-azure

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.

@hco-bot
Copy link
Collaborator

hco-bot commented Apr 5, 2022

hco-e2e-upgrade-prev-index-aws lane succeeded.
/override ci/prow/hco-e2e-upgrade-prev-index-azure

@kubevirt-bot
Copy link
Contributor

@hco-bot: Overrode contexts on behalf of hco-bot: ci/prow/hco-e2e-upgrade-prev-index-azure

In response to this:

hco-e2e-upgrade-prev-index-aws lane succeeded.
/override ci/prow/hco-e2e-upgrade-prev-index-azure

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.

@tiraboschi
Copy link
Member Author

ignoring slightly decreased coverage
/override coverage/coveralls

@kubevirt-bot
Copy link
Contributor

@tiraboschi: Overrode contexts on behalf of tiraboschi: coverage/coveralls

In response to this:

ignoring slightly decreased coverage
/override coverage/coveralls

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.

@nunnatsa
Copy link
Collaborator

nunnatsa commented Apr 5, 2022

/approve
/lgtm

@kubevirt-bot kubevirt-bot added the lgtm Indicates that a PR is ready to be merged. label Apr 5, 2022
@kubevirt-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: nunnatsa

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

The pull request process is described 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

@kubevirt-bot kubevirt-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 5, 2022
@kubevirt-bot kubevirt-bot merged commit 5906b44 into kubevirt:main Apr 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XXL
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants