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 check if index and bundle deploys both enabled #438

Conversation

leifmadsen
Copy link
Member

Add a fail check to make sure we're not deploying from both index images
and bundle images at the same time.

Add a fail check to make sure we're not deploying from both index images
and bundle images at the same time.
@leifmadsen leifmadsen merged commit fc5e1bb into stf-1362/add-index-bundle-builds Jun 7, 2023
@leifmadsen leifmadsen deleted the stf-1362/add-fail-check-index-and-bundle-deploy branch June 7, 2023 22:38
leifmadsen added a commit that referenced this pull request Jun 7, 2023
* Create bundle and index builds for OLM deployment

Create bundle images using BuildConfigs through the internal registry
after generating contents using generate_bundles. Create a file-based
index image from the bundles created and available from the internal
registry.

Deploy STF using a local CatalogSource that references the internal
index image which allows OLM to stand up dependencies using
properties.yaml within the Service Teleletry Operator metadata. Skips
over pre-deployment artifacts and uses only data available via
CatalogSource for dependency validation.

* Add bundle builds to stf-run-ci for index-based deployments

Initial working code to allow bundle builds to be created in support of
index-based (CatalogSource) deployments of STF using local builds.

Updates the create_builds.yml logic so that it allows deployments to
proceed when builds have already been created. If local builds are
enabled then if BuildConfigs have already been created, then the role
will lookup the latest Build object and set the internal image path so
that the deployment can continue. Primary function is for iterative
development.

Stubbed out functionality to start creating the index image is
available, but still needs to be developed fully.

* Update generate_bundle.sh to return a JSON map

Update generate_bundle.sh to return a JSON map so that it can be
consumed by Ansible in stf-run-ci.

* Working development for index-based deployment

Completed the initial implementation of a local bundle build and
index-image created from bundle images. Generated via opm and loaded in
a CatalogSource that allows stf-run-ci to Subscribe to the
service-telemetry-operator package.

Created to allow testing of the properties.yaml now included in Service
Telemetry Operator to allow dependencies to be resolved without
pre-Subscribing to the Operators.

Closes: STF-1362

* Test and Tune

- clean up some ordering of object creation
- update index name in a couple of spots (service-telemetry-framework vs
  service-telemetry-operator)
- more checks to allow better idempotency when running stf-run-ci
  multiple times
- create CatalogSource
- syntax error on a couple of plays
- add some more clean up to make re-running deployments without full
  artifact builds possible
- always need OperatorGroup from CLI... had a check because testing was
  done from UI incorrectly

* Fix syntax error for pre-Subscription

* Remove unused template file

* Move OCP version lookup to top of plays (#433)

* Make debug output of generate_bundle consistent

* Clean up block usage for BuildConfig creation

* Set operator base image and tag as parameters

* Fix typo in annotation

* Add check if index and bundle deploys both enabled (#438)

Add a fail check to make sure we're not deploying from both index images
and bundle images at the same time.
leifmadsen added a commit that referenced this pull request Jun 12, 2023
* Manage Operator dependencies with properties.yaml

Use the properties.yaml to manage the packages we require when deploying
Service Telemetry Operator. Allows us to reference the Operator name
(which you can find via 'oc get packagemanifests' and reviewing the
packageName value of the packagemanifest (which should just match the
name listed in the oc get packagemanifests output).

Constraints allow the use of versions as well, setting a target of >=
the current version(ish).

Per
https://olm.operatorframework.io/docs/concepts/olm-architecture/dependency-resolution/#nested-compound-constraints:

> A nested compound constraint, one that contains at least one child
compound constraint along with zero or more simple constraints, is
evaluated from the bottom up following the procedures described for each
above.

For Prometheus, we set our ordered list from bottom to top, with a
preference for Observability Operator, followed by RHODS Prometheus
Operator, and finally Prometheus Operator from the Community Catalog.

Closes: STF-1356

* Move smart-gateway-operator dependency to properties.yaml

* Update deploy/olm-catalog/service-telemetry-operator/metadata/properties.yaml

Co-authored-by: Chris Sibbitt <csibbitt@redhat.com>

* Add index-based deployment method to stf-run-ci (#428)

* Create bundle and index builds for OLM deployment

Create bundle images using BuildConfigs through the internal registry
after generating contents using generate_bundles. Create a file-based
index image from the bundles created and available from the internal
registry.

Deploy STF using a local CatalogSource that references the internal
index image which allows OLM to stand up dependencies using
properties.yaml within the Service Teleletry Operator metadata. Skips
over pre-deployment artifacts and uses only data available via
CatalogSource for dependency validation.

* Add bundle builds to stf-run-ci for index-based deployments

Initial working code to allow bundle builds to be created in support of
index-based (CatalogSource) deployments of STF using local builds.

Updates the create_builds.yml logic so that it allows deployments to
proceed when builds have already been created. If local builds are
enabled then if BuildConfigs have already been created, then the role
will lookup the latest Build object and set the internal image path so
that the deployment can continue. Primary function is for iterative
development.

Stubbed out functionality to start creating the index image is
available, but still needs to be developed fully.

* Update generate_bundle.sh to return a JSON map

Update generate_bundle.sh to return a JSON map so that it can be
consumed by Ansible in stf-run-ci.

* Working development for index-based deployment

Completed the initial implementation of a local bundle build and
index-image created from bundle images. Generated via opm and loaded in
a CatalogSource that allows stf-run-ci to Subscribe to the
service-telemetry-operator package.

Created to allow testing of the properties.yaml now included in Service
Telemetry Operator to allow dependencies to be resolved without
pre-Subscribing to the Operators.

Closes: STF-1362

* Test and Tune

- clean up some ordering of object creation
- update index name in a couple of spots (service-telemetry-framework vs
  service-telemetry-operator)
- more checks to allow better idempotency when running stf-run-ci
  multiple times
- create CatalogSource
- syntax error on a couple of plays
- add some more clean up to make re-running deployments without full
  artifact builds possible
- always need OperatorGroup from CLI... had a check because testing was
  done from UI incorrectly

* Fix syntax error for pre-Subscription

* Remove unused template file

* Move OCP version lookup to top of plays (#433)

* Make debug output of generate_bundle consistent

* Clean up block usage for BuildConfig creation

* Set operator base image and tag as parameters

* Fix typo in annotation

* Add check if index and bundle deploys both enabled (#438)

Add a fail check to make sure we're not deploying from both index images
and bundle images at the same time.

* Drop rhods-prometheus-operator from satisfying STO

Don't allow rhods-prometheus-operator package to satisfy for
installation of Service Telemetry Operator as it is expected to go away.

---------

Co-authored-by: Chris Sibbitt <csibbitt@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant