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

Reconcile ImageStream only if the FG is true #1659

Merged
merged 1 commit into from
Dec 16, 2021

Conversation

nunnatsa
Copy link
Collaborator

If the enableCommonBootImageImport FG is set, create the imageStreams and reconcile them
If the enableCommonBootImageImport FG is not set, remove the imageStreams

Signed-off-by: Nahshon Unna-Tsameret nunnatsa@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:

Reconcile the image stream only if the enableCommonBootImageImport featuregate is true

@kubevirt-bot kubevirt-bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. labels Dec 15, 2021
@coveralls
Copy link
Collaborator

coveralls commented Dec 15, 2021

Pull Request Test Coverage Report for Build 1586043444

  • 52 of 70 (74.29%) changed or added relevant lines in 6 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.04%) to 70.578%

Changes Missing Coverage Covered Lines Changed/Added Lines %
pkg/controller/operands/operandHandler.go 14 16 87.5%
pkg/util/util.go 5 12 41.67%
pkg/controller/operands/imageStream.go 27 36 75.0%
Totals Coverage Status
Change from base Build 1578112894: 0.04%
Covered Lines: 3711
Relevant Lines: 5258

💛 - Coveralls

@nunnatsa
Copy link
Collaborator Author

/retest

1 similar comment
@nunnatsa
Copy link
Collaborator Author

/retest

@hco-bot
Copy link
Collaborator

hco-bot commented Dec 15, 2021

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

@kubevirt-bot
Copy link
Contributor

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

In response to this:

hco-e2e-upgrade-prev-index-sno-azure lane succeeded.
/override ci/prow/hco-e2e-upgrade-prev-index-sno-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 Dec 15, 2021

hco-e2e-kv-smoke-azure lane succeeded.
/override ci/prow/hco-e2e-kv-smoke-gcp

@kubevirt-bot
Copy link
Contributor

@hco-bot: Overrode contexts on behalf of hco-bot: ci/prow/hco-e2e-kv-smoke-gcp

In response to this:

hco-e2e-kv-smoke-azure lane succeeded.
/override ci/prow/hco-e2e-kv-smoke-gcp

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.

If the enableCommonBootImageImport FG is set, create the imageStreams and reconcile them
If the enableCommonBootImageImport FG is not set, remove the imageStreams

Signed-off-by: Nahshon Unna-Tsameret <nunnatsa@redhat.com>
@sonarcloud
Copy link

sonarcloud bot commented Dec 16, 2021

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

@erkanerol
Copy link
Contributor

/lgtm

@kubevirt-bot kubevirt-bot added the lgtm Indicates that a PR is ready to be merged. label Dec 16, 2021
@hco-bot
Copy link
Collaborator

hco-bot commented Dec 16, 2021

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

@kubevirt-bot
Copy link
Contributor

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

In response to this:

okd-hco-e2e-upgrade-index-gcp, okd-hco-e2e-upgrade-index-gcp lanes succeeded.
/override ci/prow/okd-hco-e2e-upgrade-index-aws
hco-e2e-image-index-sno-azure, hco-e2e-image-index-sno-azure, hco-e2e-image-index-sno-azure lanes succeeded.
/override ci/prow/hco-e2e-image-index-sno-aws
hco-e2e-image-index-aws, hco-e2e-image-index-aws lanes succeeded.
/override ci/prow/hco-e2e-image-index-gcp
hco-e2e-upgrade-index-sno-azure, hco-e2e-upgrade-index-sno-azure lanes succeeded.
/override ci/prow/hco-e2e-upgrade-index-sno-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.

@nunnatsa
Copy link
Collaborator Author

/override-bot

@hco-bot
Copy link
Collaborator

hco-bot commented Dec 16, 2021

hco-e2e-image-index-sno-azure lane succeeded.
/override ci/prow/hco-e2e-image-index-sno-aws
hco-e2e-upgrade-index-sno-azure lane succeeded.
/override ci/prow/hco-e2e-upgrade-index-sno-aws
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/hco-e2e-image-index-sno-aws, ci/prow/hco-e2e-upgrade-index-sno-aws, ci/prow/okd-hco-e2e-upgrade-index-aws

In response to this:

hco-e2e-image-index-sno-azure lane succeeded.
/override ci/prow/hco-e2e-image-index-sno-aws
hco-e2e-upgrade-index-sno-azure lane succeeded.
/override ci/prow/hco-e2e-upgrade-index-sno-aws
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.

@nunnatsa
Copy link
Collaborator Author

/override-bot

@hco-bot
Copy link
Collaborator

hco-bot commented Dec 16, 2021

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

@kubevirt-bot
Copy link
Contributor

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

In response to this:

hco-e2e-upgrade-prev-index-sno-azure lane succeeded.
/override ci/prow/hco-e2e-upgrade-prev-index-sno-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.

@nunnatsa
Copy link
Collaborator Author

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

@kubevirt-bot
Copy link
Contributor

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

In response to this:

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

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 Author

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

@kubevirt-bot
Copy link
Contributor

@nunnatsa: Overrode contexts on behalf of nunnatsa: 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.

@openshift-ci
Copy link

openshift-ci bot commented Dec 16, 2021

@nunnatsa: 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 c76d18b link true /test hco-e2e-upgrade-index-aws
ci/prow/okd-hco-e2e-upgrade-index-aws c76d18b link true /test okd-hco-e2e-upgrade-index-aws
ci/prow/hco-e2e-image-index-azure c76d18b link true /test hco-e2e-image-index-azure
ci/prow/hco-e2e-upgrade-prev-index-sno-aws c76d18b link false /test hco-e2e-upgrade-prev-index-sno-aws
ci/prow/hco-e2e-image-index-gcp c76d18b link true /test hco-e2e-image-index-gcp
ci/prow/hco-e2e-upgrade-index-sno-aws c76d18b link false /test hco-e2e-upgrade-index-sno-aws
ci/prow/hco-e2e-image-index-sno-aws c76d18b link false /test hco-e2e-image-index-sno-aws
ci/prow/hco-e2e-kv-smoke-gcp c76d18b link true /test hco-e2e-kv-smoke-gcp

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 Dec 16, 2021

hco-e2e-kv-smoke-azure, hco-e2e-kv-smoke-azure lanes succeeded.
/override ci/prow/hco-e2e-kv-smoke-gcp

@kubevirt-bot
Copy link
Contributor

@hco-bot: Overrode contexts on behalf of hco-bot: ci/prow/hco-e2e-kv-smoke-gcp

In response to this:

hco-e2e-kv-smoke-azure, hco-e2e-kv-smoke-azure lanes succeeded.
/override ci/prow/hco-e2e-kv-smoke-gcp

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.

@erkanerol
Copy link
Contributor

/approve

@kubevirt-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: erkanerol

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 Dec 16, 2021
@kubevirt-bot kubevirt-bot merged commit 2c4f703 into kubevirt:main Dec 16, 2021
@nunnatsa nunnatsa deleted the reconcile-imagestream-fg branch December 16, 2021 10:07
Copy link
Collaborator

@orenc1 orenc1 left a comment

Choose a reason for hiding this comment

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

looks good so far, haven't went over all of the changes yet.
some nits inline

@@ -5,6 +5,12 @@ set -ex
IMAGES_NS=${IMAGES_NS:-kubevirt-os-images}

if [[ $(${KUBECTL_BINARY} get ssp -n ${INSTALLED_NAMESPACE}) ]]; then
[[ $(${KUBECTL_BINARY} get imageStream centos8 -n ${IMAGES_NS} --no-headers | wc -l) -eq 0 ]]
Copy link
Collaborator

Choose a reason for hiding this comment

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

if you use get for a specific object by name, why counting the output lines and comparing to 0?
whether it's exist, or not.
you can simplify with

[[ ! $(${KUBECTL_BINARY} get imageStream centos8 -n ${IMAGES_NS} ]]

# Test DataImportCronTemplates
./hack/retry.sh 10 3 "${KUBECTL_BINARY} patch hco -n \"${INSTALLED_NAMESPACE}\" --type=json kubevirt-hyperconverged -p '[{ \"op\": \"replace\", \"path\": \"/spec/featureGates/enableCommonBootImageImport\", \"value\": true }]'"
sleep 10

# Test image streams
[[ $(${KUBECTL_BINARY} get imageStream centos8 -n ${IMAGES_NS} --no-headers | wc -l) -eq 1 ]]
Copy link
Collaborator

Choose a reason for hiding this comment

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

same here (opposite logic)

crType: "ImageStream",
// Previous versions used to have HCO-operator (scope namespace)
// as the owner of NetworkAddons (scope cluster).
// It's not legal, so remove that.
Copy link
Collaborator

Choose a reason for hiding this comment

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

this comment doesn't seem relevant here

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/L
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants