-
Notifications
You must be signed in to change notification settings - Fork 153
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
simple deploy_marketplace.sh #409
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It may be a good idea to simplify this script by dropping half of its code, but you should probably explain why nobody needs the catalogSource preparation.
I would suggest to keep the code, but move it to a function. Then you can run the script with something like --use-existing-catalog-source
if you do not need a new one.
@@ -2,195 +2,72 @@ | |||
|
|||
set -ex | |||
|
|||
RED='\033[0;31m' | |||
NO_COLOR='\033[0m' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this change is irrelevant. If you think that this should be dropped, please do it in a separate PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because when you have a cluster (clean one), you already have 3 catalogsources: redhat-operators, community, and certified-operators. So no need for preparation.
In case of QE/Dev, custom catalogsources are prepared earlier, and already used for other operators (not just CNV)
Should someone, needs a custom catsrc, then he can't use the "full" script as it's not supporting the creation of a plain catalogSource (ONLY by operatorSource, from QUAY).
IMO, an OLM catalogSource creation script, should be added to repo as an extra utility, and to support plain/opsrc catsrc creation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't like long scripts myself. If you want to split out some logic to another script, please do it. But please take care of existing use cases
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As mentioned before, for 99.99% of deploy_marketplace.sh, creation of catalogSOurce is not required. For other cases, the split is in a new script (with old content) deploy_operatoSource.sh.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently we already have deploy_imageregistry.sh (to consume the bundle image as a local registry) and deploy_marketplace.sh (to deploy pointing to a remote app-registry) and we want to unify them (to avoid having to duplicate each fix to both of them).
Introducing a third script is definitively not an option.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
deploy_imageregistry is creating catalogSource not an operatorSource from QUAY.
Also this one should be splitted..
Sure, it's a good idea to unify them (just for catsrc/opsrc creation)
deploy/deploy_marketplace.sh
Outdated
globalNamespace=`oc -n openshift-operator-lifecycle-manager get deployments catalog-operator -o jsonpath='{.spec.template.spec.containers[].args[1]}'` | ||
echo "Global Namespace: ${globalNamespace}" | ||
GLOBAL_NAMESPACE="${GLOBAL_NAMESPACE:-$globalNamespace}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see you do not introduce this in this PR, but the previous line printed one value, and now you are going to use another. This would confuse the reader.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not used at all, and the confusion is there also with the original script.
Note it's running 'oc' command, even if it's called with CLUSTER=KUBERNETES.
It's should be removed completely.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer to split the code into helper functions and eventually skip what's not needed for the specific case instead of removing the code that is still relevant for other use cases.
9e86911
to
a043742
Compare
a043742
to
3c6a7e9
Compare
4b2b896
to
234d911
Compare
234d911
to
c814b22
Compare
Thanks for your pull request. Before we can look at it, you'll need to add a 'DCO signoff' to your commits. 📝 Please follow instructions in the contributing guide to update your commits with the DCO Full details of the Developer Certificate of Origin can be found at developercertificate.org. The list of commits missing DCO signoff:
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. |
We are going to use kustomize for this, see #463 |
A simple deploy_Marketplace.sh script, which does not include the creation of operatorSource nor catalogSourceConfig.
In upstream/downstream openshift cluster creation of operatorSorce/catalogSource is not required (redhat-operators is used)
For QE/Dev environment, custom opsrc/catsrc are provided in an earlier step of cluster creation.