Skip to content

Commit 7d81f6b

Browse files
authored
Merge pull request #682 from infrawatch/OSPRH-19028/add-deploy-from-catalog
Add support for deploy from catalog
2 parents aeaa898 + a35b96c commit 7d81f6b

7 files changed

Lines changed: 343 additions & 379 deletions

File tree

.ansible-lint-ignore

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,12 @@ build/stf-run-ci/tasks/clone_repos.yml name[template]
5555
build/stf-run-ci/tasks/clone_repos.yml yaml[empty-lines]
5656
build/stf-run-ci/tasks/create_builds.yml name[missing]
5757
build/stf-run-ci/tasks/create_builds.yml no-changed-when
58-
build/stf-run-ci/tasks/create_catalog.yml ignore-errors
59-
build/stf-run-ci/tasks/create_catalog.yml jinja[spacing]
60-
build/stf-run-ci/tasks/create_catalog.yml name[missing]
61-
build/stf-run-ci/tasks/create_catalog.yml no-changed-when
62-
build/stf-run-ci/tasks/create_catalog.yml risky-file-permissions
63-
build/stf-run-ci/tasks/create_catalog.yml yaml[truthy]
58+
build/stf-run-ci/tasks/create_index_image.yml ignore-errors
59+
build/stf-run-ci/tasks/create_index_image.yml jinja[spacing]
60+
build/stf-run-ci/tasks/create_index_image.yml name[missing]
61+
build/stf-run-ci/tasks/create_index_image.yml no-changed-when
62+
build/stf-run-ci/tasks/create_index_image.yml risky-file-permissions
63+
build/stf-run-ci/tasks/create_index_image.yml yaml[truthy]
6464
build/stf-run-ci/tasks/main.yml jinja[spacing]
6565
build/stf-run-ci/tasks/main.yml key-order[task]
6666
build/stf-run-ci/tasks/main.yml name[missing]

build/stf-run-ci/README.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,11 @@ choose to override:
2121
| `__local_build_enabled` | {true,false} | true | Whether to deploy STF from local built artifacts. Also see `working_branch`, `sg_branch`, `sgo_branch` |
2222
| `__deploy_from_bundles_enabled` | {true,false} | false | Whether to deploy STF from OLM bundles (TODO: compat with `__local_build_enabled`) |
2323
| `__deploy_from_index_enabled` | {true,false} | false | Whether to deploy STF from locally built bundles/OLM bundles and index image. |
24+
| `__deploy_from_catalog` | {true,false} | false | Whether to deploy STF from a pre-built index image. |
2425
| `__disconnected_deploy` | {true,false} | false | Whether to deploy on a disconnected cluster |
2526
| `__service_telemetry_bundle_image_path` | <image_path> | `quay.io/infrawatch-operators/service-telemetry-operator-bundle:nightly-head` | Image path to Service Telemetry Operator bundle |
2627
| `__smart_gateway_bundle_image_path` | <image_path> | `quay.io/infrawatch-operators/smart-gateway-operator-bundle:nightly-head` | Image path to Smart Gateway Operator bundle |
28+
| `__stf_catalog_index_image_path` | <image_path> | `quay.io/infrawatch-operators/infrawatch-catalog:nightly` | Index image path to STF catalog |
2729
| `setup_bundle_registry_tls_ca` | {true,false} | true | Whether to setup or not a TLS CA cert for the bundle registry access |
2830
| `setup_bundle_registry_auth` | {true,false} | true | Whether to setup or not the auth for the bundle registry access |
2931
| `prometheus_webhook_snmp_branch` | <git_branch> | master | Which Prometheus Webhook SNMP git branch to checkout |
@@ -135,7 +137,7 @@ You can perform a deployment using OLM and a Subscription from locally built art
135137
ansible-playbook -e __local_build_enabled=true -e __deploy_from_index_enabled=true run-ci.yaml
136138
```
137139

138-
## Deployment with pre-build bundles and index
140+
## Deployment with pre-built bundles and locally created index image
139141

140142
Instead of relying on the operator-sdk to deploy from selected bundles using the "operator-sdk run bundle" utility,
141143
you can perform a deployment using OLM and a Subscription to a locally created index image like this:
@@ -155,6 +157,19 @@ Since you will fetch the selected images from a bundle registry, it is required
155157
access credentials for the desired registry correctly configured. Check the "Deployment with pre-build bundles"
156158
docs above to get more information about this.
157159

160+
## Deployment with pre-built index image
161+
162+
Is it also possible to pass the path for a pre-build index image to create a CatalogSource and deploy STF from it.
163+
This can be done as follows:
164+
165+
```sh
166+
ansible-playbook -e __local_build_enabled=false -e __deploy_from_catalog=true \
167+
-e __stf_catalog_index_image_path=<registry>/<namespace>/infrawatch-catalog:<tag> \
168+
-e pull_secret_registry=<registry> \
169+
-e pull_secret_user=<username> \
170+
-e pull_secret_pass=<password>
171+
run-ci.yaml
172+
```
158173

159174
# License
160175

build/stf-run-ci/defaults/main.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ list_of_stf_objects:
88
__local_build_enabled: true
99
__deploy_from_bundles_enabled: false
1010
__deploy_from_index_enabled: false
11+
__deploy_from_catalog: false
1112
__deploy_stf: true
1213

1314
__disconnected_deploy: false
@@ -34,6 +35,7 @@ __service_telemetry_transports_certificates_ca_cert_duration: 70080h
3435
__internal_registry_path: image-registry.openshift-image-registry.svc:5000
3536
__service_telemetry_bundle_image_path: "quay.io/infrawatch-operators/service-telemetry-operator-bundle:nightly-head"
3637
__smart_gateway_bundle_image_path: "quay.io/infrawatch-operators/smart-gateway-operator-bundle:nightly-head"
38+
__stf_catalog_index_image_path: "quay.io/infrawatch-operators/infrawatch-catalog:nightly"
3739

3840
default_operator_registry_image_base: registry.redhat.io/openshift4/ose-operator-registry
3941
default_operator_registry_image_tag: v4.13

0 commit comments

Comments
 (0)