-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[openshift_setup] Add support for overriding dependent operators Cata…
…logSource This is needed to easily test pre-release versions of OCP. OpenStack depends on a few operators, these operators don't easily expose pre-release versions for installation. A hack like this patch allows a user to create a new CatalogSource for the current GA version of OCP and patch the dependent operators to install from it.
- Loading branch information
1 parent
b7e23c7
commit ec2eb3d
Showing
3 changed files
with
70 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
58 changes: 58 additions & 0 deletions
58
roles/openshift_setup/tasks/patch_dependent_operators_source.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
--- | ||
# HACK: (Lewis) This taskfile is used to test pre-release OCP versions | ||
# by intalling the previous OCP release's catalog source for the | ||
# dependent operators to use and overriding their subscriptions | ||
|
||
- name: Write catalog source | ||
kubernetes.core.k8s: | ||
kubeconfig: "{{ cifmw_openshift_kubeconfig }}" | ||
state: present | ||
definition: | ||
apiVersion: operators.coreos.com/v1alpha1 | ||
kind: CatalogSource | ||
metadata: | ||
name: "{{ cifmw_openshift_setup_operator_override_catalog_name }}" | ||
namespace: "{{ cifmw_openshift_setup_operator_override_catalog_namespace }}" | ||
spec: | ||
displayName: "{{ cifmw_openshift_setup_operator_override_catalog_name }}" | ||
image: "{{ cifmw_openshift_setup_operator_override_catalog_image }}" | ||
publisher: CI-Framework | ||
sourceType: grpc | ||
updateStrategy: | ||
registryPoll: | ||
interval: 10m | ||
|
||
- name: Patch metallb operator subscription to use custom CatalogSource | ||
kubernetes.core.k8s: | ||
state: patched | ||
kind: Subscription | ||
api_version: operators.coreos.com/v1alpha1 | ||
kubeconfig: "{{ cifmw_openshift_kubeconfig }}" | ||
name: metallb-operator-sub | ||
namespace: metallb-system | ||
definition: | ||
spec: | ||
source: "{{ cifmw_openshift_setup_operator_override_catalog_name }}" | ||
wait: true | ||
wait_timeout: 300 | ||
wait_condition: | ||
type: CatalogSourcesUnhealthy | ||
status: "False" | ||
|
||
- name: Patch nmstate operator subscription to use custom CatalogSource | ||
kubernetes.core.k8s: | ||
state: patched | ||
kind: Subscription | ||
api_version: operators.coreos.com/v1alpha1 | ||
kubeconfig: "{{ cifmw_openshift_kubeconfig }}" | ||
name: kubernetes-nmstate-operator | ||
namespace: openshift-nmstate | ||
definition: | ||
spec: | ||
source: "{{ cifmw_openshift_setup_operator_override_catalog_name }}" | ||
wait_sleep: 10 | ||
wait: true | ||
wait_timeout: 300 | ||
wait_condition: | ||
type: CatalogSourcesUnhealthy | ||
status: "False" |