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

Introducing kustomize for HCO deployment #463

Merged
merged 6 commits into from
Apr 30, 2020

Conversation

orenc1
Copy link
Collaborator

@orenc1 orenc1 commented Feb 19, 2020

Implementing Kustomization deployment for HCO, aimed to replace the "deploy_marketplace.sh" and "deploy_imageregistry.sh" scripts.

@kubevirt-bot kubevirt-bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. dco-signoff: no Indicates the PR's author has not 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. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/XXL labels Feb 19, 2020
Copy link
Member

@tiraboschi tiraboschi left a comment

Choose a reason for hiding this comment

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

Can you please rebase this on master and squash in a single commit?

@dankenigsberg
Copy link
Member

Can be used as a secondary method for deployment, instead of deploy/deploy_marketplace.sh

There should be only one entry point to deploy the project. You should explain the benefit of kustomize. I don't think there is any point of keeping the existing code - let me know if I am wrong.

@kubevirt-bot kubevirt-bot added size/L and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/XXL labels Feb 23, 2020
@kubevirt-bot kubevirt-bot added dco-signoff: yes Indicates the PR's author has DCO signed all their commits. size/XXL and removed dco-signoff: no Indicates the PR's author has not DCO signed all their commits. size/L labels Feb 23, 2020
@orenc1 orenc1 closed this Feb 24, 2020
@kubevirt-bot kubevirt-bot added size/XS approved Indicates a PR has been approved by an approver from all required OWNERS files. and removed size/XXL labels Feb 24, 2020
@orenc1 orenc1 reopened this Feb 24, 2020

main() {
SCRIPT_DIR="$(dirname "$0")"
TARGET_NAMESPACE=$(grep name: $SCRIPT_DIR/namespace.yaml | awk '{print $2}')
Copy link
Contributor

Choose a reason for hiding this comment

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

The other option is to take theTARGET_NAMESPACE argument (or environment variable) and simply write out the namespace.yaml.

Copy link
Contributor

@djzager djzager left a comment

Choose a reason for hiding this comment

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

All of the manifests and deploy_kustomize.sh script look good to me. As far as the README is concerned, you should at least communicate how these manifests would be consumed without the shell script.

@@ -0,0 +1,44 @@
# Intro
Copy link
Contributor

Choose a reason for hiding this comment

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

I recommend making the header something like "Kustomize Manifests" and simply describe this directory as manifests for delivering and deploying the HCO via OLM using Kustomize.

Copy link
Contributor

Choose a reason for hiding this comment

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

Instead of having the "Deploy Modes" as you do below. I recommend that here, you mention that there are two necessary steps to install HCO via OLM in a cluster 1) "delivery" - make OLM aware of HCO and 2) "deploy" - use OLM provided APIs to install HCO.

deploy/kustomize/README.md Show resolved Hide resolved
Copy link
Contributor

@djzager djzager left a comment

Choose a reason for hiding this comment

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

My bad for missing this comment the last round of review, other than the directory structure being included in the readme this LGTM.

1. **Delivery** - Make HCO recognized and available for the operator-lifecycle-manager (OLM).
2. **Deployment** - Use OLM provided resources and APIs to deploy HCO on the cluster.

## Directory Tree
Copy link
Contributor

Choose a reason for hiding this comment

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

To keep from needing to update this readme anytime we modify this directory, let's just drop the directory tree.

@kubevirt-bot kubevirt-bot added the lgtm Indicates that a PR is ready to be merged. label Apr 29, 2020
@tiraboschi
Copy link
Member

/test hco-e2e-aws

@tiraboschi
Copy link
Member

/approve

@kubevirt-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: tiraboschi

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 29, 2020
@tiraboschi
Copy link
Member

ci/prow/hco-e2e-upgrade-aws currently runs on OCP 4.5 and it's going to fail due to a side effect in the fix of https://bugzilla.redhat.com/1825330
It will be addressed on operator-framework/operator-lifecycle-manager#1470 on OLM side.
Temporary ignoring it
/override ci/prow/hco-e2e-upgrade-aws

@kubevirt-bot
Copy link
Contributor

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

In response to this:

ci/prow/hco-e2e-upgrade-aws currently runs on OCP 4.5 and it's going to fail due to a side effect in the fix of https://bugzilla.redhat.com/1825330
It will be addressed on operator-framework/operator-lifecycle-manager#1470 on OLM side.
Temporary ignoring it
/override ci/prow/hco-e2e-upgrade-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

/test hco-e2e-aws

orenc1 added 6 commits April 29, 2020 23:34
Intended to replace deploy_marketplace.sh and deploy_imageregistry.sh scripts.
Deployment can be done by two ways:
1. Export relevant env vars, then run the "deploy_kustomize.sh" script using either "marketplace" or "image_registry" arguments.
2. Edit the relevant manifests, then run the overlay for the required HCO deployment combination.

Signed-off-by: orenc1 <[email protected]>
… make hco available and install hco, moving quay token and retry_loop functions to different files

Signed-off-by: orenc1 <[email protected]>
…ace change using patches, update README file.

Signed-off-by: orenc1 <[email protected]>
@kubevirt-bot kubevirt-bot removed the lgtm Indicates that a PR is ready to be merged. label Apr 29, 2020
Copy link
Contributor

@djzager djzager left a comment

Choose a reason for hiding this comment

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

/lgtm

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

djzager commented Apr 30, 2020

/test images

Based on #463 (comment)

/override ci/prow/hco-e2e-upgrade-aws

@kubevirt-bot
Copy link
Contributor

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

In response to this:

/test images

Based on #463 (comment)

/override ci/prow/hco-e2e-upgrade-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-robot
Copy link
Collaborator

openshift-ci-robot commented Apr 30, 2020

@orenc1: The following test failed, say /retest to rerun all failed tests:

Test name Commit Details Rerun command
ci/prow/hco-e2e-upgrade-aws fc35ad0 link /test hco-e2e-upgrade-aws

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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.

@tiraboschi
Copy link
Member

/test images

@kubevirt-bot kubevirt-bot merged commit 0fe19a6 into kubevirt:master Apr 30, 2020
}

# Deploy HCO and OLM Resources with retries
retry_loop() {
Copy link
Member

Choose a reason for hiding this comment

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

@dankenigsberg just FYI - this is a retryloop we need to mitigae the not-auto-create-cr

Copy link
Member

Choose a reason for hiding this comment

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

Yes, I'm aware of it. If we auto-create, users with default requirements could avoid this retry_loop. But we cannot avoid in code if we want to support user kustomization of the HCO.cr. We currently have nothing there, but sooner or later, we would.

@orenc1 orenc1 deleted the kustomize branch May 25, 2020 12:20
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.

8 participants