-
Notifications
You must be signed in to change notification settings - Fork 95
Add OpenStack OLM subscription configurations #537
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 OpenStack OLM subscription configurations #537
Conversation
490db3b
to
b8da55a
Compare
- v1.0.6: this version no longer includes the AnsibleEE operator | ||
- v1.0.7 and later: these versions only include the OpenStack operator | ||
|
||
Refer to the `ci_gen_kustomize_values` role README for configuration |
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 would be good to provide a link to CIFMW if we're going to reference it, though I am a bit wary of pointing in that direction since the dependency is the other way around and we haven't explicitly mentioned CIFMW in this repo yet.
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.
Eventually ci_gen_kustomize_values
is one "hardcoded" way to interact with this (as it is for examples/common/olm/
) and it took me some time to get it. From a roocky point of view it makes sense to explicititely set the relation between the two, but I might miss something. Now, I get that maybe such pointer shouldn't be explicit in there. So let me know when you've set your mind, and I'll either add a proper link, or just remove that line entirely.
@@ -0,0 +1,6 @@ | |||
--- |
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.
The main difference relative to to examples/common/olm/
is that the kustomization.yml
can be overwritten as well in order to select the right overlay . I didn't find a way to make this a paramater that can be passed down to kustomize, so I re-use the values.yml mechanism (ie overwritting file) to create the kustomization.yaml
file as well.
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.
We generally assume that the various values.yaml
ConfigMap
s are the interface by which the user customizes the VAs/DTs. If they're modifying the kustomization.yaml
s, then technically they aren't using the repo as intended. So looking at the new examples/common/olm-subscriptions
, I'm not sure why you couldn't just add your new values.yaml
fields/values to the existing values.yaml
[1] and then modify the kustomization.yaml
[2] to inject them. Perhaps I am missing something though.
[1] https://github.com/openstack-k8s-operators/architecture/blob/main/examples/common/olm/values.yaml
[2] https://github.com/openstack-k8s-operators/architecture/blob/main/lib/olm-openstack/kustomization.yaml
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.
So the problem is twofold here:
- the list of subscription to create is different from version to version: 1.0.3 has ansiibleee subscription, but 1.0.6 doesn't. That mean that the kustomization cannot include always the same list of files;
- the startingCSV value need to be
<operator subscription name>.<version>
, making it "dynamic" is it's different for every subscription. Having overlays enablekustomize
to take this into account. But then we must choose the right overlay, hence the need to overwritekustomization.yaml
Starting with v1.0.7 everything is simpler and the kustomization.yaml
overwrite doesn't happen anymore (we just use the default
overlay). Furthermore, we can just use the values.yaml
to populate the startingCSV
of the openstack-operator to openstack-operator.<version>
as it's the only subscription to edit.
To summarize, this is only needed for 1.0.3 and 1.0.6 and because their number of subscriptions is more than one and they are differents for each of them.
Does it make sense ?
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.
Yes, I see what your concern is now. I need to think about it some more, but what you've done might be the right approach for now at least.
lib/olm-openstack-subscriptions/overlays/v1.0.6/disable-openstack-ansibleee.yaml
Outdated
Show resolved
Hide resolved
0c7db87
to
e5deb1f
Compare
A new parameter, `cifmw_ci_gen_kustomize_values_deployment_version`, has been introduced for overriding OLM startingCSV values in kustomize. This also ensures the appropriate architecture directory is utilized and all necessary subscriptions are deployed based on the installed version. This eventually leverages the overlay `kustomize` feature, hence the new `olm_subscriptions_overlay.yml` that helps set the right overlay. When configured, this parameter will stop the update playbook from executing the `set_openstack_containers` role and the deployment playbook from executing the `update_container` role. The assumption is that OLM will be used to update any necessary operators. New test cases have been added using Molecule for different OpenStack operator versions: v1.0.3, v1.0.6, and v1.0.7. Note that v1.0.7 is designed to support all future deployments where only the openstack-operator subscription is needed. To assist in testing and verification within a live environment, tasks for setting up and tearing down OpenShift CRC are provided. Depends-On: openstack-k8s-operators/architecture#537 Resolves-Part-Of: [OSPRH-15056](https://issues.redhat.com//browse/OSPRH-15056)
d794684
to
b0c5d22
Compare
A new parameter, `cifmw_ci_gen_kustomize_values_deployment_version`, has been introduced for overriding OLM startingCSV values in kustomize. This also ensures the appropriate architecture directory is utilized and all necessary subscriptions are deployed based on the installed version. This eventually leverages the overlay `kustomize` feature, hence the new `olm_subscriptions_overlay.yml` that helps set the right overlay. When configured, this parameter will stop the update playbook from executing the `set_openstack_containers` role and the deployment playbook from executing the `update_container` role. The assumption is that OLM will be used to update any necessary operators. Depends-On: openstack-k8s-operators/architecture#537 Resolves-Part-Of: [OSPRH-15056](https://issues.redhat.com//browse/OSPRH-15056)
A new parameter, `cifmw_ci_gen_kustomize_values_deployment_version`, has been introduced for overriding OLM startingCSV values in kustomize. This also ensures the appropriate architecture directory is utilized and all necessary subscriptions are deployed based on the installed version. This eventually leverages the overlay `kustomize` feature, hence the new `olm_subscriptions_overlay.yml` that helps set the right overlay. When configured, this parameter will stop the update playbook from executing the `set_openstack_containers` role and the deployment playbook from executing the `update_container` role. The assumption is that OLM will be used to update any necessary operators. Depends-On: openstack-k8s-operators/architecture#537 Resolves-Part-Of: [OSPRH-15056](https://issues.redhat.com//browse/OSPRH-15056)
Ability to install a specific version of the operator(s) when multiple versions are available in the OLM catalog. Added new kustomization files and YAML configurations for OpenStack operator subscriptions using OLM. This includes catalog sources, namespaces, and operator groups for openstack-operators, as well as subscription definitions for the OpenStack components when the version is below v1.0.7. Kustomization facilitates version-specific configurations starting with v1.0.3 and v1.0.6, incorporating modifications like the elimination of the AnsibleEE operator in subsequent versions. From version 1.0.7 onwards, only the OpenStack operator is retained. For each overlay we define the same set of ConfigMap that reach a set of relevant parameter in the subscriptions and catalog source definitions. An unexpected mechanism here is that we override the `common/olm-subscriptions/kustomization.yaml` file from ci-framework for version `v1.0.3` and `v1.0.6`. This enables the dynamic selection of the right overlay. For version `v1.0.7` and beyond we used the default overlay and we don't need to overwrite the `kustomization` file. The problems that we cannot solve with just parameters are: - `v1.0.3` and `v1.0.6` have a different set of subscriptions to include - `startingCSV` parameter is "dynamic" as it's composed of the `spec.name`.`version`, not just `version`. Thus we cannot encode in a kustomize parameter without create our own transformer. As transformwer are not deployed here, it would be too much work to boostrap it. All this disapear starting with `v1.0.7` where we have only one subscription to set.
A new parameter, `cifmw_ci_gen_kustomize_values_deployment_version`, has been introduced for overriding OLM startingCSV values in kustomize. This also ensures the appropriate architecture directory is utilized and all necessary subscriptions are deployed based on the installed version. This eventually leverages the overlay `kustomize` feature, hence the new `olm_subscriptions_overlay.yml` that helps set the right overlay. When configured, this parameter will stop the update playbook from executing the `set_openstack_containers` role and the deployment playbook from executing the `update_container` role. The assumption is that OLM will be used to update any necessary operators. Depends-On: openstack-k8s-operators/architecture#537 Resolves-Part-Of: [OSPRH-15056](https://issues.redhat.com//browse/OSPRH-15056)
A new parameter, `cifmw_ci_gen_kustomize_values_deployment_version`, has been introduced for overriding OLM startingCSV values in kustomize. This also ensures the appropriate architecture directory is utilized and all necessary subscriptions are deployed based on the installed version. This eventually leverages the overlay `kustomize` feature, hence the new `olm_subscriptions_overlay.yml` that helps set the right overlay. When configured, this parameter will stop the update playbook from executing the `set_openstack_containers` role and the deployment playbook from executing the `update_container` role. The assumption is that OLM will be used to update any necessary operators. Depends-On: openstack-k8s-operators/architecture#537 Resolves-Part-Of: [OSPRH-15056](https://issues.redhat.com//browse/OSPRH-15056)
A new parameter, `cifmw_ci_gen_kustomize_values_deployment_version`, has been introduced for overriding OLM startingCSV values in kustomize. This also ensures the appropriate architecture directory is utilized and all necessary subscriptions are deployed based on the installed version. This eventually leverages the overlay `kustomize` feature, hence the new `olm_subscriptions_overlay.yml` that helps set the right overlay. When configured, this parameter will stop the update playbook from executing the `set_openstack_containers` role and the deployment playbook from executing the `update_container` role. The assumption is that OLM will be used to update any necessary operators. Depends-On: openstack-k8s-operators/architecture#537 Resolves-Part-Of: [OSPRH-15056](https://issues.redhat.com//browse/OSPRH-15056)
A new parameter, `cifmw_ci_gen_kustomize_values_deployment_version`, has been introduced for overriding OLM startingCSV values in kustomize. This also ensures the appropriate architecture directory is utilized and all necessary subscriptions are deployed based on the installed version. This eventually leverages the overlay `kustomize` feature, hence the new `olm_subscriptions_overlay.yml` that helps set the right overlay. When configured, this parameter will stop the update playbook from executing the `set_openstack_containers` role and the deployment playbook from executing the `update_container` role. The assumption is that OLM will be used to update any necessary operators. Depends-On: openstack-k8s-operators/architecture#537 Resolves-Part-Of: [OSPRH-15056](https://issues.redhat.com//browse/OSPRH-15056)
A new parameter, `cifmw_ci_gen_kustomize_values_deployment_version`, has been introduced for overriding OLM startingCSV values in kustomize. This also ensures the appropriate architecture directory is utilized and all necessary subscriptions are deployed based on the installed version. This eventually leverages the overlay `kustomize` feature, hence the new `olm_subscriptions_overlay.yml` that helps set the right overlay. When configured, this parameter will stop the update playbook from executing the `set_openstack_containers` role and the deployment playbook from executing the `update_container` role. The assumption is that OLM will be used to update any necessary operators. Depends-On: openstack-k8s-operators/architecture#537 Resolves-Part-Of: [OSPRH-15056](https://issues.redhat.com//browse/OSPRH-15056)
A new parameter, `cifmw_ci_gen_kustomize_values_deployment_version`, has been introduced for overriding OLM startingCSV values in kustomize. This also ensures the appropriate architecture directory is utilized and all necessary subscriptions are deployed based on the installed version. This eventually leverages the overlay `kustomize` feature, hence the new `olm_subscriptions_overlay.yml` that helps set the right overlay. When configured, this parameter will stop the update playbook from executing the `set_openstack_containers` role and the deployment playbook from executing the `update_container` role. The assumption is that OLM will be used to update any necessary operators. Depends-On: openstack-k8s-operators/architecture#537 Resolves-Part-Of: [OSPRH-15056](https://issues.redhat.com//browse/OSPRH-15056)
A new parameter, `cifmw_ci_gen_kustomize_values_deployment_version`, has been introduced for overriding OLM startingCSV values in kustomize. This also ensures the appropriate architecture directory is utilized and all necessary subscriptions are deployed based on the installed version. This eventually leverages the overlay `kustomize` feature, hence the new `olm_subscriptions_overlay.yml` that helps set the right overlay. When configured, this parameter will stop the update playbook from executing the `set_openstack_containers` role and the deployment playbook from executing the `update_container` role. The assumption is that OLM will be used to update any necessary operators. Depends-On: openstack-k8s-operators/architecture#537 Resolves-Part-Of: [OSPRH-15056](https://issues.redhat.com//browse/OSPRH-15056)
@sathlan invited me and others to a meeting in which he explained his reasoning for creating this PR this way. While it is somewhat regrettable to have to create something so specific and verbose, I agree with him that Kustomize constricts our options here. If this approach works for now, I am good with it. It does not impact the existing OLM deployment approach used by the VAs and DTs. @fultonj What do you think? |
@abays I agree with you. I think we can merge. |
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.
/approve
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: fultonj, sathlan 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 |
3b90625
into
openstack-k8s-operators:main
A new parameter, `cifmw_ci_gen_kustomize_values_deployment_version`, has been introduced for overriding OLM startingCSV values in kustomize. This also ensures the appropriate architecture directory is utilized and all necessary subscriptions are deployed based on the installed version. This eventually leverages the overlay `kustomize` feature, hence the new `olm_subscriptions_overlay.yml` that helps set the right overlay. When configured, this parameter will stop the update playbook from executing the `set_openstack_containers` role and the deployment playbook from executing the `update_container` role. The assumption is that OLM will be used to update any necessary operators. Depends-On: openstack-k8s-operators/architecture#537 Resolves-Part-Of: [OSPRH-15056](https://issues.redhat.com//browse/OSPRH-15056)
A new parameter, `cifmw_ci_gen_kustomize_values_deployment_version`, has been introduced for overriding OLM startingCSV values in kustomize. This also ensures the appropriate architecture directory is utilized and all necessary subscriptions are deployed based on the installed version. This eventually leverages the overlay `kustomize` feature, hence the new `olm_subscriptions_overlay.yml` that helps set the right overlay. When configured, this parameter will stop the update playbook from executing the `set_openstack_containers` role and the deployment playbook from executing the `update_container` role. The assumption is that OLM will be used to update any necessary operators. Depends-On: openstack-k8s-operators/architecture#537 Resolves-Part-Of: [OSPRH-15056](https://issues.redhat.com//browse/OSPRH-15056)
/cherry-pick 18.0-fr2 |
@sathlan: new pull request created: #548 In response to this:
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-sigs/prow repository. |
A new parameter, `cifmw_ci_gen_kustomize_values_deployment_version`, has been introduced for overriding OLM startingCSV values in kustomize. This also ensures the appropriate architecture directory is utilized and all necessary subscriptions are deployed based on the installed version. This eventually leverages the overlay `kustomize` feature, hence the new `olm_subscriptions_overlay.yml` that helps set the right overlay. When configured, this parameter will stop the update playbook from executing the `set_openstack_containers` role and the deployment playbook from executing the `update_container` role. The assumption is that OLM will be used to update any necessary operators. Depends-On: openstack-k8s-operators/architecture#537 Resolves-Part-Of: [OSPRH-15056](https://issues.redhat.com//browse/OSPRH-15056)
…37-to-18.0-fr2 [18.0-fr2] Add OpenStack OLM subscription configurations This is an automated cherry-pick of #537 /assign sathlan Reviewed-by: Andrew Bays <[email protected]>
Ability to install a specific version of the operator(s) when multiple
versions are available in the OLM catalog.
Added new kustomization files and YAML configurations for OpenStack
operator subscriptions using OLM. This includes catalog sources,
namespaces, and operator groups for openstack-operators, as well as
subscription definitions for the OpenStack components when the version
is below v1.0.7.
Kustomization facilitates version-specific configurations starting
with v1.0.3 and v1.0.6, incorporating modifications like the
elimination of the AnsibleEE operator in subsequent versions. From
version 1.0.7 onwards, only the OpenStack operator is retained.
For each overlay we define the same set of ConfigMap that reach a set
of relevant parameter in the subscriptions and catalog source
definitions.
An unexpected mechanism here is that we override the
common/olm-subscriptions/kustomization.yaml
file from ci-frameworkfor version
v1.0.3
andv1.0.6
. This enables the dynamic selectionof the right overlay. For version
v1.0.7
and beyond we used thedefault overlay and we don't need to overwrite the
kustomization
file.
The problems that we cannot solve with just parameters are:
v1.0.3
andv1.0.6
have a different set of subscriptions toinclude
startingCSV
parameter is "dynamic" as it's composed of thespec.name
.version
, not justversion
. Thus we cannot encode in akustomize parameter without create our own transformer. As
transformwer are not deployed here, it would be too much work to
boostrap it.
All this disapear starting with
v1.0.7
where we have only onesubscription to set.
Resolves-Part-Of: OSPRH-15056