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

-Add Camel-K CSV and Package for OLM integration and deployment of op… #366

Closed
wants to merge 1 commit into from

Conversation

anik120
Copy link

@anik120 anik120 commented Jan 23, 2019

…erator through OperatorHub

  • This pull requests introduces a CSV and Package which can be bundled together and used by the Operator Lifecycle Manager(OLM) to install, manage, and upgrade the Camel-K Operator in a cluster.

  • The Camel-K operator versions available to all Kubernetes clusters using OLM can be updated by submitting a pull request to the Community Operators GitHub repo that includes the latest CSVs, CRDs, and Packages.

  • The CSV was created based on the documentation provided by OLM and the documentation provided by OperatorHub.

  • It was confirmed that the behavior of the operator deployed by the steps outlined in the Camel-K README reached a running state in a Kubernetes 1.11.0 cluster with OLM installed, and that the operator watched the creation of the cr.example.yaml CR provided in the deploy directory. It was then confirmed that the operator deployed with the CSV matched this behavior in the same environment.

  • The CSV had to be verified against the scorecard functionality recently introduced to the Operator-sdk, to ensure that it conforms to the format expected by the OLM. However, the sdk currently does not support scoring operators that have multiple CRDs. A feature request has been made against the operator-sdk repository to allow testing operators that have multiple CRDs. The CSV in this pull request has been manually verified instead. All future changes to the CSV should be tested against the scorecard, when the feature becomes available.

OLM integration can be improved by future code changes to the Operator:

@nicolaferraro
Copy link
Member

Thanks @anik120 I had some time to check the PR and see the awesome work you're doing in https://github.com/operator-framework/community-operators.

I've few questions:

  • I see that the content of the PR is also replicated in Add Camel-K operator  operator-framework/community-operators#8. Is this one a copy that allows us to test it locally before submitting a PR to the community-operators or this is going to be synced automatically?
  • Once we release a new version of Camel K, should we add the new CSV to the operator repo or replace the existing one?
  • Do you have a quick guide on how to install OLM, including the marketplace? Does it require okd 4.0?

Maybe @rhuss already know some answers.

@anik120
Copy link
Author

anik120 commented Jan 24, 2019

Hey @nicolaferraro, thank you so much for reviewing my PR.

I see that the content of the PR is also replicated in operator-framework/community-operators#8. Is this one a copy that allows us to test it locally before submitting a PR to the community-operators or this is going to be synced automatically?

The CSVs of the operators stored in the community-operator repo will be visible in the Operator Hub in an Openshift 4.0+ cluster that has Marketplace installed. The Camel K operator in the Operator Hub will be based on the latest CSV in the community-operator repo. The typical workflow would be to test the CSV in the Camel K operator repo locally, and then submit a PR to the community-operator repo. Currently, we do not have a system in place to automatically sync the CSVs in both places.

Once we release a new version of Camel K, should we add the new CSV to the operator repo or replace the existing one?

When a new version of the Camel K is released, the new CSV should be added to the community-operator repo. OLM uses the old CSV and the new CSV to provide an upgrade path to users from one version of the operator to the other. The “How are updates handled?” response in the FAQ section of this OLM doc explains the process more clearly.

Do you have a quick guide on how to install OLM, including the marketplace? Does it require okd 4.0?

You can follow the instructions here to install OLM in a Kubernetes cluster.
You can install Marketplace in a Kubernetes cluster with OLM installed by following the instructions here.

The OLM and Marketplace comes installed by default with OKD 4.0. Older releases of OKD does not support Marketplace.

@anik120
Copy link
Author

anik120 commented Feb 1, 2019

Hey @nicolaferraro I just noticed that the spec.container.image blocks in operator-deployment-kubernetes.yaml and operator-deployment-openshift.yaml specifies docker.io/apache/camel-k:0.2.1-SNAPSHOT which is not among the released tags because of which I get an error while trying to deploy the operator. Should these files be updated with the proper image tag? Which image should the CSV use?

…erator through OperatorHub

- This pull requests introduces a CSV and Package which can be bundled together and used by the [Operator Lifecycle Manager(OLM)](https://github.com/operator-framework/operator-lifecycle-manager) to install, manage, and upgrade the Camel-K Operator in a cluster.

- The Camel-K operator versions available to all Kubernetes clusters using OLM can be updated by submitting a pull request to the [Community Operators GitHub repo](https://github.com/operator-framework/community-operators) that includes the latest CSVs, CRDs, and Packages.

- The CSV was created based on the [documentation provided by OLM](https://github.com/operator-framework/operator-lifecycle-manager/blob/master/Documentation/design/building-your-csv.md) and the [documentation](https://github.com/operator-framework/community-operators/blob/master/docs/marketplace-required-csv-annotations.md) provided by [OperatorHub](https://github.com/operator-framework/operator-marketplace).

- It was confirmed that the behavior of the operator deployed by the steps outlined in the Camel-K README reached a running state in a Kubernetes 1.11.0 cluster with OLM installed, and that the operator watched the creation of the cr.example.yaml CR provided in the deploy directory. It was then confirmed that the operator deployed with the CSV matched this behavior in the same environment.

- The CSV had to be verified against the [scorecard functionality recently introduced](operator-framework/operator-sdk#758) to the [Operator-sdk](https://github.com/operator-framework/operator-sdk), to ensure that it conforms to the format expected by the OLM. However, the sdk currently does not support scoring operators that have multiple CRDs. A [feature request](operator-framework/operator-sdk#984) has been made against the operator-sdk repository to allow testing operators that have multiple CRDs. The CSV in this pull request has been manually verified instead. All future changes to the CSV should be tested against the scorecard, when the feature becomes available.

OLM integration can be improved by future code changes to the Operator:
- Addressing the operator-sdk scorecard tests that might fail, once the Operator can be scored with the scorecard.
- Adding additional information to the Camel-K CSV based on the [CSV documentation provided by OLM](https://github.com/operator-framework/operator-lifecycle-manager/blob/master/Documentation/design/building-your-csv.md)
- Adding additional information to the Camel-K CSV based on the [CSV documentation provided by OperatorHub](https://github.com/operator-framework/community-operators/blob/master/docs/marketplace-required-csv-annotations.md)

- Adding [StatusDescriptors and SpecDescriptors](https://github.com/operator-framework/operator-lifecycle-manager/blob/master/Documentation/design/building-your-csv.md#your-custom-resource-definitions) to the CRDs
- Adding additional CR examples to `metadata.annotations.alm-examples`
@astefanutti
Copy link
Member

@anik120 version 0.2.1 has just been released and the image docker.io/apache/camel-k:0.2.1 should be used. We use SNAPSHOT suffix for continuous development though it should not be used to publish into the Operator Hub nor the Marketplace.

Would you be able to update your PR and I'll give it a quick try and review? Or do you prefer we do the update?

@anik120
Copy link
Author

anik120 commented Feb 23, 2019

@astefanutti

We use SNAPSHOT suffix for continuous development though it should not be used to publish into the Operator Hub nor the Marketplace

Thank you for clarifying that for me. My PR uses 0.2.0 so it should be good to go.

Would you be able to update your PR and I'll give it a quick try and review? Or do you prefer we do the update?

I think it'll be a good exercise if the Camel k team go through the update process as that'll give both the Camel K team and the community-operators team an opportunity to sync up and pave the way for future updates. Again, thank you for your feedbacks!

Please let me know if you need any assistance if reviewing/testing the CSV

@astefanutti
Copy link
Member

astefanutti commented Feb 26, 2019

I've tried installing Camel K using the operator Marketplace but failed with operator-framework/operator-lifecycle-manager#728.

I've tried installing the OLM manifest directly but it seems some expected requirements are not met.

Anyhow, I understand enough about OperatorHub and OLM now so I can help moving the issue forward.

@anik120
Copy link
Author

anik120 commented Feb 26, 2019

@astefanutti thank you for bringing that to the notice of the OLM team. If you use the quay.io/openshift/origin-operator-lifecycle-manager image for the olm-operator deployment image and reinstall OLM, you can get around the issue for now.

Note: All the packageserver and catalog-operator deployments will also need that image.

@astefanutti
Copy link
Member

@anik120 thanks. This was confirmed by the OLM team.

Have you already managed to install the Camel K manifest directly too?

@anik120
Copy link
Author

anik120 commented Feb 27, 2019

@astefanutti

Have you already managed to install the Camel K manifest directly too?

On OCP 4.0 yes.

@astefanutti
Copy link
Member

This is superseded by #648.

@oscerd
Copy link
Contributor

oscerd commented May 14, 2019

Thanks btw @anik120

@anik120
Copy link
Author

anik120 commented May 14, 2019

@oscerd of course :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants